polytypo 1.6.0 → 1.6.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-GDZCWLM3.cjs → chunk-DKUR763G.cjs} +16 -16
- package/dist/{chunk-GDZCWLM3.cjs.map → chunk-DKUR763G.cjs.map} +1 -1
- package/dist/{chunk-ZHF6GNJ4.js → chunk-FICUT4OU.js} +2 -2
- package/dist/{chunk-TDIDDBNH.js → chunk-IN32R4AX.js} +4 -4
- package/dist/{chunk-242RX2X7.js → chunk-LDXWXCGL.js} +2 -2
- package/dist/{chunk-V3EGRWOR.cjs → chunk-M4PJNXRU.cjs} +13 -13
- package/dist/{chunk-V3EGRWOR.cjs.map → chunk-M4PJNXRU.cjs.map} +1 -1
- package/dist/chunk-MDESZMU2.cjs +33 -0
- package/dist/{chunk-3HRK4WOC.cjs.map → chunk-MDESZMU2.cjs.map} +1 -1
- package/dist/{chunk-A4CH2EQC.cjs → chunk-P6IBHZL6.cjs} +3 -3
- package/dist/{chunk-A4CH2EQC.cjs.map → chunk-P6IBHZL6.cjs.map} +1 -1
- package/dist/{chunk-JWODP74P.cjs → chunk-PGHLZCGV.cjs} +17 -17
- package/dist/{chunk-JWODP74P.cjs.map → chunk-PGHLZCGV.cjs.map} +1 -1
- package/dist/{chunk-IMWES4GY.js → chunk-URE2U73R.js} +3 -3
- package/dist/{chunk-P47H3TPN.cjs → chunk-V6SSSZLP.cjs} +4 -4
- package/dist/{chunk-P47H3TPN.cjs.map → chunk-V6SSSZLP.cjs.map} +1 -1
- package/dist/{chunk-2OERMYTV.js → chunk-VBZAV63L.js} +2 -2
- package/dist/{chunk-GAIX76FT.cjs → chunk-VCD45VZH.cjs} +1 -1
- package/dist/{chunk-GAIX76FT.cjs.map → chunk-VCD45VZH.cjs.map} +1 -1
- package/dist/chunk-VSONV4W4.cjs +31 -0
- package/dist/{chunk-3JF6P2GI.cjs.map → chunk-VSONV4W4.cjs.map} +1 -1
- package/dist/{chunk-C2KW4GOY.js → chunk-VST7L77N.js} +2 -2
- package/dist/{chunk-MOAEMPFT.js → chunk-W77K6K6G.js} +1 -1
- package/dist/{chunk-MOAEMPFT.js.map → chunk-W77K6K6G.js.map} +1 -1
- package/dist/{chunk-CVYDGAIH.js → chunk-YD5JMNLT.js} +4 -4
- package/dist/html.cjs +10 -10
- package/dist/html.js +5 -5
- package/dist/index.cjs +17 -17
- package/dist/index.js +7 -7
- package/dist/markdown.cjs +10 -10
- package/dist/markdown.js +5 -5
- package/dist/text.cjs +8 -8
- package/dist/text.js +3 -3
- package/dist/yaml.cjs +9 -9
- package/dist/yaml.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-3HRK4WOC.cjs +0 -33
- package/dist/chunk-3JF6P2GI.cjs +0 -31
- /package/dist/{chunk-ZHF6GNJ4.js.map → chunk-FICUT4OU.js.map} +0 -0
- /package/dist/{chunk-TDIDDBNH.js.map → chunk-IN32R4AX.js.map} +0 -0
- /package/dist/{chunk-242RX2X7.js.map → chunk-LDXWXCGL.js.map} +0 -0
- /package/dist/{chunk-IMWES4GY.js.map → chunk-URE2U73R.js.map} +0 -0
- /package/dist/{chunk-2OERMYTV.js.map → chunk-VBZAV63L.js.map} +0 -0
- /package/dist/{chunk-C2KW4GOY.js.map → chunk-VST7L77N.js.map} +0 -0
- /package/dist/{chunk-CVYDGAIH.js.map → chunk-YD5JMNLT.js.map} +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkVCD45VZHcjs = require('./chunk-VCD45VZH.cjs');
|
|
10
|
+
|
|
11
|
+
// src/engine/text-pipeline.ts
|
|
12
|
+
function runTextPipeline(input, options) {
|
|
13
|
+
const narrowTarget = _chunkVCD45VZHcjs.resolveNarrowTarget.call(void 0, options.narrowNbsp);
|
|
14
|
+
const planned = _chunkVCD45VZHcjs.planRules.call(void 0, options.rules);
|
|
15
|
+
const locale = _chunkVCD45VZHcjs.getLocaleData.call(void 0, options.locale);
|
|
16
|
+
return _chunkVCD45VZHcjs.fromCodePoints.call(void 0, _chunkVCD45VZHcjs.runRules.call(void 0, _chunkVCD45VZHcjs.toCodePoints.call(void 0, input), planned, locale, "text", narrowTarget));
|
|
17
|
+
}
|
|
18
|
+
function analyzeTextPipeline(input, options) {
|
|
19
|
+
const narrowTarget = _chunkVCD45VZHcjs.resolveNarrowTarget.call(void 0, options.narrowNbsp);
|
|
20
|
+
const planned = _chunkVCD45VZHcjs.planRules.call(void 0, options.rules);
|
|
21
|
+
const locale = _chunkVCD45VZHcjs.getLocaleData.call(void 0, options.locale);
|
|
22
|
+
const cp = _chunkVCD45VZHcjs.toCodePoints.call(void 0, input);
|
|
23
|
+
const origin = cp.map((_value, index) => index);
|
|
24
|
+
return _chunkVCD45VZHcjs.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-VSONV4W4.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-VSONV4W4.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-VSONV4W4.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"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PolytypoError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W77K6K6G.js";
|
|
4
4
|
|
|
5
5
|
// src/modes/html.ts
|
|
6
6
|
import { parse, parseFragment } from "parse5";
|
|
@@ -144,4 +144,4 @@ export {
|
|
|
144
144
|
htmlSpans,
|
|
145
145
|
htmlFragmentSpans
|
|
146
146
|
};
|
|
147
|
-
//# sourceMappingURL=chunk-
|
|
147
|
+
//# sourceMappingURL=chunk-VST7L77N.js.map
|