@podlite/to-jsx 0.0.74 → 0.0.75
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/CHANGELOG.podlite +36 -0
- package/esm/assemble-includes.d.ts +19 -0
- package/esm/assemble-includes.js +180 -0
- package/esm/assemble-includes.js.map +1 -0
- package/esm/index.js +134 -85
- package/esm/index.js.map +1 -1
- package/esm/link-preview.d.ts +3 -1
- package/esm/link-preview.js +50 -16
- package/esm/link-preview.js.map +1 -1
- package/esm/podlite.css +19 -1
- package/esm/test-block.d.ts +9 -0
- package/esm/test-block.js +65 -0
- package/esm/test-block.js.map +1 -0
- package/esm/test-groups.d.ts +3 -0
- package/esm/test-groups.js +88 -0
- package/esm/test-groups.js.map +1 -0
- package/lib/assemble-includes.d.ts +19 -0
- package/lib/assemble-includes.js +184 -0
- package/lib/assemble-includes.js.map +1 -0
- package/lib/index.js +131 -82
- package/lib/index.js.map +1 -1
- package/lib/link-preview.d.ts +3 -1
- package/lib/link-preview.js +49 -15
- package/lib/link-preview.js.map +1 -1
- package/lib/podlite.css +19 -1
- package/lib/test-block.d.ts +9 -0
- package/lib/test-block.js +102 -0
- package/lib/test-block.js.map +1 -0
- package/lib/test-groups.d.ts +3 -0
- package/lib/test-groups.js +92 -0
- package/lib/test-groups.js.map +1 -0
- package/package.json +6 -5
package/CHANGELOG.podlite
CHANGED
|
@@ -2,6 +2,42 @@
|
|
|
2
2
|
|
|
3
3
|
=head1 Upcoming
|
|
4
4
|
|
|
5
|
+
=head1 0.0.75
|
|
6
|
+
|
|
7
|
+
=item an explicit C<=code> block renders its C<:nested>, as in HTML and Markdown
|
|
8
|
+
|
|
9
|
+
=item a paragraph and code written without a marker render the C<:nested> and C<:masked> that C<=config> or C<=set> gave them, the paragraph of a definition too. An C<:id> given this way is written on the paragraph itself; an explicit C<=para> writes it on an element around the paragraph
|
|
10
|
+
|
|
11
|
+
=item an included C<.md> file is rendered as Markdown, and a file of another extension than Podlite or Markdown is read in the default mode; a C<:mime-type> on the C<=include> line decides how a file is read
|
|
12
|
+
|
|
13
|
+
=item an operand of C<in> in the selector of an C<=include> is read as C<convert> reads it: a file it names is asked of C<includeReader>, and an operand with no source reads the document the include is written in; both were looked for among the included files alone
|
|
14
|
+
|
|
15
|
+
=item C<includeReader> and C<expandPaths> may return C<undefined> for an answer that is not known yet: the include then brings nothing, its C<=set> waits with it, and no warning is given until every answer is known. A host that returned C<undefined> for a missing file gets no warning now; C<null> says the file is not there
|
|
16
|
+
|
|
17
|
+
=item includes are assembled by the assembly C<convert> uses, so a preview and C<convert> read a document alike: a C<=config> written before C<=include> reaches the blocks the include places, with C<:allow> and folding among its options; a table of contents of the including file reads those options. C<includeReader> and C<expandPaths> are called as before, with one change: a file included more than once is asked for once. A file of a mask may now be included by another file of the same mask, and a file that includes itself is passed over with no warning unless a C<=set> is lost with it. A C<=set> lost to an include that failed further in is named in the warning of that include; it was a warning of its own
|
|
18
|
+
|
|
19
|
+
=item on the first block an C<=include> brings, a C<=set> of the included file wins over a C<=set> written before the include for the same key; the one before the include won
|
|
20
|
+
|
|
21
|
+
=item a C<=config> adds its options to an earlier C<=config> for the same block or markup code, and decides the ones both set; it replaced the earlier one whole
|
|
22
|
+
|
|
23
|
+
=item with an include reader, the document is assembled before it is rendered: the blocks an include finds take its place, so a table of contents lists them, a link reaches them by their address, and a test groups with the included block above it. An included file takes its own includes first, and its own table of contents lists what they brought. A C<=set> before an include that brings no block reaches the next block; an include that fails, or stands in the way, loses the assignment and says so. A heading brought in under a masked block is hidden in the table of contents as in the text. A wrapper is told the files an included block came through in C<ctx.includeStack>, as before. A table of contents written in an included file still lists only that file
|
|
24
|
+
|
|
25
|
+
=item a C<=set> written before C<=include> reaches the first block the include brings, also when that block comes from an include inside the included file; the block after the include received it. When the include fails, the warning names the assignment it lost. When the include brings no block, the assignment is not carried on to the next block yet, and a warning says it has no target
|
|
26
|
+
|
|
27
|
+
=item an include by a selector renders a found block once: a block inside another found block comes with it and is not rendered again
|
|
28
|
+
|
|
29
|
+
=item a table of contents kept as a C<toc> or C<Toc> block renders its table, with the C<:id> of the block on the element
|
|
30
|
+
|
|
31
|
+
=item an include whose selector has an operand of C<in> that does not resolve brings nothing in and is reported as a warning, rather than rendering the include as failed
|
|
32
|
+
|
|
33
|
+
=item the caption of a table of contents renders the markup written in it, and a hidden word in it is hidden while the rest stays open
|
|
34
|
+
|
|
35
|
+
=item hidden content keeps its captions and titles hidden on the page: table captions, the summary of a folded block, the title of a note, the title of a table of contents, the alternative text of a picture, link titles and file names, text written with C<< S<> >> or C<< E<> >>, the kind of a hidden note, and the name a hidden block written in capitals shows as its heading. A link preview shows hidden text masked, a markdown block's included, except in draft
|
|
36
|
+
|
|
37
|
+
=item a C<=test> is shown where it stands: a line with its caption that opens the test in place, the fixture and each resource as source, and what each assertion must or must not find. The test is open in server output and folds in the browser unless the author wrote C<:!folded> or the address points at it; a block and the tests under it share a C<test-group> element for the site to lay out
|
|
38
|
+
|
|
39
|
+
=item a link preview leaves out comments and tests: their text no longer shows up in the preview of a section that holds them. A link to a comment finds nothing; a link to a test is shown the caption of the test
|
|
40
|
+
|
|
5
41
|
=head1 0.0.73
|
|
6
42
|
|
|
7
43
|
=item shiki is a dependency again. Dropping it in 0.0.72 left every consumer without it, and their builds stopped resolving the module
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ConfigScope } from '@podlite/schema';
|
|
2
|
+
export type IncludeReader = (path: string, baseDir?: string) => string | null | undefined;
|
|
3
|
+
export type ExpandPaths = (pattern: string, baseDir?: string) => string[] | undefined;
|
|
4
|
+
export type AssembleOptions = {
|
|
5
|
+
includeReader: IncludeReader;
|
|
6
|
+
includeBaseDir?: string;
|
|
7
|
+
expandPaths?: ExpandPaths;
|
|
8
|
+
parser: {
|
|
9
|
+
parse: (source: string, opts: any) => any;
|
|
10
|
+
toAst: (tree: any, opts?: {
|
|
11
|
+
config?: ConfigScope;
|
|
12
|
+
}) => any;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type Assembly = {
|
|
16
|
+
tree: any;
|
|
17
|
+
stacks: WeakMap<object, string[]>;
|
|
18
|
+
};
|
|
19
|
+
export declare const assembleIncludes: (tree: any, opts: AssembleOptions) => Assembly;
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { markGuarded, parseSelector } from '@podlite/schema';
|
|
2
|
+
import { rebuildToc } from '@podlite/toc';
|
|
3
|
+
import { assembleIncludes as assemble, readerFor } from 'podlite';
|
|
4
|
+
const isGlobPattern = (s) => /[*?[]/.test(s);
|
|
5
|
+
const isBlock = (node, name) => Boolean(node && typeof node === 'object' && node.type === 'block' && (name === undefined || node.name === name));
|
|
6
|
+
const isToc = (node) => isBlock(node, 'toc') || isBlock(node, 'Toc');
|
|
7
|
+
const warn = (message) => console.warn(`[to-jsx] ${message}`);
|
|
8
|
+
// the marks set later change nodes in place, and the tree given is not ours
|
|
9
|
+
const deepCopy = (node) => {
|
|
10
|
+
if (Array.isArray(node))
|
|
11
|
+
return node.map(deepCopy);
|
|
12
|
+
if (!node || typeof node !== 'object')
|
|
13
|
+
return node;
|
|
14
|
+
const copy = {};
|
|
15
|
+
for (const key of Object.keys(node))
|
|
16
|
+
copy[key] = deepCopy(node[key]);
|
|
17
|
+
return copy;
|
|
18
|
+
};
|
|
19
|
+
// the name the document itself goes by among the files on the way
|
|
20
|
+
const DOCUMENT = '';
|
|
21
|
+
/*
|
|
22
|
+
=begin pod :kind<export>
|
|
23
|
+
|
|
24
|
+
=head2 assembleIncludes
|
|
25
|
+
|
|
26
|
+
Puts the blocks each C<=include> finds in its place in the list that holds it,
|
|
27
|
+
as C<convert> does and by the same assembly, before anything is rendered:
|
|
28
|
+
selectors, tables of contents and links then see the included blocks as blocks
|
|
29
|
+
of the document. The host is asked for a file by the path as written, once for
|
|
30
|
+
each file. An include that does not resolve is reported once, by a warning. The
|
|
31
|
+
tree given is not changed.
|
|
32
|
+
|
|
33
|
+
Returns the assembled tree and, for each included node, the files it came
|
|
34
|
+
through.
|
|
35
|
+
|
|
36
|
+
=end pod
|
|
37
|
+
*/
|
|
38
|
+
export const assembleIncludes = (tree, opts) => {
|
|
39
|
+
const origin = new WeakMap();
|
|
40
|
+
// why a file could not be read, when the reader threw
|
|
41
|
+
const reasons = new Map();
|
|
42
|
+
// what the mask of a directive came to, by the directive
|
|
43
|
+
const expansions = new Map();
|
|
44
|
+
const stepOf = (file, offset) => `${file}@${offset ?? ''}`;
|
|
45
|
+
// an answer was not known yet: what is said now would be said again later
|
|
46
|
+
let waiting = false;
|
|
47
|
+
const sources = {
|
|
48
|
+
locate: (written, _context, plain, at) => {
|
|
49
|
+
const masked = !plain && isGlobPattern(written) && Boolean(opts.expandPaths);
|
|
50
|
+
let paths = [written];
|
|
51
|
+
if (masked && opts.expandPaths) {
|
|
52
|
+
let expanded;
|
|
53
|
+
try {
|
|
54
|
+
expanded = opts.expandPaths(written, opts.includeBaseDir);
|
|
55
|
+
}
|
|
56
|
+
catch (e) {
|
|
57
|
+
return { masked, sources: [], failed: String(e?.message ?? e) };
|
|
58
|
+
}
|
|
59
|
+
if (expanded === undefined) {
|
|
60
|
+
waiting = true;
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
paths = expanded;
|
|
64
|
+
if (at)
|
|
65
|
+
expansions.set(stepOf(at.file, at.location?.start?.offset), paths);
|
|
66
|
+
}
|
|
67
|
+
// a file is known to the host by its path as written, and paths written
|
|
68
|
+
// inside it are read the same way
|
|
69
|
+
return { masked, sources: paths.map(path => ({ id: path, name: path, context: path })) };
|
|
70
|
+
},
|
|
71
|
+
read: source => {
|
|
72
|
+
try {
|
|
73
|
+
const text = opts.includeReader(source.id, opts.includeBaseDir);
|
|
74
|
+
if (text === undefined)
|
|
75
|
+
waiting = true;
|
|
76
|
+
return text;
|
|
77
|
+
}
|
|
78
|
+
catch (e) {
|
|
79
|
+
reasons.set(source.id, String(e?.message ?? e));
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
const names = (lost) => (lost ?? []).join(', ');
|
|
85
|
+
// the words this renderer has always said for a problem of the assembly
|
|
86
|
+
const said = (problem) => {
|
|
87
|
+
const lost = problem.lost?.length ? `; =set assignments not applied: ${names(problem.lost)}` : '';
|
|
88
|
+
const written = parseSelector(problem.target)?.document ?? '';
|
|
89
|
+
const base = () => {
|
|
90
|
+
if (problem.kind === 'set-target')
|
|
91
|
+
return `=set before =include has no target block: ${names(problem.lost)}`;
|
|
92
|
+
if (problem.kind === 'unparsed-selector' && !problem.target)
|
|
93
|
+
return 'include selector cannot be read: (empty)';
|
|
94
|
+
if (problem.kind === 'unparsed-selector' || problem.kind === 'unsupported-scheme' || problem.kind === 'cycle') {
|
|
95
|
+
return `include is not resolved: ${problem.target}`;
|
|
96
|
+
}
|
|
97
|
+
if (problem.kind === 'source') {
|
|
98
|
+
const cut = problem.message.split('; =set assignments not applied:')[0];
|
|
99
|
+
if (cut.startsWith('include target not found')) {
|
|
100
|
+
return reasons.has(written)
|
|
101
|
+
? `include target cannot be read: ${written}: ${reasons.get(written)}`
|
|
102
|
+
: `include is not resolved: ${problem.target}`;
|
|
103
|
+
}
|
|
104
|
+
const file = cut.replace('include target cannot be read: ', '');
|
|
105
|
+
return reasons.has(file) ? `${cut}: ${reasons.get(file)}` : cut;
|
|
106
|
+
}
|
|
107
|
+
return problem.message.split('; =set assignments not applied:')[0];
|
|
108
|
+
};
|
|
109
|
+
return problem.kind === 'set-target' ? base() : `${base()}${lost}`;
|
|
110
|
+
};
|
|
111
|
+
const stacks = new WeakMap();
|
|
112
|
+
// The files a node came through: the file of each include on its way after
|
|
113
|
+
// the document, then its own. Where a mask brought the file, every file of
|
|
114
|
+
// the mask stands for it, as it always has.
|
|
115
|
+
const stackOf = (where) => {
|
|
116
|
+
const steps = (where.via ?? '').split('>');
|
|
117
|
+
// the file each directive brought: the file the next one is written in, or the node's own
|
|
118
|
+
const files = [...steps.slice(1).map(step => step.slice(0, step.lastIndexOf('@'))), where.file];
|
|
119
|
+
return steps.flatMap((step, i) => expansions.get(step) ?? [files[i]]);
|
|
120
|
+
};
|
|
121
|
+
const markStacks = (node) => {
|
|
122
|
+
if (!node || typeof node !== 'object')
|
|
123
|
+
return;
|
|
124
|
+
if (Array.isArray(node))
|
|
125
|
+
return node.forEach(markStacks);
|
|
126
|
+
const where = origin.get(node);
|
|
127
|
+
if (where?.via && !stacks.has(node))
|
|
128
|
+
stacks.set(node, stackOf(where));
|
|
129
|
+
markStacks(node.content);
|
|
130
|
+
};
|
|
131
|
+
// the tables of contents written in the document itself, built again over it
|
|
132
|
+
const rebuildOwnTocs = (root) => {
|
|
133
|
+
markGuarded(root);
|
|
134
|
+
const walk = (node) => {
|
|
135
|
+
if (!node || typeof node !== 'object')
|
|
136
|
+
return node;
|
|
137
|
+
if (Array.isArray(node)) {
|
|
138
|
+
const mapped = node.map(walk);
|
|
139
|
+
return mapped.some((n, i) => n !== node[i]) ? mapped : node;
|
|
140
|
+
}
|
|
141
|
+
if (isToc(node) && !origin.get(node)?.via)
|
|
142
|
+
return rebuildToc(node, root);
|
|
143
|
+
if (!Array.isArray(node.content))
|
|
144
|
+
return node;
|
|
145
|
+
const content = walk(node.content);
|
|
146
|
+
if (content === node.content)
|
|
147
|
+
return node;
|
|
148
|
+
const copy = { ...node, content };
|
|
149
|
+
const known = origin.get(node);
|
|
150
|
+
if (known)
|
|
151
|
+
origin.set(copy, known);
|
|
152
|
+
return copy;
|
|
153
|
+
};
|
|
154
|
+
return walk(root);
|
|
155
|
+
};
|
|
156
|
+
const problems = [];
|
|
157
|
+
const assembled = assemble(deepCopy(tree), {
|
|
158
|
+
sources,
|
|
159
|
+
context: DOCUMENT,
|
|
160
|
+
file: DOCUMENT,
|
|
161
|
+
parse: readerFor(opts.parser),
|
|
162
|
+
origin,
|
|
163
|
+
tolerant: true,
|
|
164
|
+
onError: problem => problems.push(problem),
|
|
165
|
+
onWarning: problem => problems.push(problem),
|
|
166
|
+
});
|
|
167
|
+
if (!waiting)
|
|
168
|
+
problems.forEach(problem => warn(said(problem)));
|
|
169
|
+
const hasIncluded = (node) => {
|
|
170
|
+
if (!node || typeof node !== 'object')
|
|
171
|
+
return false;
|
|
172
|
+
if (Array.isArray(node))
|
|
173
|
+
return node.some(hasIncluded);
|
|
174
|
+
return Boolean(origin.get(node)?.via) || hasIncluded(node.content);
|
|
175
|
+
};
|
|
176
|
+
const done = hasIncluded(assembled) ? rebuildOwnTocs(assembled) : assembled;
|
|
177
|
+
markStacks(done);
|
|
178
|
+
return { tree: done, stacks };
|
|
179
|
+
};
|
|
180
|
+
//# sourceMappingURL=assemble-includes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assemble-includes.js","sourceRoot":"","sources":["../src/assemble-includes.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,gBAAgB,IAAI,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAyBjE,MAAM,aAAa,GAAG,CAAC,CAAS,EAAW,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AAE7D,MAAM,OAAO,GAAG,CAAC,IAAS,EAAE,IAAa,EAAW,EAAE,CACpD,OAAO,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAA;AAElH,MAAM,KAAK,GAAG,CAAC,IAAS,EAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AAElF,MAAM,IAAI,GAAG,CAAC,OAAe,EAA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