polytypo 1.6.3 → 1.8.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 (78) hide show
  1. package/README.md +27 -0
  2. package/dist/{chunk-UOPLHOTJ.js → chunk-4RAZ2EDS.js} +4 -4
  3. package/dist/chunk-6UQAKZ7L.js +35 -0
  4. package/dist/chunk-6UQAKZ7L.js.map +1 -0
  5. package/dist/{chunk-UIUJSDBS.js → chunk-EH542ZE4.js} +2 -2
  6. package/dist/{chunk-VVBJZBXR.js → chunk-EQ2JTKYF.js} +1 -1
  7. package/dist/{chunk-VVBJZBXR.js.map → chunk-EQ2JTKYF.js.map} +1 -1
  8. package/dist/{chunk-OHMN6WPZ.js → chunk-F6HVIPLF.js} +21 -8
  9. package/dist/{chunk-OHMN6WPZ.js.map → chunk-F6HVIPLF.js.map} +1 -1
  10. package/dist/{chunk-JT3VGUUU.cjs → chunk-GK5P55K5.cjs} +3 -3
  11. package/dist/{chunk-JT3VGUUU.cjs.map → chunk-GK5P55K5.cjs.map} +1 -1
  12. package/dist/{chunk-UB7HJ4MX.cjs → chunk-GUROIWJY.cjs} +1 -1
  13. package/dist/{chunk-UB7HJ4MX.cjs.map → chunk-GUROIWJY.cjs.map} +1 -1
  14. package/dist/{chunk-2XWZW3RU.cjs → chunk-KAJ3GVK2.cjs} +23 -27
  15. package/dist/chunk-KAJ3GVK2.cjs.map +1 -0
  16. package/dist/{chunk-4ELGGQ7B.js → chunk-KCKZHLI5.js} +23 -27
  17. package/dist/chunk-KCKZHLI5.js.map +1 -0
  18. package/dist/chunk-KFDDI4LH.cjs +35 -0
  19. package/dist/chunk-KFDDI4LH.cjs.map +1 -0
  20. package/dist/{chunk-BCU7YHWD.cjs → chunk-M3TVDUGX.cjs} +4 -4
  21. package/dist/{chunk-BCU7YHWD.cjs.map → chunk-M3TVDUGX.cjs.map} +1 -1
  22. package/dist/{chunk-RZYVLO3Z.js → chunk-PEBD5XTD.js} +2 -2
  23. package/dist/chunk-UJ3D4DYP.cjs +33 -0
  24. package/dist/{chunk-TV4AZVHZ.cjs.map → chunk-UJ3D4DYP.cjs.map} +1 -1
  25. package/dist/{chunk-7DKZNZUD.cjs → chunk-UWFI3XV7.cjs} +35 -22
  26. package/dist/chunk-UWFI3XV7.cjs.map +1 -0
  27. package/dist/chunk-VBHUVDW4.cjs +296 -0
  28. package/dist/chunk-VBHUVDW4.cjs.map +1 -0
  29. package/dist/{chunk-ODTH774G.js → chunk-XLTVLET5.js} +2 -2
  30. package/dist/chunk-YA64BEKC.cjs +31 -0
  31. package/dist/{chunk-GZSUAD6M.cjs.map → chunk-YA64BEKC.cjs.map} +1 -1
  32. package/dist/{chunk-27B32RJQ.js → chunk-YH77XVJB.js} +126 -17
  33. package/dist/chunk-YH77XVJB.js.map +1 -0
  34. package/dist/{errors-C1_sHGgx.d.ts → errors-DeHxbXRn.d.cts} +8 -0
  35. package/dist/{errors-C1_sHGgx.d.cts → errors-DeHxbXRn.d.ts} +8 -0
  36. package/dist/html.cjs +10 -10
  37. package/dist/html.cjs.map +1 -1
  38. package/dist/html.d.cts +3 -3
  39. package/dist/html.d.ts +3 -3
  40. package/dist/html.js +5 -5
  41. package/dist/html.js.map +1 -1
  42. package/dist/index.cjs +18 -17
  43. package/dist/index.cjs.map +1 -1
  44. package/dist/index.d.cts +2 -2
  45. package/dist/index.d.ts +2 -2
  46. package/dist/index.js +8 -7
  47. package/dist/index.js.map +1 -1
  48. package/dist/markdown.cjs +11 -10
  49. package/dist/markdown.cjs.map +1 -1
  50. package/dist/markdown.d.cts +2 -2
  51. package/dist/markdown.d.ts +2 -2
  52. package/dist/markdown.js +6 -5
  53. package/dist/markdown.js.map +1 -1
  54. package/dist/text.cjs +8 -8
  55. package/dist/text.cjs.map +1 -1
  56. package/dist/text.d.cts +3 -3
  57. package/dist/text.d.ts +3 -3
  58. package/dist/text.js +3 -3
  59. package/dist/text.js.map +1 -1
  60. package/dist/yaml.cjs +10 -9
  61. package/dist/yaml.cjs.map +1 -1
  62. package/dist/yaml.d.cts +3 -3
  63. package/dist/yaml.d.ts +3 -3
  64. package/dist/yaml.js +5 -4
  65. package/dist/yaml.js.map +1 -1
  66. package/package.json +1 -1
  67. package/dist/chunk-27B32RJQ.js.map +0 -1
  68. package/dist/chunk-2XWZW3RU.cjs.map +0 -1
  69. package/dist/chunk-4ELGGQ7B.js.map +0 -1
  70. package/dist/chunk-7DKZNZUD.cjs.map +0 -1
  71. package/dist/chunk-GZSUAD6M.cjs +0 -31
  72. package/dist/chunk-RNH6KTYZ.cjs +0 -187
  73. package/dist/chunk-RNH6KTYZ.cjs.map +0 -1
  74. package/dist/chunk-TV4AZVHZ.cjs +0 -33
  75. /package/dist/{chunk-UOPLHOTJ.js.map → chunk-4RAZ2EDS.js.map} +0 -0
  76. /package/dist/{chunk-UIUJSDBS.js.map → chunk-EH542ZE4.js.map} +0 -0
  77. /package/dist/{chunk-RZYVLO3Z.js.map → chunk-PEBD5XTD.js.map} +0 -0
  78. /package/dist/{chunk-ODTH774G.js.map → chunk-XLTVLET5.js.map} +0 -0
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/engine/pipeline.ts","../src/index.ts"],"sourcesContent":["import { PolytypoError } from \"../errors.js\";\nimport type { Mode, Options } from \"../types.js\";\nimport { analyzeHtmlPipeline, runHtmlPipeline } from \"./html-pipeline.js\";\nimport { analyzeMarkdownPipeline, runMarkdownPipeline } from \"./markdown-pipeline.js\";\nimport { analyzeTextPipeline, runTextPipeline } from \"./text-pipeline.js\";\nimport { analyzeYamlPipeline, runYamlPipeline } from \"./yaml-pipeline.js\";\nimport type { Change } from \"./origin.js\";\n\nexport { planRules } from \"./rule-runner.js\";\n\nfunction resolveMode(mode: Mode | undefined): Mode {\n if (mode === undefined || mode === \"text\") return \"text\";\n if (mode === \"html\" || mode === \"markdown\" || mode === \"yaml\") return mode;\n throw new PolytypoError(\n \"POLYTYPO_INVALID_MODE\",\n `Unknown mode \"${String(mode)}\". Expected \"text\", \"html\", \"markdown\" or \"yaml\".`,\n );\n}\n\n/**\n * The aggregate entry's dispatcher: every mode is reachable, so it is the only pipeline module\n * that imports all four mode-specific ones (and therefore the only one whose module graph\n * includes both `parse5` and the Micromark/MDX stack). `polytypo/text`, `polytypo/html` and\n * `polytypo/markdown` each call their own mode-specific pipeline directly and never import this\n * module (AUDIT_REMEDIATION_AND_RELEASE_PLAN.md 5.1).\n */\nexport function runPipeline(input: string, options: Options): string {\n // A plain-JS caller can omit the options object entirely. Reading through a null here would\n // raise a native TypeError, which is outside the error taxonomy; an absent `locale` is an\n // unknown locale and must say so with a code (locale-resolution.md 3.1).\n const given: Partial<Options> = options ?? {};\n const mode = resolveMode(given.mode);\n if (mode === \"text\") return runTextPipeline(input, given);\n if (mode === \"html\") return runHtmlPipeline(input, given);\n if (mode === \"yaml\") return runYamlPipeline(input, given);\n return runMarkdownPipeline(input, given);\n}\n\n/**\n * The dispatcher for `analyze` (analyze.md §1). Mode resolution, and therefore\n * POLYTYPO_INVALID_MODE, is shared with `runPipeline` rather than duplicated: A1 requires the\n * two entry points to accept and reject exactly the same arguments.\n */\nexport function runAnalyze(input: string, options: Options): Change[] {\n const given: Partial<Options> = options ?? {};\n const mode = resolveMode(given.mode);\n if (mode === \"text\") return analyzeTextPipeline(input, given);\n if (mode === \"html\") return analyzeHtmlPipeline(input, given);\n if (mode === \"yaml\") return analyzeYamlPipeline(input, given);\n return analyzeMarkdownPipeline(input, given);\n}\n","import { runAnalyze, runPipeline } from \"./engine/pipeline.js\";\nimport type { Change } from \"./engine/origin.js\";\nimport type { Options } from \"./types.js\";\n\nexport function transform(input: string, options: Options): string {\n return runPipeline(input, options);\n}\n\n/**\n * The same pipeline as `transform`, reporting what it would do instead of doing it\n * (spec/rules/analyze.md). Offsets are code-point offsets into `input` in every mode.\n *\n * What it guarantees: the list is empty exactly when `transform` would return the input\n * unchanged, every `ruleId` was enabled for the call, and every offset is inside the input.\n * What it does not: the list is a report, not a patch — two rules may touch the same original\n * range, so replaying it is not guaranteed to reproduce `transform`'s output. Call `transform`\n * for the text (analyze.md §4, §5).\n */\nexport function analyze(input: string, options: Options): Change[] {\n return runAnalyze(input, options);\n}\n\nexport { PolytypoError } from \"./errors.js\";\nexport type { PolytypoErrorCode } from \"./errors.js\";\nexport type { Change } from \"./engine/origin.js\";\nexport type {\n Dialect,\n Edit,\n LocaleData,\n LocaleSource,\n Mode,\n NarrowNbsp,\n Options,\n QuotePair,\n Rule,\n RuleContext,\n RuleId,\n} from \"./types.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAUA,SAAS,YAAY,MAA8B;AACjD,MAAI,SAAS,UAAa,SAAS,OAAQ,QAAO;AAClD,MAAI,SAAS,UAAU,SAAS,cAAc,SAAS,OAAQ,QAAO;AACtE,QAAM,IAAI;AAAA,IACR;AAAA,IACA,iBAAiB,OAAO,IAAI,CAAC;AAAA,EAC/B;AACF;AASO,SAAS,YAAY,OAAe,SAA0B;AAInE,QAAM,QAA0B,WAAW,CAAC;AAC5C,QAAM,OAAO,YAAY,MAAM,IAAI;AACnC,MAAI,SAAS,OAAQ,QAAO,gBAAgB,OAAO,KAAK;AACxD,MAAI,SAAS,OAAQ,QAAO,gBAAgB,OAAO,KAAK;AACxD,MAAI,SAAS,OAAQ,QAAO,gBAAgB,OAAO,KAAK;AACxD,SAAO,oBAAoB,OAAO,KAAK;AACzC;AAOO,SAAS,WAAW,OAAe,SAA4B;AACpE,QAAM,QAA0B,WAAW,CAAC;AAC5C,QAAM,OAAO,YAAY,MAAM,IAAI;AACnC,MAAI,SAAS,OAAQ,QAAO,oBAAoB,OAAO,KAAK;AAC5D,MAAI,SAAS,OAAQ,QAAO,oBAAoB,OAAO,KAAK;AAC5D,MAAI,SAAS,OAAQ,QAAO,oBAAoB,OAAO,KAAK;AAC5D,SAAO,wBAAwB,OAAO,KAAK;AAC7C;;;AC9CO,SAAS,UAAU,OAAe,SAA0B;AACjE,SAAO,YAAY,OAAO,OAAO;AACnC;AAYO,SAAS,QAAQ,OAAe,SAA4B;AACjE,SAAO,WAAW,OAAO,OAAO;AAClC;","names":[]}
1
+ {"version":3,"sources":["../src/engine/pipeline.ts","../src/index.ts"],"sourcesContent":["import { PolytypoError } from \"../errors.js\";\nimport type { Mode, Options } from \"../types.js\";\nimport { analyzeHtmlPipeline, runHtmlPipeline } from \"./html-pipeline.js\";\nimport { analyzeMarkdownPipeline, runMarkdownPipeline } from \"./markdown-pipeline.js\";\nimport { analyzeTextPipeline, runTextPipeline } from \"./text-pipeline.js\";\nimport { analyzeYamlPipeline, runYamlPipeline } from \"./yaml-pipeline.js\";\nimport type { Change } from \"./origin.js\";\n\nexport { planRules } from \"./rule-runner.js\";\n\nfunction resolveMode(mode: Mode | undefined): Mode {\n if (mode === undefined || mode === \"text\") return \"text\";\n if (mode === \"html\" || mode === \"markdown\" || mode === \"yaml\") return mode;\n throw new PolytypoError(\n \"POLYTYPO_INVALID_MODE\",\n `Unknown mode \"${String(mode)}\". Expected \"text\", \"html\", \"markdown\" or \"yaml\".`,\n );\n}\n\n/**\n * The aggregate entry's dispatcher: every mode is reachable, so it is the only pipeline module\n * that imports all four mode-specific ones (and therefore the only one whose module graph\n * includes both `parse5` and the Micromark/MDX stack). `polytypo/text`, `polytypo/html` and\n * `polytypo/markdown` each call their own mode-specific pipeline directly and never import this\n * module (AUDIT_REMEDIATION_AND_RELEASE_PLAN.md 5.1).\n */\nexport function runPipeline(input: string, options: Options): string {\n // A plain-JS caller can omit the options object entirely. Reading through a null here would\n // raise a native TypeError, which is outside the error taxonomy; an absent `locale` is an\n // unknown locale and must say so with a code (locale-resolution.md 3.1).\n const given: Partial<Options> = options ?? {};\n const mode = resolveMode(given.mode);\n if (mode === \"text\") return runTextPipeline(input, given);\n if (mode === \"html\") return runHtmlPipeline(input, given);\n if (mode === \"yaml\") return runYamlPipeline(input, given);\n return runMarkdownPipeline(input, given);\n}\n\n/**\n * The dispatcher for `analyze` (analyze.md §1). Mode resolution, and therefore\n * POLYTYPO_INVALID_MODE, is shared with `runPipeline` rather than duplicated: A1 requires the\n * two entry points to accept and reject exactly the same arguments.\n */\nexport function runAnalyze(input: string, options: Options): Change[] {\n const given: Partial<Options> = options ?? {};\n const mode = resolveMode(given.mode);\n if (mode === \"text\") return analyzeTextPipeline(input, given);\n if (mode === \"html\") return analyzeHtmlPipeline(input, given);\n if (mode === \"yaml\") return analyzeYamlPipeline(input, given);\n return analyzeMarkdownPipeline(input, given);\n}\n","import { runAnalyze, runPipeline } from \"./engine/pipeline.js\";\nimport type { Change } from \"./engine/origin.js\";\nimport type { Options } from \"./types.js\";\n\nexport function transform(input: string, options: Options): string {\n return runPipeline(input, options);\n}\n\n/**\n * The same pipeline as `transform`, reporting what it would do instead of doing it\n * (spec/rules/analyze.md). Offsets are code-point offsets into `input` in every mode.\n *\n * What it guarantees: the list is empty exactly when `transform` would return the input\n * unchanged, every `ruleId` was enabled for the call, and every offset is inside the input.\n * What it does not: the list is a report, not a patch — two rules may touch the same original\n * range, so replaying it is not guaranteed to reproduce `transform`'s output. Call `transform`\n * for the text (analyze.md §4, §5).\n */\nexport function analyze(input: string, options: Options): Change[] {\n return runAnalyze(input, options);\n}\n\nexport { PolytypoError } from \"./errors.js\";\nexport type { PolytypoErrorCode } from \"./errors.js\";\nexport type { Change } from \"./engine/origin.js\";\nexport type {\n Dialect,\n Edit,\n LocaleData,\n LocaleSource,\n Mode,\n NarrowNbsp,\n Options,\n QuotePair,\n Rule,\n RuleContext,\n RuleId,\n} from \"./types.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAUA,SAAS,YAAY,MAA8B;AACjD,MAAI,SAAS,UAAa,SAAS,OAAQ,QAAO;AAClD,MAAI,SAAS,UAAU,SAAS,cAAc,SAAS,OAAQ,QAAO;AACtE,QAAM,IAAI;AAAA,IACR;AAAA,IACA,iBAAiB,OAAO,IAAI,CAAC;AAAA,EAC/B;AACF;AASO,SAAS,YAAY,OAAe,SAA0B;AAInE,QAAM,QAA0B,WAAW,CAAC;AAC5C,QAAM,OAAO,YAAY,MAAM,IAAI;AACnC,MAAI,SAAS,OAAQ,QAAO,gBAAgB,OAAO,KAAK;AACxD,MAAI,SAAS,OAAQ,QAAO,gBAAgB,OAAO,KAAK;AACxD,MAAI,SAAS,OAAQ,QAAO,gBAAgB,OAAO,KAAK;AACxD,SAAO,oBAAoB,OAAO,KAAK;AACzC;AAOO,SAAS,WAAW,OAAe,SAA4B;AACpE,QAAM,QAA0B,WAAW,CAAC;AAC5C,QAAM,OAAO,YAAY,MAAM,IAAI;AACnC,MAAI,SAAS,OAAQ,QAAO,oBAAoB,OAAO,KAAK;AAC5D,MAAI,SAAS,OAAQ,QAAO,oBAAoB,OAAO,KAAK;AAC5D,MAAI,SAAS,OAAQ,QAAO,oBAAoB,OAAO,KAAK;AAC5D,SAAO,wBAAwB,OAAO,KAAK;AAC7C;;;AC9CO,SAAS,UAAU,OAAe,SAA0B;AACjE,SAAO,YAAY,OAAO,OAAO;AACnC;AAYO,SAAS,QAAQ,OAAe,SAA4B;AACjE,SAAO,WAAW,OAAO,OAAO;AAClC;","names":[]}
package/dist/markdown.cjs CHANGED
@@ -1,30 +1,31 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
3
 
4
- var _chunkRNH6KTYZcjs = require('./chunk-RNH6KTYZ.cjs');
5
- require('./chunk-BCU7YHWD.cjs');
6
- require('./chunk-7DKZNZUD.cjs');
4
+ var _chunkVBHUVDW4cjs = require('./chunk-VBHUVDW4.cjs');
5
+ require('./chunk-M3TVDUGX.cjs');
6
+ require('./chunk-KAJ3GVK2.cjs');
7
+ require('./chunk-UWFI3XV7.cjs');
7
8
 
8
9
 
9
- var _chunkJT3VGUUUcjs = require('./chunk-JT3VGUUU.cjs');
10
+ var _chunkGK5P55K5cjs = require('./chunk-GK5P55K5.cjs');
10
11
 
11
12
 
12
- var _chunkUB7HJ4MXcjs = require('./chunk-UB7HJ4MX.cjs');
13
+ var _chunkGUROIWJYcjs = require('./chunk-GUROIWJY.cjs');
13
14
 
14
15
  // src/index.markdown.ts
15
16
  function transform(input, options) {
16
17
  const given = _nullishCoalesce(options, () => ( {}));
17
- _chunkJT3VGUUUcjs.assertFixedMode.call(void 0, given.mode, "markdown", "polytypo/markdown");
18
- return _chunkRNH6KTYZcjs.runMarkdownPipeline.call(void 0, input, given);
18
+ _chunkGK5P55K5cjs.assertFixedMode.call(void 0, given.mode, "markdown", "polytypo/markdown");
19
+ return _chunkVBHUVDW4cjs.runMarkdownPipeline.call(void 0, input, given);
19
20
  }
20
21
  function analyze(input, options) {
21
22
  const given = _nullishCoalesce(options, () => ( {}));
22
- _chunkJT3VGUUUcjs.assertFixedMode.call(void 0, given.mode, "markdown", "polytypo/markdown");
23
- return _chunkRNH6KTYZcjs.analyzeMarkdownPipeline.call(void 0, input, given);
23
+ _chunkGK5P55K5cjs.assertFixedMode.call(void 0, given.mode, "markdown", "polytypo/markdown");
24
+ return _chunkVBHUVDW4cjs.analyzeMarkdownPipeline.call(void 0, input, given);
24
25
  }
25
26
 
26
27
 
27
28
 
28
29
 
29
- exports.PolytypoError = _chunkUB7HJ4MXcjs.PolytypoError; exports.analyze = analyze; exports.transform = transform;
30
+ exports.PolytypoError = _chunkGUROIWJYcjs.PolytypoError; exports.analyze = analyze; exports.transform = transform;
30
31
  //# sourceMappingURL=markdown.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/polytypo-js/polytypo-js/dist/markdown.cjs","../src/index.markdown.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACMO,SAAS,SAAA,CAAU,KAAA,EAAe,OAAA,EAAkC;AACzE,EAAA,MAAM,MAAA,mBAAS,OAAA,UAAW,CAAC,GAAA;AAC3B,EAAA,+CAAA,KAAgB,CAAM,IAAA,EAAM,UAAA,EAAY,mBAAmB,CAAA;AAC3D,EAAA,OAAO,mDAAA,KAAoB,EAAO,KAAK,CAAA;AACzC;AAOO,SAAS,OAAA,CAAQ,KAAA,EAAe,OAAA,EAAoC;AACzE,EAAA,MAAM,MAAA,mBAAS,OAAA,UAAW,CAAC,GAAA;AAC3B,EAAA,+CAAA,KAAgB,CAAM,IAAA,EAAM,UAAA,EAAY,mBAAmB,CAAA;AAC3D,EAAA,OAAO,uDAAA,KAAwB,EAAO,KAAK,CAAA;AAC7C;ADVA;AACE;AACA;AACA;AACF,kHAAC","file":"/home/runner/work/polytypo-js/polytypo-js/dist/markdown.cjs","sourcesContent":[null,"import { assertFixedMode } from \"./engine/assert-fixed-mode.js\";\nimport { analyzeMarkdownPipeline, runMarkdownPipeline } from \"./engine/markdown-pipeline.js\";\nimport type { Change } from \"./engine/origin.js\";\nimport type { Dialect, Options } from \"./types.js\";\n\n/**\n * `polytypo/markdown` — Markdown-only entry point. Its module graph includes the Micromark/MDX\n * stack and `parse5` (the latter via `./modes/markdown.js` importing `./modes/html.js` for\n * normative embedded-HTML handling, modes.md 3.7) — both are legitimately reachable here\n * (AUDIT_REMEDIATION_AND_RELEASE_PLAN.md 5.1). It imports `./engine/markdown-pipeline.js`\n * directly and never `./engine/pipeline.js`.\n *\n * `mode` is absent from `MarkdownOptions`, since this entry only ever runs `markdown` mode.\n * `dialect` keeps the aggregate entry's contract: required, no default (types.ts).\n */\nexport type MarkdownOptions = Omit<Options, \"mode\"> & {\n dialect: Dialect;\n};\n\nexport function transform(input: string, options: MarkdownOptions): string {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"markdown\", \"polytypo/markdown\");\n return runMarkdownPipeline(input, given);\n}\n\n/**\n * The same pipeline as this entry's `transform`, reporting instead of applying\n * (spec/rules/analyze.md). Offsets are code-point offsets into `input` — into the document,\n * not into a span (analyze.md §6).\n */\nexport function analyze(input: string, options: MarkdownOptions): Change[] {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"markdown\", \"polytypo/markdown\");\n return analyzeMarkdownPipeline(input, given);\n}\n\nexport { PolytypoError } from \"./errors.js\";\nexport type { PolytypoErrorCode } from \"./errors.js\";\nexport type {\n Dialect,\n LocaleData,\n LocaleSource,\n NarrowNbsp,\n QuotePair,\n Rule,\n RuleContext,\n RuleId,\n} from \"./types.js\";\n"]}
1
+ {"version":3,"sources":["/home/runner/work/polytypo-js/polytypo-js/dist/markdown.cjs","../src/index.markdown.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACKO,SAAS,SAAA,CAAU,KAAA,EAAe,OAAA,EAAkC;AACzE,EAAA,MAAM,MAAA,mBAAS,OAAA,UAAW,CAAC,GAAA;AAC3B,EAAA,+CAAA,KAAgB,CAAM,IAAA,EAAM,UAAA,EAAY,mBAAmB,CAAA;AAC3D,EAAA,OAAO,mDAAA,KAAoB,EAAO,KAAK,CAAA;AACzC;AAOO,SAAS,OAAA,CAAQ,KAAA,EAAe,OAAA,EAAoC;AACzE,EAAA,MAAM,MAAA,mBAAS,OAAA,UAAW,CAAC,GAAA;AAC3B,EAAA,+CAAA,KAAgB,CAAM,IAAA,EAAM,UAAA,EAAY,mBAAmB,CAAA;AAC3D,EAAA,OAAO,uDAAA,KAAwB,EAAO,KAAK,CAAA;AAC7C;ADTA;AACE;AACA;AACA;AACF,kHAAC","file":"/home/runner/work/polytypo-js/polytypo-js/dist/markdown.cjs","sourcesContent":[null,"import { assertFixedMode } from \"./engine/assert-fixed-mode.js\";\nimport { analyzeMarkdownPipeline, runMarkdownPipeline } from \"./engine/markdown-pipeline.js\";\nimport type { Change } from \"./engine/origin.js\";\nimport type { Dialect, Options } from \"./types.js\";\n\n/**\n * `polytypo/markdown` — Markdown-only entry point. Its module graph includes the Micromark/MDX\n * stack and `parse5` (the latter via `./modes/markdown.js` importing `./modes/html.js` for\n * normative embedded-HTML handling, modes.md 3.7) — both are legitimately reachable here\n * (AUDIT_REMEDIATION_AND_RELEASE_PLAN.md 5.1). It imports `./engine/markdown-pipeline.js`\n * directly and never `./engine/pipeline.js`.\n *\n * `mode` is absent from `MarkdownOptions`, since this entry only ever runs `markdown` mode.\n * `dialect` keeps the aggregate entry's contract: required, no default (types.ts).\n */\nexport type MarkdownOptions = Omit<Options, \"mode\"> & {\n dialect: Dialect;\n};\n\nexport function transform(input: string, options: MarkdownOptions): string {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"markdown\", \"polytypo/markdown\");\n return runMarkdownPipeline(input, given);\n}\n\n/**\n * The same pipeline as this entry's `transform`, reporting instead of applying\n * (spec/rules/analyze.md). Offsets are code-point offsets into `input` — into the document,\n * not into a span (analyze.md §6).\n */\nexport function analyze(input: string, options: MarkdownOptions): Change[] {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"markdown\", \"polytypo/markdown\");\n return analyzeMarkdownPipeline(input, given);\n}\n\nexport { PolytypoError } from \"./errors.js\";\nexport type { PolytypoErrorCode } from \"./errors.js\";\nexport type {\n Dialect,\n LocaleData,\n LocaleSource,\n NarrowNbsp,\n QuotePair,\n Rule,\n RuleContext,\n RuleId,\n} from \"./types.js\";\n"]}
@@ -1,5 +1,5 @@
1
- import { O as Options, D as Dialect, C as Change } from './errors-C1_sHGgx.cjs';
2
- export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-C1_sHGgx.cjs';
1
+ import { O as Options, D as Dialect, C as Change } from './errors-DeHxbXRn.cjs';
2
+ export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-DeHxbXRn.cjs';
3
3
 
4
4
  /**
5
5
  * `polytypo/markdown` — Markdown-only entry point. Its module graph includes the Micromark/MDX
@@ -1,5 +1,5 @@
1
- import { O as Options, D as Dialect, C as Change } from './errors-C1_sHGgx.js';
2
- export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-C1_sHGgx.js';
1
+ import { O as Options, D as Dialect, C as Change } from './errors-DeHxbXRn.js';
2
+ export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-DeHxbXRn.js';
3
3
 
4
4
  /**
5
5
  * `polytypo/markdown` — Markdown-only entry point. Its module graph includes the Micromark/MDX
package/dist/markdown.js CHANGED
@@ -1,15 +1,16 @@
1
1
  import {
2
2
  analyzeMarkdownPipeline,
3
3
  runMarkdownPipeline
4
- } from "./chunk-27B32RJQ.js";
5
- import "./chunk-RZYVLO3Z.js";
6
- import "./chunk-OHMN6WPZ.js";
4
+ } from "./chunk-YH77XVJB.js";
5
+ import "./chunk-PEBD5XTD.js";
6
+ import "./chunk-KCKZHLI5.js";
7
+ import "./chunk-F6HVIPLF.js";
7
8
  import {
8
9
  assertFixedMode
9
- } from "./chunk-UIUJSDBS.js";
10
+ } from "./chunk-EH542ZE4.js";
10
11
  import {
11
12
  PolytypoError
12
- } from "./chunk-VVBJZBXR.js";
13
+ } from "./chunk-EQ2JTKYF.js";
13
14
 
14
15
  // src/index.markdown.ts
15
16
  function transform(input, options) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.markdown.ts"],"sourcesContent":["import { assertFixedMode } from \"./engine/assert-fixed-mode.js\";\nimport { analyzeMarkdownPipeline, runMarkdownPipeline } from \"./engine/markdown-pipeline.js\";\nimport type { Change } from \"./engine/origin.js\";\nimport type { Dialect, Options } from \"./types.js\";\n\n/**\n * `polytypo/markdown` — Markdown-only entry point. Its module graph includes the Micromark/MDX\n * stack and `parse5` (the latter via `./modes/markdown.js` importing `./modes/html.js` for\n * normative embedded-HTML handling, modes.md 3.7) — both are legitimately reachable here\n * (AUDIT_REMEDIATION_AND_RELEASE_PLAN.md 5.1). It imports `./engine/markdown-pipeline.js`\n * directly and never `./engine/pipeline.js`.\n *\n * `mode` is absent from `MarkdownOptions`, since this entry only ever runs `markdown` mode.\n * `dialect` keeps the aggregate entry's contract: required, no default (types.ts).\n */\nexport type MarkdownOptions = Omit<Options, \"mode\"> & {\n dialect: Dialect;\n};\n\nexport function transform(input: string, options: MarkdownOptions): string {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"markdown\", \"polytypo/markdown\");\n return runMarkdownPipeline(input, given);\n}\n\n/**\n * The same pipeline as this entry's `transform`, reporting instead of applying\n * (spec/rules/analyze.md). Offsets are code-point offsets into `input` — into the document,\n * not into a span (analyze.md §6).\n */\nexport function analyze(input: string, options: MarkdownOptions): Change[] {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"markdown\", \"polytypo/markdown\");\n return analyzeMarkdownPipeline(input, given);\n}\n\nexport { PolytypoError } from \"./errors.js\";\nexport type { PolytypoErrorCode } from \"./errors.js\";\nexport type {\n Dialect,\n LocaleData,\n LocaleSource,\n NarrowNbsp,\n QuotePair,\n Rule,\n RuleContext,\n RuleId,\n} from \"./types.js\";\n"],"mappings":";;;;;;;;;;;;;;AAmBO,SAAS,UAAU,OAAe,SAAkC;AACzE,QAAM,QAAS,WAAW,CAAC;AAC3B,kBAAgB,MAAM,MAAM,YAAY,mBAAmB;AAC3D,SAAO,oBAAoB,OAAO,KAAK;AACzC;AAOO,SAAS,QAAQ,OAAe,SAAoC;AACzE,QAAM,QAAS,WAAW,CAAC;AAC3B,kBAAgB,MAAM,MAAM,YAAY,mBAAmB;AAC3D,SAAO,wBAAwB,OAAO,KAAK;AAC7C;","names":[]}
1
+ {"version":3,"sources":["../src/index.markdown.ts"],"sourcesContent":["import { assertFixedMode } from \"./engine/assert-fixed-mode.js\";\nimport { analyzeMarkdownPipeline, runMarkdownPipeline } from \"./engine/markdown-pipeline.js\";\nimport type { Change } from \"./engine/origin.js\";\nimport type { Dialect, Options } from \"./types.js\";\n\n/**\n * `polytypo/markdown` — Markdown-only entry point. Its module graph includes the Micromark/MDX\n * stack and `parse5` (the latter via `./modes/markdown.js` importing `./modes/html.js` for\n * normative embedded-HTML handling, modes.md 3.7) — both are legitimately reachable here\n * (AUDIT_REMEDIATION_AND_RELEASE_PLAN.md 5.1). It imports `./engine/markdown-pipeline.js`\n * directly and never `./engine/pipeline.js`.\n *\n * `mode` is absent from `MarkdownOptions`, since this entry only ever runs `markdown` mode.\n * `dialect` keeps the aggregate entry's contract: required, no default (types.ts).\n */\nexport type MarkdownOptions = Omit<Options, \"mode\"> & {\n dialect: Dialect;\n};\n\nexport function transform(input: string, options: MarkdownOptions): string {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"markdown\", \"polytypo/markdown\");\n return runMarkdownPipeline(input, given);\n}\n\n/**\n * The same pipeline as this entry's `transform`, reporting instead of applying\n * (spec/rules/analyze.md). Offsets are code-point offsets into `input` — into the document,\n * not into a span (analyze.md §6).\n */\nexport function analyze(input: string, options: MarkdownOptions): Change[] {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"markdown\", \"polytypo/markdown\");\n return analyzeMarkdownPipeline(input, given);\n}\n\nexport { PolytypoError } from \"./errors.js\";\nexport type { PolytypoErrorCode } from \"./errors.js\";\nexport type {\n Dialect,\n LocaleData,\n LocaleSource,\n NarrowNbsp,\n QuotePair,\n Rule,\n RuleContext,\n RuleId,\n} from \"./types.js\";\n"],"mappings":";;;;;;;;;;;;;;;AAmBO,SAAS,UAAU,OAAe,SAAkC;AACzE,QAAM,QAAS,WAAW,CAAC;AAC3B,kBAAgB,MAAM,MAAM,YAAY,mBAAmB;AAC3D,SAAO,oBAAoB,OAAO,KAAK;AACzC;AAOO,SAAS,QAAQ,OAAe,SAAoC;AACzE,QAAM,QAAS,WAAW,CAAC;AAC3B,kBAAgB,MAAM,MAAM,YAAY,mBAAmB;AAC3D,SAAO,wBAAwB,OAAO,KAAK;AAC7C;","names":[]}
package/dist/text.cjs CHANGED
@@ -1,28 +1,28 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
3
 
4
- var _chunkGZSUAD6Mcjs = require('./chunk-GZSUAD6M.cjs');
4
+ var _chunkYA64BEKCcjs = require('./chunk-YA64BEKC.cjs');
5
5
 
6
6
 
7
- var _chunkJT3VGUUUcjs = require('./chunk-JT3VGUUU.cjs');
7
+ var _chunkGK5P55K5cjs = require('./chunk-GK5P55K5.cjs');
8
8
 
9
9
 
10
- var _chunkUB7HJ4MXcjs = require('./chunk-UB7HJ4MX.cjs');
10
+ var _chunkGUROIWJYcjs = require('./chunk-GUROIWJY.cjs');
11
11
 
12
12
  // src/index.text.ts
13
13
  function transform(input, options) {
14
14
  const given = _nullishCoalesce(options, () => ( {}));
15
- _chunkJT3VGUUUcjs.assertFixedMode.call(void 0, given.mode, "text", "polytypo/text");
16
- return _chunkGZSUAD6Mcjs.runTextPipeline.call(void 0, input, given);
15
+ _chunkGK5P55K5cjs.assertFixedMode.call(void 0, given.mode, "text", "polytypo/text");
16
+ return _chunkYA64BEKCcjs.runTextPipeline.call(void 0, input, given);
17
17
  }
18
18
  function analyze(input, options) {
19
19
  const given = _nullishCoalesce(options, () => ( {}));
20
- _chunkJT3VGUUUcjs.assertFixedMode.call(void 0, given.mode, "text", "polytypo/text");
21
- return _chunkGZSUAD6Mcjs.analyzeTextPipeline.call(void 0, input, given);
20
+ _chunkGK5P55K5cjs.assertFixedMode.call(void 0, given.mode, "text", "polytypo/text");
21
+ return _chunkYA64BEKCcjs.analyzeTextPipeline.call(void 0, input, given);
22
22
  }
23
23
 
24
24
 
25
25
 
26
26
 
27
- exports.PolytypoError = _chunkUB7HJ4MXcjs.PolytypoError; exports.analyze = analyze; exports.transform = transform;
27
+ exports.PolytypoError = _chunkGUROIWJYcjs.PolytypoError; exports.analyze = analyze; exports.transform = transform;
28
28
  //# sourceMappingURL=text.cjs.map
package/dist/text.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/polytypo-js/polytypo-js/dist/text.cjs","../src/index.text.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACMO,SAAS,SAAA,CAAU,KAAA,EAAe,OAAA,EAA8B;AACrE,EAAA,MAAM,MAAA,mBAAS,OAAA,UAAW,CAAC,GAAA;AAC3B,EAAA,+CAAA,KAAgB,CAAM,IAAA,EAAM,MAAA,EAAQ,eAAe,CAAA;AACnD,EAAA,OAAO,+CAAA,KAAgB,EAAO,KAAK,CAAA;AACrC;AAMO,SAAS,OAAA,CAAQ,KAAA,EAAe,OAAA,EAAgC;AACrE,EAAA,MAAM,MAAA,mBAAS,OAAA,UAAW,CAAC,GAAA;AAC3B,EAAA,+CAAA,KAAgB,CAAM,IAAA,EAAM,MAAA,EAAQ,eAAe,CAAA;AACnD,EAAA,OAAO,mDAAA,KAAoB,EAAO,KAAK,CAAA;AACzC;ADTA;AACE;AACA;AACA;AACF,kHAAC","file":"/home/runner/work/polytypo-js/polytypo-js/dist/text.cjs","sourcesContent":[null,"import { assertFixedMode } from \"./engine/assert-fixed-mode.js\";\nimport { analyzeTextPipeline, runTextPipeline } from \"./engine/text-pipeline.js\";\nimport type { Change } from \"./engine/origin.js\";\nimport type { Options } from \"./types.js\";\n\n/**\n * `polytypo/text` — text-only entry point. Its module graph excludes `parse5` and the\n * Micromark/MDX stack entirely (AUDIT_REMEDIATION_AND_RELEASE_PLAN.md 5.1): it imports\n * `./engine/text-pipeline.js` directly and never `./engine/pipeline.js`, `./modes/html.js` or\n * `./modes/markdown.js`.\n *\n * `mode` is absent from `TextOptions`, since this entry only ever runs `text` mode. `dialect` is\n * likewise absent — it has no effect in `text` mode even in the aggregate entry (types.ts), so\n * there is nothing for it to conflict with here.\n */\nexport type TextOptions = Omit<Options, \"mode\" | \"dialect\">;\n\nexport function transform(input: string, options: TextOptions): string {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"text\", \"polytypo/text\");\n return runTextPipeline(input, given);\n}\n\n/**\n * The same pipeline as this entry's `transform`, reporting instead of applying\n * (spec/rules/analyze.md). Offsets are code-point offsets into `input`.\n */\nexport function analyze(input: string, options: TextOptions): Change[] {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"text\", \"polytypo/text\");\n return analyzeTextPipeline(input, given);\n}\n\nexport { PolytypoError } from \"./errors.js\";\nexport type { PolytypoErrorCode } from \"./errors.js\";\nexport type { Change } from \"./engine/origin.js\";\nexport type { NarrowNbsp } from \"./types.js\";\nexport type { LocaleData, LocaleSource, QuotePair, Rule, RuleContext, RuleId } from \"./types.js\";\n"]}
1
+ {"version":3,"sources":["/home/runner/work/polytypo-js/polytypo-js/dist/text.cjs","../src/index.text.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACMO,SAAS,SAAA,CAAU,KAAA,EAAe,OAAA,EAA8B;AACrE,EAAA,MAAM,MAAA,mBAAS,OAAA,UAAW,CAAC,GAAA;AAC3B,EAAA,+CAAA,KAAgB,CAAM,IAAA,EAAM,MAAA,EAAQ,eAAe,CAAA;AACnD,EAAA,OAAO,+CAAA,KAAgB,EAAO,KAAK,CAAA;AACrC;AAMO,SAAS,OAAA,CAAQ,KAAA,EAAe,OAAA,EAAgC;AACrE,EAAA,MAAM,MAAA,mBAAS,OAAA,UAAW,CAAC,GAAA;AAC3B,EAAA,+CAAA,KAAgB,CAAM,IAAA,EAAM,MAAA,EAAQ,eAAe,CAAA;AACnD,EAAA,OAAO,mDAAA,KAAoB,EAAO,KAAK,CAAA;AACzC;ADTA;AACE;AACA;AACA;AACF,kHAAC","file":"/home/runner/work/polytypo-js/polytypo-js/dist/text.cjs","sourcesContent":[null,"import { assertFixedMode } from \"./engine/assert-fixed-mode.js\";\nimport { analyzeTextPipeline, runTextPipeline } from \"./engine/text-pipeline.js\";\nimport type { Change } from \"./engine/origin.js\";\nimport type { Options } from \"./types.js\";\n\n/**\n * `polytypo/text` — text-only entry point. Its module graph excludes `parse5` and the\n * Micromark/MDX stack entirely (AUDIT_REMEDIATION_AND_RELEASE_PLAN.md 5.1): it imports\n * `./engine/text-pipeline.js` directly and never `./engine/pipeline.js`, `./modes/html.js` or\n * `./modes/markdown.js`.\n *\n * `mode` is absent from `TextOptions`, since this entry only ever runs `text` mode. `dialect` is\n * likewise absent — it has no effect in `text` mode even in the aggregate entry (types.ts), so\n * there is nothing for it to conflict with here.\n */\nexport type TextOptions = Omit<Options, \"mode\" | \"dialect\" | \"frontmatterKeys\">;\n\nexport function transform(input: string, options: TextOptions): string {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"text\", \"polytypo/text\");\n return runTextPipeline(input, given);\n}\n\n/**\n * The same pipeline as this entry's `transform`, reporting instead of applying\n * (spec/rules/analyze.md). Offsets are code-point offsets into `input`.\n */\nexport function analyze(input: string, options: TextOptions): Change[] {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"text\", \"polytypo/text\");\n return analyzeTextPipeline(input, given);\n}\n\nexport { PolytypoError } from \"./errors.js\";\nexport type { PolytypoErrorCode } from \"./errors.js\";\nexport type { Change } from \"./engine/origin.js\";\nexport type { NarrowNbsp } from \"./types.js\";\nexport type { LocaleData, LocaleSource, QuotePair, Rule, RuleContext, RuleId } from \"./types.js\";\n"]}
package/dist/text.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { O as Options, C as Change } from './errors-C1_sHGgx.cjs';
2
- export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-C1_sHGgx.cjs';
1
+ import { O as Options, C as Change } from './errors-DeHxbXRn.cjs';
2
+ export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-DeHxbXRn.cjs';
3
3
 
4
4
  /**
5
5
  * `polytypo/text` — text-only entry point. Its module graph excludes `parse5` and the
@@ -11,7 +11,7 @@ export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError
11
11
  * likewise absent — it has no effect in `text` mode even in the aggregate entry (types.ts), so
12
12
  * there is nothing for it to conflict with here.
13
13
  */
14
- type TextOptions = Omit<Options, "mode" | "dialect">;
14
+ type TextOptions = Omit<Options, "mode" | "dialect" | "frontmatterKeys">;
15
15
  declare function transform(input: string, options: TextOptions): string;
16
16
  /**
17
17
  * The same pipeline as this entry's `transform`, reporting instead of applying
package/dist/text.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { O as Options, C as Change } from './errors-C1_sHGgx.js';
2
- export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-C1_sHGgx.js';
1
+ import { O as Options, C as Change } from './errors-DeHxbXRn.js';
2
+ export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-DeHxbXRn.js';
3
3
 
4
4
  /**
5
5
  * `polytypo/text` — text-only entry point. Its module graph excludes `parse5` and the
@@ -11,7 +11,7 @@ export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError
11
11
  * likewise absent — it has no effect in `text` mode even in the aggregate entry (types.ts), so
12
12
  * there is nothing for it to conflict with here.
13
13
  */
14
- type TextOptions = Omit<Options, "mode" | "dialect">;
14
+ type TextOptions = Omit<Options, "mode" | "dialect" | "frontmatterKeys">;
15
15
  declare function transform(input: string, options: TextOptions): string;
16
16
  /**
17
17
  * The same pipeline as this entry's `transform`, reporting instead of applying
package/dist/text.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  analyzeTextPipeline,
3
3
  runTextPipeline
4
- } from "./chunk-ODTH774G.js";
4
+ } from "./chunk-XLTVLET5.js";
5
5
  import {
6
6
  assertFixedMode
7
- } from "./chunk-UIUJSDBS.js";
7
+ } from "./chunk-EH542ZE4.js";
8
8
  import {
9
9
  PolytypoError
10
- } from "./chunk-VVBJZBXR.js";
10
+ } from "./chunk-EQ2JTKYF.js";
11
11
 
12
12
  // src/index.text.ts
13
13
  function transform(input, options) {
package/dist/text.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.text.ts"],"sourcesContent":["import { assertFixedMode } from \"./engine/assert-fixed-mode.js\";\nimport { analyzeTextPipeline, runTextPipeline } from \"./engine/text-pipeline.js\";\nimport type { Change } from \"./engine/origin.js\";\nimport type { Options } from \"./types.js\";\n\n/**\n * `polytypo/text` — text-only entry point. Its module graph excludes `parse5` and the\n * Micromark/MDX stack entirely (AUDIT_REMEDIATION_AND_RELEASE_PLAN.md 5.1): it imports\n * `./engine/text-pipeline.js` directly and never `./engine/pipeline.js`, `./modes/html.js` or\n * `./modes/markdown.js`.\n *\n * `mode` is absent from `TextOptions`, since this entry only ever runs `text` mode. `dialect` is\n * likewise absent — it has no effect in `text` mode even in the aggregate entry (types.ts), so\n * there is nothing for it to conflict with here.\n */\nexport type TextOptions = Omit<Options, \"mode\" | \"dialect\">;\n\nexport function transform(input: string, options: TextOptions): string {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"text\", \"polytypo/text\");\n return runTextPipeline(input, given);\n}\n\n/**\n * The same pipeline as this entry's `transform`, reporting instead of applying\n * (spec/rules/analyze.md). Offsets are code-point offsets into `input`.\n */\nexport function analyze(input: string, options: TextOptions): Change[] {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"text\", \"polytypo/text\");\n return analyzeTextPipeline(input, given);\n}\n\nexport { PolytypoError } from \"./errors.js\";\nexport type { PolytypoErrorCode } from \"./errors.js\";\nexport type { Change } from \"./engine/origin.js\";\nexport type { NarrowNbsp } from \"./types.js\";\nexport type { LocaleData, LocaleSource, QuotePair, Rule, RuleContext, RuleId } from \"./types.js\";\n"],"mappings":";;;;;;;;;;;;AAiBO,SAAS,UAAU,OAAe,SAA8B;AACrE,QAAM,QAAS,WAAW,CAAC;AAC3B,kBAAgB,MAAM,MAAM,QAAQ,eAAe;AACnD,SAAO,gBAAgB,OAAO,KAAK;AACrC;AAMO,SAAS,QAAQ,OAAe,SAAgC;AACrE,QAAM,QAAS,WAAW,CAAC;AAC3B,kBAAgB,MAAM,MAAM,QAAQ,eAAe;AACnD,SAAO,oBAAoB,OAAO,KAAK;AACzC;","names":[]}
1
+ {"version":3,"sources":["../src/index.text.ts"],"sourcesContent":["import { assertFixedMode } from \"./engine/assert-fixed-mode.js\";\nimport { analyzeTextPipeline, runTextPipeline } from \"./engine/text-pipeline.js\";\nimport type { Change } from \"./engine/origin.js\";\nimport type { Options } from \"./types.js\";\n\n/**\n * `polytypo/text` — text-only entry point. Its module graph excludes `parse5` and the\n * Micromark/MDX stack entirely (AUDIT_REMEDIATION_AND_RELEASE_PLAN.md 5.1): it imports\n * `./engine/text-pipeline.js` directly and never `./engine/pipeline.js`, `./modes/html.js` or\n * `./modes/markdown.js`.\n *\n * `mode` is absent from `TextOptions`, since this entry only ever runs `text` mode. `dialect` is\n * likewise absent — it has no effect in `text` mode even in the aggregate entry (types.ts), so\n * there is nothing for it to conflict with here.\n */\nexport type TextOptions = Omit<Options, \"mode\" | \"dialect\" | \"frontmatterKeys\">;\n\nexport function transform(input: string, options: TextOptions): string {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"text\", \"polytypo/text\");\n return runTextPipeline(input, given);\n}\n\n/**\n * The same pipeline as this entry's `transform`, reporting instead of applying\n * (spec/rules/analyze.md). Offsets are code-point offsets into `input`.\n */\nexport function analyze(input: string, options: TextOptions): Change[] {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"text\", \"polytypo/text\");\n return analyzeTextPipeline(input, given);\n}\n\nexport { PolytypoError } from \"./errors.js\";\nexport type { PolytypoErrorCode } from \"./errors.js\";\nexport type { Change } from \"./engine/origin.js\";\nexport type { NarrowNbsp } from \"./types.js\";\nexport type { LocaleData, LocaleSource, QuotePair, Rule, RuleContext, RuleId } from \"./types.js\";\n"],"mappings":";;;;;;;;;;;;AAiBO,SAAS,UAAU,OAAe,SAA8B;AACrE,QAAM,QAAS,WAAW,CAAC;AAC3B,kBAAgB,MAAM,MAAM,QAAQ,eAAe;AACnD,SAAO,gBAAgB,OAAO,KAAK;AACrC;AAMO,SAAS,QAAQ,OAAe,SAAgC;AACrE,QAAM,QAAS,WAAW,CAAC;AAC3B,kBAAgB,MAAM,MAAM,QAAQ,eAAe;AACnD,SAAO,oBAAoB,OAAO,KAAK;AACzC;","names":[]}
package/dist/yaml.cjs CHANGED
@@ -1,29 +1,30 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
3
 
4
- var _chunk2XWZW3RUcjs = require('./chunk-2XWZW3RU.cjs');
5
- require('./chunk-7DKZNZUD.cjs');
4
+ var _chunkKFDDI4LHcjs = require('./chunk-KFDDI4LH.cjs');
5
+ require('./chunk-KAJ3GVK2.cjs');
6
+ require('./chunk-UWFI3XV7.cjs');
6
7
 
7
8
 
8
- var _chunkJT3VGUUUcjs = require('./chunk-JT3VGUUU.cjs');
9
+ var _chunkGK5P55K5cjs = require('./chunk-GK5P55K5.cjs');
9
10
 
10
11
 
11
- var _chunkUB7HJ4MXcjs = require('./chunk-UB7HJ4MX.cjs');
12
+ var _chunkGUROIWJYcjs = require('./chunk-GUROIWJY.cjs');
12
13
 
13
14
  // src/index.yaml.ts
14
15
  function transform(input, options) {
15
16
  const given = _nullishCoalesce(options, () => ( {}));
16
- _chunkJT3VGUUUcjs.assertFixedMode.call(void 0, given.mode, "yaml", "polytypo/yaml");
17
- return _chunk2XWZW3RUcjs.runYamlPipeline.call(void 0, input, given);
17
+ _chunkGK5P55K5cjs.assertFixedMode.call(void 0, given.mode, "yaml", "polytypo/yaml");
18
+ return _chunkKFDDI4LHcjs.runYamlPipeline.call(void 0, input, given);
18
19
  }
19
20
  function analyze(input, options) {
20
21
  const given = _nullishCoalesce(options, () => ( {}));
21
- _chunkJT3VGUUUcjs.assertFixedMode.call(void 0, given.mode, "yaml", "polytypo/yaml");
22
- return _chunk2XWZW3RUcjs.analyzeYamlPipeline.call(void 0, input, given);
22
+ _chunkGK5P55K5cjs.assertFixedMode.call(void 0, given.mode, "yaml", "polytypo/yaml");
23
+ return _chunkKFDDI4LHcjs.analyzeYamlPipeline.call(void 0, input, given);
23
24
  }
24
25
 
25
26
 
26
27
 
27
28
 
28
- exports.PolytypoError = _chunkUB7HJ4MXcjs.PolytypoError; exports.analyze = analyze; exports.transform = transform;
29
+ exports.PolytypoError = _chunkGUROIWJYcjs.PolytypoError; exports.analyze = analyze; exports.transform = transform;
29
30
  //# sourceMappingURL=yaml.cjs.map
package/dist/yaml.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/polytypo-js/polytypo-js/dist/yaml.cjs","../src/index.yaml.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACUO,SAAS,SAAA,CAAU,KAAA,EAAe,OAAA,EAA8B;AACrE,EAAA,MAAM,MAAA,mBAAS,OAAA,UAAW,CAAC,GAAA;AAC3B,EAAA,+CAAA,KAAgB,CAAM,IAAA,EAAM,MAAA,EAAQ,eAAe,CAAA;AACnD,EAAA,OAAO,+CAAA,KAAgB,EAAO,KAAK,CAAA;AACrC;AAMO,SAAS,OAAA,CAAQ,KAAA,EAAe,OAAA,EAAgC;AACrE,EAAA,MAAM,MAAA,mBAAS,OAAA,UAAW,CAAC,GAAA;AAC3B,EAAA,+CAAA,KAAgB,CAAM,IAAA,EAAM,MAAA,EAAQ,eAAe,CAAA;AACnD,EAAA,OAAO,mDAAA,KAAoB,EAAO,KAAK,CAAA;AACzC;ADbA;AACE;AACA;AACA;AACF,kHAAC","file":"/home/runner/work/polytypo-js/polytypo-js/dist/yaml.cjs","sourcesContent":[null,"import { assertFixedMode } from \"./engine/assert-fixed-mode.js\";\nimport { analyzeYamlPipeline, runYamlPipeline } from \"./engine/yaml-pipeline.js\";\nimport type { Change } from \"./engine/origin.js\";\nimport type { Options } from \"./types.js\";\n\n/**\n * `polytypo/yaml` — YAML-only entry point, and the lightest of the four: `yaml` mode uses no\n * parser at all (spec/rules/modes.md 3.8.1), so this entry's module graph excludes `parse5` and\n * the Micromark/MDX stack for the same reason `polytypo/text` does — it has nothing to import.\n * `scripts/check-entry-reach.mjs` asserts that against the real module graph, which is what\n * turns \"parser-free\" from a claim in the spec into a fact this package can be held to.\n *\n * `mode` is absent from `YamlOptions`, since this entry only ever runs `yaml` mode. `dialect` is\n * likewise absent — it belongs to `markdown` alone (types.ts). `keys` goes the other way: it is\n * optional on the aggregate `Options` because the other three modes ignore it, and **required**\n * here, where the mode is fixed and the option always applies.\n */\nexport type YamlOptions = Omit<Options, \"mode\" | \"dialect\" | \"keys\"> & {\n /** Required here, with no default — modes.md §3.8.2. An empty list processes nothing. */\n readonly keys: readonly string[];\n};\n\nexport function transform(input: string, options: YamlOptions): string {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"yaml\", \"polytypo/yaml\");\n return runYamlPipeline(input, given);\n}\n\n/**\n * The same pipeline as this entry's `transform`, reporting instead of applying\n * (spec/rules/analyze.md). Offsets are code-point offsets into `input`, not into a span.\n */\nexport function analyze(input: string, options: YamlOptions): Change[] {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"yaml\", \"polytypo/yaml\");\n return analyzeYamlPipeline(input, given);\n}\n\nexport { PolytypoError } from \"./errors.js\";\nexport type { PolytypoErrorCode } from \"./errors.js\";\nexport type { Change } from \"./engine/origin.js\";\nexport type { NarrowNbsp } from \"./types.js\";\nexport type { LocaleData, LocaleSource, QuotePair, Rule, RuleContext, RuleId } from \"./types.js\";\n"]}
1
+ {"version":3,"sources":["/home/runner/work/polytypo-js/polytypo-js/dist/yaml.cjs","../src/index.yaml.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACSO,SAAS,SAAA,CAAU,KAAA,EAAe,OAAA,EAA8B;AACrE,EAAA,MAAM,MAAA,mBAAS,OAAA,UAAW,CAAC,GAAA;AAC3B,EAAA,+CAAA,KAAgB,CAAM,IAAA,EAAM,MAAA,EAAQ,eAAe,CAAA;AACnD,EAAA,OAAO,+CAAA,KAAgB,EAAO,KAAK,CAAA;AACrC;AAMO,SAAS,OAAA,CAAQ,KAAA,EAAe,OAAA,EAAgC;AACrE,EAAA,MAAM,MAAA,mBAAS,OAAA,UAAW,CAAC,GAAA;AAC3B,EAAA,+CAAA,KAAgB,CAAM,IAAA,EAAM,MAAA,EAAQ,eAAe,CAAA;AACnD,EAAA,OAAO,mDAAA,KAAoB,EAAO,KAAK,CAAA;AACzC;ADZA;AACE;AACA;AACA;AACF,kHAAC","file":"/home/runner/work/polytypo-js/polytypo-js/dist/yaml.cjs","sourcesContent":[null,"import { assertFixedMode } from \"./engine/assert-fixed-mode.js\";\nimport { analyzeYamlPipeline, runYamlPipeline } from \"./engine/yaml-pipeline.js\";\nimport type { Change } from \"./engine/origin.js\";\nimport type { Options } from \"./types.js\";\n\n/**\n * `polytypo/yaml` — YAML-only entry point, and the lightest of the four: `yaml` mode uses no\n * parser at all (spec/rules/modes.md 3.8.1), so this entry's module graph excludes `parse5` and\n * the Micromark/MDX stack for the same reason `polytypo/text` does — it has nothing to import.\n * `scripts/check-entry-reach.mjs` asserts that against the real module graph, which is what\n * turns \"parser-free\" from a claim in the spec into a fact this package can be held to.\n *\n * `mode` is absent from `YamlOptions`, since this entry only ever runs `yaml` mode. `dialect` is\n * likewise absent — it belongs to `markdown` alone (types.ts). `keys` goes the other way: it is\n * optional on the aggregate `Options` because the other three modes ignore it, and **required**\n * here, where the mode is fixed and the option always applies.\n */\nexport type YamlOptions = Omit<Options, \"mode\" | \"dialect\" | \"keys\" | \"frontmatterKeys\"> & {\n /** Required here, with no default — modes.md §3.8.2. An empty list processes nothing. */\n readonly keys: readonly string[];\n};\n\nexport function transform(input: string, options: YamlOptions): string {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"yaml\", \"polytypo/yaml\");\n return runYamlPipeline(input, given);\n}\n\n/**\n * The same pipeline as this entry's `transform`, reporting instead of applying\n * (spec/rules/analyze.md). Offsets are code-point offsets into `input`, not into a span.\n */\nexport function analyze(input: string, options: YamlOptions): Change[] {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"yaml\", \"polytypo/yaml\");\n return analyzeYamlPipeline(input, given);\n}\n\nexport { PolytypoError } from \"./errors.js\";\nexport type { PolytypoErrorCode } from \"./errors.js\";\nexport type { Change } from \"./engine/origin.js\";\nexport type { NarrowNbsp } from \"./types.js\";\nexport type { LocaleData, LocaleSource, QuotePair, Rule, RuleContext, RuleId } from \"./types.js\";\n"]}
package/dist/yaml.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { O as Options, C as Change } from './errors-C1_sHGgx.cjs';
2
- export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-C1_sHGgx.cjs';
1
+ import { O as Options, C as Change } from './errors-DeHxbXRn.cjs';
2
+ export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-DeHxbXRn.cjs';
3
3
 
4
4
  /**
5
5
  * `polytypo/yaml` — YAML-only entry point, and the lightest of the four: `yaml` mode uses no
@@ -13,7 +13,7 @@ export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError
13
13
  * optional on the aggregate `Options` because the other three modes ignore it, and **required**
14
14
  * here, where the mode is fixed and the option always applies.
15
15
  */
16
- type YamlOptions = Omit<Options, "mode" | "dialect" | "keys"> & {
16
+ type YamlOptions = Omit<Options, "mode" | "dialect" | "keys" | "frontmatterKeys"> & {
17
17
  /** Required here, with no default — modes.md §3.8.2. An empty list processes nothing. */
18
18
  readonly keys: readonly string[];
19
19
  };
package/dist/yaml.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { O as Options, C as Change } from './errors-C1_sHGgx.js';
2
- export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-C1_sHGgx.js';
1
+ import { O as Options, C as Change } from './errors-DeHxbXRn.js';
2
+ export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-DeHxbXRn.js';
3
3
 
4
4
  /**
5
5
  * `polytypo/yaml` — YAML-only entry point, and the lightest of the four: `yaml` mode uses no
@@ -13,7 +13,7 @@ export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError
13
13
  * optional on the aggregate `Options` because the other three modes ignore it, and **required**
14
14
  * here, where the mode is fixed and the option always applies.
15
15
  */
16
- type YamlOptions = Omit<Options, "mode" | "dialect" | "keys"> & {
16
+ type YamlOptions = Omit<Options, "mode" | "dialect" | "keys" | "frontmatterKeys"> & {
17
17
  /** Required here, with no default — modes.md §3.8.2. An empty list processes nothing. */
18
18
  readonly keys: readonly string[];
19
19
  };
package/dist/yaml.js CHANGED
@@ -1,14 +1,15 @@
1
1
  import {
2
2
  analyzeYamlPipeline,
3
3
  runYamlPipeline
4
- } from "./chunk-4ELGGQ7B.js";
5
- import "./chunk-OHMN6WPZ.js";
4
+ } from "./chunk-6UQAKZ7L.js";
5
+ import "./chunk-KCKZHLI5.js";
6
+ import "./chunk-F6HVIPLF.js";
6
7
  import {
7
8
  assertFixedMode
8
- } from "./chunk-UIUJSDBS.js";
9
+ } from "./chunk-EH542ZE4.js";
9
10
  import {
10
11
  PolytypoError
11
- } from "./chunk-VVBJZBXR.js";
12
+ } from "./chunk-EQ2JTKYF.js";
12
13
 
13
14
  // src/index.yaml.ts
14
15
  function transform(input, options) {
package/dist/yaml.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.yaml.ts"],"sourcesContent":["import { assertFixedMode } from \"./engine/assert-fixed-mode.js\";\nimport { analyzeYamlPipeline, runYamlPipeline } from \"./engine/yaml-pipeline.js\";\nimport type { Change } from \"./engine/origin.js\";\nimport type { Options } from \"./types.js\";\n\n/**\n * `polytypo/yaml` — YAML-only entry point, and the lightest of the four: `yaml` mode uses no\n * parser at all (spec/rules/modes.md 3.8.1), so this entry's module graph excludes `parse5` and\n * the Micromark/MDX stack for the same reason `polytypo/text` does — it has nothing to import.\n * `scripts/check-entry-reach.mjs` asserts that against the real module graph, which is what\n * turns \"parser-free\" from a claim in the spec into a fact this package can be held to.\n *\n * `mode` is absent from `YamlOptions`, since this entry only ever runs `yaml` mode. `dialect` is\n * likewise absent — it belongs to `markdown` alone (types.ts). `keys` goes the other way: it is\n * optional on the aggregate `Options` because the other three modes ignore it, and **required**\n * here, where the mode is fixed and the option always applies.\n */\nexport type YamlOptions = Omit<Options, \"mode\" | \"dialect\" | \"keys\"> & {\n /** Required here, with no default — modes.md §3.8.2. An empty list processes nothing. */\n readonly keys: readonly string[];\n};\n\nexport function transform(input: string, options: YamlOptions): string {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"yaml\", \"polytypo/yaml\");\n return runYamlPipeline(input, given);\n}\n\n/**\n * The same pipeline as this entry's `transform`, reporting instead of applying\n * (spec/rules/analyze.md). Offsets are code-point offsets into `input`, not into a span.\n */\nexport function analyze(input: string, options: YamlOptions): Change[] {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"yaml\", \"polytypo/yaml\");\n return analyzeYamlPipeline(input, given);\n}\n\nexport { PolytypoError } from \"./errors.js\";\nexport type { PolytypoErrorCode } from \"./errors.js\";\nexport type { Change } from \"./engine/origin.js\";\nexport type { NarrowNbsp } from \"./types.js\";\nexport type { LocaleData, LocaleSource, QuotePair, Rule, RuleContext, RuleId } from \"./types.js\";\n"],"mappings":";;;;;;;;;;;;;AAsBO,SAAS,UAAU,OAAe,SAA8B;AACrE,QAAM,QAAS,WAAW,CAAC;AAC3B,kBAAgB,MAAM,MAAM,QAAQ,eAAe;AACnD,SAAO,gBAAgB,OAAO,KAAK;AACrC;AAMO,SAAS,QAAQ,OAAe,SAAgC;AACrE,QAAM,QAAS,WAAW,CAAC;AAC3B,kBAAgB,MAAM,MAAM,QAAQ,eAAe;AACnD,SAAO,oBAAoB,OAAO,KAAK;AACzC;","names":[]}
1
+ {"version":3,"sources":["../src/index.yaml.ts"],"sourcesContent":["import { assertFixedMode } from \"./engine/assert-fixed-mode.js\";\nimport { analyzeYamlPipeline, runYamlPipeline } from \"./engine/yaml-pipeline.js\";\nimport type { Change } from \"./engine/origin.js\";\nimport type { Options } from \"./types.js\";\n\n/**\n * `polytypo/yaml` — YAML-only entry point, and the lightest of the four: `yaml` mode uses no\n * parser at all (spec/rules/modes.md 3.8.1), so this entry's module graph excludes `parse5` and\n * the Micromark/MDX stack for the same reason `polytypo/text` does — it has nothing to import.\n * `scripts/check-entry-reach.mjs` asserts that against the real module graph, which is what\n * turns \"parser-free\" from a claim in the spec into a fact this package can be held to.\n *\n * `mode` is absent from `YamlOptions`, since this entry only ever runs `yaml` mode. `dialect` is\n * likewise absent — it belongs to `markdown` alone (types.ts). `keys` goes the other way: it is\n * optional on the aggregate `Options` because the other three modes ignore it, and **required**\n * here, where the mode is fixed and the option always applies.\n */\nexport type YamlOptions = Omit<Options, \"mode\" | \"dialect\" | \"keys\" | \"frontmatterKeys\"> & {\n /** Required here, with no default — modes.md §3.8.2. An empty list processes nothing. */\n readonly keys: readonly string[];\n};\n\nexport function transform(input: string, options: YamlOptions): string {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"yaml\", \"polytypo/yaml\");\n return runYamlPipeline(input, given);\n}\n\n/**\n * The same pipeline as this entry's `transform`, reporting instead of applying\n * (spec/rules/analyze.md). Offsets are code-point offsets into `input`, not into a span.\n */\nexport function analyze(input: string, options: YamlOptions): Change[] {\n const given = (options ?? {}) as Partial<Options>;\n assertFixedMode(given.mode, \"yaml\", \"polytypo/yaml\");\n return analyzeYamlPipeline(input, given);\n}\n\nexport { PolytypoError } from \"./errors.js\";\nexport type { PolytypoErrorCode } from \"./errors.js\";\nexport type { Change } from \"./engine/origin.js\";\nexport type { NarrowNbsp } from \"./types.js\";\nexport type { LocaleData, LocaleSource, QuotePair, Rule, RuleContext, RuleId } from \"./types.js\";\n"],"mappings":";;;;;;;;;;;;;;AAsBO,SAAS,UAAU,OAAe,SAA8B;AACrE,QAAM,QAAS,WAAW,CAAC;AAC3B,kBAAgB,MAAM,MAAM,QAAQ,eAAe;AACnD,SAAO,gBAAgB,OAAO,KAAK;AACrC;AAMO,SAAS,QAAQ,OAAe,SAAgC;AACrE,QAAM,QAAS,WAAW,CAAC;AAC3B,kBAAgB,MAAM,MAAM,QAAQ,eAAe;AACnD,SAAO,oBAAoB,OAAO,KAAK;AACzC;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polytypo",
3
- "version": "1.6.3",
3
+ "version": "1.8.0",
4
4
  "description": "Normalize typography across languages: locale-correct quotes, dashes, ellipses and no-break spaces.",
5
5
  "keywords": [
6
6
  "typography",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/modes/markdown.ts","../src/engine/markdown-pipeline.ts"],"sourcesContent":["import { parse, postprocess, preprocess } from \"micromark\";\nimport { frontmatter } from \"micromark-extension-frontmatter\";\nimport { gfm } from \"micromark-extension-gfm\";\nimport { mdxjs } from \"micromark-extension-mdxjs\";\nimport type { Event, Extension } from \"micromark-util-types\";\nimport { PolytypoError } from \"../errors.js\";\nimport type { Dialect } from \"../types.js\";\nimport { htmlFragmentSpans, isSkippedElement } from \"./html.js\";\nimport { wrapParserErrors } from \"./parse-error.js\";\nimport type { Span } from \"./spans.js\";\n\n/**\n * spec/rules/modes.md 3.7. Each entry is skipped **whole**, including anything that looks\n * processable inside it. The complement is not enumerated: a span is emitted only for a\n * micromark `data` token, which is the tokenizer's own name for \"literal content\", so list\n * markers, emphasis delimiters, heading sequences, table padding, line endings, hard-break\n * spaces, character escapes and character references are outside every span by construction\n * rather than by a second list that could drift from the first.\n */\nconst SKIPPED_TOKEN_TYPES: ReadonlySet<string> = new Set([\n // fenced code blocks (including the info string and the fences) and indented code blocks\n \"codeFenced\",\n \"codeIndented\",\n // inline code spans, including the backticks\n \"codeText\",\n // autolinks `<https://…>`, and GFM's bare-URL form\n \"autolink\",\n \"literalAutolink\",\n // link and image destinations and titles; the definition line of a reference link. The link\n // *text* is a `labelText`, which is not skipped.\n \"resource\",\n \"reference\",\n \"definition\",\n // MDX: expression containers in full, and every JSX attribute — the whole tag is skipped, so\n // attributes never surface. JSX element *children* sit outside the tag tokens and are\n // processable.\n \"mdxFlowExpression\",\n \"mdxTextExpression\",\n \"mdxjsEsm\",\n // modes.md 3.7.3, and it matters: without it the second `---` of a YAML block reads as a setext\n // underline, `title: Une note` becomes a paragraph, and `fr` puts a narrow no-break space in\n // front of the colon of a machine-read metadata field. Covered by conformance fixtures\n // en-us-markdown-{commonmark,mdx}-frontmatter, fr-markdown-{commonmark,mdx}-frontmatter-nbsp,\n // en-us-markdown-commonmark-frontmatter-toml and -frontmatter-unterminated.\n \"frontmatter\",\n]);\n\n/** Token types whose enter/exit also maintains the skipped-element stack. */\nconst RAW_TAG_TOKEN_TYPES: ReadonlySet<string> = new Set([\n \"htmlText\",\n \"mdxJsxTextTag\",\n \"mdxJsxFlowTag\",\n]);\n\nconst LESS_THAN = 0x3c;\nconst GREATER_THAN = 0x3e;\nconst SLASH = 0x2f;\nconst EXCLAMATION = 0x21;\nconst QUESTION = 0x3f;\n\nfunction isAsciiLetter(unit: number): boolean {\n return (unit >= 0x61 && unit <= 0x7a) || (unit >= 0x41 && unit <= 0x5a);\n}\n\nfunction isTagNameUnit(unit: number): boolean {\n // Deliberately permissive: anything that is not a delimiter belongs to the name. Custom\n // elements (`my-callout`) and member expressions (`Foo.Bar`) must come out whole so that they\n // fail the skip-list membership test rather than being truncated into something that passes.\n return (\n unit !== GREATER_THAN &&\n unit !== SLASH &&\n unit !== 0x20 &&\n unit !== 0x09 &&\n unit !== 0x0a &&\n unit !== 0x0d\n );\n}\n\n/** ASCII-only, because HTML tag names are ASCII case-insensitive and `toLowerCase()` is not. */\nfunction asciiLower(value: string): string {\n let out = \"\";\n for (let i = 0; i < value.length; i += 1) {\n const unit = value.charCodeAt(i);\n out += unit >= 0x41 && unit <= 0x5a ? String.fromCharCode(unit + 0x20) : value[i];\n }\n return out;\n}\n\ninterface RawTag {\n readonly name: string;\n readonly closing: boolean;\n readonly selfClosing: boolean;\n}\n\nfunction readTag(tag: string): RawTag | null {\n if (tag.charCodeAt(0) !== LESS_THAN) return null;\n let i = 1;\n const closing = tag.charCodeAt(i) === SLASH;\n if (closing) i += 1;\n // Comments, declarations and processing instructions carry no element name.\n if (tag.charCodeAt(i) === EXCLAMATION || tag.charCodeAt(i) === QUESTION) return null;\n if (!isAsciiLetter(tag.charCodeAt(i))) return null;\n const nameAt = i;\n while (i < tag.length && isTagNameUnit(tag.charCodeAt(i))) i += 1;\n const selfClosing = tag.charCodeAt(tag.length - 2) === SLASH;\n return { name: tag.slice(nameAt, i), closing, selfClosing };\n}\n\n/**\n * modes.md 3.7: raw HTML is \"handed to the html skip list of 3.6\". Inline raw HTML reaches the\n * tokenizer as isolated tags with ordinary markdown content between them, so honouring the\n * subtree rule means tracking which skipped element is currently open. JSX names are compared\n * case-sensitively (`<Code>` is a component, `<code>` is an element); HTML names are not.\n */\nfunction updateElementStack(stack: string[], tag: string, caseSensitive: boolean): void {\n const parsed = readTag(tag);\n if (parsed === null) return;\n const name = caseSensitive ? parsed.name : asciiLower(parsed.name);\n if (parsed.closing) {\n if (stack[stack.length - 1] === name) stack.pop();\n return;\n }\n if (!parsed.selfClosing && isSkippedElement(name)) stack.push(name);\n}\n\nfunction tokenize(source: string, extensions: readonly Extension[]): Event[] {\n return postprocess(\n parse({ extensions: [...extensions] })\n .document()\n .write(preprocess()(source, null, true)),\n );\n}\n\n/**\n * modes.md 3.7.1. The dialect is the caller's, never detected: `\"commonmark\"` is CommonMark 0.31\n * plus GFM, `\"mdx\"` is the same minus indented code blocks and `<…>` autolinks, plus JSX and\n * `{…}` expression containers. Both enable frontmatter and GFM, which 3.7.2 makes normative —\n * §4's promise that table alignment rows survive is empty unless tables are recognised at all.\n */\nexport function resolveDialect(dialect: Dialect | undefined): Dialect {\n if (dialect === \"commonmark\" || dialect === \"mdx\") return dialect;\n if (dialect === undefined) {\n throw new PolytypoError(\n \"POLYTYPO_INVALID_DIALECT\",\n 'Mode \"markdown\" requires a dialect. Expected \"commonmark\" or \"mdx\"; there is no default.',\n );\n }\n throw new PolytypoError(\n \"POLYTYPO_INVALID_DIALECT\",\n `Unknown dialect \"${String(dialect)}\". Expected \"commonmark\" or \"mdx\".`,\n );\n}\n\n// modes.md 3.7.3 names both frontmatter delimiters, `---` (YAML) and `+++` (TOML), and skips\n// either whole. micromark's default matter is YAML alone, so both must be asked for by name: with\n// the default, a `+++` block parses as prose and the machine-read fields inside it get typeset.\nconst FRONTMATTER_MATTERS = [\"yaml\", \"toml\"] as const;\n\nfunction extensionsFor(dialect: Dialect): Extension[] {\n const fm = frontmatter([...FRONTMATTER_MATTERS]);\n return dialect === \"mdx\" ? [fm, gfm(), mdxjs()] : [fm, gfm()];\n}\n\nexport function markdownSpans(source: string, dialect: Dialect): Span[] {\n const events = wrapParserErrors(dialect, () => tokenize(source, extensionsFor(dialect)));\n const spans: Span[] = [];\n const elementStack: string[] = [];\n let skipDepth = 0;\n\n for (const [kind, token] of events) {\n const type = token.type;\n\n if (SKIPPED_TOKEN_TYPES.has(type)) {\n skipDepth += kind === \"enter\" ? 1 : -1;\n continue;\n }\n\n if (RAW_TAG_TOKEN_TYPES.has(type)) {\n if (kind === \"enter\") {\n updateElementStack(\n elementStack,\n source.slice(token.start.offset, token.end.offset),\n type !== \"htmlText\",\n );\n }\n skipDepth += kind === \"enter\" ? 1 : -1;\n continue;\n }\n\n // An HTML block is handed to the `html` extractor rather than skipped whole, so that the\n // prose inside `<div>…</div>` is typeset while the markup is not.\n if (type === \"htmlFlow\") {\n if (kind === \"enter\" && skipDepth === 0 && elementStack.length === 0) {\n for (const span of htmlFragmentSpans(\n source.slice(token.start.offset, token.end.offset),\n token.start.offset,\n )) {\n spans.push(span);\n }\n }\n skipDepth += kind === \"enter\" ? 1 : -1;\n continue;\n }\n\n if (kind === \"enter\" && type === \"data\" && skipDepth === 0 && elementStack.length === 0) {\n spans.push({ start: token.start.offset, end: token.end.offset });\n }\n }\n\n return spans;\n}\n","import { markdownSpans, resolveDialect } from \"../modes/markdown.js\";\nimport type { Options } from \"../types.js\";\nimport { getLocaleData } from \"./locale.js\";\nimport { resolveNarrowTarget } from \"./narrow-target.js\";\nimport { planRules } from \"./rule-runner.js\";\nimport { analyzeOverSpans, runOverSpans } from \"./span-runner.js\";\nimport type { Change } from \"./origin.js\";\n\n/**\n * `markdown` mode only. Imports the Micromark/MDX stack and `parse5` (via `../modes/markdown.js`\n * importing `../modes/html.js` for normative embedded-HTML handling, modes.md 3.7) — both are\n * legitimately reachable from `polytypo/markdown` (AUDIT_REMEDIATION_AND_RELEASE_PLAN.md 5.1).\n *\n * Validation order — `planRules`, then `getLocaleData`, then `resolveDialect`/parsing — mirrors\n * the pre-Stage-5 aggregate `runPipeline` exactly: an unknown-rule error wins over an\n * unknown-locale error, which wins over a missing/invalid dialect, which wins over a parse\n * failure. All four are public, tested behaviour this refactor was not authorised to change.\n */\nexport function runMarkdownPipeline(input: string, options: Partial<Options>): string {\n const narrowTarget = resolveNarrowTarget(options.narrowNbsp);\n const planned = planRules(options.rules);\n const locale = getLocaleData(options.locale);\n const dialect = resolveDialect(options.dialect);\n const spans = markdownSpans(input, dialect);\n return runOverSpans(input, spans, planned, locale, \"markdown\", narrowTarget);\n}\n\n/** analyze.md §1, `markdown` mode. Dialect validation happens here exactly as it does for\n * `runMarkdownPipeline`, so an absent dialect throws POLYTYPO_INVALID_DIALECT from `analyze`\n * too (analyze.md §4 A1). */\nexport function analyzeMarkdownPipeline(input: string, options: Partial<Options>): Change[] {\n const narrowTarget = resolveNarrowTarget(options.narrowNbsp);\n const planned = planRules(options.rules);\n const locale = getLocaleData(options.locale);\n const dialect = resolveDialect(options.dialect);\n return analyzeOverSpans(\n input,\n markdownSpans(input, dialect),\n planned,\n locale,\n \"markdown\",\n narrowTarget,\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAS,OAAO,aAAa,kBAAkB;AAC/C,SAAS,mBAAmB;AAC5B,SAAS,WAAW;AACpB,SAAS,aAAa;AAgBtB,IAAM,sBAA2C,oBAAI,IAAI;AAAA;AAAA,EAEvD;AAAA,EACA;AAAA;A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3D,QAAM,UAAU,UAAU,QAAQ,KAAK;AACvC,QAAM,SAAS,cAAc,QAAQ,MAAM;AAC3C,QAAM,UAAU,eAAe,QAAQ,OAAO;AAC9C,SAAO;AAAA,IACL;AAAA,IACA,cAAc,OAAO,OAAO;AAAA,IAC5B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/polytypo-js/polytypo-js/dist/chunk-2XWZW3RU.cjs","../src/modes/yaml.ts","../src/engine/yaml-keys.ts","../src/engine/yaml-pipeline.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACWA,IAAM,IAAA,EAAM,CAAA;AACZ,IAAM,GAAA,EAAK,EAAA;AACX,IAAM,GAAA,EAAK,EAAA;AACX,IAAM,MAAA,EAAQ,EAAA;AACd,IAAM,KAAA,EAAO,EAAA;AACb,IAAM,OAAA,EAAS,EAAA;AACf,IAAM,KAAA,EAAO,EAAA;AACb,IAAM,QAAA,EAAU,EAAA;AAChB,IAAM,UAAA,EAAY,EAAA;AAClB,IAAM,OAAA,EAAS,EAAA;AACf,IAAM,KAAA,EAAO,EAAA;AACb,IAAM,KAAA,EAAO,EAAA;AACb,IAAM,KAAA,EAAO,EAAA;AACb,IAAM,IAAA,EAAM,EAAA;AACZ,IAAM,KAAA,EAAO,EAAA;AACb,IAAM,IAAA,EAAM,EAAA;AACZ,IAAM,KAAA,EAAO,EAAA;AACb,IAAM,MAAA,EAAQ,EAAA;AACd,IAAM,QAAA,EAAU,EAAA;AAChB,IAAM,SAAA,EAAW,EAAA;AACjB,IAAM,UAAA,EAAY,EAAA;AAClB,IAAM,OAAA,EAAS,GAAA;AACf,IAAM,KAAA,EAAO,GAAA;AAgBb,SAAS,UAAA,CAAW,MAAA,EAAwB;AAC1C,EAAA,MAAM,MAAA,EAAgB,CAAC,CAAA;AAC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SAAA,CAAU,GAAG,CAAC,CAAA,CAAA;AAAA,MACnE,CAAA;AAAA,IACF;AAAA,EACF;AACA,EAAA,OAAO,KAAA;AACT;AFmNA;AACA;AGnOO,SAAS,eAAA,CAAgB,KAAA,EAAe,OAAA,EAAmC;AAChF,EAAA,MAAM,aAAA,EAAe,mDAAA,OAAoB,CAAQ,UAAU,CAAA;AAC3D,EAAA,MAAM,QAAA,EAAU,yCAAA,OAAU,CAAQ,KAAK,CAAA;AACvC,EAAA,MAAM,OAAA,EAAS,6CAAA,OAAc,CAAQ,MAAM,CAAA;AAC3C,EAAA,MAAM,KAAA,EAAO,eAAA,CAAgB,OAAA,CAAQ,IAAI,CAAA;AACzC,EAAA,OAAO,4CAAA,KAAa,EAAO,SAAA,CAAU,KAAA,EAAO,IAAI,CAAA,EAAG,OAAA,EAAS,MAAA,EAAQ,MAAA,EAAQ,YAAY,CAAA;AAC1F;AAGO,SAAS,mBAAA,CAAoB,KAAA,EAAe,OAAA,EAAqC;AACtF,EAAA,MAAM,aAAA,EAAe,mDAAA,OAAoB,CAAQ,UAAU,CAAA;AAC3D,EAAA,MAAM,QAAA,EAAU,yCAAA,OAAU,CAAQ,KAAK,CAAA;AACvC,EAAA,MAAM,OAAA,EAAS,6CAAA,OAAc,CAAQ,MAAM,CAAA;AAC3C,EAAA,MAAM,KAAA,EAAO,eAAA,CAAgB,OAAA,CAAQ,IAAI,CAAA;AACzC,EAAA,OAAO,gDAAA,KAAiB,EAAO,SAAA,CAAU,KAAA,EAAO,IAAI,CAAA,EAAG,OAAA,EAAS,MAAA,EAAQ,MAAA,EAAQ,YAAY,CAAA;AAC9F;AHmOA;AACA;AACE;AACA;AACF,6FAAC","file":"/home/runner/work/polytypo-js/polytypo-js/dist/chunk-2XWZW3RU.cjs","sourcesContent":[null,"import type { Span } from \"./spans.js\";\n\n/**\n * spec/rules/modes.md 3.8. `yaml` differs from the other two document modes twice over.\n *\n * It uses **no parser** (3.8.1): two of the five ecosystems' YAML libraries cannot report the\n * source offsets the round-trip guarantee needs, so the scan below is specified rather than\n * delegated and is written the same way in every runtime.\n *\n * And the caller names the keys (3.8.2). YAML is a data format with islands of prose in it — the\n * inverse of HTML and Markdown — and nothing in its syntax separates `description:` from `run:`.\n * A keyless draft of this file rewrote `if !` as `if!` inside a workflow's shell script; there is\n * no content test that would not, because shell and template expressions are written in words.\n *\n * It also **skips by default** — the inverse of 3.6's closed skip list. A construct this scan\n * does not recognise with certainty yields no spans, so the worst outcome of a gap in it is prose\n * left untypeset, never a changed byte.\n *\n * Offsets are UTF-16 indices, like every other mode in this runtime; every character the scan\n * tests is ASCII, so indexing by code unit and indexing by code point agree on all of them.\n */\n\nconst TAB = 0x09;\nconst LF = 0x0a;\nconst CR = 0x0d;\nconst SPACE = 0x20;\nconst BANG = 0x21;\nconst DQUOTE = 0x22;\nconst HASH = 0x23;\nconst PERCENT = 0x25;\nconst AMPERSAND = 0x26;\nconst SQUOTE = 0x27;\nconst STAR = 0x2a;\nconst PLUS = 0x2b;\nconst DASH = 0x2d;\nconst DOT = 0x2e;\nconst ZERO = 0x30;\nconst ONE = 0x31;\nconst NINE = 0x39;\nconst COLON = 0x3a;\nconst GREATER = 0x3e;\nconst LBRACKET = 0x5b;\nconst BACKSLASH = 0x5c;\nconst LBRACE = 0x7b;\nconst PIPE = 0x7c;\n\ninterface Line {\n readonly start: number;\n /** Index of the line terminator, or of the end of the source — never inside a span. */\n readonly end: number;\n}\n\n/**\n * 3.8.4: a line ends at U+000A, and **a U+000D immediately before it is not part of the line** —\n * it is a terminator like the U+000A itself, so it lies outside every span and comes back\n * untouched. Without that clause a CRLF file behaves differently from the same bytes with LF: the\n * block header reads as `|\\r` and is unrecognised, and a plain scalar carries the carriage return\n * inside its span. Five runtimes split lines with five different standard-library calls, so the\n * treatment has to be stated rather than inherited.\n */\nfunction splitLines(source: string): Line[] {\n const lines: Line[] = [];\n let start = 0;\n const endOf = (i: number): number => (i > start && source.charCodeAt(i - 1) === CR ? i - 1 : i);\n for (let i = 0; i < source.length; i += 1) {\n if (source.charCodeAt(i) === LF) {\n lines.push({ start, end: endOf(i) });\n start = i + 1;\n }\n }\n if (start < source.length) lines.push({ start, end: endOf(source.length) });\n return lines;\n}\n\n/** Index of the first code unit that is not U+0020, or `line.end` for a blank line. */\nfunction firstNonSpace(source: string, line: Line): number {\n let i = line.start;\n while (i < line.end && source.charCodeAt(i) === SPACE) i += 1;\n return i;\n}\n\nfunction isBlank(source: string, line: Line): boolean {\n return firstNonSpace(source, line) === line.end;\n}\n\nfunction hasTab(source: string, line: Line): boolean {\n for (let i = line.start; i < line.end; i += 1) if (source.charCodeAt(i) === TAB) return true;\n return false;\n}\n\n/**\n * 3.8.4 step 3. `---` and `...` at the head of a line, bare or introducing a node: the\n * trailing-content form is declined too, so `--- key: value` never yields a key of `--- key`.\n */\nfunction isDocumentMarker(source: string, from: number, end: number): boolean {\n if (end - from < 3) return false;\n const c = source.charCodeAt(from);\n if (c !== DASH && c !== DOT) return false;\n if (source.charCodeAt(from + 1) !== c || source.charCodeAt(from + 2) !== c) return false;\n return from + 3 === end || source.charCodeAt(from + 3) === SPACE;\n}\n\n/** A colon that ends the line or is followed by U+0020 — the only colon YAML reads as an indicator. */\nfunction isIndicatorColon(source: string, j: number, end: number): boolean {\n if (source.charCodeAt(j) !== COLON) return false;\n return j + 1 === end || source.charCodeAt(j + 1) === SPACE;\n}\n\n/** A `-` that ends the line or is followed by U+0020 — a block sequence entry marker. */\nfunction isSequenceDash(source: string, j: number, end: number): boolean {\n if (source.charCodeAt(j) !== DASH) return false;\n return j + 1 === end || source.charCodeAt(j + 1) === SPACE;\n}\n\n/**\n * The value run of 3.8.4 step 7: every following line that is blank or indented more than the\n * key line. **Those lines are never scanned again** — without that, a multi-line quoted scalar,\n * a multi-line flow collection and a folded plain scalar all leak their continuation lines back\n * into the scan as if they were mappings, and a span can end up holding a scalar's own closing\n * delimiter.\n */\nfunction valueRunEnd(source: string, lines: readonly Line[], li: number, indent: number): number {\n let k = li + 1;\n while (k < lines.length) {\n const next = lines[k] as Line;\n if (!isBlank(source, next) && firstNonSpace(source, next) - next.start <= indent) break;\n k += 1;\n }\n return k;\n}\n\nexport function yamlSpans(source: string, keys: readonly string[]): Span[] {\n const listed = new Set(keys);\n const lines = splitLines(source);\n const spans: Span[] = [];\n let li = 0;\n while (li < lines.length) li = scanLine(source, lines, li, listed, spans);\n return spans;\n}\n\n/** One step of 3.8.4. Returns the index of the next line to scan. */\nfunction scanLine(\n source: string,\n lines: readonly Line[],\n li: number,\n listed: ReadonlySet<string>,\n spans: Span[],\n): number {\n const line = lines[li] as Line;\n const skipLine = li + 1;\n\n // step 1 — blank, or a tab anywhere, which makes indentation undecidable.\n const start = firstNonSpace(source, line);\n if (start === line.end || hasTab(source, line)) return skipLine;\n const indent = start - line.start;\n\n // steps 2 and 3 — comment, directive, document marker.\n const head = source.charCodeAt(start);\n if (head === HASH || head === PERCENT) return skipLine;\n if (isDocumentMarker(source, start, line.end)) return skipLine;\n\n // step 4 — block sequence entries are consumed, not skipped; `- - key: v` nests.\n let i = start;\n while (i < line.end && isSequenceDash(source, i, line.end)) {\n i += 2;\n while (i < line.end && source.charCodeAt(i) === SPACE) i += 1;\n }\n if (i >= line.end) return skipLine;\n\n // step 5 — find the key. A colon NOT followed by U+0020 or the line end is an ordinary key\n // character, so `a:b: v` has the key `a:b`; stating that is what keeps five scanners agreeing.\n const keyStart = i;\n let colon = -1;\n for (let j = i; j < line.end; j += 1) {\n const c = source.charCodeAt(j);\n if (\n c === DQUOTE ||\n c === SQUOTE ||\n c === LBRACE ||\n c === LBRACKET ||\n c === AMPERSAND ||\n c === STAR ||\n c === BANG ||\n c === HASH\n ) {\n return skipLine;\n }\n if (isIndicatorColon(source, j, line.end)) {\n colon = j;\n break;\n }\n }\n if (colon < 0) return skipLine;\n let keyEnd = colon;\n while (keyEnd > keyStart && source.charCodeAt(keyEnd - 1) === SPACE) keyEnd -= 1;\n if (keyEnd <= keyStart) return skipLine;\n\n // step 6 — an empty value means a nested node, whose lines ARE scanned on their own.\n let v = colon + 1;\n while (v < line.end && source.charCodeAt(v) === SPACE) v += 1;\n if (v >= line.end) return skipLine;\n\n // step 7 — the line carries an inline value, so its continuation lines belong to that value.\n const next = valueRunEnd(source, lines, li, indent);\n\n // step 8 — the key must be listed. Checked before the value's form, so an unlisted key costs\n // nothing to decline: this is what makes `run:`, `if:` and `image:` unreachable.\n if (!listed.has(source.slice(keyStart, keyEnd))) return next;\n\n // step 9 — the scalar form.\n const value = source.charCodeAt(v);\n if (\n value === HASH ||\n value === AMPERSAND ||\n value === STAR ||\n value === BANG ||\n value === LBRACE ||\n value === LBRACKET\n ) {\n return next;\n }\n if (value === PIPE || value === GREATER) {\n blockScalar(source, lines, li, next, indent, v, spans);\n return next;\n }\n if (value === DQUOTE || value === SQUOTE) {\n if (next === li + 1) quotedScalar(source, line, v, spans);\n return next;\n }\n if (next === li + 1) plainScalar(source, line, v, spans);\n return next;\n}\n\n/**\n * 3.8.5. One span per non-blank content line, starting after the block's own indentation. The\n * header, the indentation and every line terminator lie outside every span — including the run\n * of line terminators at the end that the chomping indicator governs, which is why `|`, `|-`,\n * `|+`, `>`, `>-` and `>+` are handled identically here.\n */\nfunction blockScalar(\n source: string,\n lines: readonly Line[],\n li: number,\n runEnd: number,\n indent: number,\n v: number,\n spans: Span[],\n): void {\n const line = lines[li] as Line;\n\n // The header: at most one chomping indicator and at most one indentation indicator, in either\n // order, then optional spaces and an optional comment. Anything else is unrecognised.\n let h = v + 1;\n let explicitIndent = 0;\n let chomping = false;\n while (h < line.end) {\n const c = source.charCodeAt(h);\n if ((c === DASH || c === PLUS) && !chomping) {\n chomping = true;\n h += 1;\n continue;\n }\n if (c >= ONE && c <= NINE && explicitIndent === 0) {\n explicitIndent = c - ZERO;\n h += 1;\n continue;\n }\n break;\n }\n while (h < line.end && source.charCodeAt(h) === SPACE) h += 1;\n if (h < line.end && source.charCodeAt(h) !== HASH) return;\n\n // One definition of the run, and three conditions that make the whole block yield no spans.\n const content: Line[] = [];\n let contentIndent = -1;\n for (let k = li + 1; k < runEnd; k += 1) {\n const next = lines[k] as Line;\n if (isBlank(source, next)) continue; // blank lines belong to the block and yield no span\n if (hasTab(source, next)) return;\n const nextIndent = firstNonSpace(source, next) - next.start;\n if (contentIndent < 0) {\n contentIndent = explicitIndent > 0 ? indent + explicitIndent : nextIndent;\n }\n // An explicit indicator that disagrees with the block as written, or a later line dedented\n // inside it, is ambiguous rather than guessable — bail rather than choose.\n if (nextIndent < contentIndent) return;\n content.push(next);\n }\n if (contentIndent <= 0) return;\n\n for (const c of content) {\n const from = c.start + contentIndent;\n if (c.end > from) spans.push({ start: from, end: c.end });\n }\n}\n\n/**\n * 3.8.6. The span is the content between the quotes. Both bails exist so that source characters\n * and content characters are the same thing, which the offset model of 3.1 requires — the same\n * constraint that makes an HTML character reference an opaque unit in 3.6. No colon test applies\n * here: quoting neutralises the colon, and applying the plain-scalar test would decline\n * `title: \"Chapter 1: the beginning\"`.\n */\nfunction quotedScalar(source: string, line: Line, v: number, spans: Span[]): void {\n const quote = source.charCodeAt(v);\n let close = -1;\n for (let j = v + 1; j < line.end; j += 1) {\n const c = source.charCodeAt(j);\n if (quote === DQUOTE && c === BACKSLASH) return;\n if (\n quote === SQUOTE &&\n c === SQUOTE &&\n j + 1 < line.end &&\n source.charCodeAt(j + 1) === SQUOTE\n ) {\n return;\n }\n if (c === quote) {\n close = j;\n break;\n }\n }\n if (close < 0) return;\n\n let after = close + 1;\n while (after < line.end && source.charCodeAt(after) === SPACE) after += 1;\n if (after < line.end && source.charCodeAt(after) !== HASH) return;\n\n if (close > v + 1) spans.push({ start: v + 1, end: close });\n}\n\n/**\n * 3.8.6. In a plain scalar `:` and `#` are still live: U+0020 beside either of them is what turns\n * a scalar into a mapping indicator or a comment, and `dashes` emits U+0020 in every `-spaced`\n * locale. Lifting both out as opaque units leaves the dash token against a boundary marker, which\n * `dashes` declines on its own account — the edge-growth rule of 3.4 is the second net, not the\n * first.\n */\nfunction plainScalar(source: string, line: Line, v: number, spans: Span[]): void {\n // The scalar ends before a trailing comment, so a colon inside that comment is not the\n // scalar's and must not decline it.\n let end = line.end;\n for (let j = v; j < line.end; j += 1) {\n if (source.charCodeAt(j) === HASH && j > v && source.charCodeAt(j - 1) === SPACE) {\n end = j - 1;\n break;\n }\n }\n while (end > v && source.charCodeAt(end - 1) === SPACE) end -= 1;\n if (end <= v) return;\n\n // Compact nesting is not a value: `key: - item` opens a sequence, and `key: a .:` is a mapping\n // whose key is `a .` — a plain scalar can never contain a colon in that position.\n if (isSequenceDash(source, v, line.end)) return;\n for (let j = v; j < end; j += 1) if (isIndicatorColon(source, j, line.end)) return;\n\n let segment = v;\n for (let j = v; j <= end; j += 1) {\n if (j === end || source.charCodeAt(j) === COLON || source.charCodeAt(j) === HASH) {\n if (j > segment) spans.push({ start: segment, end: j });\n segment = j + 1;\n }\n }\n}\n","import { PolytypoError } from \"../errors.js\";\n\n/**\n * modes.md §3.8.2: `yaml` mode's `keys` option, resolved once at the call boundary.\n *\n * It has **no default**, for the reason `dialect` has none. YAML is a data format with islands of\n * prose in it, and nothing in its syntax marks them — `description` holds a sentence and `run`\n * holds a shell script, spelled identically — so a default would be a guess about the schema\n * above the document. An **empty list is legal**: \"process nothing\" is a choice a caller may\n * make, not an error.\n *\n * Checked after `locale`, last of the option checks, alongside `dialect` (ARCHITECTURE.md §7).\n * The two never both apply, since each belongs to a different mode.\n */\nexport function resolveYamlKeys(value: unknown): readonly string[] {\n if (!Array.isArray(value)) {\n throw new PolytypoError(\n \"POLYTYPO_INVALID_OPTION\",\n `\"keys\" is required when mode is \"yaml\" and must be a list of strings (modes.md §3.8.2). ` +\n `Received ${value === undefined ? \"nothing\" : JSON.stringify(value)}.`,\n );\n }\n for (const key of value as readonly unknown[]) {\n if (typeof key !== \"string\") {\n throw new PolytypoError(\n \"POLYTYPO_INVALID_OPTION\",\n `\"keys\" must contain only strings; received ${JSON.stringify(key)}.`,\n );\n }\n }\n return value as readonly string[];\n}\n","import { yamlSpans } from \"../modes/yaml.js\";\nimport type { Options } from \"../types.js\";\nimport { getLocaleData } from \"./locale.js\";\nimport { resolveNarrowTarget } from \"./narrow-target.js\";\nimport { resolveYamlKeys } from \"./yaml-keys.js\";\nimport { planRules } from \"./rule-runner.js\";\nimport { analyzeOverSpans, runOverSpans } from \"./span-runner.js\";\nimport type { Change } from \"./origin.js\";\n\n/**\n * `yaml` mode only, and the only mode pipeline with **no parser dependency at all** — span\n * selection is the specified scan of modes.md 3.8, not a library. There is likewise no\n * `POLYTYPO_MALFORMED_INPUT` counterpart here: with no declared grammar to violate, a file that\n * is not YAML yields few spans or none and comes back byte for byte (modes.md 3.8.3). The only\n * throw this mode adds is `keys`, which is about the call and not the input.\n */\nexport function runYamlPipeline(input: string, options: Partial<Options>): string {\n const narrowTarget = resolveNarrowTarget(options.narrowNbsp);\n const planned = planRules(options.rules);\n const locale = getLocaleData(options.locale);\n const keys = resolveYamlKeys(options.keys);\n return runOverSpans(input, yamlSpans(input, keys), planned, locale, \"yaml\", narrowTarget);\n}\n\n/** analyze.md §1, `yaml` mode: offsets are into the document, not into a span (analyze.md §6). */\nexport function analyzeYamlPipeline(input: string, options: Partial<Options>): Change[] {\n const narrowTarget = resolveNarrowTarget(options.narrowNbsp);\n const planned = planRules(options.rules);\n const locale = getLocaleData(options.locale);\n const keys = resolveYamlKeys(options.keys);\n return analyzeOverSpans(input, yamlSpans(input, keys), planned, locale, \"yaml\", narrowTarget);\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/modes/yaml.ts","../src/engine/yaml-keys.ts","../src/engine/yaml-pipeline.ts"],"sourcesContent":["import type { Span } from \"./spans.js\";\n\n/**\n * spec/rules/modes.md 3.8. `yaml` differs from the other two document modes twice over.\n *\n * It uses **no parser** (3.8.1): two of the five ecosystems' YAML libraries cannot report the\n * source offsets the round-trip guarantee needs, so the scan below is specified rather than\n * delegated and is written the same way in every runtime.\n *\n * And the caller names the keys (3.8.2). YAML is a data format with islands of prose in it — the\n * inverse of HTML and Markdown — and nothing in its syntax separates `description:` from `run:`.\n * A keyless draft of this file rewrote `if !` as `if!` inside a workflow's shell script; there is\n * no content test that would not, because shell and template expressions are written in words.\n *\n * It also **skips by default** — the inverse of 3.6's closed skip list. A construct this scan\n * does not recognise with certainty yields no spans, so the worst outcome of a gap in it is prose\n * left untypeset, never a changed byte.\n *\n * Offsets are UTF-16 indices, like every other mode in this runtime; every character the scan\n * tests is ASCII, so indexing by code unit and indexing by code point agree on all of them.\n */\n\nconst TAB = 0x09;\nconst LF = 0x0a;\nconst CR = 0x0d;\nconst SPACE = 0x20;\nconst BANG = 0x21;\nconst DQUOTE = 0x22;\nconst HASH = 0x23;\nconst PERCENT = 0x25;\nconst AMPERSAND = 0x26;\nconst SQUOTE = 0x27;\nconst STAR = 0x2a;\nconst PLUS = 0x2b;\nconst DASH = 0x2d;\nconst DOT = 0x2e;\nconst ZERO = 0x30;\nconst ONE = 0x31;\nconst NINE = 0x39;\nconst COLON = 0x3a;\nconst GREATER = 0x3e;\nconst LBRACKET = 0x5b;\nconst BACKSLASH = 0x5c;\nconst LBRACE = 0x7b;\nconst PIPE = 0x7c;\n\ninterface Line {\n readonly start: number;\n /** Index of the line terminator, or of the end of the source — never inside a span. */\n readonly end: number;\n}\n\n/**\n * 3.8.4: a line ends at U+000A, and **a U+000D immediately before it is not part of the line** —\n * it is a terminator like the U+000A itself, so it lies outside every span and comes back\n * untouched. Without that clause a CRLF file behaves differently from the same bytes with LF: the\n * block header reads as `|\\r` and is unrecognised, and a plain scalar carries the carriage return\n * inside its span. Five runtimes split lines with five different standard-library calls, so the\n * treatment has to be stated rather than inherited.\n */\nfunction splitLines(source: string): Line[] {\n const lines: Line[] = [];\n let start = 0;\n const endOf = (i: number): number => (i > start && source.charCodeAt(i - 1) === CR ? i - 1 : i);\n for (let i = 0; i < source.length; i += 1) {\n if (source.charCodeAt(i) === LF) {\n lines.push({ start, end: endOf(i) });\n start = i + 1;\n }\n }\n if (start < source.length) lines.push({ start, end: endOf(source.length) });\n return lines;\n}\n\n/** Index of the first code unit that is not U+0020, or `line.end` for a blank line. */\nfunction firstNonSpace(source: string, line: Line): number {\n let i = line.start;\n while (i < line.end && source.charCodeAt(i) === SPACE) i += 1;\n return i;\n}\n\nfunction isBlank(source: string, line: Line): boolean {\n return firstNonSpace(source, line) === line.end;\n}\n\nfunction hasTab(source: string, line: Line): boolean {\n for (let i = line.start; i < line.end; i += 1) if (source.charCodeAt(i) === TAB) return true;\n return false;\n}\n\n/**\n * 3.8.4 step 3. `---` and `...` at the head of a line, bare or introducing a node: the\n * trailing-content form is declined too, so `--- key: value` never yields a key of `--- key`.\n */\nfunction isDocumentMarker(source: string, from: number, end: number): boolean {\n if (end - from < 3) return false;\n const c = source.charCodeAt(from);\n if (c !== DASH && c !== DOT) return false;\n if (source.charCodeAt(from + 1) !== c || source.charCodeAt(from + 2) !== c) return false;\n return from + 3 === end || source.charCodeAt(from + 3) === SPACE;\n}\n\n/** A colon that ends the line or is followed by U+0020 — the only colon YAML reads as an indicator. */\nfunction isIndicatorColon(source: string, j: number, end: number): boolean {\n if (source.charCodeAt(j) !== COLON) return false;\n return j + 1 === end || source.charCodeAt(j + 1) === SPACE;\n}\n\n/** A `-` that ends the line or is followed by U+0020 — a block sequence entry marker. */\nfunction isSequenceDash(source: string, j: number, end: number): boolean {\n if (source.charCodeAt(j) !== DASH) return false;\n return j + 1 === end || source.charCodeAt(j + 1) === SPACE;\n}\n\n/**\n * The value run of 3.8.4 step 7: every following line that is blank or indented more than the\n * key line. **Those lines are never scanned again** — without that, a multi-line quoted scalar,\n * a multi-line flow collection and a folded plain scalar all leak their continuation lines back\n * into the scan as if they were mappings, and a span can end up holding a scalar's own closing\n * delimiter.\n */\nfunction valueRunEnd(source: string, lines: readonly Line[], li: number, indent: number): number {\n let k = li + 1;\n while (k < lines.length) {\n const next = lines[k] as Line;\n if (!isBlank(source, next) && firstNonSpace(source, next) - next.start <= indent) break;\n k += 1;\n }\n return k;\n}\n\nexport function yamlSpans(source: string, keys: readonly string[]): Span[] {\n const listed = new Set(keys);\n const lines = splitLines(source);\n const spans: Span[] = [];\n let li = 0;\n while (li < lines.length) li = scanLine(source, lines, li, listed, spans);\n return spans;\n}\n\n/** One step of 3.8.4. Returns the index of the next line to scan. */\nfunction scanLine(\n source: string,\n lines: readonly Line[],\n li: number,\n listed: ReadonlySet<string>,\n spans: Span[],\n): number {\n const line = lines[li] as Line;\n const skipLine = li + 1;\n\n // step 1 — blank, or a tab anywhere, which makes indentation undecidable.\n const start = firstNonSpace(source, line);\n if (start === line.end || hasTab(source, line)) return skipLine;\n const indent = start - line.start;\n\n // steps 2 and 3 — comment, directive, document marker.\n const head = source.charCodeAt(start);\n if (head === HASH || head === PERCENT) return skipLine;\n if (isDocumentMarker(source, start, line.end)) return skipLine;\n\n // step 4 — block sequence entries are consumed, not skipped; `- - key: v` nests.\n let i = start;\n while (i < line.end && isSequenceDash(source, i, line.end)) {\n i += 2;\n while (i < line.end && source.charCodeAt(i) === SPACE) i += 1;\n }\n if (i >= line.end) return skipLine;\n\n // step 5 — find the key. A colon NOT followed by U+0020 or the line end is an ordinary key\n // character, so `a:b: v` has the key `a:b`; stating that is what keeps five scanners agreeing.\n const keyStart = i;\n let colon = -1;\n for (let j = i; j < line.end; j += 1) {\n const c = source.charCodeAt(j);\n if (\n c === DQUOTE ||\n c === SQUOTE ||\n c === LBRACE ||\n c === LBRACKET ||\n c === AMPERSAND ||\n c === STAR ||\n c === BANG ||\n c === HASH\n ) {\n return skipLine;\n }\n if (isIndicatorColon(source, j, line.end)) {\n colon = j;\n break;\n }\n }\n if (colon < 0) return skipLine;\n let keyEnd = colon;\n while (keyEnd > keyStart && source.charCodeAt(keyEnd - 1) === SPACE) keyEnd -= 1;\n if (keyEnd <= keyStart) return skipLine;\n\n // step 6 — an empty value means a nested node, whose lines ARE scanned on their own.\n let v = colon + 1;\n while (v < line.end && source.charCodeAt(v) === SPACE) v += 1;\n if (v >= line.end) return skipLine;\n\n // step 7 — the line carries an inline value, so its continuation lines belong to that value.\n const next = valueRunEnd(source, lines, li, indent);\n\n // step 8 — the key must be listed. Checked before the value's form, so an unlisted key costs\n // nothing to decline: this is what makes `run:`, `if:` and `image:` unreachable.\n if (!listed.has(source.slice(keyStart, keyEnd))) return next;\n\n // step 9 — the scalar form.\n const value = source.charCodeAt(v);\n if (\n value === HASH ||\n value === AMPERSAND ||\n value === STAR ||\n value === BANG ||\n value === LBRACE ||\n value === LBRACKET\n ) {\n return next;\n }\n if (value === PIPE || value === GREATER) {\n blockScalar(source, lines, li, next, indent, v, spans);\n return next;\n }\n if (value === DQUOTE || value === SQUOTE) {\n if (next === li + 1) quotedScalar(source, line, v, spans);\n return next;\n }\n if (next === li + 1) plainScalar(source, line, v, spans);\n return next;\n}\n\n/**\n * 3.8.5. One span per non-blank content line, starting after the block's own indentation. The\n * header, the indentation and every line terminator lie outside every span — including the run\n * of line terminators at the end that the chomping indicator governs, which is why `|`, `|-`,\n * `|+`, `>`, `>-` and `>+` are handled identically here.\n */\nfunction blockScalar(\n source: string,\n lines: readonly Line[],\n li: number,\n runEnd: number,\n indent: number,\n v: number,\n spans: Span[],\n): void {\n const line = lines[li] as Line;\n\n // The header: at most one chomping indicator and at most one indentation indicator, in either\n // order, then optional spaces and an optional comment. Anything else is unrecognised.\n let h = v + 1;\n let explicitIndent = 0;\n let chomping = false;\n while (h < line.end) {\n const c = source.charCodeAt(h);\n if ((c === DASH || c === PLUS) && !chomping) {\n chomping = true;\n h += 1;\n continue;\n }\n if (c >= ONE && c <= NINE && explicitIndent === 0) {\n explicitIndent = c - ZERO;\n h += 1;\n continue;\n }\n break;\n }\n while (h < line.end && source.charCodeAt(h) === SPACE) h += 1;\n if (h < line.end && source.charCodeAt(h) !== HASH) return;\n\n // One definition of the run, and three conditions that make the whole block yield no spans.\n const content: Line[] = [];\n let contentIndent = -1;\n for (let k = li + 1; k < runEnd; k += 1) {\n const next = lines[k] as Line;\n if (isBlank(source, next)) continue; // blank lines belong to the block and yield no span\n if (hasTab(source, next)) return;\n const nextIndent = firstNonSpace(source, next) - next.start;\n if (contentIndent < 0) {\n contentIndent = explicitIndent > 0 ? indent + explicitIndent : nextIndent;\n }\n // An explicit indicator that disagrees with the block as written, or a later line dedented\n // inside it, is ambiguous rather than guessable — bail rather than choose.\n if (nextIndent < contentIndent) return;\n content.push(next);\n }\n if (contentIndent <= 0) return;\n\n for (const c of content) {\n const from = c.start + contentIndent;\n if (c.end > from) spans.push({ start: from, end: c.end });\n }\n}\n\n/**\n * 3.8.6. The span is the content between the quotes. Both bails exist so that source characters\n * and content characters are the same thing, which the offset model of 3.1 requires — the same\n * constraint that makes an HTML character reference an opaque unit in 3.6. No colon test applies\n * here: quoting neutralises the colon, and applying the plain-scalar test would decline\n * `title: \"Chapter 1: the beginning\"`.\n */\nfunction quotedScalar(source: string, line: Line, v: number, spans: Span[]): void {\n const quote = source.charCodeAt(v);\n let close = -1;\n for (let j = v + 1; j < line.end; j += 1) {\n const c = source.charCodeAt(j);\n if (quote === DQUOTE && c === BACKSLASH) return;\n if (\n quote === SQUOTE &&\n c === SQUOTE &&\n j + 1 < line.end &&\n source.charCodeAt(j + 1) === SQUOTE\n ) {\n return;\n }\n if (c === quote) {\n close = j;\n break;\n }\n }\n if (close < 0) return;\n\n let after = close + 1;\n while (after < line.end && source.charCodeAt(after) === SPACE) after += 1;\n if (after < line.end && source.charCodeAt(after) !== HASH) return;\n\n if (close > v + 1) spans.push({ start: v + 1, end: close });\n}\n\n/**\n * 3.8.6. In a plain scalar `:` and `#` are still live: U+0020 beside either of them is what turns\n * a scalar into a mapping indicator or a comment, and `dashes` emits U+0020 in every `-spaced`\n * locale. Lifting both out as opaque units leaves the dash token against a boundary marker, which\n * `dashes` declines on its own account — the edge-growth rule of 3.4 is the second net, not the\n * first.\n */\nfunction plainScalar(source: string, line: Line, v: number, spans: Span[]): void {\n // The scalar ends before a trailing comment, so a colon inside that comment is not the\n // scalar's and must not decline it.\n let end = line.end;\n for (let j = v; j < line.end; j += 1) {\n if (source.charCodeAt(j) === HASH && j > v && source.charCodeAt(j - 1) === SPACE) {\n end = j - 1;\n break;\n }\n }\n while (end > v && source.charCodeAt(end - 1) === SPACE) end -= 1;\n if (end <= v) return;\n\n // Compact nesting is not a value: `key: - item` opens a sequence, and `key: a .:` is a mapping\n // whose key is `a .` — a plain scalar can never contain a colon in that position.\n if (isSequenceDash(source, v, line.end)) return;\n for (let j = v; j < end; j += 1) if (isIndicatorColon(source, j, line.end)) return;\n\n let segment = v;\n for (let j = v; j <= end; j += 1) {\n if (j === end || source.charCodeAt(j) === COLON || source.charCodeAt(j) === HASH) {\n if (j > segment) spans.push({ start: segment, end: j });\n segment = j + 1;\n }\n }\n}\n","import { PolytypoError } from \"../errors.js\";\n\n/**\n * modes.md §3.8.2: `yaml` mode's `keys` option, resolved once at the call boundary.\n *\n * It has **no default**, for the reason `dialect` has none. YAML is a data format with islands of\n * prose in it, and nothing in its syntax marks them — `description` holds a sentence and `run`\n * holds a shell script, spelled identically — so a default would be a guess about the schema\n * above the document. An **empty list is legal**: \"process nothing\" is a choice a caller may\n * make, not an error.\n *\n * Checked after `locale`, last of the option checks, alongside `dialect` (ARCHITECTURE.md §7).\n * The two never both apply, since each belongs to a different mode.\n */\nexport function resolveYamlKeys(value: unknown): readonly string[] {\n if (!Array.isArray(value)) {\n throw new PolytypoError(\n \"POLYTYPO_INVALID_OPTION\",\n `\"keys\" is required when mode is \"yaml\" and must be a list of strings (modes.md §3.8.2). ` +\n `Received ${value === undefined ? \"nothing\" : JSON.stringify(value)}.`,\n );\n }\n for (const key of value as readonly unknown[]) {\n if (typeof key !== \"string\") {\n throw new PolytypoError(\n \"POLYTYPO_INVALID_OPTION\",\n `\"keys\" must contain only strings; received ${JSON.stringify(key)}.`,\n );\n }\n }\n return value as readonly string[];\n}\n","import { yamlSpans } from \"../modes/yaml.js\";\nimport type { Options } from \"../types.js\";\nimport { getLocaleData } from \"./locale.js\";\nimport { resolveNarrowTarget } from \"./narrow-target.js\";\nimport { resolveYamlKeys } from \"./yaml-keys.js\";\nimport { planRules } from \"./rule-runner.js\";\nimport { analyzeOverSpans, runOverSpans } from \"./span-runner.js\";\nimport type { Change } from \"./origin.js\";\n\n/**\n * `yaml` mode only, and the only mode pipeline with **no parser dependency at all** — span\n * selection is the specified scan of modes.md 3.8, not a library. There is likewise no\n * `POLYTYPO_MALFORMED_INPUT` counterpart here: with no declared grammar to violate, a file that\n * is not YAML yields few spans or none and comes back byte for byte (modes.md 3.8.3). The only\n * throw this mode adds is `keys`, which is about the call and not the input.\n */\nexport function runYamlPipeline(input: string, options: Partial<Options>): string {\n const narrowTarget = resolveNarrowTarget(options.narrowNbsp);\n const planned = planRules(options.rules);\n const locale = getLocaleData(options.locale);\n const keys = resolveYamlKeys(options.keys);\n return runOverSpans(input, yamlSpans(input, keys), planned, locale, \"yaml\", narrowTarget);\n}\n\n/** analyze.md §1, `yaml` mode: offsets are into the document, not into a span (analyze.md §6). */\nexport function analyzeYamlPipeline(input: string, options: Partial<Options>): Change[] {\n const narrowTarget = resolveNarrowTarget(options.narrowNbsp);\n const planned = planRules(options.rules);\n const locale = getLocaleData(options.locale);\n const keys = resolveYamlKeys(options.keys);\n return analyzeOverSpans(input, yamlSpans(input, keys), planned, locale, \"yaml\", narrowTarget);\n}\n"],"mappings":";;;;;;;;;;;;AAsBA,IAAM,MAAM;AACZ,IAAM,KAAK;AACX,IAAM,KAAK;AACX,IAAM,QAAQ;AACd,IAAM,OAAO;AACb,IAAM,SAAS;AACf,IAAM,OAAO;AACb,IAAM,UAAU;AAChB,IAAM,YAAY;AAClB,IAAM,SAAS;AACf,IAAM,OAAO;AACb,IAAM,OAAO;AACb,IAAM,OAAO;AACb,IAAM,MAAM;AACZ,IAAM,OAAO;AACb,IAAM,MAAM;AACZ,IAAM,OAAO;AACb,IAAM,QAAQ;AACd,IAAM,UAAU;AAChB,IAAM,WAAW;AACjB,IAAM,Y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