polytypo 1.8.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-XLTVLET5.js → chunk-2DNTZH4F.js} +2 -2
- package/dist/{chunk-GK5P55K5.cjs → chunk-3HJSBQ3V.cjs} +3 -3
- package/dist/{chunk-GK5P55K5.cjs.map → chunk-3HJSBQ3V.cjs.map} +1 -1
- package/dist/{chunk-UWFI3XV7.cjs → chunk-46OPZEOJ.cjs} +16 -16
- package/dist/{chunk-UWFI3XV7.cjs.map → chunk-46OPZEOJ.cjs.map} +1 -1
- package/dist/{chunk-YH77XVJB.js → chunk-4RLNGRZY.js} +5 -5
- package/dist/{chunk-4RAZ2EDS.js → chunk-7D6OKNF7.js} +4 -4
- package/dist/{chunk-PEBD5XTD.js → chunk-C7IOLTT5.js} +2 -2
- package/dist/{chunk-VBHUVDW4.cjs → chunk-DRSERRP3.cjs} +21 -21
- package/dist/{chunk-VBHUVDW4.cjs.map → chunk-DRSERRP3.cjs.map} +1 -1
- package/dist/{chunk-M3TVDUGX.cjs → chunk-GFU64ZPK.cjs} +4 -4
- package/dist/{chunk-M3TVDUGX.cjs.map → chunk-GFU64ZPK.cjs.map} +1 -1
- package/dist/{chunk-F6HVIPLF.js → chunk-GSH2742L.js} +2 -2
- package/dist/{chunk-EQ2JTKYF.js → chunk-LO2IGWUX.js} +2 -2
- package/dist/chunk-LO2IGWUX.js.map +1 -0
- package/dist/{chunk-KAJ3GVK2.cjs → chunk-LQOZ3W4B.cjs} +6 -6
- package/dist/{chunk-KAJ3GVK2.cjs.map → chunk-LQOZ3W4B.cjs.map} +1 -1
- package/dist/{chunk-6UQAKZ7L.js → chunk-NCYZYIOG.js} +4 -4
- package/dist/{chunk-GUROIWJY.cjs → chunk-QZIVTU25.cjs} +2 -2
- package/dist/chunk-QZIVTU25.cjs.map +1 -0
- package/dist/{chunk-KCKZHLI5.js → chunk-U2POYXTP.js} +2 -2
- package/dist/chunk-W7NXX74B.cjs +33 -0
- package/dist/{chunk-UJ3D4DYP.cjs.map → chunk-W7NXX74B.cjs.map} +1 -1
- package/dist/chunk-Y7GDDTZ4.cjs +35 -0
- package/dist/{chunk-KFDDI4LH.cjs.map → chunk-Y7GDDTZ4.cjs.map} +1 -1
- package/dist/{chunk-EH542ZE4.js → chunk-YLIX3M2X.js} +2 -2
- package/dist/chunk-YRAXUXVB.cjs +31 -0
- package/dist/{chunk-YA64BEKC.cjs.map → chunk-YRAXUXVB.cjs.map} +1 -1
- package/dist/html.cjs +10 -10
- package/dist/html.js +5 -5
- package/dist/index.cjs +18 -18
- package/dist/index.js +8 -8
- package/dist/markdown.cjs +11 -11
- package/dist/markdown.js +6 -6
- package/dist/text.cjs +8 -8
- package/dist/text.js +3 -3
- package/dist/yaml.cjs +10 -10
- package/dist/yaml.js +5 -5
- package/package.json +1 -1
- package/dist/chunk-EQ2JTKYF.js.map +0 -1
- package/dist/chunk-GUROIWJY.cjs.map +0 -1
- package/dist/chunk-KFDDI4LH.cjs +0 -35
- package/dist/chunk-UJ3D4DYP.cjs +0 -33
- package/dist/chunk-YA64BEKC.cjs +0 -31
- /package/dist/{chunk-XLTVLET5.js.map → chunk-2DNTZH4F.js.map} +0 -0
- /package/dist/{chunk-YH77XVJB.js.map → chunk-4RLNGRZY.js.map} +0 -0
- /package/dist/{chunk-4RAZ2EDS.js.map → chunk-7D6OKNF7.js.map} +0 -0
- /package/dist/{chunk-PEBD5XTD.js.map → chunk-C7IOLTT5.js.map} +0 -0
- /package/dist/{chunk-F6HVIPLF.js.map → chunk-GSH2742L.js.map} +0 -0
- /package/dist/{chunk-6UQAKZ7L.js.map → chunk-NCYZYIOG.js.map} +0 -0
- /package/dist/{chunk-KCKZHLI5.js.map → chunk-U2POYXTP.js.map} +0 -0
- /package/dist/{chunk-EH542ZE4.js.map → chunk-YLIX3M2X.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PolytypoError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LO2IGWUX.js";
|
|
4
4
|
|
|
5
5
|
// src/modes/yaml.ts
|
|
6
6
|
var TAB = 9;
|
|
@@ -257,4 +257,4 @@ export {
|
|
|
257
257
|
resolveYamlKeys,
|
|
258
258
|
resolveFrontmatterKeys
|
|
259
259
|
};
|
|
260
|
-
//# sourceMappingURL=chunk-
|
|
260
|
+
//# sourceMappingURL=chunk-U2POYXTP.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkGFU64ZPKcjs = require('./chunk-GFU64ZPK.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunk46OPZEOJcjs = require('./chunk-46OPZEOJ.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunkQZIVTU25cjs = require('./chunk-QZIVTU25.cjs');
|
|
13
|
+
|
|
14
|
+
// src/engine/html-pipeline.ts
|
|
15
|
+
function runHtmlPipeline(input, options) {
|
|
16
|
+
const narrowTarget = _chunkQZIVTU25cjs.resolveNarrowTarget.call(void 0, options.narrowNbsp);
|
|
17
|
+
const planned = _chunkQZIVTU25cjs.planRules.call(void 0, options.rules);
|
|
18
|
+
const locale = _chunkQZIVTU25cjs.getLocaleData.call(void 0, options.locale);
|
|
19
|
+
const spans = _chunkGFU64ZPKcjs.htmlSpans.call(void 0, input);
|
|
20
|
+
return _chunk46OPZEOJcjs.runOverSpans.call(void 0, input, spans, planned, locale, "html", narrowTarget);
|
|
21
|
+
}
|
|
22
|
+
function analyzeHtmlPipeline(input, options) {
|
|
23
|
+
const narrowTarget = _chunkQZIVTU25cjs.resolveNarrowTarget.call(void 0, options.narrowNbsp);
|
|
24
|
+
const planned = _chunkQZIVTU25cjs.planRules.call(void 0, options.rules);
|
|
25
|
+
const locale = _chunkQZIVTU25cjs.getLocaleData.call(void 0, options.locale);
|
|
26
|
+
return _chunk46OPZEOJcjs.analyzeOverSpans.call(void 0, input, _chunkGFU64ZPKcjs.htmlSpans.call(void 0, input), planned, locale, "html", narrowTarget);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
exports.runHtmlPipeline = runHtmlPipeline; exports.analyzeHtmlPipeline = analyzeHtmlPipeline;
|
|
33
|
+
//# sourceMappingURL=chunk-W7NXX74B.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/polytypo-js/polytypo-js/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/polytypo-js/polytypo-js/dist/chunk-W7NXX74B.cjs","../src/engine/html-pipeline.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;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,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,OAAO,gDAAA,KAAiB,EAAO,yCAAA,KAAe,CAAA,EAAG,OAAA,EAAS,MAAA,EAAQ,MAAA,EAAQ,YAAY,CAAA;AACxF;ADJA;AACA;AACE;AACA;AACF,6FAAC","file":"/home/runner/work/polytypo-js/polytypo-js/dist/chunk-W7NXX74B.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 { 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 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 return analyzeOverSpans(input, htmlSpans(input), planned, locale, \"html\", narrowTarget);\n}\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkLQOZ3W4Bcjs = require('./chunk-LQOZ3W4B.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunk46OPZEOJcjs = require('./chunk-46OPZEOJ.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
var _chunkQZIVTU25cjs = require('./chunk-QZIVTU25.cjs');
|
|
14
|
+
|
|
15
|
+
// src/engine/yaml-pipeline.ts
|
|
16
|
+
function runYamlPipeline(input, options) {
|
|
17
|
+
const narrowTarget = _chunkQZIVTU25cjs.resolveNarrowTarget.call(void 0, options.narrowNbsp);
|
|
18
|
+
const planned = _chunkQZIVTU25cjs.planRules.call(void 0, options.rules);
|
|
19
|
+
const locale = _chunkQZIVTU25cjs.getLocaleData.call(void 0, options.locale);
|
|
20
|
+
const keys = _chunkLQOZ3W4Bcjs.resolveYamlKeys.call(void 0, options.keys);
|
|
21
|
+
return _chunk46OPZEOJcjs.runOverSpans.call(void 0, input, _chunkLQOZ3W4Bcjs.yamlSpans.call(void 0, input, keys), planned, locale, "yaml", narrowTarget);
|
|
22
|
+
}
|
|
23
|
+
function analyzeYamlPipeline(input, options) {
|
|
24
|
+
const narrowTarget = _chunkQZIVTU25cjs.resolveNarrowTarget.call(void 0, options.narrowNbsp);
|
|
25
|
+
const planned = _chunkQZIVTU25cjs.planRules.call(void 0, options.rules);
|
|
26
|
+
const locale = _chunkQZIVTU25cjs.getLocaleData.call(void 0, options.locale);
|
|
27
|
+
const keys = _chunkLQOZ3W4Bcjs.resolveYamlKeys.call(void 0, options.keys);
|
|
28
|
+
return _chunk46OPZEOJcjs.analyzeOverSpans.call(void 0, input, _chunkLQOZ3W4Bcjs.yamlSpans.call(void 0, input, keys), planned, locale, "yaml", narrowTarget);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
exports.runYamlPipeline = runYamlPipeline; exports.analyzeYamlPipeline = analyzeYamlPipeline;
|
|
35
|
+
//# sourceMappingURL=chunk-Y7GDDTZ4.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/polytypo-js/polytypo-js/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/polytypo-js/polytypo-js/dist/chunk-Y7GDDTZ4.cjs","../src/engine/yaml-pipeline.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACEO,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,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,OAAO,gDAAA,KAAiB,EAAO,yCAAA,KAAU,EAAO,IAAI,CAAA,EAAG,OAAA,EAAS,MAAA,EAAQ,MAAA,EAAQ,YAAY,CAAA;AAC9F;ADFA;AACA;AACE;AACA;AACF,6FAAC","file":"/home/runner/work/polytypo-js/polytypo-js/dist/chunk-Y7GDDTZ4.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 { planRules } from \"./rule-runner.js\";\nimport { analyzeOverSpans, runOverSpans } from \"./span-runner.js\";\nimport type { Change } from \"./origin.js\";\n\n/**\n * `yaml` mode only, and the only mode pipeline with **no parser dependency at all** — span\n * selection is the specified scan of modes.md 3.8, not a library. There is likewise no\n * `POLYTYPO_MALFORMED_INPUT` counterpart here: with no declared grammar to violate, a file that\n * is not YAML yields few spans or none and comes back byte for byte (modes.md 3.8.3). The only\n * throw this mode adds is `keys`, which is about the call and not the input.\n */\nexport function runYamlPipeline(input: string, options: Partial<Options>): string {\n const narrowTarget = resolveNarrowTarget(options.narrowNbsp);\n const planned = planRules(options.rules);\n const locale = getLocaleData(options.locale);\n const keys = resolveYamlKeys(options.keys);\n return runOverSpans(input, yamlSpans(input, keys), planned, locale, \"yaml\", narrowTarget);\n}\n\n/** analyze.md §1, `yaml` mode: offsets are into the document, not into a span (analyze.md §6). */\nexport function analyzeYamlPipeline(input: string, options: Partial<Options>): Change[] {\n const narrowTarget = resolveNarrowTarget(options.narrowNbsp);\n const planned = planRules(options.rules);\n const locale = getLocaleData(options.locale);\n const keys = resolveYamlKeys(options.keys);\n return analyzeOverSpans(input, yamlSpans(input, keys), planned, locale, \"yaml\", narrowTarget);\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PolytypoError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LO2IGWUX.js";
|
|
4
4
|
|
|
5
5
|
// src/engine/assert-fixed-mode.ts
|
|
6
6
|
function assertFixedMode(mode, fixed, entryPoint) {
|
|
@@ -14,4 +14,4 @@ function assertFixedMode(mode, fixed, entryPoint) {
|
|
|
14
14
|
export {
|
|
15
15
|
assertFixedMode
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=chunk-
|
|
17
|
+
//# sourceMappingURL=chunk-YLIX3M2X.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkQZIVTU25cjs = require('./chunk-QZIVTU25.cjs');
|
|
10
|
+
|
|
11
|
+
// src/engine/text-pipeline.ts
|
|
12
|
+
function runTextPipeline(input, options) {
|
|
13
|
+
const narrowTarget = _chunkQZIVTU25cjs.resolveNarrowTarget.call(void 0, options.narrowNbsp);
|
|
14
|
+
const planned = _chunkQZIVTU25cjs.planRules.call(void 0, options.rules);
|
|
15
|
+
const locale = _chunkQZIVTU25cjs.getLocaleData.call(void 0, options.locale);
|
|
16
|
+
return _chunkQZIVTU25cjs.fromCodePoints.call(void 0, _chunkQZIVTU25cjs.runRules.call(void 0, _chunkQZIVTU25cjs.toCodePoints.call(void 0, input), planned, locale, "text", narrowTarget));
|
|
17
|
+
}
|
|
18
|
+
function analyzeTextPipeline(input, options) {
|
|
19
|
+
const narrowTarget = _chunkQZIVTU25cjs.resolveNarrowTarget.call(void 0, options.narrowNbsp);
|
|
20
|
+
const planned = _chunkQZIVTU25cjs.planRules.call(void 0, options.rules);
|
|
21
|
+
const locale = _chunkQZIVTU25cjs.getLocaleData.call(void 0, options.locale);
|
|
22
|
+
const cp = _chunkQZIVTU25cjs.toCodePoints.call(void 0, input);
|
|
23
|
+
const origin = cp.map((_value, index) => index);
|
|
24
|
+
return _chunkQZIVTU25cjs.runRulesRecording.call(void 0, cp, planned, locale, "text", narrowTarget, origin, cp.length);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
exports.runTextPipeline = runTextPipeline; exports.analyzeTextPipeline = analyzeTextPipeline;
|
|
31
|
+
//# sourceMappingURL=chunk-YRAXUXVB.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/polytypo-js/polytypo-js/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/polytypo-js/polytypo-js/dist/chunk-YRAXUXVB.cjs","../src/engine/text-pipeline.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACQO,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,OAAO,8CAAA,wCAAe,4CAAS,KAAkB,CAAA,EAAG,OAAA,EAAS,MAAA,EAAQ,MAAA,EAAQ,YAAY,CAAC,CAAA;AAC5F;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,GAAA,EAAK,4CAAA,KAAkB,CAAA;AAC7B,EAAA,MAAM,OAAA,EAAS,EAAA,CAAG,GAAA,CAAI,CAAC,MAAA,EAAQ,KAAA,EAAA,GAAU,KAAK,CAAA;AAC9C,EAAA,OAAO,iDAAA,EAAkB,EAAI,OAAA,EAAS,MAAA,EAAQ,MAAA,EAAQ,YAAA,EAAc,MAAA,EAAQ,EAAA,CAAG,MAAM,CAAA;AACvF;ADRA;AACA;AACE;AACA;AACF,6FAAC","file":"/home/runner/work/polytypo-js/polytypo-js/dist/chunk-YRAXUXVB.cjs","sourcesContent":[null,"import type { Options } from \"../types.js\";\nimport { fromCodePoints, toCodePoints } from \"./codepoints.js\";\nimport type { Change } from \"./origin.js\";\nimport { getLocaleData } from \"./locale.js\";\nimport { resolveNarrowTarget } from \"./narrow-target.js\";\nimport { planRules, runRules, runRulesRecording } from \"./rule-runner.js\";\n\n/**\n * `text` mode only. Deliberately imports nothing from `../modes/html.js` or\n * `../modes/markdown.js` (or their parser dependencies) — this is what makes `polytypo/text`'s\n * module graph exclude `parse5` and the Micromark stack (AUDIT_REMEDIATION_AND_RELEASE_PLAN.md\n * 5.1).\n *\n * Validation order — `planRules` before `getLocaleData` — mirrors the pre-Stage-5 aggregate\n * `runPipeline` exactly (an unknown-rule error must win over an unknown-locale error when both\n * are present, since that is public, tested behaviour, not an implementation detail this\n * refactor was authorised to change).\n */\nexport function runTextPipeline(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 return fromCodePoints(runRules(toCodePoints(input), planned, locale, \"text\", narrowTarget));\n}\n\n/** analyze.md §1: the same pipeline as `runTextPipeline`, reporting instead of applying. */\nexport function analyzeTextPipeline(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 cp = toCodePoints(input);\n const origin = cp.map((_value, index) => index);\n return runRulesRecording(cp, planned, locale, \"text\", narrowTarget, origin, cp.length);\n}\n"]}
|
package/dist/html.cjs
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
4
|
+
var _chunkW7NXX74Bcjs = require('./chunk-W7NXX74B.cjs');
|
|
5
|
+
require('./chunk-GFU64ZPK.cjs');
|
|
6
|
+
require('./chunk-46OPZEOJ.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk3HJSBQ3Vcjs = require('./chunk-3HJSBQ3V.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkQZIVTU25cjs = require('./chunk-QZIVTU25.cjs');
|
|
13
13
|
|
|
14
14
|
// src/index.html.ts
|
|
15
15
|
function transform(input, options) {
|
|
16
16
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
17
|
-
|
|
18
|
-
return
|
|
17
|
+
_chunk3HJSBQ3Vcjs.assertFixedMode.call(void 0, given.mode, "html", "polytypo/html");
|
|
18
|
+
return _chunkW7NXX74Bcjs.runHtmlPipeline.call(void 0, input, given);
|
|
19
19
|
}
|
|
20
20
|
function analyze(input, options) {
|
|
21
21
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
22
|
-
|
|
23
|
-
return
|
|
22
|
+
_chunk3HJSBQ3Vcjs.assertFixedMode.call(void 0, given.mode, "html", "polytypo/html");
|
|
23
|
+
return _chunkW7NXX74Bcjs.analyzeHtmlPipeline.call(void 0, input, given);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
exports.PolytypoError =
|
|
29
|
+
exports.PolytypoError = _chunkQZIVTU25cjs.PolytypoError; exports.analyze = analyze; exports.transform = transform;
|
|
30
30
|
//# sourceMappingURL=html.cjs.map
|
package/dist/html.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
analyzeHtmlPipeline,
|
|
3
3
|
runHtmlPipeline
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-7D6OKNF7.js";
|
|
5
|
+
import "./chunk-C7IOLTT5.js";
|
|
6
|
+
import "./chunk-GSH2742L.js";
|
|
7
7
|
import {
|
|
8
8
|
assertFixedMode
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YLIX3M2X.js";
|
|
10
10
|
import {
|
|
11
11
|
PolytypoError
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LO2IGWUX.js";
|
|
13
13
|
|
|
14
14
|
// src/index.html.ts
|
|
15
15
|
function transform(input, options) {
|
package/dist/index.cjs
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkYRAXUXVBcjs = require('./chunk-YRAXUXVB.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkW7NXX74Bcjs = require('./chunk-W7NXX74B.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
require('./chunk-
|
|
12
|
+
var _chunkDRSERRP3cjs = require('./chunk-DRSERRP3.cjs');
|
|
13
|
+
require('./chunk-GFU64ZPK.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
18
|
-
require('./chunk-
|
|
19
|
-
require('./chunk-
|
|
17
|
+
var _chunkY7GDDTZ4cjs = require('./chunk-Y7GDDTZ4.cjs');
|
|
18
|
+
require('./chunk-LQOZ3W4B.cjs');
|
|
19
|
+
require('./chunk-46OPZEOJ.cjs');
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkQZIVTU25cjs = require('./chunk-QZIVTU25.cjs');
|
|
23
23
|
|
|
24
24
|
// src/engine/pipeline.ts
|
|
25
25
|
function resolveMode(mode) {
|
|
26
26
|
if (mode === void 0 || mode === "text") return "text";
|
|
27
27
|
if (mode === "html" || mode === "markdown" || mode === "yaml") return mode;
|
|
28
|
-
throw new (0,
|
|
28
|
+
throw new (0, _chunkQZIVTU25cjs.PolytypoError)(
|
|
29
29
|
"POLYTYPO_INVALID_MODE",
|
|
30
30
|
`Unknown mode "${String(mode)}". Expected "text", "html", "markdown" or "yaml".`
|
|
31
31
|
);
|
|
@@ -33,18 +33,18 @@ function resolveMode(mode) {
|
|
|
33
33
|
function runPipeline(input, options) {
|
|
34
34
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
35
35
|
const mode = resolveMode(given.mode);
|
|
36
|
-
if (mode === "text") return
|
|
37
|
-
if (mode === "html") return
|
|
38
|
-
if (mode === "yaml") return
|
|
39
|
-
return
|
|
36
|
+
if (mode === "text") return _chunkYRAXUXVBcjs.runTextPipeline.call(void 0, input, given);
|
|
37
|
+
if (mode === "html") return _chunkW7NXX74Bcjs.runHtmlPipeline.call(void 0, input, given);
|
|
38
|
+
if (mode === "yaml") return _chunkY7GDDTZ4cjs.runYamlPipeline.call(void 0, input, given);
|
|
39
|
+
return _chunkDRSERRP3cjs.runMarkdownPipeline.call(void 0, input, given);
|
|
40
40
|
}
|
|
41
41
|
function runAnalyze(input, options) {
|
|
42
42
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
43
43
|
const mode = resolveMode(given.mode);
|
|
44
|
-
if (mode === "text") return
|
|
45
|
-
if (mode === "html") return
|
|
46
|
-
if (mode === "yaml") return
|
|
47
|
-
return
|
|
44
|
+
if (mode === "text") return _chunkYRAXUXVBcjs.analyzeTextPipeline.call(void 0, input, given);
|
|
45
|
+
if (mode === "html") return _chunkW7NXX74Bcjs.analyzeHtmlPipeline.call(void 0, input, given);
|
|
46
|
+
if (mode === "yaml") return _chunkY7GDDTZ4cjs.analyzeYamlPipeline.call(void 0, input, given);
|
|
47
|
+
return _chunkDRSERRP3cjs.analyzeMarkdownPipeline.call(void 0, input, given);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
// src/index.ts
|
|
@@ -58,5 +58,5 @@ function analyze(input, options) {
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
exports.PolytypoError =
|
|
61
|
+
exports.PolytypoError = _chunkQZIVTU25cjs.PolytypoError; exports.analyze = analyze; exports.transform = transform;
|
|
62
62
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
analyzeTextPipeline,
|
|
3
3
|
runTextPipeline
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2DNTZH4F.js";
|
|
5
5
|
import {
|
|
6
6
|
analyzeHtmlPipeline,
|
|
7
7
|
runHtmlPipeline
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7D6OKNF7.js";
|
|
9
9
|
import {
|
|
10
10
|
analyzeMarkdownPipeline,
|
|
11
11
|
runMarkdownPipeline
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-4RLNGRZY.js";
|
|
13
|
+
import "./chunk-C7IOLTT5.js";
|
|
14
14
|
import {
|
|
15
15
|
analyzeYamlPipeline,
|
|
16
16
|
runYamlPipeline
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-NCYZYIOG.js";
|
|
18
|
+
import "./chunk-U2POYXTP.js";
|
|
19
|
+
import "./chunk-GSH2742L.js";
|
|
20
20
|
import {
|
|
21
21
|
PolytypoError
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-LO2IGWUX.js";
|
|
23
23
|
|
|
24
24
|
// src/engine/pipeline.ts
|
|
25
25
|
function resolveMode(mode) {
|
package/dist/markdown.cjs
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
4
|
+
var _chunkDRSERRP3cjs = require('./chunk-DRSERRP3.cjs');
|
|
5
|
+
require('./chunk-GFU64ZPK.cjs');
|
|
6
|
+
require('./chunk-LQOZ3W4B.cjs');
|
|
7
|
+
require('./chunk-46OPZEOJ.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunk3HJSBQ3Vcjs = require('./chunk-3HJSBQ3V.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkQZIVTU25cjs = require('./chunk-QZIVTU25.cjs');
|
|
14
14
|
|
|
15
15
|
// src/index.markdown.ts
|
|
16
16
|
function transform(input, options) {
|
|
17
17
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
18
|
-
|
|
19
|
-
return
|
|
18
|
+
_chunk3HJSBQ3Vcjs.assertFixedMode.call(void 0, given.mode, "markdown", "polytypo/markdown");
|
|
19
|
+
return _chunkDRSERRP3cjs.runMarkdownPipeline.call(void 0, input, given);
|
|
20
20
|
}
|
|
21
21
|
function analyze(input, options) {
|
|
22
22
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
23
|
-
|
|
24
|
-
return
|
|
23
|
+
_chunk3HJSBQ3Vcjs.assertFixedMode.call(void 0, given.mode, "markdown", "polytypo/markdown");
|
|
24
|
+
return _chunkDRSERRP3cjs.analyzeMarkdownPipeline.call(void 0, input, given);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
exports.PolytypoError =
|
|
30
|
+
exports.PolytypoError = _chunkQZIVTU25cjs.PolytypoError; exports.analyze = analyze; exports.transform = transform;
|
|
31
31
|
//# sourceMappingURL=markdown.cjs.map
|
package/dist/markdown.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
analyzeMarkdownPipeline,
|
|
3
3
|
runMarkdownPipeline
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-4RLNGRZY.js";
|
|
5
|
+
import "./chunk-C7IOLTT5.js";
|
|
6
|
+
import "./chunk-U2POYXTP.js";
|
|
7
|
+
import "./chunk-GSH2742L.js";
|
|
8
8
|
import {
|
|
9
9
|
assertFixedMode
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YLIX3M2X.js";
|
|
11
11
|
import {
|
|
12
12
|
PolytypoError
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-LO2IGWUX.js";
|
|
14
14
|
|
|
15
15
|
// src/index.markdown.ts
|
|
16
16
|
function transform(input, options) {
|
package/dist/text.cjs
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkYRAXUXVBcjs = require('./chunk-YRAXUXVB.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk3HJSBQ3Vcjs = require('./chunk-3HJSBQ3V.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkQZIVTU25cjs = require('./chunk-QZIVTU25.cjs');
|
|
11
11
|
|
|
12
12
|
// src/index.text.ts
|
|
13
13
|
function transform(input, options) {
|
|
14
14
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
15
|
-
|
|
16
|
-
return
|
|
15
|
+
_chunk3HJSBQ3Vcjs.assertFixedMode.call(void 0, given.mode, "text", "polytypo/text");
|
|
16
|
+
return _chunkYRAXUXVBcjs.runTextPipeline.call(void 0, input, given);
|
|
17
17
|
}
|
|
18
18
|
function analyze(input, options) {
|
|
19
19
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
20
|
-
|
|
21
|
-
return
|
|
20
|
+
_chunk3HJSBQ3Vcjs.assertFixedMode.call(void 0, given.mode, "text", "polytypo/text");
|
|
21
|
+
return _chunkYRAXUXVBcjs.analyzeTextPipeline.call(void 0, input, given);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
exports.PolytypoError =
|
|
27
|
+
exports.PolytypoError = _chunkQZIVTU25cjs.PolytypoError; exports.analyze = analyze; exports.transform = transform;
|
|
28
28
|
//# sourceMappingURL=text.cjs.map
|
package/dist/text.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
analyzeTextPipeline,
|
|
3
3
|
runTextPipeline
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2DNTZH4F.js";
|
|
5
5
|
import {
|
|
6
6
|
assertFixedMode
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YLIX3M2X.js";
|
|
8
8
|
import {
|
|
9
9
|
PolytypoError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LO2IGWUX.js";
|
|
11
11
|
|
|
12
12
|
// src/index.text.ts
|
|
13
13
|
function transform(input, options) {
|
package/dist/yaml.cjs
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
4
|
+
var _chunkY7GDDTZ4cjs = require('./chunk-Y7GDDTZ4.cjs');
|
|
5
|
+
require('./chunk-LQOZ3W4B.cjs');
|
|
6
|
+
require('./chunk-46OPZEOJ.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk3HJSBQ3Vcjs = require('./chunk-3HJSBQ3V.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkQZIVTU25cjs = require('./chunk-QZIVTU25.cjs');
|
|
13
13
|
|
|
14
14
|
// src/index.yaml.ts
|
|
15
15
|
function transform(input, options) {
|
|
16
16
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
17
|
-
|
|
18
|
-
return
|
|
17
|
+
_chunk3HJSBQ3Vcjs.assertFixedMode.call(void 0, given.mode, "yaml", "polytypo/yaml");
|
|
18
|
+
return _chunkY7GDDTZ4cjs.runYamlPipeline.call(void 0, input, given);
|
|
19
19
|
}
|
|
20
20
|
function analyze(input, options) {
|
|
21
21
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
22
|
-
|
|
23
|
-
return
|
|
22
|
+
_chunk3HJSBQ3Vcjs.assertFixedMode.call(void 0, given.mode, "yaml", "polytypo/yaml");
|
|
23
|
+
return _chunkY7GDDTZ4cjs.analyzeYamlPipeline.call(void 0, input, given);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
exports.PolytypoError =
|
|
29
|
+
exports.PolytypoError = _chunkQZIVTU25cjs.PolytypoError; exports.analyze = analyze; exports.transform = transform;
|
|
30
30
|
//# sourceMappingURL=yaml.cjs.map
|
package/dist/yaml.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
analyzeYamlPipeline,
|
|
3
3
|
runYamlPipeline
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-NCYZYIOG.js";
|
|
5
|
+
import "./chunk-U2POYXTP.js";
|
|
6
|
+
import "./chunk-GSH2742L.js";
|
|
7
7
|
import {
|
|
8
8
|
assertFixedMode
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YLIX3M2X.js";
|
|
10
10
|
import {
|
|
11
11
|
PolytypoError
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LO2IGWUX.js";
|
|
13
13
|
|
|
14
14
|
// src/index.yaml.ts
|
|
15
15
|
function transform(input, options) {
|