polytypo 1.20.1 → 1.21.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-6GTMDBHQ.cjs → chunk-3L5KLKLP.cjs} +23 -23
- package/dist/{chunk-6GTMDBHQ.cjs.map → chunk-3L5KLKLP.cjs.map} +1 -1
- package/dist/{chunk-TKFAPD4Z.cjs → chunk-3WYVUARI.cjs} +6 -6
- package/dist/{chunk-TKFAPD4Z.cjs.map → chunk-3WYVUARI.cjs.map} +1 -1
- package/dist/{chunk-NBINYPGF.js → chunk-55LL24PJ.js} +3 -3
- package/dist/{chunk-WPF7QNGG.cjs → chunk-5AEJFYWK.cjs} +3 -3
- package/dist/{chunk-WPF7QNGG.cjs.map → chunk-5AEJFYWK.cjs.map} +1 -1
- package/dist/{chunk-7BQ34ZVZ.js → chunk-5AQIJOPD.js} +4 -4
- package/dist/{chunk-OZLT5NZJ.cjs → chunk-75BQY5RY.cjs} +153 -98
- package/dist/chunk-75BQY5RY.cjs.map +1 -0
- package/dist/chunk-AUKI3EXL.cjs +38 -0
- package/dist/{chunk-Q4Y2OWQI.cjs.map → chunk-AUKI3EXL.cjs.map} +1 -1
- package/dist/{chunk-66E6VFGJ.cjs → chunk-DHKVVUYY.cjs} +4 -4
- package/dist/{chunk-66E6VFGJ.cjs.map → chunk-DHKVVUYY.cjs.map} +1 -1
- package/dist/chunk-F2CNG4TF.cjs +36 -0
- package/dist/{chunk-5A3KGYPE.cjs.map → chunk-F2CNG4TF.cjs.map} +1 -1
- package/dist/{chunk-WCGLFL3P.js → chunk-FEVHV3ED.js} +2 -2
- package/dist/{chunk-4V77MJOE.js → chunk-FV4S3LDM.js} +2 -2
- package/dist/{chunk-HZNKXY23.js → chunk-IBN7DIS5.js} +3 -3
- package/dist/{chunk-MY6V3BBS.js → chunk-KY6R54DA.js} +2 -2
- package/dist/{chunk-ZTMVKQCT.js → chunk-NJXVMN4M.js} +2 -2
- package/dist/chunk-QIUGMSFQ.cjs +34 -0
- package/dist/{chunk-GUTC5F7K.cjs.map → chunk-QIUGMSFQ.cjs.map} +1 -1
- package/dist/{chunk-J7U6Y6K4.js → chunk-QXUC42OO.js} +153 -98
- package/dist/chunk-QXUC42OO.js.map +1 -0
- package/dist/{errors-CQz5lyjD.d.ts → errors-CjpOoBlm.d.cts} +10 -4
- package/dist/{errors-CQz5lyjD.d.cts → errors-CjpOoBlm.d.ts} +10 -4
- package/dist/html.cjs +9 -9
- package/dist/html.d.cts +2 -2
- package/dist/html.d.ts +2 -2
- package/dist/html.js +4 -4
- package/dist/index.cjs +17 -17
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -7
- package/dist/markdown.cjs +10 -10
- package/dist/markdown.d.cts +2 -2
- package/dist/markdown.d.ts +2 -2
- package/dist/markdown.js +5 -5
- package/dist/text.cjs +8 -8
- package/dist/text.d.cts +2 -2
- package/dist/text.d.ts +2 -2
- package/dist/text.js +3 -3
- package/dist/yaml.cjs +9 -9
- package/dist/yaml.d.cts +2 -2
- package/dist/yaml.d.ts +2 -2
- package/dist/yaml.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-5A3KGYPE.cjs +0 -36
- package/dist/chunk-GUTC5F7K.cjs +0 -34
- package/dist/chunk-J7U6Y6K4.js.map +0 -1
- package/dist/chunk-OZLT5NZJ.cjs.map +0 -1
- package/dist/chunk-Q4Y2OWQI.cjs +0 -38
- /package/dist/{chunk-NBINYPGF.js.map → chunk-55LL24PJ.js.map} +0 -0
- /package/dist/{chunk-7BQ34ZVZ.js.map → chunk-5AQIJOPD.js.map} +0 -0
- /package/dist/{chunk-WCGLFL3P.js.map → chunk-FEVHV3ED.js.map} +0 -0
- /package/dist/{chunk-4V77MJOE.js.map → chunk-FV4S3LDM.js.map} +0 -0
- /package/dist/{chunk-HZNKXY23.js.map → chunk-IBN7DIS5.js.map} +0 -0
- /package/dist/{chunk-MY6V3BBS.js.map → chunk-KY6R54DA.js.map} +0 -0
- /package/dist/{chunk-ZTMVKQCT.js.map → chunk-NJXVMN4M.js.map} +0 -0
|
@@ -6,7 +6,7 @@ type Mode = "text" | "html" | "markdown" | "yaml";
|
|
|
6
6
|
* invalid MDX, and a heuristic would then silently reclassify an ESM statement as prose.
|
|
7
7
|
*/
|
|
8
8
|
type Dialect = "commonmark" | "mdx";
|
|
9
|
-
type RuleId = "spaces" | "ellipsis" | "dashes" | "ranges" | "hyphen" | "quotes" | "apostrophe" | "symbols" | "nbsp";
|
|
9
|
+
type RuleId = "spaces" | "ellipsis" | "dashes" | "ranges" | "hyphen" | "quotes" | "quote-punctuation" | "apostrophe" | "symbols" | "nbsp";
|
|
10
10
|
interface Options {
|
|
11
11
|
/** Required. An unknown locale throws; there is never a fallback to English. */
|
|
12
12
|
locale: string;
|
|
@@ -29,8 +29,8 @@ interface Options {
|
|
|
29
29
|
*/
|
|
30
30
|
frontmatterKeys?: readonly string[];
|
|
31
31
|
/**
|
|
32
|
-
* Per-rule override, keyed by `RuleId`. For a default-on rule (every rule except `ranges`),
|
|
33
|
-
* `false` disables it and `true` is a no-op. For `ranges`
|
|
32
|
+
* Per-rule override, keyed by `RuleId`. For a default-on rule (every rule except `ranges` and `quote-punctuation`),
|
|
33
|
+
* `false` disables it and `true` is a no-op. For `ranges` (spec 0.5.0) and `quote-punctuation` (spec 1.21.0) — off by default —
|
|
34
34
|
* `true` explicitly opts in and `false` (or omitting the key) leaves it disabled. Absence of a
|
|
35
35
|
* key always means "use that rule's own default", never "off".
|
|
36
36
|
*/
|
|
@@ -108,6 +108,12 @@ interface LocaleData {
|
|
|
108
108
|
* closed set of attaching fragments is classified exactly as spec 1.3.1 classified it.
|
|
109
109
|
*/
|
|
110
110
|
readonly elisionClitics: ElisionClitics;
|
|
111
|
+
/**
|
|
112
|
+
* `quotes.punctuationPlacement` — spec/rules/quote-punctuation.md §2 (spec 1.21.0). `"inside"`:
|
|
113
|
+
* the locale's cited convention puts a comma or full stop before the closing primary mark.
|
|
114
|
+
* `"none"`: the `quote-punctuation` rule does nothing for this locale.
|
|
115
|
+
*/
|
|
116
|
+
readonly punctuationPlacement: "inside" | "none";
|
|
111
117
|
};
|
|
112
118
|
readonly dash: {
|
|
113
119
|
readonly parenthetical: "em-tight" | "em-spaced" | "em-paired" | "en-tight" | "en-spaced" | "none";
|
|
@@ -145,7 +151,7 @@ interface LocaleData {
|
|
|
145
151
|
interface LocaleSource {
|
|
146
152
|
/** Rule ids from spec/rules/order.json — note the rule is `dashes`/`ranges` while the field
|
|
147
153
|
* both read is `dash`. */
|
|
148
|
-
readonly rule: "quotes" | "dashes" | "ranges" | "ellipsis" | "hyphen" | "nbsp" | "spaces" | "apostrophe" | "symbols";
|
|
154
|
+
readonly rule: "quotes" | "quote-punctuation" | "dashes" | "ranges" | "ellipsis" | "hyphen" | "nbsp" | "spaces" | "apostrophe" | "symbols";
|
|
149
155
|
readonly cite: string;
|
|
150
156
|
readonly url?: string;
|
|
151
157
|
readonly note?: string;
|
|
@@ -6,7 +6,7 @@ type Mode = "text" | "html" | "markdown" | "yaml";
|
|
|
6
6
|
* invalid MDX, and a heuristic would then silently reclassify an ESM statement as prose.
|
|
7
7
|
*/
|
|
8
8
|
type Dialect = "commonmark" | "mdx";
|
|
9
|
-
type RuleId = "spaces" | "ellipsis" | "dashes" | "ranges" | "hyphen" | "quotes" | "apostrophe" | "symbols" | "nbsp";
|
|
9
|
+
type RuleId = "spaces" | "ellipsis" | "dashes" | "ranges" | "hyphen" | "quotes" | "quote-punctuation" | "apostrophe" | "symbols" | "nbsp";
|
|
10
10
|
interface Options {
|
|
11
11
|
/** Required. An unknown locale throws; there is never a fallback to English. */
|
|
12
12
|
locale: string;
|
|
@@ -29,8 +29,8 @@ interface Options {
|
|
|
29
29
|
*/
|
|
30
30
|
frontmatterKeys?: readonly string[];
|
|
31
31
|
/**
|
|
32
|
-
* Per-rule override, keyed by `RuleId`. For a default-on rule (every rule except `ranges`),
|
|
33
|
-
* `false` disables it and `true` is a no-op. For `ranges`
|
|
32
|
+
* Per-rule override, keyed by `RuleId`. For a default-on rule (every rule except `ranges` and `quote-punctuation`),
|
|
33
|
+
* `false` disables it and `true` is a no-op. For `ranges` (spec 0.5.0) and `quote-punctuation` (spec 1.21.0) — off by default —
|
|
34
34
|
* `true` explicitly opts in and `false` (or omitting the key) leaves it disabled. Absence of a
|
|
35
35
|
* key always means "use that rule's own default", never "off".
|
|
36
36
|
*/
|
|
@@ -108,6 +108,12 @@ interface LocaleData {
|
|
|
108
108
|
* closed set of attaching fragments is classified exactly as spec 1.3.1 classified it.
|
|
109
109
|
*/
|
|
110
110
|
readonly elisionClitics: ElisionClitics;
|
|
111
|
+
/**
|
|
112
|
+
* `quotes.punctuationPlacement` — spec/rules/quote-punctuation.md §2 (spec 1.21.0). `"inside"`:
|
|
113
|
+
* the locale's cited convention puts a comma or full stop before the closing primary mark.
|
|
114
|
+
* `"none"`: the `quote-punctuation` rule does nothing for this locale.
|
|
115
|
+
*/
|
|
116
|
+
readonly punctuationPlacement: "inside" | "none";
|
|
111
117
|
};
|
|
112
118
|
readonly dash: {
|
|
113
119
|
readonly parenthetical: "em-tight" | "em-spaced" | "em-paired" | "en-tight" | "en-spaced" | "none";
|
|
@@ -145,7 +151,7 @@ interface LocaleData {
|
|
|
145
151
|
interface LocaleSource {
|
|
146
152
|
/** Rule ids from spec/rules/order.json — note the rule is `dashes`/`ranges` while the field
|
|
147
153
|
* both read is `dash`. */
|
|
148
|
-
readonly rule: "quotes" | "dashes" | "ranges" | "ellipsis" | "hyphen" | "nbsp" | "spaces" | "apostrophe" | "symbols";
|
|
154
|
+
readonly rule: "quotes" | "quote-punctuation" | "dashes" | "ranges" | "ellipsis" | "hyphen" | "nbsp" | "spaces" | "apostrophe" | "symbols";
|
|
149
155
|
readonly cite: string;
|
|
150
156
|
readonly url?: string;
|
|
151
157
|
readonly note?: string;
|
package/dist/html.cjs
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
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-
|
|
4
|
+
var _chunkQIUGMSFQcjs = require('./chunk-QIUGMSFQ.cjs');
|
|
5
|
+
require('./chunk-DHKVVUYY.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunk5AEJFYWKcjs = require('./chunk-5AEJFYWK.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunk75BQY5RYcjs = require('./chunk-75BQY5RY.cjs');
|
|
12
12
|
|
|
13
13
|
// src/index.html.ts
|
|
14
14
|
function transform(input, options) {
|
|
15
15
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
16
|
-
|
|
17
|
-
return
|
|
16
|
+
_chunk5AEJFYWKcjs.assertFixedMode.call(void 0, given.mode, "html", "polytypo/html");
|
|
17
|
+
return _chunkQIUGMSFQcjs.runHtmlPipeline.call(void 0, input, given);
|
|
18
18
|
}
|
|
19
19
|
function analyze(input, options) {
|
|
20
20
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
21
|
-
|
|
22
|
-
return
|
|
21
|
+
_chunk5AEJFYWKcjs.assertFixedMode.call(void 0, given.mode, "html", "polytypo/html");
|
|
22
|
+
return _chunkQIUGMSFQcjs.analyzeHtmlPipeline.call(void 0, input, given);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
exports.PolytypoError =
|
|
28
|
+
exports.PolytypoError = _chunk75BQY5RYcjs.PolytypoError; exports.analyze = analyze; exports.transform = transform;
|
|
29
29
|
//# sourceMappingURL=html.cjs.map
|
package/dist/html.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as Options, C as Change } from './errors-
|
|
2
|
-
export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-
|
|
1
|
+
import { O as Options, C as Change } from './errors-CjpOoBlm.cjs';
|
|
2
|
+
export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-CjpOoBlm.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* `polytypo/html` — HTML-only entry point. Its module graph includes `parse5` but excludes the
|
package/dist/html.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as Options, C as Change } from './errors-
|
|
2
|
-
export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-
|
|
1
|
+
import { O as Options, C as Change } from './errors-CjpOoBlm.js';
|
|
2
|
+
export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-CjpOoBlm.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* `polytypo/html` — HTML-only entry point. Its module graph includes `parse5` but excludes the
|
package/dist/html.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
analyzeHtmlPipeline,
|
|
3
3
|
runHtmlPipeline
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-55LL24PJ.js";
|
|
5
|
+
import "./chunk-KY6R54DA.js";
|
|
6
6
|
import {
|
|
7
7
|
assertFixedMode
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NJXVMN4M.js";
|
|
9
9
|
import {
|
|
10
10
|
PolytypoError
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-QXUC42OO.js";
|
|
12
12
|
|
|
13
13
|
// src/index.html.ts
|
|
14
14
|
function transform(input, options) {
|
package/dist/index.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
|
|
4
|
+
var _chunkAUKI3EXLcjs = require('./chunk-AUKI3EXL.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkQIUGMSFQcjs = require('./chunk-QIUGMSFQ.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
require('./chunk-
|
|
12
|
+
var _chunk3L5KLKLPcjs = require('./chunk-3L5KLKLP.cjs');
|
|
13
|
+
require('./chunk-DHKVVUYY.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
18
|
-
require('./chunk-
|
|
17
|
+
var _chunkF2CNG4TFcjs = require('./chunk-F2CNG4TF.cjs');
|
|
18
|
+
require('./chunk-3WYVUARI.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunk75BQY5RYcjs = require('./chunk-75BQY5RY.cjs');
|
|
22
22
|
|
|
23
23
|
// src/engine/pipeline.ts
|
|
24
24
|
function resolveMode(mode) {
|
|
25
25
|
if (mode === void 0 || mode === "text") return "text";
|
|
26
26
|
if (mode === "html" || mode === "markdown" || mode === "yaml") return mode;
|
|
27
|
-
throw new (0,
|
|
27
|
+
throw new (0, _chunk75BQY5RYcjs.PolytypoError)(
|
|
28
28
|
"POLYTYPO_INVALID_MODE",
|
|
29
29
|
`Unknown mode "${String(mode)}". Expected "text", "html", "markdown" or "yaml".`
|
|
30
30
|
);
|
|
@@ -32,18 +32,18 @@ function resolveMode(mode) {
|
|
|
32
32
|
function runPipeline(input, options) {
|
|
33
33
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
34
34
|
const mode = resolveMode(given.mode);
|
|
35
|
-
if (mode === "text") return
|
|
36
|
-
if (mode === "html") return
|
|
37
|
-
if (mode === "yaml") return
|
|
38
|
-
return
|
|
35
|
+
if (mode === "text") return _chunkAUKI3EXLcjs.runTextPipeline.call(void 0, input, given);
|
|
36
|
+
if (mode === "html") return _chunkQIUGMSFQcjs.runHtmlPipeline.call(void 0, input, given);
|
|
37
|
+
if (mode === "yaml") return _chunkF2CNG4TFcjs.runYamlPipeline.call(void 0, input, given);
|
|
38
|
+
return _chunk3L5KLKLPcjs.runMarkdownPipeline.call(void 0, input, given);
|
|
39
39
|
}
|
|
40
40
|
function runAnalyze(input, options) {
|
|
41
41
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
42
42
|
const mode = resolveMode(given.mode);
|
|
43
|
-
if (mode === "text") return
|
|
44
|
-
if (mode === "html") return
|
|
45
|
-
if (mode === "yaml") return
|
|
46
|
-
return
|
|
43
|
+
if (mode === "text") return _chunkAUKI3EXLcjs.analyzeTextPipeline.call(void 0, input, given);
|
|
44
|
+
if (mode === "html") return _chunkQIUGMSFQcjs.analyzeHtmlPipeline.call(void 0, input, given);
|
|
45
|
+
if (mode === "yaml") return _chunkF2CNG4TFcjs.analyzeYamlPipeline.call(void 0, input, given);
|
|
46
|
+
return _chunk3L5KLKLPcjs.analyzeMarkdownPipeline.call(void 0, input, given);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
// src/index.ts
|
|
@@ -57,5 +57,5 @@ function analyze(input, options) {
|
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
|
|
60
|
-
exports.PolytypoError =
|
|
60
|
+
exports.PolytypoError = _chunk75BQY5RYcjs.PolytypoError; exports.analyze = analyze; exports.transform = transform;
|
|
61
61
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as Options, C as Change } from './errors-
|
|
2
|
-
export { D as Dialect, E as Edit, L as LocaleData, a as LocaleSource, M as Mode, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, e as ProtectRange, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-
|
|
1
|
+
import { O as Options, C as Change } from './errors-CjpOoBlm.cjs';
|
|
2
|
+
export { D as Dialect, E as Edit, L as LocaleData, a as LocaleSource, M as Mode, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, e as ProtectRange, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-CjpOoBlm.cjs';
|
|
3
3
|
|
|
4
4
|
declare function transform(input: string, options: Options): string;
|
|
5
5
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as Options, C as Change } from './errors-
|
|
2
|
-
export { D as Dialect, E as Edit, L as LocaleData, a as LocaleSource, M as Mode, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, e as ProtectRange, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-
|
|
1
|
+
import { O as Options, C as Change } from './errors-CjpOoBlm.js';
|
|
2
|
+
export { D as Dialect, E as Edit, L as LocaleData, a as LocaleSource, M as Mode, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, e as ProtectRange, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-CjpOoBlm.js';
|
|
3
3
|
|
|
4
4
|
declare function transform(input: string, options: Options): string;
|
|
5
5
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
analyzeTextPipeline,
|
|
3
3
|
runTextPipeline
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FEVHV3ED.js";
|
|
5
5
|
import {
|
|
6
6
|
analyzeHtmlPipeline,
|
|
7
7
|
runHtmlPipeline
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-55LL24PJ.js";
|
|
9
9
|
import {
|
|
10
10
|
analyzeMarkdownPipeline,
|
|
11
11
|
runMarkdownPipeline
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-5AQIJOPD.js";
|
|
13
|
+
import "./chunk-KY6R54DA.js";
|
|
14
14
|
import {
|
|
15
15
|
analyzeYamlPipeline,
|
|
16
16
|
runYamlPipeline
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-IBN7DIS5.js";
|
|
18
|
+
import "./chunk-FV4S3LDM.js";
|
|
19
19
|
import {
|
|
20
20
|
PolytypoError
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-QXUC42OO.js";
|
|
22
22
|
|
|
23
23
|
// src/engine/pipeline.ts
|
|
24
24
|
function resolveMode(mode) {
|
package/dist/markdown.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 _chunk3L5KLKLPcjs = require('./chunk-3L5KLKLP.cjs');
|
|
5
|
+
require('./chunk-DHKVVUYY.cjs');
|
|
6
|
+
require('./chunk-3WYVUARI.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk5AEJFYWKcjs = require('./chunk-5AEJFYWK.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunk75BQY5RYcjs = require('./chunk-75BQY5RY.cjs');
|
|
13
13
|
|
|
14
14
|
// src/index.markdown.ts
|
|
15
15
|
function transform(input, options) {
|
|
16
16
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
17
|
-
|
|
18
|
-
return
|
|
17
|
+
_chunk5AEJFYWKcjs.assertFixedMode.call(void 0, given.mode, "markdown", "polytypo/markdown");
|
|
18
|
+
return _chunk3L5KLKLPcjs.runMarkdownPipeline.call(void 0, input, given);
|
|
19
19
|
}
|
|
20
20
|
function analyze(input, options) {
|
|
21
21
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
22
|
-
|
|
23
|
-
return
|
|
22
|
+
_chunk5AEJFYWKcjs.assertFixedMode.call(void 0, given.mode, "markdown", "polytypo/markdown");
|
|
23
|
+
return _chunk3L5KLKLPcjs.analyzeMarkdownPipeline.call(void 0, input, given);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
exports.PolytypoError =
|
|
29
|
+
exports.PolytypoError = _chunk75BQY5RYcjs.PolytypoError; exports.analyze = analyze; exports.transform = transform;
|
|
30
30
|
//# sourceMappingURL=markdown.cjs.map
|
package/dist/markdown.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as Options, D as Dialect, C as Change } from './errors-
|
|
2
|
-
export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-
|
|
1
|
+
import { O as Options, D as Dialect, C as Change } from './errors-CjpOoBlm.cjs';
|
|
2
|
+
export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-CjpOoBlm.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* `polytypo/markdown` — Markdown-only entry point. Its module graph includes the Micromark/MDX
|
package/dist/markdown.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as Options, D as Dialect, C as Change } from './errors-
|
|
2
|
-
export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-
|
|
1
|
+
import { O as Options, D as Dialect, C as Change } from './errors-CjpOoBlm.js';
|
|
2
|
+
export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-CjpOoBlm.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* `polytypo/markdown` — Markdown-only entry point. Its module graph includes the Micromark/MDX
|
package/dist/markdown.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
analyzeMarkdownPipeline,
|
|
3
3
|
runMarkdownPipeline
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-5AQIJOPD.js";
|
|
5
|
+
import "./chunk-KY6R54DA.js";
|
|
6
|
+
import "./chunk-FV4S3LDM.js";
|
|
7
7
|
import {
|
|
8
8
|
assertFixedMode
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NJXVMN4M.js";
|
|
10
10
|
import {
|
|
11
11
|
PolytypoError
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QXUC42OO.js";
|
|
13
13
|
|
|
14
14
|
// src/index.markdown.ts
|
|
15
15
|
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 _chunkAUKI3EXLcjs = require('./chunk-AUKI3EXL.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk5AEJFYWKcjs = require('./chunk-5AEJFYWK.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunk75BQY5RYcjs = require('./chunk-75BQY5RY.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
|
+
_chunk5AEJFYWKcjs.assertFixedMode.call(void 0, given.mode, "text", "polytypo/text");
|
|
16
|
+
return _chunkAUKI3EXLcjs.runTextPipeline.call(void 0, input, given);
|
|
17
17
|
}
|
|
18
18
|
function analyze(input, options) {
|
|
19
19
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
20
|
-
|
|
21
|
-
return
|
|
20
|
+
_chunk5AEJFYWKcjs.assertFixedMode.call(void 0, given.mode, "text", "polytypo/text");
|
|
21
|
+
return _chunkAUKI3EXLcjs.analyzeTextPipeline.call(void 0, input, given);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
exports.PolytypoError =
|
|
27
|
+
exports.PolytypoError = _chunk75BQY5RYcjs.PolytypoError; exports.analyze = analyze; exports.transform = transform;
|
|
28
28
|
//# sourceMappingURL=text.cjs.map
|
package/dist/text.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as Options, C as Change } from './errors-
|
|
2
|
-
export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, e as ProtectRange, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-
|
|
1
|
+
import { O as Options, C as Change } from './errors-CjpOoBlm.cjs';
|
|
2
|
+
export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, e as ProtectRange, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-CjpOoBlm.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* `polytypo/text` — text-only entry point. Its module graph excludes `parse5` and the
|
package/dist/text.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as Options, C as Change } from './errors-
|
|
2
|
-
export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, e as ProtectRange, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-
|
|
1
|
+
import { O as Options, C as Change } from './errors-CjpOoBlm.js';
|
|
2
|
+
export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, e as ProtectRange, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-CjpOoBlm.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* `polytypo/text` — text-only entry point. Its module graph excludes `parse5` and the
|
package/dist/text.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
analyzeTextPipeline,
|
|
3
3
|
runTextPipeline
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FEVHV3ED.js";
|
|
5
5
|
import {
|
|
6
6
|
assertFixedMode
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NJXVMN4M.js";
|
|
8
8
|
import {
|
|
9
9
|
PolytypoError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QXUC42OO.js";
|
|
11
11
|
|
|
12
12
|
// src/index.text.ts
|
|
13
13
|
function transform(input, options) {
|
package/dist/yaml.cjs
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
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-
|
|
4
|
+
var _chunkF2CNG4TFcjs = require('./chunk-F2CNG4TF.cjs');
|
|
5
|
+
require('./chunk-3WYVUARI.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunk5AEJFYWKcjs = require('./chunk-5AEJFYWK.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunk75BQY5RYcjs = require('./chunk-75BQY5RY.cjs');
|
|
12
12
|
|
|
13
13
|
// src/index.yaml.ts
|
|
14
14
|
function transform(input, options) {
|
|
15
15
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
16
|
-
|
|
17
|
-
return
|
|
16
|
+
_chunk5AEJFYWKcjs.assertFixedMode.call(void 0, given.mode, "yaml", "polytypo/yaml");
|
|
17
|
+
return _chunkF2CNG4TFcjs.runYamlPipeline.call(void 0, input, given);
|
|
18
18
|
}
|
|
19
19
|
function analyze(input, options) {
|
|
20
20
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
21
|
-
|
|
22
|
-
return
|
|
21
|
+
_chunk5AEJFYWKcjs.assertFixedMode.call(void 0, given.mode, "yaml", "polytypo/yaml");
|
|
22
|
+
return _chunkF2CNG4TFcjs.analyzeYamlPipeline.call(void 0, input, given);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
exports.PolytypoError =
|
|
28
|
+
exports.PolytypoError = _chunk75BQY5RYcjs.PolytypoError; exports.analyze = analyze; exports.transform = transform;
|
|
29
29
|
//# sourceMappingURL=yaml.cjs.map
|
package/dist/yaml.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as Options, C as Change } from './errors-
|
|
2
|
-
export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-
|
|
1
|
+
import { O as Options, C as Change } from './errors-CjpOoBlm.cjs';
|
|
2
|
+
export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-CjpOoBlm.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* `polytypo/yaml` — YAML-only entry point, and the lightest of the four: `yaml` mode uses no
|
package/dist/yaml.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as Options, C as Change } from './errors-
|
|
2
|
-
export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-
|
|
1
|
+
import { O as Options, C as Change } from './errors-CjpOoBlm.js';
|
|
2
|
+
export { L as LocaleData, a as LocaleSource, N as NarrowNbsp, P as PolytypoError, b as PolytypoErrorCode, Q as QuotePair, R as Rule, c as RuleContext, d as RuleId } from './errors-CjpOoBlm.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* `polytypo/yaml` — YAML-only entry point, and the lightest of the four: `yaml` mode uses no
|
package/dist/yaml.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
analyzeYamlPipeline,
|
|
3
3
|
runYamlPipeline
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-IBN7DIS5.js";
|
|
5
|
+
import "./chunk-FV4S3LDM.js";
|
|
6
6
|
import {
|
|
7
7
|
assertFixedMode
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NJXVMN4M.js";
|
|
9
9
|
import {
|
|
10
10
|
PolytypoError
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-QXUC42OO.js";
|
|
12
12
|
|
|
13
13
|
// src/index.yaml.ts
|
|
14
14
|
function transform(input, options) {
|
package/package.json
CHANGED
package/dist/chunk-5A3KGYPE.cjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var _chunkTKFAPD4Zcjs = require('./chunk-TKFAPD4Z.cjs');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _chunkOZLT5NZJcjs = require('./chunk-OZLT5NZJ.cjs');
|
|
13
|
-
|
|
14
|
-
// src/engine/yaml-pipeline.ts
|
|
15
|
-
function runYamlPipeline(input, options) {
|
|
16
|
-
const narrowTarget = _chunkOZLT5NZJcjs.resolveNarrowTarget.call(void 0, options.narrowNbsp);
|
|
17
|
-
const planned = _chunkOZLT5NZJcjs.planRules.call(void 0, options.rules);
|
|
18
|
-
const locale = _chunkOZLT5NZJcjs.getLocaleData.call(void 0, options.locale);
|
|
19
|
-
const keys = _chunkTKFAPD4Zcjs.resolveYamlKeys.call(void 0, options.keys);
|
|
20
|
-
_chunkOZLT5NZJcjs.assertNoProtect.call(void 0, options.protect, "yaml");
|
|
21
|
-
return _chunkOZLT5NZJcjs.runOverSpans.call(void 0, input, _chunkTKFAPD4Zcjs.yamlSpans.call(void 0, input, keys), planned, locale, "yaml", narrowTarget);
|
|
22
|
-
}
|
|
23
|
-
function analyzeYamlPipeline(input, options) {
|
|
24
|
-
const narrowTarget = _chunkOZLT5NZJcjs.resolveNarrowTarget.call(void 0, options.narrowNbsp);
|
|
25
|
-
const planned = _chunkOZLT5NZJcjs.planRules.call(void 0, options.rules);
|
|
26
|
-
const locale = _chunkOZLT5NZJcjs.getLocaleData.call(void 0, options.locale);
|
|
27
|
-
const keys = _chunkTKFAPD4Zcjs.resolveYamlKeys.call(void 0, options.keys);
|
|
28
|
-
_chunkOZLT5NZJcjs.assertNoProtect.call(void 0, options.protect, "yaml");
|
|
29
|
-
return _chunkOZLT5NZJcjs.analyzeOverSpans.call(void 0, input, _chunkTKFAPD4Zcjs.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-5A3KGYPE.cjs.map
|
package/dist/chunk-GUTC5F7K.cjs
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunk66E6VFGJcjs = require('./chunk-66E6VFGJ.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var _chunkOZLT5NZJcjs = require('./chunk-OZLT5NZJ.cjs');
|
|
12
|
-
|
|
13
|
-
// src/engine/html-pipeline.ts
|
|
14
|
-
function runHtmlPipeline(input, options) {
|
|
15
|
-
const narrowTarget = _chunkOZLT5NZJcjs.resolveNarrowTarget.call(void 0, options.narrowNbsp);
|
|
16
|
-
const planned = _chunkOZLT5NZJcjs.planRules.call(void 0, options.rules);
|
|
17
|
-
const locale = _chunkOZLT5NZJcjs.getLocaleData.call(void 0, options.locale);
|
|
18
|
-
_chunkOZLT5NZJcjs.assertNoProtect.call(void 0, options.protect, "html");
|
|
19
|
-
const spans = _chunk66E6VFGJcjs.htmlSpans.call(void 0, input);
|
|
20
|
-
return _chunkOZLT5NZJcjs.runOverSpans.call(void 0, input, spans, planned, locale, "html", narrowTarget);
|
|
21
|
-
}
|
|
22
|
-
function analyzeHtmlPipeline(input, options) {
|
|
23
|
-
const narrowTarget = _chunkOZLT5NZJcjs.resolveNarrowTarget.call(void 0, options.narrowNbsp);
|
|
24
|
-
const planned = _chunkOZLT5NZJcjs.planRules.call(void 0, options.rules);
|
|
25
|
-
const locale = _chunkOZLT5NZJcjs.getLocaleData.call(void 0, options.locale);
|
|
26
|
-
_chunkOZLT5NZJcjs.assertNoProtect.call(void 0, options.protect, "html");
|
|
27
|
-
return _chunkOZLT5NZJcjs.analyzeOverSpans.call(void 0, input, _chunk66E6VFGJcjs.htmlSpans.call(void 0, input), planned, locale, "html", narrowTarget);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
exports.runHtmlPipeline = runHtmlPipeline; exports.analyzeHtmlPipeline = analyzeHtmlPipeline;
|
|
34
|
-
//# sourceMappingURL=chunk-GUTC5F7K.cjs.map
|