polytypo 1.5.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-EJ3BHHOQ.cjs → chunk-DKUR763G.cjs} +16 -16
- package/dist/{chunk-EJ3BHHOQ.cjs.map → chunk-DKUR763G.cjs.map} +1 -1
- package/dist/{chunk-S4CDIFBW.js → chunk-FICUT4OU.js} +2 -2
- package/dist/{chunk-XP5JTHSC.js → chunk-IN32R4AX.js} +4 -4
- package/dist/{chunk-OBE7MMRU.js → chunk-LDXWXCGL.js} +2 -2
- package/dist/{chunk-ZJRQBQEA.cjs → chunk-M4PJNXRU.cjs} +13 -13
- package/dist/{chunk-ZJRQBQEA.cjs.map → chunk-M4PJNXRU.cjs.map} +1 -1
- package/dist/chunk-MDESZMU2.cjs +33 -0
- package/dist/{chunk-NPY6XGYB.cjs.map → chunk-MDESZMU2.cjs.map} +1 -1
- package/dist/{chunk-55BMPPAR.cjs → chunk-P6IBHZL6.cjs} +3 -3
- package/dist/{chunk-55BMPPAR.cjs.map → chunk-P6IBHZL6.cjs.map} +1 -1
- package/dist/{chunk-77CWF35X.cjs → chunk-PGHLZCGV.cjs} +17 -17
- package/dist/{chunk-77CWF35X.cjs.map → chunk-PGHLZCGV.cjs.map} +1 -1
- package/dist/{chunk-ZZ3OK5SL.js → chunk-URE2U73R.js} +3 -3
- package/dist/{chunk-J2JVIZ6C.cjs → chunk-V6SSSZLP.cjs} +4 -4
- package/dist/{chunk-J2JVIZ6C.cjs.map → chunk-V6SSSZLP.cjs.map} +1 -1
- package/dist/{chunk-QBPOFGSD.js → chunk-VBZAV63L.js} +2 -2
- package/dist/{chunk-SD4SLSAR.cjs → chunk-VCD45VZH.cjs} +3 -1
- package/dist/chunk-VCD45VZH.cjs.map +1 -0
- package/dist/chunk-VSONV4W4.cjs +31 -0
- package/dist/{chunk-Z5FXQRXU.cjs.map → chunk-VSONV4W4.cjs.map} +1 -1
- package/dist/{chunk-F4UOZBYW.js → chunk-VST7L77N.js} +2 -2
- package/dist/{chunk-ETKYEVE6.js → chunk-W77K6K6G.js} +3 -1
- package/dist/chunk-W77K6K6G.js.map +1 -0
- package/dist/{chunk-A57IM245.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-ETKYEVE6.js.map +0 -1
- package/dist/chunk-NPY6XGYB.cjs +0 -33
- package/dist/chunk-SD4SLSAR.cjs.map +0 -1
- package/dist/chunk-Z5FXQRXU.cjs +0 -31
- /package/dist/{chunk-S4CDIFBW.js.map → chunk-FICUT4OU.js.map} +0 -0
- /package/dist/{chunk-XP5JTHSC.js.map → chunk-IN32R4AX.js.map} +0 -0
- /package/dist/{chunk-OBE7MMRU.js.map → chunk-LDXWXCGL.js.map} +0 -0
- /package/dist/{chunk-ZZ3OK5SL.js.map → chunk-URE2U73R.js.map} +0 -0
- /package/dist/{chunk-QBPOFGSD.js.map → chunk-VBZAV63L.js.map} +0 -0
- /package/dist/{chunk-F4UOZBYW.js.map → chunk-VST7L77N.js.map} +0 -0
- /package/dist/{chunk-A57IM245.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
|
|
@@ -61,6 +61,7 @@ var KNOWN_LOCALES = [
|
|
|
61
61
|
"pt-PT",
|
|
62
62
|
"ru",
|
|
63
63
|
"sv",
|
|
64
|
+
"tr",
|
|
64
65
|
"uk"
|
|
65
66
|
];
|
|
66
67
|
var ALIASES = {
|
|
@@ -86,6 +87,7 @@ var LOCALES = {
|
|
|
86
87
|
"pt-PT": { locale: "pt-PT", name: "Portuguese (Portugal)", quotes: { primary: { open: "\xAB", close: "\xBB", innerSpace: "none" }, secondary: { open: "\u201C", close: "\u201D", innerSpace: "none" }, elisionIdioms: [], elisionClitics: { before: ["d", "n", "pel", "m", "t", "lh", "sant"], after: [] } }, dash: { parenthetical: "em-spaced", range: "none" }, ellipsis: { abbreviatedAfterTerminal: false }, hyphen: { prefixes: [], suffixes: [], compounds: [] }, nbsp: { beforePunctuation: [], narrowBeforePunctuation: [], afterShortWords: [], abbreviations: ["p. ex."], beforeUnits: ["%", "\u2030", "\xB0C", "km", "cm", "mm", "kg", "kW", "kWh", "Hz"], beforeNumber: ["p."], beforeWord: [], afterSymbols: [], initialBinding: "none" } },
|
|
87
88
|
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" } },
|
|
88
89
|
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" } },
|
|
90
|
+
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" } },
|
|
89
91
|
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" } }
|
|
90
92
|
};
|
|
91
93
|
|
|
@@ -5835,4 +5837,4 @@ export {
|
|
|
5835
5837
|
runRules,
|
|
5836
5838
|
runRulesRecording
|
|
5837
5839
|
};
|
|
5838
|
-
//# sourceMappingURL=chunk-
|
|
5840
|
+
//# sourceMappingURL=chunk-W77K6K6G.js.map
|