@refrakt-md/runes 0.32.0 → 0.33.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/config.d.ts.map +1 -1
- package/dist/config.js +20 -4
- package/dist/config.js.map +1 -1
- package/dist/data-emit.d.ts +1 -0
- package/dist/data-emit.d.ts.map +1 -1
- package/dist/data-emit.js +40 -0
- package/dist/data-emit.js.map +1 -1
- package/dist/data-pipeline.d.ts +10 -4
- package/dist/data-pipeline.d.ts.map +1 -1
- package/dist/data-pipeline.js +296 -30
- package/dist/data-pipeline.js.map +1 -1
- package/dist/data-projection.d.ts +21 -0
- package/dist/data-projection.d.ts.map +1 -1
- package/dist/data-projection.js +37 -0
- package/dist/data-projection.js.map +1 -1
- package/dist/include-pipeline.d.ts +52 -0
- package/dist/include-pipeline.d.ts.map +1 -0
- package/dist/include-pipeline.js +204 -0
- package/dist/include-pipeline.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/component.d.ts +20 -0
- package/dist/lib/component.d.ts.map +1 -1
- package/dist/lib/component.js +35 -0
- package/dist/lib/component.js.map +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/nodes.d.ts.map +1 -1
- package/dist/nodes.js +15 -11
- package/dist/nodes.js.map +1 -1
- package/dist/reference.d.ts +27 -2
- package/dist/reference.d.ts.map +1 -1
- package/dist/reference.js +31 -4
- package/dist/reference.js.map +1 -1
- package/dist/tags/accordion.d.ts.map +1 -1
- package/dist/tags/accordion.js +23 -5
- package/dist/tags/accordion.js.map +1 -1
- package/dist/tags/code.d.ts +25 -0
- package/dist/tags/code.d.ts.map +1 -0
- package/dist/tags/code.js +36 -0
- package/dist/tags/code.js.map +1 -0
- package/dist/tags/data.d.ts.map +1 -1
- package/dist/tags/data.js +26 -4
- package/dist/tags/data.js.map +1 -1
- package/dist/tags/include.d.ts +24 -0
- package/dist/tags/include.d.ts.map +1 -0
- package/dist/tags/include.js +46 -0
- package/dist/tags/include.js.map +1 -0
- package/dist/tags/snippet.d.ts.map +1 -1
- package/dist/tags/snippet.js +14 -6
- package/dist/tags/snippet.js.map +1 -1
- package/dist/util.d.ts +41 -1
- package/dist/util.d.ts.map +1 -1
- package/dist/util.js +70 -12
- package/dist/util.js.map +1 -1
- package/package.json +3 -3
package/dist/tags/data.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/tags/data.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/tags/data.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,IAAI,mCAsDf,CAAC"}
|
package/dist/tags/data.js
CHANGED
|
@@ -23,7 +23,7 @@ export const data = createContentModelSchema({
|
|
|
23
23
|
format: { type: String, required: false, matches: ['csv', 'tsv', 'json', 'ndjson'], description: 'Source format. Inferred from the file extension; override for ambiguity.' },
|
|
24
24
|
// CSV / TSV.
|
|
25
25
|
delimiter: { type: String, required: false, description: 'Override the field separator (CSV/TSV).' },
|
|
26
|
-
header: { type: Boolean, required: false, description: '
|
|
26
|
+
header: { type: Boolean, required: false, description: 'CSV/TSV: whether the first row is the header (default true). false synthesizes col1…' },
|
|
27
27
|
// JSON (adapter lands in WORK-486; declared here for the full surface).
|
|
28
28
|
root: { type: String, required: false, description: 'JSON: dotted path / JSON Pointer to the array or map within the document.' },
|
|
29
29
|
orient: { type: String, required: false, matches: ['records', 'values', 'index'], description: 'JSON: how each element maps to a row. records/values auto-detected; index is explicit.' },
|
|
@@ -34,17 +34,39 @@ export const data = createContentModelSchema({
|
|
|
34
34
|
sort: { type: String, required: false, description: 'Sort by a column; "-" prefix for descending.' },
|
|
35
35
|
limit: { type: Number, required: false, description: 'Maximum number of rows.' },
|
|
36
36
|
offset: { type: Number, required: false, description: 'Skip this many rows before limiting.' },
|
|
37
|
+
// Body-as-table-row (WORK-550). Its presence switches what the body means.
|
|
38
|
+
headers: { type: String, required: false, description: 'Header labels for a `---`-delimited body, e.g. "Attribute, Type". Setting it makes the body one table ROW — cells separated by `---` — instead of a run of blocks, so cells can carry emphasis, links, runes and {% if %}. Requires a body.' },
|
|
37
39
|
// Shared typing.
|
|
38
40
|
numeric: { type: String, required: false, description: 'Comma-separated columns to force to numeric typing (emits data-value).' },
|
|
39
41
|
text: { type: String, required: false, description: 'Comma-separated columns to force to text typing.' },
|
|
40
42
|
},
|
|
43
|
+
// An optional body is the per-row template (SPEC-127): transformed once per
|
|
44
|
+
// row with `$row` bound, in place of the `<table>` the bodyless form emits.
|
|
45
|
+
// With `headers` set it is instead one `---`-delimited table *row* (WORK-550).
|
|
46
|
+
// The content model stays empty because the body never reaches the transform
|
|
47
|
+
// — `preprocessData` binds and splices it at parse time — but it must be
|
|
48
|
+
// *allowed* here or Markdoc rejects the tag before the preprocessor sees it.
|
|
41
49
|
contentModel: { type: 'sequence', fields: [] },
|
|
42
50
|
transform(_resolved, _attrs) {
|
|
43
51
|
// Unreachable in normal operation — corePipelineHooks.preprocess replaces
|
|
44
52
|
// `data` tags with `table` nodes before the transform runs.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
53
|
+
//
|
|
54
|
+
// For a *content* author there is exactly one way to get here, and it is
|
|
55
|
+
// the common one: the file was pulled in with `{% partial %}`, which
|
|
56
|
+
// Markdoc expands during transform — after the preprocess phase that
|
|
57
|
+
// resolves `data`. So the message names that fix first (SPEC-129). With
|
|
58
|
+
// `partial` documented as the default, this error is the main way anyone
|
|
59
|
+
// discovers `include` exists; describing the pipeline teaches nothing.
|
|
60
|
+
throw new Error('{% data %} reached the transform phase unresolved.\n\n' +
|
|
61
|
+
'If this file is pulled in with {% partial %}: use {% include %} instead. ' +
|
|
62
|
+
'Markdoc expands partials during the transform, which is after the preprocess ' +
|
|
63
|
+
'phase that resolves `data` — so a `data` tag inside a partial never gets read. ' +
|
|
64
|
+
'{% include file="..." /%} pastes the file before preprocess, so `data` and ' +
|
|
65
|
+
'`snippet` inside it resolve. Both runes read the same `_partials/` directory ' +
|
|
66
|
+
'and file roots, so only the call site changes.\n\n' +
|
|
67
|
+
'If you are building a custom pipeline: registered `preprocess` hooks must run ' +
|
|
68
|
+
'before `Markdoc.transform` (data pre-resolves to a Markdoc `table` node; ' +
|
|
69
|
+
'see SPEC-103 § Architecture).');
|
|
48
70
|
},
|
|
49
71
|
});
|
|
50
72
|
//# sourceMappingURL=data.js.map
|
package/dist/tags/data.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../src/tags/data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAE3D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,wBAAwB,CAAC;IAC5C,UAAU,EAAE;QACX,QAAQ;QACR,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,oEAAoE,EAAE;QACxH,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,WAAW,EAAE,0EAA0E,EAAE;QAC7K,aAAa;QACb,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,yCAAyC,EAAE;QACpG,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,KAA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C3E,+BAA+B,CAC/B,CAAC;IACH,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `include` rune — paste a file's AST into the page during **preprocess**
|
|
3
|
+
* (SPEC-129).
|
|
4
|
+
*
|
|
5
|
+
* `{% partial %}` is Markdoc's, and Markdoc expands it during
|
|
6
|
+
* `Markdoc.transform`. refrakt's preprocessors — `data` (SPEC-103) and
|
|
7
|
+
* `snippet` (SPEC-062) — walk the *page's* AST before that, so a preprocessor
|
|
8
|
+
* rune inside a partial is never in the tree when they run and survives to its
|
|
9
|
+
* own throwing transform. `include` closes that gap: it splices the file's
|
|
10
|
+
* parsed AST into the page ahead of every other preprocess step, so the pasted
|
|
11
|
+
* content is preprocessed exactly as if it had been typed there.
|
|
12
|
+
*
|
|
13
|
+
* Both runes read the same `_partials/` directory and the same `namespace:file`
|
|
14
|
+
* roots — a file's *location* should not depend on its *contents*, so only the
|
|
15
|
+
* call site differs. `partial` stays the documented default; reach for
|
|
16
|
+
* `include` when the file contains `data` or `snippet`.
|
|
17
|
+
*
|
|
18
|
+
* Like `snippet` and `data`, this is an **AST preprocessor**, so the schema's
|
|
19
|
+
* `transform` is unreachable in normal operation. It exists for tooling
|
|
20
|
+
* (`refrakt inspect include`, contracts, attribute validation, the rune
|
|
21
|
+
* catalog) and throws a message pointing at the wiring if it ever runs.
|
|
22
|
+
*/
|
|
23
|
+
export declare const include: import("@markdoc/markdoc").Schema;
|
|
24
|
+
//# sourceMappingURL=include.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"include.d.ts","sourceRoot":"","sources":["../../src/tags/include.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,OAAO,mCAuBlB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { createContentModelSchema } from '../lib/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The `include` rune — paste a file's AST into the page during **preprocess**
|
|
4
|
+
* (SPEC-129).
|
|
5
|
+
*
|
|
6
|
+
* `{% partial %}` is Markdoc's, and Markdoc expands it during
|
|
7
|
+
* `Markdoc.transform`. refrakt's preprocessors — `data` (SPEC-103) and
|
|
8
|
+
* `snippet` (SPEC-062) — walk the *page's* AST before that, so a preprocessor
|
|
9
|
+
* rune inside a partial is never in the tree when they run and survives to its
|
|
10
|
+
* own throwing transform. `include` closes that gap: it splices the file's
|
|
11
|
+
* parsed AST into the page ahead of every other preprocess step, so the pasted
|
|
12
|
+
* content is preprocessed exactly as if it had been typed there.
|
|
13
|
+
*
|
|
14
|
+
* Both runes read the same `_partials/` directory and the same `namespace:file`
|
|
15
|
+
* roots — a file's *location* should not depend on its *contents*, so only the
|
|
16
|
+
* call site differs. `partial` stays the documented default; reach for
|
|
17
|
+
* `include` when the file contains `data` or `snippet`.
|
|
18
|
+
*
|
|
19
|
+
* Like `snippet` and `data`, this is an **AST preprocessor**, so the schema's
|
|
20
|
+
* `transform` is unreachable in normal operation. It exists for tooling
|
|
21
|
+
* (`refrakt inspect include`, contracts, attribute validation, the rune
|
|
22
|
+
* catalog) and throws a message pointing at the wiring if it ever runs.
|
|
23
|
+
*/
|
|
24
|
+
export const include = createContentModelSchema({
|
|
25
|
+
attributes: {
|
|
26
|
+
file: {
|
|
27
|
+
type: String,
|
|
28
|
+
required: true,
|
|
29
|
+
description: 'Partial to paste, by the same key `{% partial %}` uses — a path under the site\'s `_partials/` (e.g. "attrs.md") or a namespaced file root ("shared:attrs.md").',
|
|
30
|
+
},
|
|
31
|
+
variables: {
|
|
32
|
+
type: Object,
|
|
33
|
+
required: false,
|
|
34
|
+
description: 'Bindings substituted into the pasted AST at paste time, e.g. variables={q: "rune:card"} makes `$q` inside the file that string. Unlike `partial`, this is substitution rather than a transform-time scope, so bound values reach preprocessor attributes such as `{% data where=$q %}`.',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
contentModel: { type: 'sequence', fields: [] },
|
|
38
|
+
transform(_resolved, _attrs) {
|
|
39
|
+
// Unreachable in normal operation — corePipelineHooks.preprocess splices
|
|
40
|
+
// `include` tags away before the transform runs.
|
|
41
|
+
throw new Error('{% include %} reached the transform phase unresolved — its preprocess hook was not ' +
|
|
42
|
+
'wired through. Ensure the content pipeline runs registered `preprocess` hooks before ' +
|
|
43
|
+
'`Markdoc.transform` (include pastes its file\'s AST; see SPEC-129).');
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
//# sourceMappingURL=include.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"include.js","sourceRoot":"","sources":["../../src/tags/include.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,wBAAwB,CAAC;IAC/C,UAAU,EAAE;QACX,IAAI,EAAE;YACL,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,iKAAiK;SAC9K;QACD,SAAS,EAAE;YACV,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,yRAAyR;SACtS;KACD;IACD,YAAY,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE;IAC9C,SAAS,CAAC,SAAS,EAAE,MAAM;QAC1B,yEAAyE;QACzE,iDAAiD;QACjD,MAAM,IAAI,KAAK,CACd,qFAAqF;YACrF,uFAAuF;YACvF,qEAAqE,CACrE,CAAC;IACH,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snippet.d.ts","sourceRoot":"","sources":["../../src/tags/snippet.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"snippet.d.ts","sourceRoot":"","sources":["../../src/tags/snippet.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,OAAO,mCAiDlB,CAAC"}
|
package/dist/tags/snippet.js
CHANGED
|
@@ -48,12 +48,20 @@ export const snippet = createContentModelSchema({
|
|
|
48
48
|
transform(_resolved, _attrs) {
|
|
49
49
|
// Unreachable in normal operation — corePipelineHooks.preprocess
|
|
50
50
|
// replaces snippet tags with fence nodes before the transform runs.
|
|
51
|
-
//
|
|
52
|
-
//
|
|
53
|
-
//
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
'
|
|
51
|
+
//
|
|
52
|
+
// The reachable case is a content author's, not a framework author's:
|
|
53
|
+
// the file was pulled in with `{% partial %}`, which expands during the
|
|
54
|
+
// transform — after the preprocess phase. Name that fix first (SPEC-129).
|
|
55
|
+
throw new Error('{% snippet %} reached the transform phase unresolved.\n\n' +
|
|
56
|
+
'If this file is pulled in with {% partial %}: use {% include %} instead. ' +
|
|
57
|
+
'Markdoc expands partials during the transform, which is after the preprocess ' +
|
|
58
|
+
'phase that resolves `snippet` — so a `snippet` tag inside a partial never gets ' +
|
|
59
|
+
'read. {% include file="..." /%} pastes the file before preprocess, so `snippet` ' +
|
|
60
|
+
'and `data` inside it resolve. Both runes read the same `_partials/` directory ' +
|
|
61
|
+
'and file roots, so only the call site changes.\n\n' +
|
|
62
|
+
'If you are building a custom pipeline: registered `preprocess` hooks must run ' +
|
|
63
|
+
'before `Markdoc.transform` (snippet pre-resolves to a Markdoc `fence` node; ' +
|
|
64
|
+
'see SPEC-062 § Composition).');
|
|
57
65
|
},
|
|
58
66
|
});
|
|
59
67
|
//# sourceMappingURL=snippet.js.map
|
package/dist/tags/snippet.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snippet.js","sourceRoot":"","sources":["../../src/tags/snippet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,i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,KAAK;YACf,WAAW,EAAE,6EAA6E;SAC1F;QACD,WAAW,EAAE;YACZ,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,wLAAwL;SACrM;QACD,SAAS,EAAE;YACV,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,kPAAkP;SAC/P;KACD;IACD,YAAY,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE;IAC9C,SAAS,CAAC,SAAS,EAAE,MAAM;QAC1B,iEAAiE;QACjE,oEAAoE;QACpE,EAAE;QACF,sEAAsE;QACtE,wEAAwE;QACxE,0EAA0E;QAC1E,MAAM,IAAI,KAAK,CACd,2DAA2D;YAC3D,2EAA2E;YAC3E,+EAA+E;YAC/E,iFAAiF;YACjF,kFAAkF;YAClF,gFAAgF;YAChF,oDAAoD;YACpD,gFAAgF;YAChF,8EAA8E;YAC9E,8BAA8B,CAC9B,CAAC;IACH,CAAC;CACD,CAAC,CAAC"}
|
package/dist/util.d.ts
CHANGED
|
@@ -14,9 +14,49 @@ export interface HeadingInfo {
|
|
|
14
14
|
/** Canonical name of the known section this heading belongs to, if any. */
|
|
15
15
|
knownSection?: string;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Build a heading's `id` from its plain text.
|
|
19
|
+
*
|
|
20
|
+
* The single implementation behind both the parse-time heading index
|
|
21
|
+
* (`extractHeadings`) and the rendered `<h*>` id (the `heading` node
|
|
22
|
+
* transform). They used to be two near-copies that had drifted apart — one
|
|
23
|
+
* stripped `?`, the other `?{}%` — so a heading containing `{`, `}` or `%` was
|
|
24
|
+
* indexed under one id and rendered under another (BUG-005).
|
|
25
|
+
*
|
|
26
|
+
* The rules are the ones an author writing an anchor by hand already assumes,
|
|
27
|
+
* and they match GitHub closely enough to be guessable: lowercase, drop
|
|
28
|
+
* punctuation, collapse whitespace and separator runs to a single `-`. Dropping
|
|
29
|
+
* punctuation also subsumes the reason `%` was stripped — a literal `%` not
|
|
30
|
+
* followed by a hex pair used to crash SvelteKit's prerender crawler in
|
|
31
|
+
* `decodeURI`.
|
|
32
|
+
*/
|
|
33
|
+
export declare function headingSlug(text: string): string;
|
|
34
|
+
/**
|
|
35
|
+
* Collect a heading node's plain text, including the content of inline `code`.
|
|
36
|
+
*
|
|
37
|
+
* Concatenated rather than joined with a space: the AST's own text nodes carry
|
|
38
|
+
* the spacing, so joining would double it. Inline code used to be skipped
|
|
39
|
+
* entirely — `` ### `fileRoots` — named directories `` indexed as
|
|
40
|
+
* `" — named directories"`, losing the heading's actual subject (BUG-005).
|
|
41
|
+
*/
|
|
42
|
+
export declare function headingText(n: Node): string;
|
|
43
|
+
/**
|
|
44
|
+
* Collect the plain text of already-transformed children, walking into tags.
|
|
45
|
+
*
|
|
46
|
+
* The renderable counterpart to {@link headingText}: inline code is a `Tag` by
|
|
47
|
+
* this point, and a variable has been resolved to its value. Used for the
|
|
48
|
+
* rendered heading id, where both of those matter.
|
|
49
|
+
*/
|
|
50
|
+
export declare function renderableText(children: RenderableTreeNode[]): string;
|
|
17
51
|
/**
|
|
18
52
|
* Pre-scan an AST for heading nodes, extracting their text and generating
|
|
19
|
-
* IDs
|
|
53
|
+
* IDs with {@link headingSlug} — the same slug rules the `heading` node
|
|
54
|
+
* transform applies, so the index and the rendered anchor agree.
|
|
55
|
+
*
|
|
56
|
+
* The two necessarily read different phases: this runs at parse time, so a
|
|
57
|
+
* heading whose text comes from a variable (`### {% $row.name %}` inside a
|
|
58
|
+
* `{% data %}` body) is not knowable here and is indexed under its unresolved
|
|
59
|
+
* form. The rendered anchor, which is what a link targets, is correct.
|
|
20
60
|
*/
|
|
21
61
|
export declare function extractHeadings(node: Node): HeadingInfo[];
|
|
22
62
|
/**
|
package/dist/util.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA,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AAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,2EAA2E;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAUhD;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,CAQ3C;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAOrE;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,WAAW,EAAE,CAsBzD;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,CAyBtD;AAED,wBAAgB,cAAc,CAAC,OAAO,CAAC,EAAE,qBAAqB,IAIpD,OAAO,IAAI,EAAE,oBAkCtB"}
|
package/dist/util.js
CHANGED
|
@@ -30,25 +30,83 @@ export function* walkTag(tag) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Build a heading's `id` from its plain text.
|
|
35
|
+
*
|
|
36
|
+
* The single implementation behind both the parse-time heading index
|
|
37
|
+
* (`extractHeadings`) and the rendered `<h*>` id (the `heading` node
|
|
38
|
+
* transform). They used to be two near-copies that had drifted apart — one
|
|
39
|
+
* stripped `?`, the other `?{}%` — so a heading containing `{`, `}` or `%` was
|
|
40
|
+
* indexed under one id and rendered under another (BUG-005).
|
|
41
|
+
*
|
|
42
|
+
* The rules are the ones an author writing an anchor by hand already assumes,
|
|
43
|
+
* and they match GitHub closely enough to be guessable: lowercase, drop
|
|
44
|
+
* punctuation, collapse whitespace and separator runs to a single `-`. Dropping
|
|
45
|
+
* punctuation also subsumes the reason `%` was stripped — a literal `%` not
|
|
46
|
+
* followed by a hex pair used to crash SvelteKit's prerender crawler in
|
|
47
|
+
* `decodeURI`.
|
|
48
|
+
*/
|
|
49
|
+
export function headingSlug(text) {
|
|
50
|
+
return text
|
|
51
|
+
.toLowerCase()
|
|
52
|
+
// Keep letters, numbers, whitespace and hyphens; drop everything else.
|
|
53
|
+
// Unicode-aware so non-ASCII headings keep their words rather than
|
|
54
|
+
// collapsing to an empty id.
|
|
55
|
+
.replace(/[^\p{L}\p{N}\s-]/gu, '')
|
|
56
|
+
.trim()
|
|
57
|
+
.replace(/[\s-]+/g, '-')
|
|
58
|
+
.replace(/^-+|-+$/g, '');
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Collect a heading node's plain text, including the content of inline `code`.
|
|
62
|
+
*
|
|
63
|
+
* Concatenated rather than joined with a space: the AST's own text nodes carry
|
|
64
|
+
* the spacing, so joining would double it. Inline code used to be skipped
|
|
65
|
+
* entirely — `` ### `fileRoots` — named directories `` indexed as
|
|
66
|
+
* `" — named directories"`, losing the heading's actual subject (BUG-005).
|
|
67
|
+
*/
|
|
68
|
+
export function headingText(n) {
|
|
69
|
+
let text = '';
|
|
70
|
+
for (const child of n.walk()) {
|
|
71
|
+
if ((child.type === 'text' || child.type === 'code') && child.attributes.content) {
|
|
72
|
+
text += String(child.attributes.content);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return text;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Collect the plain text of already-transformed children, walking into tags.
|
|
79
|
+
*
|
|
80
|
+
* The renderable counterpart to {@link headingText}: inline code is a `Tag` by
|
|
81
|
+
* this point, and a variable has been resolved to its value. Used for the
|
|
82
|
+
* rendered heading id, where both of those matter.
|
|
83
|
+
*/
|
|
84
|
+
export function renderableText(children) {
|
|
85
|
+
let text = '';
|
|
86
|
+
for (const child of children) {
|
|
87
|
+
if (typeof child === 'string')
|
|
88
|
+
text += child;
|
|
89
|
+
else if (Markdoc.Tag.isTag(child))
|
|
90
|
+
text += renderableText(child.children ?? []);
|
|
91
|
+
}
|
|
92
|
+
return text;
|
|
93
|
+
}
|
|
33
94
|
/**
|
|
34
95
|
* Pre-scan an AST for heading nodes, extracting their text and generating
|
|
35
|
-
* IDs
|
|
96
|
+
* IDs with {@link headingSlug} — the same slug rules the `heading` node
|
|
97
|
+
* transform applies, so the index and the rendered anchor agree.
|
|
98
|
+
*
|
|
99
|
+
* The two necessarily read different phases: this runs at parse time, so a
|
|
100
|
+
* heading whose text comes from a variable (`### {% $row.name %}` inside a
|
|
101
|
+
* `{% data %}` body) is not knowable here and is indexed under its unresolved
|
|
102
|
+
* form. The rendered anchor, which is what a link targets, is correct.
|
|
36
103
|
*/
|
|
37
104
|
export function extractHeadings(node) {
|
|
38
105
|
const headings = [];
|
|
39
106
|
function walk(n) {
|
|
40
107
|
if (n.type === 'heading') {
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
if (child.type === 'text' && child.attributes.content) {
|
|
44
|
-
textParts.push(child.attributes.content);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
const text = textParts.join(' ');
|
|
48
|
-
const id = n.attributes.id || text
|
|
49
|
-
.replace(/[?]/g, '')
|
|
50
|
-
.replace(/\s+/g, '-')
|
|
51
|
-
.toLowerCase();
|
|
108
|
+
const text = headingText(n);
|
|
109
|
+
const id = n.attributes.id || headingSlug(text);
|
|
52
110
|
headings.push({
|
|
53
111
|
level: n.attributes.level,
|
|
54
112
|
text,
|
package/dist/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAEvC,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,MAAM,UAAU,mBAAmB,CAAC,IAAU,EAAE,MAAc;IAC5D,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,YA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BAAM,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBAC/B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAClB,CAAC;iBAAM,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;gBAC9E,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;gBACtC,IAAI,QAAQ,EAAE,CAAC;oBACb,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC/B,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBACtB,MAAM;YACR,CAAC;QACH,CAAC;QAED,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,CAAC,GAAG,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;IAClC,CAAC,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@refrakt-md/runes",
|
|
3
3
|
"description": "Semantic Markdoc runes for refrakt.md",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.33.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"generate-translations": "node scripts/generate-translations.mjs"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@refrakt-md/types": "0.
|
|
36
|
-
"@refrakt-md/transform": "0.
|
|
35
|
+
"@refrakt-md/types": "0.33.0",
|
|
36
|
+
"@refrakt-md/transform": "0.33.0",
|
|
37
37
|
"@markdoc/markdoc": "0.4.0",
|
|
38
38
|
"reflect-metadata": "^0.2.0",
|
|
39
39
|
"fast-xml-parser": "4.5.1",
|