polytypo 1.13.0 → 1.15.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 (48) hide show
  1. package/dist/chunk-2B5GSTAD.cjs +36 -0
  2. package/dist/{chunk-OPHUDB2T.cjs.map → chunk-2B5GSTAD.cjs.map} +1 -1
  3. package/dist/{chunk-W52W6XGA.cjs → chunk-3M2WNZH3.cjs} +4 -4
  4. package/dist/{chunk-W52W6XGA.cjs.map → chunk-3M2WNZH3.cjs.map} +1 -1
  5. package/dist/{chunk-TUDHJRJN.cjs → chunk-6BG3NAIW.cjs} +6 -6
  6. package/dist/{chunk-TUDHJRJN.cjs.map → chunk-6BG3NAIW.cjs.map} +1 -1
  7. package/dist/{chunk-ANHMGSED.js → chunk-CYJ2RYZK.js} +3 -3
  8. package/dist/chunk-DPLBOK3E.cjs +34 -0
  9. package/dist/{chunk-CJIH6CFO.cjs.map → chunk-DPLBOK3E.cjs.map} +1 -1
  10. package/dist/{chunk-OWTDZ6UD.js → chunk-EBVCERP7.js} +4 -4
  11. package/dist/{chunk-MF6PJO7O.js → chunk-NUJFDRQE.js} +5 -1
  12. package/dist/chunk-NUJFDRQE.js.map +1 -0
  13. package/dist/{chunk-WWKSWVMX.cjs → chunk-O73PUFDV.cjs} +22 -22
  14. package/dist/{chunk-WWKSWVMX.cjs.map → chunk-O73PUFDV.cjs.map} +1 -1
  15. package/dist/{chunk-6PEHEU6F.js → chunk-ORCKRUSS.js} +2 -2
  16. package/dist/{chunk-WQEB33J2.cjs → chunk-TDPBY65K.cjs} +5 -1
  17. package/dist/chunk-TDPBY65K.cjs.map +1 -0
  18. package/dist/{chunk-R5VKBH3P.js → chunk-W5OHUS76.js} +2 -2
  19. package/dist/{chunk-FDNDYPPY.cjs → chunk-XJN7BCZG.cjs} +3 -3
  20. package/dist/{chunk-FDNDYPPY.cjs.map → chunk-XJN7BCZG.cjs.map} +1 -1
  21. package/dist/{chunk-MCQOMIWF.js → chunk-XLAR7USA.js} +2 -2
  22. package/dist/{chunk-E2HHFHG2.js → chunk-Y4R4LPTA.js} +3 -3
  23. package/dist/{chunk-EL7R55TV.js → chunk-YOOGB7FX.js} +2 -2
  24. package/dist/chunk-YSSOXCRM.cjs +38 -0
  25. package/dist/{chunk-MDIDDG32.cjs.map → chunk-YSSOXCRM.cjs.map} +1 -1
  26. package/dist/html.cjs +9 -9
  27. package/dist/html.js +4 -4
  28. package/dist/index.cjs +17 -17
  29. package/dist/index.js +7 -7
  30. package/dist/markdown.cjs +10 -10
  31. package/dist/markdown.js +5 -5
  32. package/dist/text.cjs +8 -8
  33. package/dist/text.js +3 -3
  34. package/dist/yaml.cjs +9 -9
  35. package/dist/yaml.js +4 -4
  36. package/package.json +1 -1
  37. package/dist/chunk-CJIH6CFO.cjs +0 -34
  38. package/dist/chunk-MDIDDG32.cjs +0 -38
  39. package/dist/chunk-MF6PJO7O.js.map +0 -1
  40. package/dist/chunk-OPHUDB2T.cjs +0 -36
  41. package/dist/chunk-WQEB33J2.cjs.map +0 -1
  42. /package/dist/{chunk-ANHMGSED.js.map → chunk-CYJ2RYZK.js.map} +0 -0
  43. /package/dist/{chunk-OWTDZ6UD.js.map → chunk-EBVCERP7.js.map} +0 -0
  44. /package/dist/{chunk-6PEHEU6F.js.map → chunk-ORCKRUSS.js.map} +0 -0
  45. /package/dist/{chunk-R5VKBH3P.js.map → chunk-W5OHUS76.js.map} +0 -0
  46. /package/dist/{chunk-MCQOMIWF.js.map → chunk-XLAR7USA.js.map} +0 -0
  47. /package/dist/{chunk-E2HHFHG2.js.map → chunk-Y4R4LPTA.js.map} +0 -0
  48. /package/dist/{chunk-EL7R55TV.js.map → chunk-YOOGB7FX.js.map} +0 -0
@@ -0,0 +1,36 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunk6BG3NAIWcjs = require('./chunk-6BG3NAIW.cjs');
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+ var _chunkTDPBY65Kcjs = require('./chunk-TDPBY65K.cjs');
13
+
14
+ // src/engine/yaml-pipeline.ts
15
+ function runYamlPipeline(input, options) {
16
+ const narrowTarget = _chunkTDPBY65Kcjs.resolveNarrowTarget.call(void 0, options.narrowNbsp);
17
+ const planned = _chunkTDPBY65Kcjs.planRules.call(void 0, options.rules);
18
+ const locale = _chunkTDPBY65Kcjs.getLocaleData.call(void 0, options.locale);
19
+ const keys = _chunk6BG3NAIWcjs.resolveYamlKeys.call(void 0, options.keys);
20
+ _chunkTDPBY65Kcjs.assertNoProtect.call(void 0, options.protect, "yaml");
21
+ return _chunkTDPBY65Kcjs.runOverSpans.call(void 0, input, _chunk6BG3NAIWcjs.yamlSpans.call(void 0, input, keys), planned, locale, "yaml", narrowTarget);
22
+ }
23
+ function analyzeYamlPipeline(input, options) {
24
+ const narrowTarget = _chunkTDPBY65Kcjs.resolveNarrowTarget.call(void 0, options.narrowNbsp);
25
+ const planned = _chunkTDPBY65Kcjs.planRules.call(void 0, options.rules);
26
+ const locale = _chunkTDPBY65Kcjs.getLocaleData.call(void 0, options.locale);
27
+ const keys = _chunk6BG3NAIWcjs.resolveYamlKeys.call(void 0, options.keys);
28
+ _chunkTDPBY65Kcjs.assertNoProtect.call(void 0, options.protect, "yaml");
29
+ return _chunkTDPBY65Kcjs.analyzeOverSpans.call(void 0, input, _chunk6BG3NAIWcjs.yamlSpans.call(void 0, input, keys), planned, locale, "yaml", narrowTarget);
30
+ }
31
+
32
+
33
+
34
+
35
+ exports.runYamlPipeline = runYamlPipeline; exports.analyzeYamlPipeline = analyzeYamlPipeline;
36
+ //# sourceMappingURL=chunk-2B5GSTAD.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/polytypo-js/polytypo-js/dist/chunk-OPHUDB2T.cjs","../src/engine/yaml-pipeline.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACIO,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,+CAAA,OAAgB,CAAQ,IAAI,CAAA;AACzC,EAAA,+CAAA,OAAgB,CAAQ,OAAA,EAAS,MAAM,CAAA;AACvC,EAAA,OAAO,4CAAA,KAAa,EAAO,yCAAA,KAAU,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,+CAAA,OAAgB,CAAQ,IAAI,CAAA;AACzC,EAAA,+CAAA,OAAgB,CAAQ,OAAA,EAAS,MAAM,CAAA;AACvC,EAAA,OAAO,gDAAA,KAAiB,EAAO,yCAAA,KAAU,EAAO,IAAI,CAAA,EAAG,OAAA,EAAS,MAAA,EAAQ,MAAA,EAAQ,YAAY,CAAA;AAC9F;ADJA;AACA;AACE;AACA;AACF,6FAAC","file":"/home/runner/work/polytypo-js/polytypo-js/dist/chunk-OPHUDB2T.cjs","sourcesContent":[null,"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 { assertNoProtect } from \"./protect.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 assertNoProtect(options.protect, \"yaml\");\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 assertNoProtect(options.protect, \"yaml\");\n return analyzeOverSpans(input, yamlSpans(input, keys), planned, locale, \"yaml\", narrowTarget);\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/polytypo-js/polytypo-js/dist/chunk-2B5GSTAD.cjs","../src/engine/yaml-pipeline.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACIO,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,+CAAA,OAAgB,CAAQ,IAAI,CAAA;AACzC,EAAA,+CAAA,OAAgB,CAAQ,OAAA,EAAS,MAAM,CAAA;AACvC,EAAA,OAAO,4CAAA,KAAa,EAAO,yCAAA,KAAU,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,+CAAA,OAAgB,CAAQ,IAAI,CAAA;AACzC,EAAA,+CAAA,OAAgB,CAAQ,OAAA,EAAS,MAAM,CAAA;AACvC,EAAA,OAAO,gDAAA,KAAiB,EAAO,yCAAA,KAAU,EAAO,IAAI,CAAA,EAAG,OAAA,EAAS,MAAA,EAAQ,MAAA,EAAQ,YAAY,CAAA;AAC9F;ADJA;AACA;AACE;AACA;AACF,6FAAC","file":"/home/runner/work/polytypo-js/polytypo-js/dist/chunk-2B5GSTAD.cjs","sourcesContent":[null,"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 { assertNoProtect } from \"./protect.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 assertNoProtect(options.protect, \"yaml\");\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 assertNoProtect(options.protect, \"yaml\");\n return analyzeOverSpans(input, yamlSpans(input, keys), planned, locale, \"yaml\", narrowTarget);\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkWQEB33J2cjs = require('./chunk-WQEB33J2.cjs');
3
+ var _chunkTDPBY65Kcjs = require('./chunk-TDPBY65K.cjs');
4
4
 
5
5
  // src/modes/html.ts
6
6
  var _parse5 = require('parse5');
@@ -20,8 +20,8 @@ function wrapParserErrors(what, run) {
20
20
  try {
21
21
  return run();
22
22
  } catch (error) {
23
- if (error instanceof _chunkWQEB33J2cjs.PolytypoError) throw error;
24
- throw new (0, _chunkWQEB33J2cjs.PolytypoError)(
23
+ if (error instanceof _chunkTDPBY65Kcjs.PolytypoError) throw error;
24
+ throw new (0, _chunkTDPBY65Kcjs.PolytypoError)(
25
25
  "POLYTYPO_MALFORMED_INPUT",
26
26
  `Input does not parse as ${what}: ${describe(error)}`
27
27
  );
@@ -144,4 +144,4 @@ function htmlFragmentSpans(source, offset) {
144
144
 
145
145
 
146
146
  exports.wrapParserErrors = wrapParserErrors; exports.isSkippedElement = isSkippedElement; exports.htmlSpans = htmlSpans; exports.htmlFragmentSpans = htmlFragmentSpans;
147
- //# sourceMappingURL=chunk-W52W6XGA.cjs.map
147
+ //# sourceMappingURL=chunk-3M2WNZH3.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/polytypo-js/polytypo-js/dist/chunk-W52W6XGA.cjs","../src/modes/html.ts","../src/modes/parse-error.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACJA,gCAAqC;ADMrC;AACA;AEAA,SAAS,QAAA,CAAS,KAAA,EAAwB;AACxC,EAAA,GAAA,CAAI,OAAO,MAAA,IAAU,SAAA,GAAY,MAAA,IAAU,IAAA,EAAM,OAAO,MAAA,CAAO,KAAK,CAAA;AACpE,EAAA,MAAM,WAAA,EAAa,KAAA;AACnB,EAAA,MAAM,OAAA,EACJ,OAAO,UAAA,CAAW,OAAA,IAAW,SAAA,EAAW,UAAA,CAAW,OAAA,EAAU,KAAA,CAAgB,OAAA;AAC/E,EAAA,MAAM,MAAA,EAAQ,UAAA,CAAW,KAAA;AACzB,EAAA,GAAA,CACE,MAAA,IAAU,KAAA,GACV,MAAA,IAAU,KAAA,EAAA,GACV,OAAO,KAAA,CAAM,KAAA,IAAS,SAAA,GACtB,OAAO,KAAA,CAAM,OAAA,IAAW,QAAA,EACxB;AACA,IAAA,OAAO,CAAA,EAAA;AACT,EAAA;AACO,EAAA;AACT;AAcgB;AACV,EAAA;AACK,IAAA;AACA,EAAA;AACH,IAAA;AACE,IAAA;AACJ,MAAA;AACA,MAAA;AACF,IAAA;AACF,EAAA;AACF;AFjBY;AACA;ACfN;AACJ,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACD;AAEe;AACP,EAAA;AACT;AAEM;AACA;AACO;AACP;AACA;AAGA;AAEG;AACA,EAAA;AACT;AAES;AACA,EAAA;AACT;AAES;AACA,EAAA;AACT;AAQS;AACH,EAAA;AACI,EAAA;AACC,EAAA;AAEL,EAAA;AACG,IAAA;AACC,IAAA;AACA,IAAA;AACG,IAAA;AACH,IAAA;AAEJ,IAAA;AAGK,MAAA;AACP,IAAA;AACI,IAAA;AACG,IAAA;AACT,EAAA;AAEM,EAAA;AAEJ,EAAA;AAIK,IAAA;AACP,EAAA;AACU,EAAA;AACH,EAAA;AACT;AAOgB;AACR,EAAA;AACF,EAAA;AACI,EAAA;AACD,EAAA;AACD,IAAA;AACI,MAAA;AACF,MAAA;AACE,QAAA;AACJ,QAAA;AACI,QAAA;AACJ,QAAA;AACF,MAAA;AACF,IAAA;AACK,IAAA;AACP,EAAA;AACU,EAAA;AACH,EAAA;AACT;AAES;AACA,EAAA;AACT;AAES;AACE,EAAA;AACD,IAAA;AACF,IAAA;AACJ,IAAA;AACQ,MAAA;AACR,IAAA;AACA,IAAA;AACF,EAAA;AAGS,EAAA;AAEL,EAAA;AAGK,EAAA;AACC,IAAA;AACR,IAAA;AACF,EAAA;AAEK,EAAA;AACL,EAAA;AACF;AAQgB;AACR,EAAA;AACA,EAAA;AACE,EAAA;AACD,EAAA;AACT;AAGgB;AACR,EAAA;AAA4B,IAAA;AAChC,IAAA;AACF,EAAA;AACM,EAAA;AACE,EAAA;AACD,EAAA;AAGT;AD9BY;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/polytypo-js/polytypo-js/dist/chunk-W52W6XGA.cjs","sourcesContent":[null,"import { parse, parseFragment } from \"parse5\";\nimport type { DefaultTreeAdapterMap } from \"parse5\";\nimport { wrapParserErrors } from \"./parse-error.js\";\nimport type { Span } from \"./spans.js\";\n\ntype Node = DefaultTreeAdapterMap[\"node\"];\ntype ParentNode = DefaultTreeAdapterMap[\"parentNode\"];\n\n/**\n * spec/rules/modes.md 3.6, exhaustive and **closed**: extending it is a spec change, not an\n * implementation decision. `svg` and `math` are here because in MathML a quotation mark, a\n * hyphen and a prime are operators and identifiers — substituting a curly glyph changes what\n * the expression means. Everything not listed is processable, **including unknown and custom\n * elements**: guessing from a tag name is exactly the heuristic that diverges across runtimes.\n */\nconst SKIPPED_ELEMENTS: ReadonlySet<string> = new Set([\n \"code\",\n \"pre\",\n \"kbd\",\n \"samp\",\n \"var\",\n \"script\",\n \"style\",\n \"textarea\",\n \"svg\",\n \"math\",\n]);\n\nexport function isSkippedElement(tagName: string): boolean {\n return SKIPPED_ELEMENTS.has(tagName);\n}\n\nconst AMPERSAND = 0x26;\nconst SEMICOLON = 0x3b;\nconst HASH = 0x23;\nconst LOWER_X = 0x78;\nconst UPPER_X = 0x58;\n\n/** Longest named reference in the WHATWG table is 32 characters; the guard is a bound, not a rule. */\nconst MAX_REFERENCE_BODY = 34;\n\nfunction isAsciiDigit(unit: number): boolean {\n return unit >= 0x30 && unit <= 0x39;\n}\n\nfunction isAsciiHexDigit(unit: number): boolean {\n return isAsciiDigit(unit) || (unit >= 0x61 && unit <= 0x66) || (unit >= 0x41 && unit <= 0x46);\n}\n\nfunction isAsciiAlphanumeric(unit: number): boolean {\n return isAsciiDigit(unit) || (unit >= 0x61 && unit <= 0x7a) || (unit >= 0x41 && unit <= 0x5a);\n}\n\n/**\n * The end offset of a well-formed character reference starting at `at`, or -1. A bare `&` that a\n * parser would repair is deliberately **not** treated as a reference: it stays inside the span,\n * where no rule can emit or delete it, rather than manufacturing a boundary that suppresses\n * conversions around it.\n */\nfunction characterReferenceEnd(source: string, at: number, limit: number): number {\n if (source.charCodeAt(at) !== AMPERSAND) return -1;\n let i = at + 1;\n if (i >= limit) return -1;\n\n if (source.charCodeAt(i) === HASH) {\n i += 1;\n const unit = i < limit ? source.charCodeAt(i) : -1;\n const hex = unit === LOWER_X || unit === UPPER_X;\n if (hex) i += 1;\n const digitsAt = i;\n while (\n i < limit &&\n (hex ? isAsciiHexDigit(source.charCodeAt(i)) : isAsciiDigit(source.charCodeAt(i)))\n ) {\n i += 1;\n }\n if (i === digitsAt) return -1;\n return i < limit && source.charCodeAt(i) === SEMICOLON ? i + 1 : -1;\n }\n\n const nameAt = i;\n while (\n i < limit &&\n i - nameAt < MAX_REFERENCE_BODY &&\n isAsciiAlphanumeric(source.charCodeAt(i))\n ) {\n i += 1;\n }\n if (i === nameAt) return -1;\n return i < limit && source.charCodeAt(i) === SEMICOLON ? i + 1 : -1;\n}\n\n/**\n * modes.md 3.6: every character reference is skipped as an **opaque unit**, and a text node\n * containing one is split into spans around it. That is the only way `&nbsp;` survives as\n * `&nbsp;` instead of becoming a literal U+00A0 on the way out.\n */\nexport function splitCharacterReferences(source: string, start: number, end: number): Span[] {\n const spans: Span[] = [];\n let cursor = start;\n let i = start;\n while (i < end) {\n if (source.charCodeAt(i) === AMPERSAND) {\n const stop = characterReferenceEnd(source, i, end);\n if (stop > 0) {\n if (i > cursor) spans.push({ start: cursor, end: i });\n cursor = stop;\n i = stop;\n continue;\n }\n }\n i += 1;\n }\n if (end > cursor) spans.push({ start: cursor, end });\n return spans;\n}\n\nfunction isParent(node: Node): node is ParentNode {\n return \"childNodes\" in node;\n}\n\nfunction collect(node: Node, source: string, spans: Span[]): void {\n if (node.nodeName === \"#text\") {\n const location = node.sourceCodeLocation;\n if (location === undefined || location === null) return;\n for (const span of splitCharacterReferences(source, location.startOffset, location.endOffset)) {\n spans.push(span);\n }\n return;\n }\n\n // Comments, doctype and processing instructions never contribute a span (modes.md 3.6).\n if (node.nodeName === \"#comment\" || node.nodeName === \"#documentType\") return;\n\n if (\"tagName\" in node && isSkippedElement(node.tagName)) return;\n\n // A `template`'s children live in a separate document fragment; `template` is not skipped.\n if (node.nodeName === \"template\" && \"content\" in node) {\n collect(node.content, source, spans);\n return;\n }\n\n if (!isParent(node)) return;\n for (const child of node.childNodes) collect(child, source, spans);\n}\n\n/**\n * Locate the processable spans of an HTML document. The tree is used only to find offsets and is\n * then discarded — modes.md 4 forbids reserialisation, which is what makes attribute quoting,\n * self-closing forms, entity spelling, tag case and malformed-input recovery preserved by\n * construction rather than by effort.\n */\nexport function htmlSpans(source: string): Span[] {\n const document = wrapParserErrors(\"HTML\", () => parse(source, { sourceCodeLocationInfo: true }));\n const spans: Span[] = [];\n collect(document, source, spans);\n return spans;\n}\n\n/** The same, for a fragment: used for HTML blocks embedded in markdown (modes.md 3.7). */\nexport function htmlFragmentSpans(source: string, offset: number): Span[] {\n const fragment = wrapParserErrors(\"HTML\", () =>\n parseFragment(source, { sourceCodeLocationInfo: true }),\n );\n const spans: Span[] = [];\n collect(fragment, source, spans);\n return offset === 0\n ? spans\n : spans.map((span) => ({ start: span.start + offset, end: span.end + offset }));\n}\n","import { PolytypoError } from \"../errors.js\";\n\ninterface PositionedError {\n readonly reason?: unknown;\n readonly place?: { readonly line?: unknown; readonly column?: unknown } | null;\n}\n\nfunction describe(error: unknown): string {\n if (typeof error !== \"object\" || error === null) return String(error);\n const positioned = error as PositionedError;\n const reason =\n typeof positioned.reason === \"string\" ? positioned.reason : (error as Error).message;\n const place = positioned.place;\n if (\n place !== null &&\n place !== undefined &&\n typeof place.line === \"number\" &&\n typeof place.column === \"number\"\n ) {\n return `${reason} (line ${place.line}, column ${place.column})`;\n }\n return reason;\n}\n\n/**\n * spec/rules/modes.md 3.7.2. **The parser's own error type must never escape.** A\n * `VFileMessage`, a `Nokogiri::SyntaxError` or a Python exception on the public surface puts a\n * dependency's type into the contract and is unreproducible in the other four runtimes; only the\n * code is contractual (ARCHITECTURE.md 4.6), while the message and the source position are\n * useful and are not.\n *\n * Reachable in exactly one place: `dialect: \"mdx\"`, because MDX embeds JavaScript. HTML parsing\n * is specified with total error recovery and every byte sequence is valid CommonMark, so neither\n * of the other two languages can fail. The wrapper is applied to all of them anyway — the\n * guarantee is that no parser type escapes, not that this particular parser is trusted.\n */\nexport function wrapParserErrors<T>(what: string, run: () => T): T {\n try {\n return run();\n } catch (error) {\n if (error instanceof PolytypoError) throw error;\n throw new PolytypoError(\n \"POLYTYPO_MALFORMED_INPUT\",\n `Input does not parse as ${what}: ${describe(error)}`,\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/polytypo-js/polytypo-js/dist/chunk-3M2WNZH3.cjs","../src/modes/html.ts","../src/modes/parse-error.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACJA,gCAAqC;ADMrC;AACA;AEAA,SAAS,QAAA,CAAS,KAAA,EAAwB;AACxC,EAAA,GAAA,CAAI,OAAO,MAAA,IAAU,SAAA,GAAY,MAAA,IAAU,IAAA,EAAM,OAAO,MAAA,CAAO,KAAK,CAAA;AACpE,EAAA,MAAM,WAAA,EAAa,KAAA;AACnB,EAAA,MAAM,OAAA,EACJ,OAAO,UAAA,CAAW,OAAA,IAAW,SAAA,EAAW,UAAA,CAAW,OAAA,EAAU,KAAA,CAAgB,OAAA;AAC/E,EAAA,MAAM,MAAA,EAAQ,UAAA,CAAW,KAAA;AACzB,EAAA,GAAA,CACE,MAAA,IAAU,KAAA,GACV,MAAA,IAAU,KAAA,EAAA,GACV,OAAO,KAAA,CAAM,KAAA,IAAS,SAAA,GACtB,OAAO,KAAA,CAAM,OAAA,IAAW,QAAA,EACxB;AACA,IAAA,OAAO,CAAA,EAAA;AACT,EAAA;AACO,EAAA;AACT;AAcgB;AACV,EAAA;AACK,IAAA;AACA,EAAA;AACH,IAAA;AACE,IAAA;AACJ,MAAA;AACA,MAAA;AACF,IAAA;AACF,EAAA;AACF;AFjBY;AACA;ACfN;AACJ,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACD;AAEe;AACP,EAAA;AACT;AAEM;AACA;AACO;AACP;AACA;AAGA;AAEG;AACA,EAAA;AACT;AAES;AACA,EAAA;AACT;AAES;AACA,EAAA;AACT;AAQS;AACH,EAAA;AACI,EAAA;AACC,EAAA;AAEL,EAAA;AACG,IAAA;AACC,IAAA;AACA,IAAA;AACG,IAAA;AACH,IAAA;AAEJ,IAAA;AAGK,MAAA;AACP,IAAA;AACI,IAAA;AACG,IAAA;AACT,EAAA;AAEM,EAAA;AAEJ,EAAA;AAIK,IAAA;AACP,EAAA;AACU,EAAA;AACH,EAAA;AACT;AAOgB;AACR,EAAA;AACF,EAAA;AACI,EAAA;AACD,EAAA;AACD,IAAA;AACI,MAAA;AACF,MAAA;AACE,QAAA;AACJ,QAAA;AACI,QAAA;AACJ,QAAA;AACF,MAAA;AACF,IAAA;AACK,IAAA;AACP,EAAA;AACU,EAAA;AACH,EAAA;AACT;AAES;AACA,EAAA;AACT;AAES;AACE,EAAA;AACD,IAAA;AACF,IAAA;AACJ,IAAA;AACQ,MAAA;AACR,IAAA;AACA,IAAA;AACF,EAAA;AAGS,EAAA;AAEL,EAAA;AAGK,EAAA;AACC,IAAA;AACR,IAAA;AACF,EAAA;AAEK,EAAA;AACL,EAAA;AACF;AAQgB;AACR,EAAA;AACA,EAAA;AACE,EAAA;AACD,EAAA;AACT;AAGgB;AACR,EAAA;AAA4B,IAAA;AAChC,IAAA;AACF,EAAA;AACM,EAAA;AACE,EAAA;AACD,EAAA;AAGT;AD9BY;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/polytypo-js/polytypo-js/dist/chunk-3M2WNZH3.cjs","sourcesContent":[null,"import { parse, parseFragment } from \"parse5\";\nimport type { DefaultTreeAdapterMap } from \"parse5\";\nimport { wrapParserErrors } from \"./parse-error.js\";\nimport type { Span } from \"./spans.js\";\n\ntype Node = DefaultTreeAdapterMap[\"node\"];\ntype ParentNode = DefaultTreeAdapterMap[\"parentNode\"];\n\n/**\n * spec/rules/modes.md 3.6, exhaustive and **closed**: extending it is a spec change, not an\n * implementation decision. `svg` and `math` are here because in MathML a quotation mark, a\n * hyphen and a prime are operators and identifiers — substituting a curly glyph changes what\n * the expression means. Everything not listed is processable, **including unknown and custom\n * elements**: guessing from a tag name is exactly the heuristic that diverges across runtimes.\n */\nconst SKIPPED_ELEMENTS: ReadonlySet<string> = new Set([\n \"code\",\n \"pre\",\n \"kbd\",\n \"samp\",\n \"var\",\n \"script\",\n \"style\",\n \"textarea\",\n \"svg\",\n \"math\",\n]);\n\nexport function isSkippedElement(tagName: string): boolean {\n return SKIPPED_ELEMENTS.has(tagName);\n}\n\nconst AMPERSAND = 0x26;\nconst SEMICOLON = 0x3b;\nconst HASH = 0x23;\nconst LOWER_X = 0x78;\nconst UPPER_X = 0x58;\n\n/** Longest named reference in the WHATWG table is 32 characters; the guard is a bound, not a rule. */\nconst MAX_REFERENCE_BODY = 34;\n\nfunction isAsciiDigit(unit: number): boolean {\n return unit >= 0x30 && unit <= 0x39;\n}\n\nfunction isAsciiHexDigit(unit: number): boolean {\n return isAsciiDigit(unit) || (unit >= 0x61 && unit <= 0x66) || (unit >= 0x41 && unit <= 0x46);\n}\n\nfunction isAsciiAlphanumeric(unit: number): boolean {\n return isAsciiDigit(unit) || (unit >= 0x61 && unit <= 0x7a) || (unit >= 0x41 && unit <= 0x5a);\n}\n\n/**\n * The end offset of a well-formed character reference starting at `at`, or -1. A bare `&` that a\n * parser would repair is deliberately **not** treated as a reference: it stays inside the span,\n * where no rule can emit or delete it, rather than manufacturing a boundary that suppresses\n * conversions around it.\n */\nfunction characterReferenceEnd(source: string, at: number, limit: number): number {\n if (source.charCodeAt(at) !== AMPERSAND) return -1;\n let i = at + 1;\n if (i >= limit) return -1;\n\n if (source.charCodeAt(i) === HASH) {\n i += 1;\n const unit = i < limit ? source.charCodeAt(i) : -1;\n const hex = unit === LOWER_X || unit === UPPER_X;\n if (hex) i += 1;\n const digitsAt = i;\n while (\n i < limit &&\n (hex ? isAsciiHexDigit(source.charCodeAt(i)) : isAsciiDigit(source.charCodeAt(i)))\n ) {\n i += 1;\n }\n if (i === digitsAt) return -1;\n return i < limit && source.charCodeAt(i) === SEMICOLON ? i + 1 : -1;\n }\n\n const nameAt = i;\n while (\n i < limit &&\n i - nameAt < MAX_REFERENCE_BODY &&\n isAsciiAlphanumeric(source.charCodeAt(i))\n ) {\n i += 1;\n }\n if (i === nameAt) return -1;\n return i < limit && source.charCodeAt(i) === SEMICOLON ? i + 1 : -1;\n}\n\n/**\n * modes.md 3.6: every character reference is skipped as an **opaque unit**, and a text node\n * containing one is split into spans around it. That is the only way `&nbsp;` survives as\n * `&nbsp;` instead of becoming a literal U+00A0 on the way out.\n */\nexport function splitCharacterReferences(source: string, start: number, end: number): Span[] {\n const spans: Span[] = [];\n let cursor = start;\n let i = start;\n while (i < end) {\n if (source.charCodeAt(i) === AMPERSAND) {\n const stop = characterReferenceEnd(source, i, end);\n if (stop > 0) {\n if (i > cursor) spans.push({ start: cursor, end: i });\n cursor = stop;\n i = stop;\n continue;\n }\n }\n i += 1;\n }\n if (end > cursor) spans.push({ start: cursor, end });\n return spans;\n}\n\nfunction isParent(node: Node): node is ParentNode {\n return \"childNodes\" in node;\n}\n\nfunction collect(node: Node, source: string, spans: Span[]): void {\n if (node.nodeName === \"#text\") {\n const location = node.sourceCodeLocation;\n if (location === undefined || location === null) return;\n for (const span of splitCharacterReferences(source, location.startOffset, location.endOffset)) {\n spans.push(span);\n }\n return;\n }\n\n // Comments, doctype and processing instructions never contribute a span (modes.md 3.6).\n if (node.nodeName === \"#comment\" || node.nodeName === \"#documentType\") return;\n\n if (\"tagName\" in node && isSkippedElement(node.tagName)) return;\n\n // A `template`'s children live in a separate document fragment; `template` is not skipped.\n if (node.nodeName === \"template\" && \"content\" in node) {\n collect(node.content, source, spans);\n return;\n }\n\n if (!isParent(node)) return;\n for (const child of node.childNodes) collect(child, source, spans);\n}\n\n/**\n * Locate the processable spans of an HTML document. The tree is used only to find offsets and is\n * then discarded — modes.md 4 forbids reserialisation, which is what makes attribute quoting,\n * self-closing forms, entity spelling, tag case and malformed-input recovery preserved by\n * construction rather than by effort.\n */\nexport function htmlSpans(source: string): Span[] {\n const document = wrapParserErrors(\"HTML\", () => parse(source, { sourceCodeLocationInfo: true }));\n const spans: Span[] = [];\n collect(document, source, spans);\n return spans;\n}\n\n/** The same, for a fragment: used for HTML blocks embedded in markdown (modes.md 3.7). */\nexport function htmlFragmentSpans(source: string, offset: number): Span[] {\n const fragment = wrapParserErrors(\"HTML\", () =>\n parseFragment(source, { sourceCodeLocationInfo: true }),\n );\n const spans: Span[] = [];\n collect(fragment, source, spans);\n return offset === 0\n ? spans\n : spans.map((span) => ({ start: span.start + offset, end: span.end + offset }));\n}\n","import { PolytypoError } from \"../errors.js\";\n\ninterface PositionedError {\n readonly reason?: unknown;\n readonly place?: { readonly line?: unknown; readonly column?: unknown } | null;\n}\n\nfunction describe(error: unknown): string {\n if (typeof error !== \"object\" || error === null) return String(error);\n const positioned = error as PositionedError;\n const reason =\n typeof positioned.reason === \"string\" ? positioned.reason : (error as Error).message;\n const place = positioned.place;\n if (\n place !== null &&\n place !== undefined &&\n typeof place.line === \"number\" &&\n typeof place.column === \"number\"\n ) {\n return `${reason} (line ${place.line}, column ${place.column})`;\n }\n return reason;\n}\n\n/**\n * spec/rules/modes.md 3.7.2. **The parser's own error type must never escape.** A\n * `VFileMessage`, a `Nokogiri::SyntaxError` or a Python exception on the public surface puts a\n * dependency's type into the contract and is unreproducible in the other four runtimes; only the\n * code is contractual (ARCHITECTURE.md 4.6), while the message and the source position are\n * useful and are not.\n *\n * Reachable in exactly one place: `dialect: \"mdx\"`, because MDX embeds JavaScript. HTML parsing\n * is specified with total error recovery and every byte sequence is valid CommonMark, so neither\n * of the other two languages can fail. The wrapper is applied to all of them anyway — the\n * guarantee is that no parser type escapes, not that this particular parser is trusted.\n */\nexport function wrapParserErrors<T>(what: string, run: () => T): T {\n try {\n return run();\n } catch (error) {\n if (error instanceof PolytypoError) throw error;\n throw new PolytypoError(\n \"POLYTYPO_MALFORMED_INPUT\",\n `Input does not parse as ${what}: ${describe(error)}`,\n );\n }\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkWQEB33J2cjs = require('./chunk-WQEB33J2.cjs');
3
+ var _chunkTDPBY65Kcjs = require('./chunk-TDPBY65K.cjs');
4
4
 
5
5
  // src/modes/yaml.ts
6
6
  var TAB = 9;
@@ -331,14 +331,14 @@ function plainScalar(source, line, v, spans) {
331
331
  // src/engine/yaml-keys.ts
332
332
  function resolveYamlKeys(value) {
333
333
  if (!Array.isArray(value)) {
334
- throw new (0, _chunkWQEB33J2cjs.PolytypoError)(
334
+ throw new (0, _chunkTDPBY65Kcjs.PolytypoError)(
335
335
  "POLYTYPO_INVALID_OPTION",
336
336
  `"keys" is required when mode is "yaml" and must be a list of strings (modes.md \xA73.8.2). Received ${value === void 0 ? "nothing" : JSON.stringify(value)}.`
337
337
  );
338
338
  }
339
339
  for (const key of value) {
340
340
  if (typeof key !== "string") {
341
- throw new (0, _chunkWQEB33J2cjs.PolytypoError)(
341
+ throw new (0, _chunkTDPBY65Kcjs.PolytypoError)(
342
342
  "POLYTYPO_INVALID_OPTION",
343
343
  `"keys" must contain only strings; received ${JSON.stringify(key)}.`
344
344
  );
@@ -349,14 +349,14 @@ function resolveYamlKeys(value) {
349
349
  function resolveFrontmatterKeys(value) {
350
350
  if (value === void 0) return void 0;
351
351
  if (!Array.isArray(value)) {
352
- throw new (0, _chunkWQEB33J2cjs.PolytypoError)(
352
+ throw new (0, _chunkTDPBY65Kcjs.PolytypoError)(
353
353
  "POLYTYPO_INVALID_OPTION",
354
354
  `"frontmatterKeys" must be a list of strings when given (modes.md \xA73.7.4). Received ${JSON.stringify(value)}.`
355
355
  );
356
356
  }
357
357
  for (const key of value) {
358
358
  if (typeof key !== "string") {
359
- throw new (0, _chunkWQEB33J2cjs.PolytypoError)(
359
+ throw new (0, _chunkTDPBY65Kcjs.PolytypoError)(
360
360
  "POLYTYPO_INVALID_OPTION",
361
361
  `"frontmatterKeys" must contain only strings; received ${JSON.stringify(key)}.`
362
362
  );
@@ -370,4 +370,4 @@ function resolveFrontmatterKeys(value) {
370
370
 
371
371
 
372
372
  exports.yamlSpans = yamlSpans; exports.resolveYamlKeys = resolveYamlKeys; exports.resolveFrontmatterKeys = resolveFrontmatterKeys;
373
- //# sourceMappingURL=chunk-TUDHJRJN.cjs.map
373
+ //# sourceMappingURL=chunk-6BG3NAIW.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/polytypo-js/polytypo-js/dist/chunk-TUDHJRJN.cjs","../src/modes/yaml.ts","../src/engine/yaml-keys.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACkBA,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,SAAA,EAAW,EAAA;AACjB,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;AACvB,EAAA,IAAI,MAAA,EAAQ,CAAA;AACZ,EAAA,MAAM,MAAA,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ACA,EAAA,IAAA,CAAA,MAAW,IAAA,GAAO,KAAA,EAA6B;AAC7C,IAAA,GAAA,CAAI,OAAO,IAAA,IAAQ,QAAA,EAAU;AAC3B,MAAA,MAAM,IAAI,oCAAA;AAAA,QACR,yBAAA;AAAA,QACA,CAAA,sDAAA,EAAyD,IAAA,CAAK,SAAA,CAAU,GAAG,CAAC,CAAA,CAAA;AAAA,MAC9E,CAAA;AAAA,IACF;AAAA,EACF;AACA,EAAA,OAAO,KAAA;AACT;AFiTA;AACA;AACE;AACA;AACA;AACF,kIAAC","file":"/home/runner/work/polytypo-js/polytypo-js/dist/chunk-TUDHJRJN.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 QUESTION = 0x3f;\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 9. A U+000D that splitLines did not take for a terminator is a lone one, and YAML\n * 1.2.2 5.4 reads it as a line break the LF-only model of 3.8.4 does not. Declining the line is\n * what keeps \"line terminators are never inside a span\" true.\n */\nfunction hasLoneCarriageReturn(source: string, line: Line): boolean {\n for (let i = line.start; i < line.end; i += 1) if (source.charCodeAt(i) === CR) 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\n/** 3.8.4 step 7: a line of the value run that is not blank. Blank lines alone are not one. */\nfunction hasContinuation(\n source: string,\n lines: readonly Line[],\n li: number,\n runEnd: number,\n): boolean {\n for (let k = li + 1; k < runEnd; k += 1) if (!isBlank(source, lines[k] as Line)) return true;\n return false;\n}\n\n/**\n * 3.8.4's carriage-return region: a line containing a U+000D yields no spans, and neither does any\n * later line up to the first one that is non-empty, does not begin with U+0020 and contains none.\n * It removes spans and never adds one, so it cannot change which lines a value run consumes.\n */\nfunction dropCarriageReturnRegions(source: string, lines: readonly Line[], spans: Span[]): Span[] {\n const declined: boolean[] = [];\n let inRegion = false;\n for (const line of lines) {\n if (hasLoneCarriageReturn(source, line)) inRegion = true;\n else if (line.end > line.start && source.charCodeAt(line.start) !== SPACE) inRegion = false;\n declined.push(inRegion);\n }\n if (!declined.includes(true)) return spans;\n const kept: Span[] = [];\n let li = 0;\n for (const span of spans) {\n while (li + 1 < lines.length && span.start >= (lines[li + 1] as Line).start) li += 1;\n if (!declined[li]) kept.push(span);\n }\n return kept;\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 dropCarriageReturnRegions(source, lines, spans);\n}\n\n/**\n * 3.8.4 step 5. The index of the quote that closes the one at `q`, or -1. In a double-quoted scalar\n * a U+005C and the code point after it never close the quote, which decodes nothing: no YAML\n * escape ends in anything that would be a closing quote. A quote not closed on the line returns -1.\n */\nfunction closingQuote(source: string, line: Line, q: number): number {\n const quote = source.charCodeAt(q);\n for (let j = q + 1; j < line.end; j += 1) {\n const c = source.charCodeAt(j);\n if (quote === DQUOTE && c === BACKSLASH) {\n j += 1;\n continue;\n }\n if (c !== quote) continue;\n if (quote === SQUOTE && j + 1 < line.end && source.charCodeAt(j + 1) === SQUOTE) {\n j += 1;\n continue;\n }\n return j;\n }\n return -1;\n}\n\n/** 3.8.4 step 3. A document marker at column 0, which is where YAML reads one. */\nfunction documentRunEnd(source: string, lines: readonly Line[], li: number): number {\n let k = li + 1;\n while (k < lines.length) {\n const next = lines[k] as Line;\n if (isDocumentMarker(source, next.start, next.end)) break;\n k += 1;\n }\n return k;\n}\n\n/**\n * 3.8.4 step 5, the own-line node: everything up to the first later line that is non-empty and\n * does not begin with U+0020, because the scan does not track the key above and a flow collection,\n * a block scalar header or an unclosed quote on a line of its own can continue at any depth.\n */\nfunction ownLineRunEnd(source: string, lines: readonly Line[], li: number, indent: number): number {\n if (indent === 0) return documentRunEnd(source, lines, li);\n let k = li + 1;\n while (k < lines.length) {\n const next = lines[k] as Line;\n if (next.end > next.start && source.charCodeAt(next.start) !== SPACE) break;\n k += 1;\n }\n return k;\n}\n\n/** 3.8.4 step 4: `-`, `?` or `:` followed by U+0020 or the line end. */\nfunction isNodeMarker(source: string, j: number, end: number): boolean {\n const c = source.charCodeAt(j);\n if (c !== DASH && c !== QUESTION && c !== COLON) return false;\n return j + 1 === end || source.charCodeAt(j + 1) === SPACE;\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. A tab makes indentation undecidable, so the line and whatever it absorbs\n // yield no spans, but steps 2 to 7 still decide what it absorbs.\n const start = firstNonSpace(source, line);\n if (start === line.end) return skipLine;\n const isQuiet = hasTab(source, line);\n const indent = start - line.start;\n\n // steps 2 and 3 — comment, directive, document marker. A marker with a node after it absorbs\n // the document.\n const head = source.charCodeAt(start);\n if (head === HASH || head === PERCENT) return skipLine;\n if (isDocumentMarker(source, start, line.end)) {\n let p = start + 3;\n while (p < line.end && source.charCodeAt(p) === SPACE) p += 1;\n if (p >= line.end || source.charCodeAt(p) === HASH) return skipLine;\n return indent === 0 ? documentRunEnd(source, lines, li) : skipLine;\n }\n\n // step 4 — node markers are consumed, not skipped; `- - key: v` nests.\n let i = start;\n while (i < line.end && isNodeMarker(source, i, line.end)) {\n i += 2;\n while (i < line.end && source.charCodeAt(i) === SPACE) i += 1;\n }\n if (i >= line.end || source.charCodeAt(i) === HASH) return skipLine;\n const hasMarker = i > start;\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 const first = source.charCodeAt(i);\n let colon = -1;\n let keyEnd = -1;\n let isDeclined = false;\n let isOpenQuote = false;\n if (first === DQUOTE || first === SQUOTE) {\n const close = closingQuote(source, line, i);\n if (close < 0) isOpenQuote = true;\n else {\n let p = close + 1;\n while (p < line.end && source.charCodeAt(p) === SPACE) p += 1;\n if (isIndicatorColon(source, p, line.end)) {\n colon = p;\n keyEnd = close + 1;\n isDeclined = true;\n }\n }\n } else if (\n first !== LBRACE &&\n first !== LBRACKET &&\n first !== AMPERSAND &&\n first !== STAR &&\n first !== BANG\n ) {\n for (let j = i; j < line.end; j += 1) {\n const c = source.charCodeAt(j);\n if (c === HASH && source.charCodeAt(j - 1) === SPACE) break;\n if (isIndicatorColon(source, j, line.end)) {\n colon = j;\n break;\n }\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 isDeclined = true;\n }\n }\n if (colon >= 0) {\n keyEnd = colon;\n while (keyEnd > keyStart && source.charCodeAt(keyEnd - 1) === SPACE) keyEnd -= 1;\n }\n }\n\n // No key: the line is a node of its own, and it absorbs its value run. One that opens a flow\n // collection, a block scalar or a quote and sits on a line of its own absorbs the region.\n if (colon < 0) {\n const isOwnLine =\n !hasMarker &&\n (isOpenQuote ||\n first === LBRACE ||\n first === LBRACKET ||\n first === PIPE ||\n first === GREATER);\n return isOwnLine\n ? ownLineRunEnd(source, lines, li, indent)\n : valueRunEnd(source, lines, li, indent);\n }\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. A\n // declined key's value absorbs them only if it can continue on the next line.\n const value = source.charCodeAt(v);\n if (isDeclined) {\n let isOpen =\n value === PIPE ||\n value === GREATER ||\n value === LBRACE ||\n value === LBRACKET ||\n value === AMPERSAND ||\n value === BANG;\n if (value === DQUOTE || value === SQUOTE) {\n const close = closingQuote(source, line, v);\n let p = close + 1;\n while (p < line.end && source.charCodeAt(p) === SPACE) p += 1;\n isOpen = close < 0 || (p < line.end && source.charCodeAt(p) !== HASH);\n }\n return isOpen ? valueRunEnd(source, lines, li, indent) : skipLine;\n }\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 if (isQuiet) return next;\n\n // step 9 — the scalar form.\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 (!hasContinuation(source, lines, li, next)) quotedScalar(source, line, v, spans);\n return next;\n }\n if (!hasContinuation(source, lines, li, next)) 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) || hasLoneCarriageReturn(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. A double-quoted scalar containing a backslash\n * yields no spans: the source spells that content with more characters than it has, which the\n * offset model of 3.1 cannot hold — the same constraint that makes an HTML character reference an\n * opaque unit in 3.6. In a single-quoted scalar `''` is the same kind of construct, and since spec\n * 1.9.0 it is such a unit: the range is split around it, so the apostrophe it spells stays\n * U+0027 and everything on either side converts. No colon test applies here: quoting neutralises\n * the colon, and applying the plain-scalar test would decline `title: \"Chapter 1: the beginning\"`.\n */\nfunction quotedScalar(source: string, line: Line, v: number, spans: Span[]): void {\n const quote = source.charCodeAt(v);\n const found: Span[] = [];\n let close = -1;\n let segment = v + 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 (c !== quote) continue;\n if (quote === SQUOTE && j + 1 < line.end && source.charCodeAt(j + 1) === SQUOTE) {\n if (j > segment) found.push({ start: segment, end: j });\n segment = j + 2;\n j += 1;\n continue;\n }\n close = j;\n break;\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 > segment) found.push({ start: segment, end: close });\n spans.push(...found);\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\n/**\n * modes.md 3.7.4: `markdown` mode's `frontmatterKeys`. Optional — absent means the frontmatter\n * block is skipped whole, which is every pre-1.7.0 document's behaviour — and an empty list is\n * legal, exactly as it is for `keys`.\n *\n * Checked **after `dialect` and before the parse** (modes.md 3.7.4), which is what decides that a\n * document failing to parse in its dialect still reports the option error rather than\n * POLYTYPO_MALFORMED_INPUT. It is a separate function from `resolveYamlKeys` because the two\n * differ exactly where a caller would be bitten by sharing one: this option has no requiredness.\n */\nexport function resolveFrontmatterKeys(value: unknown): readonly string[] | undefined {\n if (value === undefined) return undefined;\n if (!Array.isArray(value)) {\n throw new PolytypoError(\n \"POLYTYPO_INVALID_OPTION\",\n `\"frontmatterKeys\" must be a list of strings when given (modes.md §3.7.4). ` +\n `Received ${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 `\"frontmatterKeys\" must contain only strings; received ${JSON.stringify(key)}.`,\n );\n }\n }\n return value as readonly string[];\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/polytypo-js/polytypo-js/dist/chunk-6BG3NAIW.cjs","../src/modes/yaml.ts","../src/engine/yaml-keys.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACkBA,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,EA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CAAA;AAAA,IACvE,CAAA;AAAA,EACF;AACA,EAAA,IAAA,CAAA,MAAW,IAAA,GAAO,KAAA,EAA6B;AAC7C,IAAA,GAAA,CAAI,OAAO,IAAA,IAAQ,QAAA,EAAU;AAC3B,MAAA,MAAM,IAAI,oCAAA;AAAA,QACR,yBAAA;AAAA,QACA,CAAA,2CAAA,EAA8C,IAAA,CAAK,SAAA,CAAU,GAAG,CAAC,CAAA,CAAA;AAAA,MACnE,CAAA;AAAA,IACF;AAAA,EACF;AACA,EAAA,OAAO,KAAA;AACT;AAYO,SAAS,sBAAA,CAAuB,KAAA,EAA+C;AACpF,EAAA,GAAA,CAAI,MAAA,IAAU,KAAA,CAAA,EAAW,OAAO,KAAA,CAAA;AAChC,EAAA,GAAA,CAAI,CAAC,KAAA,CAAM,OAAA,CAAQ,KAAK,CAAA,EAAG;AACzB,IAAA,MAAM,IAAI,oCAAA;AAAA,MACR,yBAAA;AAAA,MACA,CAAA,sFAAA,EACc,IAAA,CAAK,SAAA,CAAU,KAAK,CAAC,CAAA,CAAA;AAAA,IACrC,CAAA;AAAA,EACF;AACA,EAAA,IAAA,CAAA,MAAW,IAAA,GAAO,KAAA,EAA6B;AAC7C,IAAA,GAAA,CAAI,OAAO,IAAA,IAAQ,QAAA,EAAU;AAC3B,MAAA,MAAM,IAAI,oCAAA;AAAA,QACR,yBAAA;AAAA,QACA,CAAA,sDAAA,EAAyD,IAAA,CAAK,SAAA,CAAU,GAAG,CAAC,CAAA,CAAA;AAAA,MAC9E,CAAA;AAAA,IACF;AAAA,EACF;AACA,EAAA,OAAO,KAAA;AACT;AFiTA;AACA;AACE;AACA;AACA;AACF,kIAAC","file":"/home/runner/work/polytypo-js/polytypo-js/dist/chunk-6BG3NAIW.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 QUESTION = 0x3f;\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 9. A U+000D that splitLines did not take for a terminator is a lone one, and YAML\n * 1.2.2 5.4 reads it as a line break the LF-only model of 3.8.4 does not. Declining the line is\n * what keeps \"line terminators are never inside a span\" true.\n */\nfunction hasLoneCarriageReturn(source: string, line: Line): boolean {\n for (let i = line.start; i < line.end; i += 1) if (source.charCodeAt(i) === CR) 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\n/** 3.8.4 step 7: a line of the value run that is not blank. Blank lines alone are not one. */\nfunction hasContinuation(\n source: string,\n lines: readonly Line[],\n li: number,\n runEnd: number,\n): boolean {\n for (let k = li + 1; k < runEnd; k += 1) if (!isBlank(source, lines[k] as Line)) return true;\n return false;\n}\n\n/**\n * 3.8.4's carriage-return region: a line containing a U+000D yields no spans, and neither does any\n * later line up to the first one that is non-empty, does not begin with U+0020 and contains none.\n * It removes spans and never adds one, so it cannot change which lines a value run consumes.\n */\nfunction dropCarriageReturnRegions(source: string, lines: readonly Line[], spans: Span[]): Span[] {\n const declined: boolean[] = [];\n let inRegion = false;\n for (const line of lines) {\n if (hasLoneCarriageReturn(source, line)) inRegion = true;\n else if (line.end > line.start && source.charCodeAt(line.start) !== SPACE) inRegion = false;\n declined.push(inRegion);\n }\n if (!declined.includes(true)) return spans;\n const kept: Span[] = [];\n let li = 0;\n for (const span of spans) {\n while (li + 1 < lines.length && span.start >= (lines[li + 1] as Line).start) li += 1;\n if (!declined[li]) kept.push(span);\n }\n return kept;\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 dropCarriageReturnRegions(source, lines, spans);\n}\n\n/**\n * 3.8.4 step 5. The index of the quote that closes the one at `q`, or -1. In a double-quoted scalar\n * a U+005C and the code point after it never close the quote, which decodes nothing: no YAML\n * escape ends in anything that would be a closing quote. A quote not closed on the line returns -1.\n */\nfunction closingQuote(source: string, line: Line, q: number): number {\n const quote = source.charCodeAt(q);\n for (let j = q + 1; j < line.end; j += 1) {\n const c = source.charCodeAt(j);\n if (quote === DQUOTE && c === BACKSLASH) {\n j += 1;\n continue;\n }\n if (c !== quote) continue;\n if (quote === SQUOTE && j + 1 < line.end && source.charCodeAt(j + 1) === SQUOTE) {\n j += 1;\n continue;\n }\n return j;\n }\n return -1;\n}\n\n/** 3.8.4 step 3. A document marker at column 0, which is where YAML reads one. */\nfunction documentRunEnd(source: string, lines: readonly Line[], li: number): number {\n let k = li + 1;\n while (k < lines.length) {\n const next = lines[k] as Line;\n if (isDocumentMarker(source, next.start, next.end)) break;\n k += 1;\n }\n return k;\n}\n\n/**\n * 3.8.4 step 5, the own-line node: everything up to the first later line that is non-empty and\n * does not begin with U+0020, because the scan does not track the key above and a flow collection,\n * a block scalar header or an unclosed quote on a line of its own can continue at any depth.\n */\nfunction ownLineRunEnd(source: string, lines: readonly Line[], li: number, indent: number): number {\n if (indent === 0) return documentRunEnd(source, lines, li);\n let k = li + 1;\n while (k < lines.length) {\n const next = lines[k] as Line;\n if (next.end > next.start && source.charCodeAt(next.start) !== SPACE) break;\n k += 1;\n }\n return k;\n}\n\n/** 3.8.4 step 4: `-`, `?` or `:` followed by U+0020 or the line end. */\nfunction isNodeMarker(source: string, j: number, end: number): boolean {\n const c = source.charCodeAt(j);\n if (c !== DASH && c !== QUESTION && c !== COLON) return false;\n return j + 1 === end || source.charCodeAt(j + 1) === SPACE;\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. A tab makes indentation undecidable, so the line and whatever it absorbs\n // yield no spans, but steps 2 to 7 still decide what it absorbs.\n const start = firstNonSpace(source, line);\n if (start === line.end) return skipLine;\n const isQuiet = hasTab(source, line);\n const indent = start - line.start;\n\n // steps 2 and 3 — comment, directive, document marker. A marker with a node after it absorbs\n // the document.\n const head = source.charCodeAt(start);\n if (head === HASH || head === PERCENT) return skipLine;\n if (isDocumentMarker(source, start, line.end)) {\n let p = start + 3;\n while (p < line.end && source.charCodeAt(p) === SPACE) p += 1;\n if (p >= line.end || source.charCodeAt(p) === HASH) return skipLine;\n return indent === 0 ? documentRunEnd(source, lines, li) : skipLine;\n }\n\n // step 4 — node markers are consumed, not skipped; `- - key: v` nests.\n let i = start;\n while (i < line.end && isNodeMarker(source, i, line.end)) {\n i += 2;\n while (i < line.end && source.charCodeAt(i) === SPACE) i += 1;\n }\n if (i >= line.end || source.charCodeAt(i) === HASH) return skipLine;\n const hasMarker = i > start;\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 const first = source.charCodeAt(i);\n let colon = -1;\n let keyEnd = -1;\n let isDeclined = false;\n let isOpenQuote = false;\n if (first === DQUOTE || first === SQUOTE) {\n const close = closingQuote(source, line, i);\n if (close < 0) isOpenQuote = true;\n else {\n let p = close + 1;\n while (p < line.end && source.charCodeAt(p) === SPACE) p += 1;\n if (isIndicatorColon(source, p, line.end)) {\n colon = p;\n keyEnd = close + 1;\n isDeclined = true;\n }\n }\n } else if (\n first !== LBRACE &&\n first !== LBRACKET &&\n first !== AMPERSAND &&\n first !== STAR &&\n first !== BANG\n ) {\n for (let j = i; j < line.end; j += 1) {\n const c = source.charCodeAt(j);\n if (c === HASH && source.charCodeAt(j - 1) === SPACE) break;\n if (isIndicatorColon(source, j, line.end)) {\n colon = j;\n break;\n }\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 isDeclined = true;\n }\n }\n if (colon >= 0) {\n keyEnd = colon;\n while (keyEnd > keyStart && source.charCodeAt(keyEnd - 1) === SPACE) keyEnd -= 1;\n }\n }\n\n // No key: the line is a node of its own, and it absorbs its value run. One that opens a flow\n // collection, a block scalar or a quote and sits on a line of its own absorbs the region.\n if (colon < 0) {\n const isOwnLine =\n !hasMarker &&\n (isOpenQuote ||\n first === LBRACE ||\n first === LBRACKET ||\n first === PIPE ||\n first === GREATER);\n return isOwnLine\n ? ownLineRunEnd(source, lines, li, indent)\n : valueRunEnd(source, lines, li, indent);\n }\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. A\n // declined key's value absorbs them only if it can continue on the next line.\n const value = source.charCodeAt(v);\n if (isDeclined) {\n let isOpen =\n value === PIPE ||\n value === GREATER ||\n value === LBRACE ||\n value === LBRACKET ||\n value === AMPERSAND ||\n value === BANG;\n if (value === DQUOTE || value === SQUOTE) {\n const close = closingQuote(source, line, v);\n let p = close + 1;\n while (p < line.end && source.charCodeAt(p) === SPACE) p += 1;\n isOpen = close < 0 || (p < line.end && source.charCodeAt(p) !== HASH);\n }\n return isOpen ? valueRunEnd(source, lines, li, indent) : skipLine;\n }\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 if (isQuiet) return next;\n\n // step 9 — the scalar form.\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 (!hasContinuation(source, lines, li, next)) quotedScalar(source, line, v, spans);\n return next;\n }\n if (!hasContinuation(source, lines, li, next)) 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) || hasLoneCarriageReturn(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. A double-quoted scalar containing a backslash\n * yields no spans: the source spells that content with more characters than it has, which the\n * offset model of 3.1 cannot hold — the same constraint that makes an HTML character reference an\n * opaque unit in 3.6. In a single-quoted scalar `''` is the same kind of construct, and since spec\n * 1.9.0 it is such a unit: the range is split around it, so the apostrophe it spells stays\n * U+0027 and everything on either side converts. No colon test applies here: quoting neutralises\n * the colon, and applying the plain-scalar test would decline `title: \"Chapter 1: the beginning\"`.\n */\nfunction quotedScalar(source: string, line: Line, v: number, spans: Span[]): void {\n const quote = source.charCodeAt(v);\n const found: Span[] = [];\n let close = -1;\n let segment = v + 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 (c !== quote) continue;\n if (quote === SQUOTE && j + 1 < line.end && source.charCodeAt(j + 1) === SQUOTE) {\n if (j > segment) found.push({ start: segment, end: j });\n segment = j + 2;\n j += 1;\n continue;\n }\n close = j;\n break;\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 > segment) found.push({ start: segment, end: close });\n spans.push(...found);\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\n/**\n * modes.md 3.7.4: `markdown` mode's `frontmatterKeys`. Optional — absent means the frontmatter\n * block is skipped whole, which is every pre-1.7.0 document's behaviour — and an empty list is\n * legal, exactly as it is for `keys`.\n *\n * Checked **after `dialect` and before the parse** (modes.md 3.7.4), which is what decides that a\n * document failing to parse in its dialect still reports the option error rather than\n * POLYTYPO_MALFORMED_INPUT. It is a separate function from `resolveYamlKeys` because the two\n * differ exactly where a caller would be bitten by sharing one: this option has no requiredness.\n */\nexport function resolveFrontmatterKeys(value: unknown): readonly string[] | undefined {\n if (value === undefined) return undefined;\n if (!Array.isArray(value)) {\n throw new PolytypoError(\n \"POLYTYPO_INVALID_OPTION\",\n `\"frontmatterKeys\" must be a list of strings when given (modes.md §3.7.4). ` +\n `Received ${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 `\"frontmatterKeys\" must contain only strings; received ${JSON.stringify(key)}.`,\n );\n }\n }\n return value as readonly string[];\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  resolveYamlKeys,
3
3
  yamlSpans
4
- } from "./chunk-6PEHEU6F.js";
4
+ } from "./chunk-ORCKRUSS.js";
5
5
  import {
6
6
  analyzeOverSpans,
7
7
  assertNoProtect,
@@ -9,7 +9,7 @@ import {
9
9
  planRules,
10
10
  resolveNarrowTarget,
11
11
  runOverSpans
12
- } from "./chunk-MF6PJO7O.js";
12
+ } from "./chunk-NUJFDRQE.js";
13
13
 
14
14
  // src/engine/yaml-pipeline.ts
15
15
  function runYamlPipeline(input, options) {
@@ -33,4 +33,4 @@ export {
33
33
  runYamlPipeline,
34
34
  analyzeYamlPipeline
35
35
  };
36
- //# sourceMappingURL=chunk-ANHMGSED.js.map
36
+ //# sourceMappingURL=chunk-CYJ2RYZK.js.map
@@ -0,0 +1,34 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunk3M2WNZH3cjs = require('./chunk-3M2WNZH3.cjs');
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+ var _chunkTDPBY65Kcjs = require('./chunk-TDPBY65K.cjs');
12
+
13
+ // src/engine/html-pipeline.ts
14
+ function runHtmlPipeline(input, options) {
15
+ const narrowTarget = _chunkTDPBY65Kcjs.resolveNarrowTarget.call(void 0, options.narrowNbsp);
16
+ const planned = _chunkTDPBY65Kcjs.planRules.call(void 0, options.rules);
17
+ const locale = _chunkTDPBY65Kcjs.getLocaleData.call(void 0, options.locale);
18
+ _chunkTDPBY65Kcjs.assertNoProtect.call(void 0, options.protect, "html");
19
+ const spans = _chunk3M2WNZH3cjs.htmlSpans.call(void 0, input);
20
+ return _chunkTDPBY65Kcjs.runOverSpans.call(void 0, input, spans, planned, locale, "html", narrowTarget);
21
+ }
22
+ function analyzeHtmlPipeline(input, options) {
23
+ const narrowTarget = _chunkTDPBY65Kcjs.resolveNarrowTarget.call(void 0, options.narrowNbsp);
24
+ const planned = _chunkTDPBY65Kcjs.planRules.call(void 0, options.rules);
25
+ const locale = _chunkTDPBY65Kcjs.getLocaleData.call(void 0, options.locale);
26
+ _chunkTDPBY65Kcjs.assertNoProtect.call(void 0, options.protect, "html");
27
+ return _chunkTDPBY65Kcjs.analyzeOverSpans.call(void 0, input, _chunk3M2WNZH3cjs.htmlSpans.call(void 0, input), planned, locale, "html", narrowTarget);
28
+ }
29
+
30
+
31
+
32
+
33
+ exports.runHtmlPipeline = runHtmlPipeline; exports.analyzeHtmlPipeline = analyzeHtmlPipeline;
34
+ //# sourceMappingURL=chunk-DPLBOK3E.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/polytypo-js/polytypo-js/dist/chunk-CJIH6CFO.cjs","../src/engine/html-pipeline.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACMO,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,+CAAA,OAAgB,CAAQ,OAAA,EAAS,MAAM,CAAA;AACvC,EAAA,MAAM,MAAA,EAAQ,yCAAA,KAAe,CAAA;AAC7B,EAAA,OAAO,4CAAA,KAAa,EAAO,KAAA,EAAO,OAAA,EAAS,MAAA,EAAQ,MAAA,EAAQ,YAAY,CAAA;AACzE;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,+CAAA,OAAgB,CAAQ,OAAA,EAAS,MAAM,CAAA;AACvC,EAAA,OAAO,gDAAA,KAAiB,EAAO,yCAAA,KAAe,CAAA,EAAG,OAAA,EAAS,MAAA,EAAQ,MAAA,EAAQ,YAAY,CAAA;AACxF;ADNA;AACA;AACE;AACA;AACF,6FAAC","file":"/home/runner/work/polytypo-js/polytypo-js/dist/chunk-CJIH6CFO.cjs","sourcesContent":[null,"import { htmlSpans } from \"../modes/html.js\";\nimport type { Options } from \"../types.js\";\nimport { getLocaleData } from \"./locale.js\";\nimport { resolveNarrowTarget } from \"./narrow-target.js\";\nimport { assertNoProtect } from \"./protect.js\";\nimport { planRules } from \"./rule-runner.js\";\nimport { analyzeOverSpans, runOverSpans } from \"./span-runner.js\";\nimport type { Change } from \"./origin.js\";\n\n/**\n * `html` mode only. Imports `parse5` (via `../modes/html.js`) and nothing from\n * `../modes/markdown.js` or the Micromark/MDX stack — this is what makes `polytypo/html`'s\n * module graph exclude the Markdown parser (AUDIT_REMEDIATION_AND_RELEASE_PLAN.md 5.1).\n *\n * Validation order — `planRules` before `getLocaleData` before parsing — mirrors the pre-Stage-5\n * aggregate `runPipeline` exactly (an unknown-rule error must win over an unknown-locale error,\n * and both must win over a parse failure, since that is public, tested behaviour).\n */\nexport function runHtmlPipeline(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 assertNoProtect(options.protect, \"html\");\n const spans = htmlSpans(input);\n return runOverSpans(input, spans, planned, locale, \"html\", narrowTarget);\n}\n\n/** analyze.md §1, `html` mode: offsets are into the document, not into a span (analyze.md §6). */\nexport function analyzeHtmlPipeline(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 assertNoProtect(options.protect, \"html\");\n return analyzeOverSpans(input, htmlSpans(input), planned, locale, \"html\", narrowTarget);\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/polytypo-js/polytypo-js/dist/chunk-DPLBOK3E.cjs","../src/engine/html-pipeline.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACMO,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,+CAAA,OAAgB,CAAQ,OAAA,EAAS,MAAM,CAAA;AACvC,EAAA,MAAM,MAAA,EAAQ,yCAAA,KAAe,CAAA;AAC7B,EAAA,OAAO,4CAAA,KAAa,EAAO,KAAA,EAAO,OAAA,EAAS,MAAA,EAAQ,MAAA,EAAQ,YAAY,CAAA;AACzE;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,+CAAA,OAAgB,CAAQ,OAAA,EAAS,MAAM,CAAA;AACvC,EAAA,OAAO,gDAAA,KAAiB,EAAO,yCAAA,KAAe,CAAA,EAAG,OAAA,EAAS,MAAA,EAAQ,MAAA,EAAQ,YAAY,CAAA;AACxF;ADNA;AACA;AACE;AACA;AACF,6FAAC","file":"/home/runner/work/polytypo-js/polytypo-js/dist/chunk-DPLBOK3E.cjs","sourcesContent":[null,"import { htmlSpans } from \"../modes/html.js\";\nimport type { Options } from \"../types.js\";\nimport { getLocaleData } from \"./locale.js\";\nimport { resolveNarrowTarget } from \"./narrow-target.js\";\nimport { assertNoProtect } from \"./protect.js\";\nimport { planRules } from \"./rule-runner.js\";\nimport { analyzeOverSpans, runOverSpans } from \"./span-runner.js\";\nimport type { Change } from \"./origin.js\";\n\n/**\n * `html` mode only. Imports `parse5` (via `../modes/html.js`) and nothing from\n * `../modes/markdown.js` or the Micromark/MDX stack — this is what makes `polytypo/html`'s\n * module graph exclude the Markdown parser (AUDIT_REMEDIATION_AND_RELEASE_PLAN.md 5.1).\n *\n * Validation order — `planRules` before `getLocaleData` before parsing — mirrors the pre-Stage-5\n * aggregate `runPipeline` exactly (an unknown-rule error must win over an unknown-locale error,\n * and both must win over a parse failure, since that is public, tested behaviour).\n */\nexport function runHtmlPipeline(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 assertNoProtect(options.protect, \"html\");\n const spans = htmlSpans(input);\n return runOverSpans(input, spans, planned, locale, \"html\", narrowTarget);\n}\n\n/** analyze.md §1, `html` mode: offsets are into the document, not into a span (analyze.md §6). */\nexport function analyzeHtmlPipeline(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 assertNoProtect(options.protect, \"html\");\n return analyzeOverSpans(input, htmlSpans(input), planned, locale, \"html\", narrowTarget);\n}\n"]}
@@ -2,11 +2,11 @@ import {
2
2
  htmlFragmentSpans,
3
3
  isSkippedElement,
4
4
  wrapParserErrors
5
- } from "./chunk-MCQOMIWF.js";
5
+ } from "./chunk-XLAR7USA.js";
6
6
  import {
7
7
  resolveFrontmatterKeys,
8
8
  yamlSpans
9
- } from "./chunk-6PEHEU6F.js";
9
+ } from "./chunk-ORCKRUSS.js";
10
10
  import {
11
11
  PolytypoError,
12
12
  analyzeOverUnits,
@@ -15,7 +15,7 @@ import {
15
15
  planRules,
16
16
  resolveNarrowTarget,
17
17
  runOverUnits
18
- } from "./chunk-MF6PJO7O.js";
18
+ } from "./chunk-NUJFDRQE.js";
19
19
 
20
20
  // src/modes/markdown.ts
21
21
  import { parse, postprocess, preprocess } from "micromark";
@@ -294,4 +294,4 @@ export {
294
294
  runMarkdownPipeline,
295
295
  analyzeMarkdownPipeline
296
296
  };
297
- //# sourceMappingURL=chunk-OWTDZ6UD.js.map
297
+ //# sourceMappingURL=chunk-EBVCERP7.js.map
@@ -65,6 +65,8 @@ var KNOWN_LOCALES = [
65
65
  "ro",
66
66
  "ru",
67
67
  "sk",
68
+ "sl",
69
+ "sr",
68
70
  "sv",
69
71
  "tr",
70
72
  "uk"
@@ -96,6 +98,8 @@ var LOCALES = {
96
98
  ro: { locale: "ro", name: "Romanian", quotes: { primary: { open: "\u201E", close: "\u201D", innerSpace: "none" }, secondary: { open: "\xAB", close: "\xBB", innerSpace: "none" }, elisionIdioms: [], elisionClitics: { before: [], after: [] } }, dash: { parenthetical: "en-spaced", range: "none" }, ellipsis: { abbreviatedAfterTerminal: false }, hyphen: { prefixes: [], suffixes: [], compounds: [] }, nbsp: { beforePunctuation: [], narrowBeforePunctuation: [], afterShortWords: [], abbreviations: [], beforeUnits: ["km", "kg", "cm", "mm", "km/h", "\xB0C"], beforeNumber: ["art.", "nr."], beforeWord: [], afterSymbols: [], initialBinding: "single" } },
97
99
  ru: { locale: "ru", name: "Russian", quotes: { primary: { open: "\xAB", close: "\xBB", innerSpace: "none" }, secondary: { open: "\u201E", close: "\u201C", innerSpace: "none" }, elisionIdioms: [], elisionClitics: { before: [], after: [] } }, dash: { parenthetical: "em-spaced", range: "em-tight" }, ellipsis: { abbreviatedAfterTerminal: true }, hyphen: { prefixes: ["\u043A\u043E\u0435-", "\u043A\u043E\u0439-"], suffixes: ["-\u0442\u043E", "-\u043B\u0438\u0431\u043E", "-\u043D\u0438\u0431\u0443\u0434\u044C", "-\u0442\u0430\u043A\u0438", "-\u043A\u0430"], compounds: ["\u0438\u0437-\u0437\u0430", "\u0438\u0437-\u043F\u043E\u0434"] }, nbsp: { beforePunctuation: [], narrowBeforePunctuation: [], afterShortWords: ["\u0430", "\u0432", "\u0438", "\u043A", "\u043E", "\u0441", "\u0443", "\u0432\u043E", "\u0434\u043E", "\u0437\u0430", "\u0438\u0437", "\u043A\u043E", "\u043D\u0430", "\u043E\u0431", "\u043E\u0442", "\u043F\u043E", "\u0441\u043E"], abbreviations: ["\u0438 \u0442. \u0434.", "\u0438 \u0442. \u043F.", "\u0442. \u0435.", "\u0438 \u0434\u0440."], beforeUnits: ["%", "\u2030", "\u20BD", "\xB0C", "\u043A\u043C", "\u0441\u043C", "\u043C\u043C", "\u043A\u0433", "\u0433.", "\u0433\u0433.", "\u0432.", "\u0432\u0432.", "\u0442\u044B\u0441.", "\u043C\u043B\u043D", "\u043C\u043B\u0440\u0434"], beforeNumber: [], beforeWord: ["\u0443\u043B.", "\u043F\u043B."], afterSymbols: ["\u2116", "\xA7"], initialBinding: "chain" } },
98
100
  sk: { locale: "sk", name: "Slovak", quotes: { primary: { open: "\u201E", close: "\u201C", innerSpace: "none" }, secondary: { open: "\u201A", close: "\u2018", innerSpace: "none" }, elisionIdioms: [], elisionClitics: { before: [], after: [] } }, dash: { parenthetical: "en-spaced", range: "en-spaced" }, ellipsis: { abbreviatedAfterTerminal: false }, hyphen: { prefixes: [], suffixes: [], compounds: [] }, nbsp: { beforePunctuation: [], narrowBeforePunctuation: [], afterShortWords: [], abbreviations: ["t. j.", "a pod.", "a. s."], beforeUnits: ["%", "\u2030", "kg", "km", "km/s", "m/s", "min"], beforeNumber: ["\u010D.", "ods.", "s."], beforeWord: [], afterSymbols: ["\xA7"], initialBinding: "none" } },
101
+ sl: { locale: "sl", name: "Slovenian", quotes: { primary: { open: "\xBB", close: "\xAB", innerSpace: "none" }, secondary: { open: "\u203A", close: "\u2039", innerSpace: "none" }, elisionIdioms: [], elisionClitics: { before: [], after: [] } }, dash: { parenthetical: "en-spaced", range: "en-tight" }, ellipsis: { abbreviatedAfterTerminal: false }, hyphen: { prefixes: [], suffixes: [], compounds: [] }, nbsp: { beforePunctuation: [], narrowBeforePunctuation: [], afterShortWords: [], abbreviations: ["t. i."], beforeUnits: ["%", "\u2030", "\u20AC", "\xB0C", "kg", "km"], beforeNumber: [], beforeWord: [], afterSymbols: ["\xA7"], initialBinding: "none" } },
102
+ sr: { locale: "sr", name: "Serbian", quotes: { primary: { open: "\u201E", close: "\u201D", innerSpace: "none" }, secondary: { open: "\u2019", close: "\u2019", innerSpace: "none" }, elisionIdioms: [], elisionClitics: { before: [], after: [] } }, dash: { parenthetical: "en-spaced", range: "en-tight" }, ellipsis: { abbreviatedAfterTerminal: false }, hyphen: { prefixes: [], suffixes: [], compounds: [] }, nbsp: { beforePunctuation: [], narrowBeforePunctuation: [], afterShortWords: [], abbreviations: [], beforeUnits: [], beforeNumber: [], beforeWord: [], afterSymbols: [], initialBinding: "none" } },
99
103
  sv: { locale: "sv", name: "Swedish", quotes: { primary: { open: "\u201D", close: "\u201D", innerSpace: "none" }, secondary: { open: "\u2019", close: "\u2019", innerSpace: "none" }, elisionIdioms: [], elisionClitics: { before: [], after: [] } }, dash: { parenthetical: "en-spaced", range: "en-tight" }, ellipsis: { abbreviatedAfterTerminal: false }, hyphen: { prefixes: [], suffixes: [], compounds: [] }, nbsp: { beforePunctuation: [], narrowBeforePunctuation: [], afterShortWords: [], abbreviations: [], beforeUnits: ["%", "\u2030", "kr", "\u20AC", "kg", "g", "mg", "km", "m", "cm", "mm", "l", "dl", "cl", "ml", "kW", "kWh", "min", "sek", "tim", "h", "\xB0C"], beforeNumber: [], beforeWord: [], afterSymbols: ["\xA7"], initialBinding: "none" } },
100
104
  tr: { locale: "tr", name: "Turkish", quotes: { primary: { open: "\u201C", close: "\u201D", innerSpace: "none" }, secondary: { open: "\u2018", close: "\u2019", innerSpace: "none" }, elisionIdioms: [], elisionClitics: { before: [], after: ["nin", "n\u0131n", "de", "da", "te", "ye", "yle", "n\u0131", "dan", "den", "lik", "nci", "\xFCm"] } }, dash: { parenthetical: "none", range: "none" }, ellipsis: { abbreviatedAfterTerminal: true }, hyphen: { prefixes: [], suffixes: [], compounds: [] }, nbsp: { beforePunctuation: [], narrowBeforePunctuation: [], afterShortWords: [], abbreviations: ["Kur. B\u015Fk.", "N\xF6. Sb."], beforeUnits: ["mm", "cm", "km", "kg", "mg", "hl", "m\xB2", "cm\xB2", "\xB0C", "ton"], beforeNumber: [], beforeWord: [], afterSymbols: [], initialBinding: "none" } },
101
105
  uk: { locale: "uk", name: "Ukrainian", quotes: { primary: { open: "\xAB", close: "\xBB", innerSpace: "none" }, secondary: { open: "\u201C", close: "\u201D", innerSpace: "none" }, elisionIdioms: [], elisionClitics: { before: [], after: [] } }, dash: { parenthetical: "em-spaced", range: "em-tight" }, ellipsis: { abbreviatedAfterTerminal: true }, hyphen: { prefixes: ["\u0431\u0443\u0434\u044C-", "\u043A\u0430\u0437\u043D\u0430-", "\u0445\u0442\u043E\u0437\u043D\u0430-", "\u0431\u043E\u0437\u043D\u0430-"], suffixes: ["-\u0431\u043E", "-\u043D\u043E", "-\u043E\u0442", "-\u0442\u043E", "-\u0442\u0430\u043A\u0438", "-\u0431\u0443\u0434\u044C", "-\u043D\u0435\u0431\u0443\u0434\u044C"], compounds: ["\u0432\u0438\u0434-\u0432\u043E", "\u0433\u0440-\u043D", "\u0456\u043D-\u0442", "\u0440-\u043D", "\u0443\u043D-\u0442", "\u0444-\u043A\u0430", "\u0442-\u0432\u043E", "\u0437-\u0437\u0430", "\u0456\u0437-\u0437\u0430", "\u0437-\u043D\u0430\u0434", "\u0437-\u043F\u0435\u0440\u0435\u0434", "\u0437-\u043F\u0456\u0434", "\u0456\u0437-\u043F\u0456\u0434", "\u0437-\u043F\u043E\u0437\u0430", "\u0437-\u043F\u043E\u043C\u0456\u0436", "\u0437-\u043F\u043E\u043D\u0430\u0434", "\u0437-\u043F\u043E\u043F\u0456\u0434", "\u0437-\u043F\u043E\u0441\u0435\u0440\u0435\u0434", "\u0437-\u043F\u0440\u043E\u043C\u0456\u0436"] }, nbsp: { beforePunctuation: [], narrowBeforePunctuation: [], afterShortWords: [], abbreviations: ["\u0456 \u0442. \u0434.", "\u0456 \u0442. \u0456\u043D.", "\u0442\u0430 \u0456\u043D.", "\u043A\u0443\u0431. \u0441\u043C"], beforeUnits: ["%", "\u0433\u0430", "\u0433\u043E\u0434", "\u0434\u043C", "\u043A\u0411", "\u043A\u0412\u0442", "\u043A\u0433", "\u043A\u043C", "\u043C\u043C", "\u0441\u043C", "\u0445\u0432", "\u0412\u0442", "\u043A\u043C/\u0433\u043E\u0434", "\u043C/\u0441", "\u043C\u043B\u043D", "\u043C\u043B\u0440\u0434", "\u0442\u0440\u043B\u043D", "\u0433\u0440\u043D", "\u0440."], beforeNumber: [], beforeWord: ["\u0430\u043A\u0430\u0434.", "\u0434\u043E\u0446.", "\u043F\u0440\u043E\u0444."], afterSymbols: [], initialBinding: "chain" } }
@@ -6168,4 +6172,4 @@ export {
6168
6172
  runProtected,
6169
6173
  analyzeProtected
6170
6174
  };
6171
- //# sourceMappingURL=chunk-MF6PJO7O.js.map
6175
+ //# sourceMappingURL=chunk-NUJFDRQE.js.map