polytypo 1.23.1 → 1.24.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.
- package/dist/{chunk-JTYWNFN4.cjs → chunk-3GKRQ3XO.cjs} +3 -3
- package/dist/{chunk-JTYWNFN4.cjs.map → chunk-3GKRQ3XO.cjs.map} +1 -1
- package/dist/{chunk-QTUPLKGX.js → chunk-44PLJMOX.js} +2 -2
- package/dist/{chunk-QDLVXAHK.cjs → chunk-4GNJWMXI.cjs} +3 -1
- package/dist/chunk-4GNJWMXI.cjs.map +1 -0
- package/dist/{chunk-4ZRAFD6S.js → chunk-6BZSWQLS.js} +3 -3
- package/dist/chunk-6XJG3XEK.cjs +34 -0
- package/dist/{chunk-244KRDWN.cjs.map → chunk-6XJG3XEK.cjs.map} +1 -1
- package/dist/{chunk-GL273L36.cjs → chunk-BRUSFT2Q.cjs} +6 -6
- package/dist/{chunk-GL273L36.cjs.map → chunk-BRUSFT2Q.cjs.map} +1 -1
- package/dist/{chunk-6Q3KRZQ5.js → chunk-D57NGDLG.js} +4 -4
- package/dist/chunk-J3EZK5OW.cjs +36 -0
- package/dist/{chunk-CVJVASBB.cjs.map → chunk-J3EZK5OW.cjs.map} +1 -1
- package/dist/{chunk-75YYV3FW.js → chunk-L3J52D7B.js} +3 -3
- package/dist/{chunk-6242RKS3.js → chunk-MLCRELTI.js} +2 -2
- package/dist/{chunk-ZAYI4P5G.cjs → chunk-PXXHTL3K.cjs} +23 -23
- package/dist/{chunk-ZAYI4P5G.cjs.map → chunk-PXXHTL3K.cjs.map} +1 -1
- package/dist/chunk-RQTVK2RX.cjs +38 -0
- package/dist/{chunk-2XOMOXCW.cjs.map → chunk-RQTVK2RX.cjs.map} +1 -1
- package/dist/{chunk-SLAQTVNN.js → chunk-RW32MNW5.js} +2 -2
- package/dist/{chunk-YXUADCFN.js → chunk-UPOI5JM4.js} +3 -1
- package/dist/chunk-UPOI5JM4.js.map +1 -0
- package/dist/{chunk-FLLMLWN5.js → chunk-W24ZJOMS.js} +2 -2
- package/dist/{chunk-6MZWJX7B.cjs → chunk-XHTWS33U.cjs} +4 -4
- package/dist/{chunk-6MZWJX7B.cjs.map → chunk-XHTWS33U.cjs.map} +1 -1
- package/dist/html.cjs +9 -9
- package/dist/html.js +4 -4
- 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-244KRDWN.cjs +0 -34
- package/dist/chunk-2XOMOXCW.cjs +0 -38
- package/dist/chunk-CVJVASBB.cjs +0 -36
- package/dist/chunk-QDLVXAHK.cjs.map +0 -1
- package/dist/chunk-YXUADCFN.js.map +0 -1
- /package/dist/{chunk-QTUPLKGX.js.map → chunk-44PLJMOX.js.map} +0 -0
- /package/dist/{chunk-4ZRAFD6S.js.map → chunk-6BZSWQLS.js.map} +0 -0
- /package/dist/{chunk-6Q3KRZQ5.js.map → chunk-D57NGDLG.js.map} +0 -0
- /package/dist/{chunk-75YYV3FW.js.map → chunk-L3J52D7B.js.map} +0 -0
- /package/dist/{chunk-6242RKS3.js.map → chunk-MLCRELTI.js.map} +0 -0
- /package/dist/{chunk-SLAQTVNN.js.map → chunk-RW32MNW5.js.map} +0 -0
- /package/dist/{chunk-FLLMLWN5.js.map → chunk-W24ZJOMS.js.map} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk4GNJWMXIcjs = require('./chunk-4GNJWMXI.cjs');
|
|
4
4
|
|
|
5
5
|
// src/engine/assert-fixed-mode.ts
|
|
6
6
|
function assertFixedMode(mode, fixed, entryPoint) {
|
|
7
7
|
if (mode === void 0 || mode === fixed) return;
|
|
8
|
-
throw new (0,
|
|
8
|
+
throw new (0, _chunk4GNJWMXIcjs.PolytypoError)(
|
|
9
9
|
"POLYTYPO_INVALID_MODE",
|
|
10
10
|
`"${entryPoint}" only supports mode "${fixed}". Received "${String(mode)}" \u2014 import from "polytypo" for the other modes, or omit \`mode\` here.`
|
|
11
11
|
);
|
|
@@ -14,4 +14,4 @@ function assertFixedMode(mode, fixed, entryPoint) {
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
exports.assertFixedMode = assertFixedMode;
|
|
17
|
-
//# sourceMappingURL=chunk-
|
|
17
|
+
//# sourceMappingURL=chunk-3GKRQ3XO.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-3GKRQ3XO.cjs","../src/engine/assert-fixed-mode.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACMO,SAAS,eAAA,CAAgB,IAAA,EAAe,KAAA,EAAa,UAAA,EAA0B;AACpF,EAAA,GAAA,CAAI,KAAA,IAAS,KAAA,EAAA,GAAa,KAAA,IAAS,KAAA,EAAO,MAAA;AAC1C,EAAA,MAAM,IAAI,oCAAA;AAAA,IACR,uBAAA;AAAA,IACA,CAAA,CAAA,EAAI,UAAU,CAAA,sBAAA,EAAyB,KAAK,CAAA,aAAA,EAAgB,MAAA,CAAO,IAAI,CAAC,CAAA,2EAAA;AAAA,EAE1E,CAAA;AACF;ADLA;AACA;AACE;AACF,0CAAC","file":"/home/runner/work/polytypo-js/polytypo-js/dist/chunk-3GKRQ3XO.cjs","sourcesContent":[null,"import { PolytypoError } from \"../errors.js\";\nimport type { Mode } from \"../types.js\";\n\n/**\n * `polytypo/text`, `polytypo/html` and `polytypo/markdown` each fix `mode` at the type level by\n * omitting it from their Options type (AUDIT_REMEDIATION_AND_RELEASE_PLAN.md 5.1, criterion 6).\n * A plain-JS caller — or a TypeScript caller passing a wider-typed variable, which excess-property\n * checking does not catch — can still supply a conflicting `mode` at runtime. That is rejected\n * explicitly here, never silently ignored or overridden.\n */\nexport function assertFixedMode(mode: unknown, fixed: Mode, entryPoint: string): void {\n if (mode === undefined || mode === fixed) return;\n throw new PolytypoError(\n \"POLYTYPO_INVALID_MODE\",\n `\"${entryPoint}\" only supports mode \"${fixed}\". Received \"${String(mode)}\" — ` +\n `import from \"polytypo\" for the other modes, or omit \\`mode\\` here.`,\n );\n}\n"]}
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
runRules,
|
|
10
10
|
runRulesRecording,
|
|
11
11
|
toCodePoints
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UPOI5JM4.js";
|
|
13
13
|
|
|
14
14
|
// src/engine/text-pipeline.ts
|
|
15
15
|
function runTextPipeline(input, options) {
|
|
@@ -35,4 +35,4 @@ export {
|
|
|
35
35
|
runTextPipeline,
|
|
36
36
|
analyzeTextPipeline
|
|
37
37
|
};
|
|
38
|
-
//# sourceMappingURL=chunk-
|
|
38
|
+
//# sourceMappingURL=chunk-44PLJMOX.js.map
|
|
@@ -59,6 +59,7 @@ var KNOWN_LOCALES = [
|
|
|
59
59
|
"hu",
|
|
60
60
|
"it",
|
|
61
61
|
"lt",
|
|
62
|
+
"lv",
|
|
62
63
|
"nl",
|
|
63
64
|
"pl",
|
|
64
65
|
"pt-BR",
|
|
@@ -93,6 +94,7 @@ var LOCALES = {
|
|
|
93
94
|
hu: { locale: "hu", name: "Hungarian", quotes: { primary: { open: "\u201E", close: "\u201D", innerSpace: "none" }, secondary: { open: "\xBB", close: "\xAB", innerSpace: "none" }, elisionIdioms: [], elisionClitics: { before: [], after: [] }, punctuationPlacement: "none" }, dash: { parenthetical: "en-spaced", range: "en-tight" }, ellipsis: { abbreviatedAfterTerminal: false }, hyphen: { prefixes: [], suffixes: [], compounds: [] }, nbsp: { beforePunctuation: [], narrowBeforePunctuation: [], afterShortWords: [], abbreviations: ["a. m.", "i. sz.", "Kr. e.", "Kr. u.", "s. k.", "i. e."], beforeUnits: [], spacedUnits: ["km", "kg", "kWh", "km/h", "\xB0C"], closedUnits: ["%"], beforeNumber: [], beforeWord: [], afterSymbols: [], initialBinding: "none" } },
|
|
94
95
|
it: { locale: "it", name: "Italian", quotes: { primary: { open: "\xAB", close: "\xBB", innerSpace: "none" }, secondary: { open: "\u201C", close: "\u201D", innerSpace: "none" }, elisionIdioms: [], elisionClitics: { before: ["l", "un", "d"], after: [] }, punctuationPlacement: "none" }, dash: { parenthetical: "em-spaced", range: "none" }, ellipsis: { abbreviatedAfterTerminal: false }, hyphen: { prefixes: [], suffixes: [], compounds: [] }, nbsp: { beforePunctuation: [], narrowBeforePunctuation: [], afterShortWords: [], abbreviations: [], beforeUnits: ["%", "\u2030", "\u20AC", "\xB0C", "km", "cm", "mm", "kg", "km/h", "kWh"], spacedUnits: [], closedUnits: [], beforeNumber: ["n.", "pag."], beforeWord: [], afterSymbols: [], initialBinding: "none" } },
|
|
95
96
|
lt: { locale: "lt", name: "Lithuanian", quotes: { primary: { open: "\u201E", close: "\u201C", innerSpace: "none" }, secondary: { open: "\u201E", close: "\u201C", innerSpace: "none" }, elisionIdioms: [], elisionClitics: { before: [], after: [] }, punctuationPlacement: "none" }, dash: { parenthetical: "en-spaced", range: "en-tight" }, ellipsis: { abbreviatedAfterTerminal: true }, hyphen: { prefixes: [], suffixes: [], compounds: [] }, nbsp: { beforePunctuation: [], narrowBeforePunctuation: [], afterShortWords: [], abbreviations: ["t. y.", "t. t.", "\u0161. m."], beforeUnits: ["cm", "mm", "m.", "d."], spacedUnits: ["%", "proc.", "\xB0C", "kg", "km", "EUR", "Eur", "\u20AC", "mln.", "val.", "min.", "km/h", "m/s", "ha"], closedUnits: [], beforeNumber: [], beforeWord: [], afterSymbols: ["\xA7"], initialBinding: "none" } },
|
|
97
|
+
lv: { locale: "lv", name: "Latvian", quotes: { primary: { open: "\u201C", close: "\u201D", innerSpace: "none" }, secondary: { open: "\u201C", close: "\u201D", innerSpace: "none" }, elisionIdioms: [], elisionClitics: { before: [], after: [] }, punctuationPlacement: "none" }, dash: { parenthetical: "en-spaced", range: "en-tight" }, ellipsis: { abbreviatedAfterTerminal: false }, hyphen: { prefixes: [], suffixes: [], compounds: [] }, nbsp: { beforePunctuation: [], narrowBeforePunctuation: [], afterShortWords: [], abbreviations: ["u. c.", "u. tml.", "\u0161. g."], beforeUnits: [], spacedUnits: ["%", "\u20AC", "EUR", "km", "\xB0C"], closedUnits: [], beforeNumber: ["Nr."], beforeWord: [], afterSymbols: [], initialBinding: "single" } },
|
|
96
98
|
nl: { locale: "nl", name: "Dutch", quotes: { primary: { open: "\u201C", close: "\u201D", innerSpace: "none" }, secondary: { open: "\u2018", close: "\u2019", innerSpace: "none" }, elisionIdioms: [], elisionClitics: { before: [], after: ["s", "t", "ns", "k", "m", "em", "r", "et"] }, punctuationPlacement: "none" }, dash: { parenthetical: "en-spaced", range: "none" }, ellipsis: { abbreviatedAfterTerminal: false }, hyphen: { prefixes: [], suffixes: [], compounds: [] }, nbsp: { beforePunctuation: [], narrowBeforePunctuation: [], afterShortWords: [], abbreviations: ["prof. dr."], beforeUnits: ["\xB0C", "km/h", "kWh"], spacedUnits: ["km", "cm", "mm", "kg"], closedUnits: ["%", "\u2030"], beforeNumber: [], beforeWord: [], afterSymbols: ["\u20AC", "$"], initialBinding: "none" } },
|
|
97
99
|
pl: { locale: "pl", name: "Polish", quotes: { primary: { open: "\u201E", close: "\u201D", innerSpace: "none" }, secondary: { open: "\xBB", close: "\xAB", innerSpace: "none" }, elisionIdioms: [], elisionClitics: { before: [], after: [] }, punctuationPlacement: "none" }, dash: { parenthetical: "en-spaced", range: "en-tight" }, ellipsis: { abbreviatedAfterTerminal: false }, hyphen: { prefixes: [], suffixes: [], compounds: [] }, nbsp: { beforePunctuation: [], narrowBeforePunctuation: [], afterShortWords: ["a", "i", "o", "u", "w", "z"], abbreviations: ["lek. med.", "in\u017C. g\xF3rn.", "bp sufr."], beforeUnits: ["\u2030", "\xB0C"], spacedUnits: ["km", "cm", "mm", "kg", "km/h", "kWh"], closedUnits: ["%"], beforeNumber: [], beforeWord: [], afterSymbols: ["\xA7"], initialBinding: "none" } },
|
|
98
100
|
"pt-BR": { locale: "pt-BR", name: "Portuguese (Brazil)", quotes: { primary: { open: "\u201C", close: "\u201D", innerSpace: "none" }, secondary: { open: "\u2018", close: "\u2019", innerSpace: "none" }, elisionIdioms: [], elisionClitics: { before: ["d", "n", "pel", "m", "t", "lh", "sant"], after: [] }, punctuationPlacement: "none" }, dash: { parenthetical: "en-spaced", range: "none" }, ellipsis: { abbreviatedAfterTerminal: false }, hyphen: { prefixes: [], suffixes: [], compounds: [] }, nbsp: { beforePunctuation: [], narrowBeforePunctuation: [], afterShortWords: [], abbreviations: ["p. ex."], beforeUnits: ["%", "\u2030"], spacedUnits: ["\xB0C", "km", "cm", "mm", "kg", "kW", "kWh", "Hz"], closedUnits: [], beforeNumber: ["p."], beforeWord: [], afterSymbols: [], initialBinding: "none" } },
|
|
@@ -6555,4 +6557,4 @@ function analyzeProtected(input, holes, planned, locale, narrowTarget) {
|
|
|
6555
6557
|
|
|
6556
6558
|
|
|
6557
6559
|
exports.PolytypoError = PolytypoError; exports.toCodePoints = toCodePoints; exports.fromCodePoints = fromCodePoints; exports.getLocaleData = getLocaleData; exports.resolveNarrowTarget = resolveNarrowTarget; exports.normalizeSpans = normalizeSpans; exports.planRules = planRules; exports.runRules = runRules; exports.runRulesRecording = runRulesRecording; exports.runOverSpans = runOverSpans; exports.runOverUnits = runOverUnits; exports.analyzeOverUnits = analyzeOverUnits; exports.analyzeOverSpans = analyzeOverSpans; exports.resolveProtect = resolveProtect; exports.assertNoProtect = assertNoProtect; exports.runProtected = runProtected; exports.analyzeProtected = analyzeProtected;
|
|
6558
|
-
//# sourceMappingURL=chunk-
|
|
6560
|
+
//# sourceMappingURL=chunk-4GNJWMXI.cjs.map
|