postext 1.33.11 → 1.34.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/README.md +2 -2
- package/dist/__tests__/bundle/designOverflowPin.test.js +1 -1
- package/dist/__tests__/bundle/gridBreakRulesPin.test.js +2 -2
- package/dist/__tests__/bundle/shapingLanguagePin.test.js +3 -3
- package/dist/__tests__/bundle/taskBoxPin.test.js +1 -1
- package/dist/__tests__/bundle.test.js +1 -1
- package/dist/__tests__/codeBlocks.test.js +1 -1
- package/dist/__tests__/composed/corpus.test.d.ts +2 -0
- package/dist/__tests__/composed/corpus.test.d.ts.map +1 -0
- package/dist/__tests__/composed/corpus.test.js +33 -0
- package/dist/__tests__/composed/corpus.test.js.map +1 -0
- package/dist/__tests__/composed/slotChecks.test.d.ts +2 -0
- package/dist/__tests__/composed/slotChecks.test.d.ts.map +1 -0
- package/dist/__tests__/composed/slotChecks.test.js +148 -0
- package/dist/__tests__/composed/slotChecks.test.js.map +1 -0
- package/dist/__tests__/composedTemplates.test.d.ts +2 -0
- package/dist/__tests__/composedTemplates.test.d.ts.map +1 -0
- package/dist/__tests__/composedTemplates.test.js +349 -0
- package/dist/__tests__/composedTemplates.test.js.map +1 -0
- package/dist/__tests__/contentInConfig.test.d.ts +2 -0
- package/dist/__tests__/contentInConfig.test.d.ts.map +1 -0
- package/dist/__tests__/contentInConfig.test.js +201 -0
- package/dist/__tests__/contentInConfig.test.js.map +1 -0
- package/dist/__tests__/defaults/stripRoundTrip.test.js +3 -1
- package/dist/__tests__/defaults/stripRoundTrip.test.js.map +1 -1
- package/dist/__tests__/exports.test.js +22 -0
- package/dist/__tests__/exports.test.js.map +1 -1
- package/dist/__tests__/hardBreaks.test.js +1 -1
- package/dist/__tests__/headingInlineMarks.test.js +1 -1
- package/dist/__tests__/mathSizeMigration.test.js +2 -2
- package/dist/__tests__/parse/composedPages.test.d.ts +2 -0
- package/dist/__tests__/parse/composedPages.test.d.ts.map +1 -0
- package/dist/__tests__/parse/composedPages.test.js +323 -0
- package/dist/__tests__/parse/composedPages.test.js.map +1 -0
- package/dist/__tests__/parse/containers.test.js +2 -2
- package/dist/__tests__/parse/containers.test.js.map +1 -1
- package/dist/__tests__/pipeline/calloutInlineResourceGap.test.js +1 -1
- package/dist/__tests__/pipeline/calloutSplitMinLinesChild.test.js +1 -1
- package/dist/__tests__/pipeline/colonListRoom.test.js +1 -1
- package/dist/__tests__/pipeline/compoundBreaks.test.js +1 -1
- package/dist/__tests__/pipeline/dashBreaks.test.js +1 -1
- package/dist/__tests__/pipeline/headingSplitOrphans.test.js +1 -1
- package/dist/__tests__/pipeline/inlineFigureSpace.test.js +1 -1
- package/dist/__tests__/pipeline/paragraphContainerTail.test.js +1 -1
- package/dist/__tests__/pipeline/raggedOptimal.test.js +1 -1
- package/dist/__tests__/tocGroups.test.d.ts +2 -0
- package/dist/__tests__/tocGroups.test.d.ts.map +1 -0
- package/dist/__tests__/tocGroups.test.js +213 -0
- package/dist/__tests__/tocGroups.test.js.map +1 -0
- package/dist/__tests__/verseLines.test.js +1 -1
- package/dist/bundle/configVersion.d.ts +16 -5
- package/dist/bundle/configVersion.d.ts.map +1 -1
- package/dist/bundle/configVersion.js +17 -4
- package/dist/bundle/configVersion.js.map +1 -1
- package/dist/bundle/types.d.ts +4 -3
- package/dist/bundle/types.d.ts.map +1 -1
- package/dist/composed/document.d.ts +43 -0
- package/dist/composed/document.d.ts.map +1 -0
- package/dist/composed/document.js +88 -0
- package/dist/composed/document.js.map +1 -0
- package/dist/composed/slotChecks.d.ts +29 -0
- package/dist/composed/slotChecks.d.ts.map +1 -0
- package/dist/composed/slotChecks.js +109 -0
- package/dist/composed/slotChecks.js.map +1 -0
- package/dist/composed/templates.d.ts +133 -0
- package/dist/composed/templates.d.ts.map +1 -0
- package/dist/composed/templates.js +702 -0
- package/dist/composed/templates.js.map +1 -0
- package/dist/composed/types.d.ts +404 -0
- package/dist/composed/types.d.ts.map +1 -0
- package/dist/composed/types.js +2 -0
- package/dist/composed/types.js.map +1 -0
- package/dist/composed/validate.d.ts +26 -0
- package/dist/composed/validate.d.ts.map +1 -0
- package/dist/composed/validate.js +276 -0
- package/dist/composed/validate.js.map +1 -0
- package/dist/configWarnings.d.ts +19 -3
- package/dist/configWarnings.d.ts.map +1 -1
- package/dist/configWarnings.js +170 -40
- package/dist/configWarnings.js.map +1 -1
- package/dist/defaults/checks.d.ts +7 -0
- package/dist/defaults/checks.d.ts.map +1 -0
- package/dist/defaults/checks.js +49 -0
- package/dist/defaults/checks.js.map +1 -0
- package/dist/defaults/index.d.ts +1 -0
- package/dist/defaults/index.d.ts.map +1 -1
- package/dist/defaults/index.js +26 -0
- package/dist/defaults/index.js.map +1 -1
- package/dist/defaults/toc.d.ts +17 -2
- package/dist/defaults/toc.d.ts.map +1 -1
- package/dist/defaults/toc.js +53 -1
- package/dist/defaults/toc.js.map +1 -1
- package/dist/design/slots.d.ts +29 -0
- package/dist/design/slots.d.ts.map +1 -0
- package/dist/design/slots.js +48 -0
- package/dist/design/slots.js.map +1 -0
- package/dist/index.d.ts +17 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/parse/blockParser.d.ts.map +1 -1
- package/dist/parse/blockParser.js +295 -36
- package/dist/parse/blockParser.js.map +1 -1
- package/dist/parse/index.d.ts +1 -1
- package/dist/parse/index.d.ts.map +1 -1
- package/dist/parse/index.js.map +1 -1
- package/dist/parse/indexMarks.d.ts.map +1 -1
- package/dist/parse/indexMarks.js +24 -0
- package/dist/parse/indexMarks.js.map +1 -1
- package/dist/parse/types.d.ts +95 -2
- package/dist/parse/types.d.ts.map +1 -1
- package/dist/pipeline/build.d.ts.map +1 -1
- package/dist/pipeline/build.js +178 -3
- package/dist/pipeline/build.js.map +1 -1
- package/dist/pipeline/config.d.ts.map +1 -1
- package/dist/pipeline/config.js +17 -2
- package/dist/pipeline/config.js.map +1 -1
- package/dist/pipeline/contentWarnings.d.ts.map +1 -1
- package/dist/pipeline/contentWarnings.js +73 -0
- package/dist/pipeline/contentWarnings.js.map +1 -1
- package/dist/pipeline/placeholders.d.ts +7 -0
- package/dist/pipeline/placeholders.d.ts.map +1 -1
- package/dist/pipeline/placeholders.js +41 -0
- package/dist/pipeline/placeholders.js.map +1 -1
- package/dist/pipeline/textWrap.js +1 -1
- package/dist/pipeline/textWrap.js.map +1 -1
- package/dist/pipeline/toc.d.ts +11 -1
- package/dist/pipeline/toc.d.ts.map +1 -1
- package/dist/pipeline/toc.js +147 -8
- package/dist/pipeline/toc.js.map +1 -1
- package/dist/types.d.ts +99 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/util/closestKey.d.ts +4 -0
- package/dist/util/closestKey.d.ts.map +1 -0
- package/dist/util/closestKey.js +40 -0
- package/dist/util/closestKey.js.map +1 -0
- package/dist/vdt.d.ts +125 -7
- package/dist/vdt.d.ts.map +1 -1
- package/dist/vdt.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -96,7 +96,7 @@ The resolvers (`resolve*Config`), strippers (`strip*Defaults`), `DEFAULT_*` cons
|
|
|
96
96
|
| `outline?` | `OutlineEntry[]` | The book's outline, for a `:::toc` in a chapter laid out on its own. |
|
|
97
97
|
| `notes?` | `PostextNote[]` | Accepted, but the engine does not read it: notes are written in the markdown (below). |
|
|
98
98
|
|
|
99
|
-
Footnotes are written in the markdown: a `[^id]` marker where the note is cited and a paragraph that opens with `[^id]:` for its text. Each note is set at the foot of the column that cites it; `footnotes.placement: 'chapterEnd'` gathers them after the chapter instead. See [Footnotes](https://postext.dev/en/docs/document-format#footnotes).
|
|
99
|
+
Footnotes are written in the markdown: a `[^id]` marker where the note is cited and a paragraph that opens with `[^id]:` for its text. Each note is set at the foot of the column that cites it; `footnotes.placement: 'chapterEnd'` gathers them after the chapter instead. See [Footnotes](https://postext.dev/en/docs/document-format-notes-references#footnotes).
|
|
100
100
|
|
|
101
101
|
## Fonts
|
|
102
102
|
|
|
@@ -120,7 +120,7 @@ const canvas = renderPage(docs[0].pages[0], docs[0]);
|
|
|
120
120
|
const { bytes } = await createBundle({ name: 'My Book', chapters: [{ markdown: '# One\n\n…' }], config });
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
-
See [Bundles](https://postext.dev/en/docs/configuration-
|
|
123
|
+
See [Bundles](https://postext.dev/en/docs/configuration-bundles#bundles-postext-files) for the full API, the PDF adapters and live examples.
|
|
124
124
|
|
|
125
125
|
## With pretext
|
|
126
126
|
|
|
@@ -61,7 +61,7 @@ describe('pinLegacyDesignOverflow (#628)', () => {
|
|
|
61
61
|
expect(overflow(fresh.parts.design)).toEqual(['wrap', 'wrap']);
|
|
62
62
|
});
|
|
63
63
|
it('pins every version before 10, none from 10', () => {
|
|
64
|
-
expect(CONFIG_VERSION).toBe(
|
|
64
|
+
expect(CONFIG_VERSION).toBe(15);
|
|
65
65
|
for (const v of [undefined, 1, 5, 8, 9]) {
|
|
66
66
|
expect(overflowOf(migrateConfig(stored(), v).parts.design, 'partTitle'), String(v)).toBe('ellipsis-end');
|
|
67
67
|
}
|
|
@@ -55,7 +55,7 @@ describe('pinLegacyGridBreakRules (#717)', () => {
|
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
57
|
it('pins every version before 12, none from 12', () => {
|
|
58
|
-
expect(CONFIG_VERSION).toBe(
|
|
58
|
+
expect(CONFIG_VERSION).toBe(15);
|
|
59
59
|
for (const v of [undefined, 1, 5, 8, 10, 11]) {
|
|
60
60
|
expect(rules(migrateConfig(grid('ja'), v)), String(v)).toEqual(ON);
|
|
61
61
|
}
|
|
@@ -116,7 +116,7 @@ describe('a bundle keeps the break rules of its grid (#717)', () => {
|
|
|
116
116
|
expect(rules(opened.config)).toEqual(ON);
|
|
117
117
|
// Written again from what was read: stamped 14, the rules spelled out.
|
|
118
118
|
const again = await createBundle({ name: 'Old', locale: 'ja', markdown: MD, config: opened.config });
|
|
119
|
-
expect(again.manifest.configVersion).toBe(
|
|
119
|
+
expect(again.manifest.configVersion).toBe(15);
|
|
120
120
|
expect(again.manifest.config.bodyText).toEqual({ ...ON, scriptContext: false, shapingLanguage: 'host' });
|
|
121
121
|
expect(rules((await openBundle(again.bytes)).config)).toEqual(ON);
|
|
122
122
|
});
|
|
@@ -36,7 +36,7 @@ describe('pinLegacyShapingLanguage (#764, #770)', () => {
|
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
it('pins every version before 14, whatever its content, and none from 14', () => {
|
|
39
|
-
expect(CONFIG_VERSION).toBe(
|
|
39
|
+
expect(CONFIG_VERSION).toBe(15);
|
|
40
40
|
for (const v of [undefined, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]) {
|
|
41
41
|
expect(kept(migrateConfig({}, v)), String(v)).toBe('host');
|
|
42
42
|
// A face may answer with other glyphs to any text: the content alone
|
|
@@ -154,7 +154,7 @@ describe('pinLegacyShapingLanguage (#764, #770)', () => {
|
|
|
154
154
|
});
|
|
155
155
|
it('a bundle written by postext 1.29 keeps its lines, and one written today is shaped in its language', async () => {
|
|
156
156
|
const written = await createBundle({ name: 'Llibre', locale: 'ca', markdown: 'El col\u00B7legi.', config: { locale: 'ca', bodyText: { fontFamily: 'Literata' } } });
|
|
157
|
-
expect(written.manifest.configVersion).toBe(
|
|
157
|
+
expect(written.manifest.configVersion).toBe(15);
|
|
158
158
|
expect(written.manifest.config?.bodyText).toEqual({ fontFamily: 'Literata' });
|
|
159
159
|
/** The language the chapters of an opened bundle are laid out in. */
|
|
160
160
|
const laidOutIn = (bundle) => shapingLanguageOf(resolveAllConfig(bundle.config));
|
|
@@ -184,7 +184,7 @@ describe('pinLegacyShapingLanguage (#764, #770)', () => {
|
|
|
184
184
|
// goes with it under today's number.
|
|
185
185
|
const old = await openBundle(restamped(13, { fontFamily: 'Literata' }));
|
|
186
186
|
const again = await createBundle({ name: 'Llibre', locale: 'ca', markdown: 'El col\u00B7legi.', config: stripConfigDefaults(old.config) });
|
|
187
|
-
expect(again.manifest.configVersion).toBe(
|
|
187
|
+
expect(again.manifest.configVersion).toBe(15);
|
|
188
188
|
expect(again.manifest.config?.bodyText).toEqual({ fontFamily: 'Literata', shapingLanguage: 'host' });
|
|
189
189
|
expect(kept((await openBundle(again.bytes)).config)).toBe('host');
|
|
190
190
|
});
|
|
@@ -27,7 +27,7 @@ describe('pinLegacyTaskBox (#765)', () => {
|
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
it('pins every version before 13 whose text may hold a task item, and none from 13', () => {
|
|
30
|
-
expect(CONFIG_VERSION).toBe(
|
|
30
|
+
expect(CONFIG_VERSION).toBe(15);
|
|
31
31
|
for (const v of [undefined, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) {
|
|
32
32
|
// Unknown content may hold one.
|
|
33
33
|
expect(kept(migrateConfig({}, v)), String(v)).toBe('character');
|
|
@@ -603,7 +603,7 @@ describe('bundles written by postext 1.4 or earlier', () => {
|
|
|
603
603
|
const pageCounts = (docs) => docs.map((d) => d.pages.length);
|
|
604
604
|
it('stamps every manifest it writes with the configuration rules', async () => {
|
|
605
605
|
const { manifest } = await sample();
|
|
606
|
-
expect(CONFIG_VERSION).toBe(
|
|
606
|
+
expect(CONFIG_VERSION).toBe(15);
|
|
607
607
|
expect(manifest.configVersion).toBe(CONFIG_VERSION);
|
|
608
608
|
});
|
|
609
609
|
it('reads a 1.4 bundle with the H1 break it laid out, and lays it out as 1.4 did', async () => {
|
|
@@ -523,7 +523,7 @@ describe('stored documents (CONFIG_VERSION 9)', () => {
|
|
|
523
523
|
'The end.',
|
|
524
524
|
].join('\n');
|
|
525
525
|
it('pins the 1.22 reading of fences for a configuration with fences in its text', () => {
|
|
526
|
-
expect(CONFIG_VERSION).toBe(
|
|
526
|
+
expect(CONFIG_VERSION).toBe(15);
|
|
527
527
|
expect(pinLegacyCodeBlocks({})).toEqual({ codeStyle: { blocks: false } });
|
|
528
528
|
const own = { codeStyle: { blocks: true } };
|
|
529
529
|
expect(pinLegacyCodeBlocks(own)).toBe(own);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"corpus.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/composed/corpus.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/ban-ts-comment -- node built-ins in a test */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/* #854: every Cookbook text parses with no composed-page node, slot, frame
|
|
4
|
+
or figure, so the new syntax changes nothing that existed before it. (The
|
|
5
|
+
programme also compared the whole parse output of every Markdown file of
|
|
6
|
+
the repository before and after the parser change: identical.) */
|
|
7
|
+
import { describe, it, expect } from 'vitest';
|
|
8
|
+
import { readdirSync, readFileSync, existsSync } from 'node:fs';
|
|
9
|
+
import { join } from 'node:path';
|
|
10
|
+
import { parseMarkdownWithIssues } from '../../parse';
|
|
11
|
+
import { extractFrontmatter } from '../../frontmatter';
|
|
12
|
+
describe('corpus (#854)', () => {
|
|
13
|
+
const root = join(__dirname, '../../../../../cookbook');
|
|
14
|
+
const files = existsSync(root)
|
|
15
|
+
? readdirSync(root).flatMap((d) => {
|
|
16
|
+
const dir = join(root, d);
|
|
17
|
+
try {
|
|
18
|
+
return readdirSync(dir).filter((f) => /^content.*\.md$/.test(f)).map((f) => join(dir, f));
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return [];
|
|
22
|
+
}
|
|
23
|
+
})
|
|
24
|
+
: [];
|
|
25
|
+
it.runIf(files.length > 0)('no Cookbook text reads as a composed page', () => {
|
|
26
|
+
for (const f of files) {
|
|
27
|
+
const { blocks } = parseMarkdownWithIssues(extractFrontmatter(readFileSync(f, 'utf8')).content);
|
|
28
|
+
const hit = blocks.find((b) => b.composedPage || b.slot || b.figure || b.containerName === 'frame');
|
|
29
|
+
expect(hit, f).toBeUndefined();
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
//# sourceMapping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G,EAAE;QAC3E,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;YACtB,MAAM,EAAE,MAAM,EAAE,GAAG,uBAAuB,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;YAChG,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,aAAa,KAAK,OAAO,CAAC,CAAC;YACpG,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC;QACjC,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slotChecks.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/composed/slotChecks.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { buildDocument } from '../../pipeline';
|
|
3
|
+
import { collectContentWarnings, formatWarning } from '../../pipeline/contentWarnings';
|
|
4
|
+
import { parseMarkdownWithIssues } from '../../parse';
|
|
5
|
+
import { composedPages } from '../../composed/document';
|
|
6
|
+
import { checkComposedSlots } from '../../composed/slotChecks';
|
|
7
|
+
// Deterministic text measurement stub (no DOM in the node test env).
|
|
8
|
+
class StubCtx {
|
|
9
|
+
font = '';
|
|
10
|
+
measureText(s) {
|
|
11
|
+
return { width: s.length * 7 };
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
globalThis.OffscreenCanvas = class {
|
|
15
|
+
getContext() {
|
|
16
|
+
return new StubCtx();
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const TEMA = {
|
|
20
|
+
id: 'tema-cajas',
|
|
21
|
+
frames: [
|
|
22
|
+
{ name: 'titulo', takes: 'h1' },
|
|
23
|
+
{ name: 'texto', flow: true },
|
|
24
|
+
{ name: 'dinero', next: 'dinero-sigue' },
|
|
25
|
+
{ name: 'dinero-sigue' },
|
|
26
|
+
{ name: 'dinero-fotos' },
|
|
27
|
+
{ name: 'nota', optional: true },
|
|
28
|
+
],
|
|
29
|
+
};
|
|
30
|
+
const check = (md, templates = [TEMA]) => checkComposedSlots(composedPages(parseMarkdownWithIssues(md).blocks), { pageTemplates: templates });
|
|
31
|
+
describe('checkComposedSlots (#854)', () => {
|
|
32
|
+
it('passes a page whose content fills its frames', () => {
|
|
33
|
+
const md = [
|
|
34
|
+
'::::page{template="tema-cajas"}',
|
|
35
|
+
'# Title',
|
|
36
|
+
'Flow text.',
|
|
37
|
+
':::frame{slot="dinero"}',
|
|
38
|
+
'Money.',
|
|
39
|
+
':::',
|
|
40
|
+
'::resource{id="foto" slot="dinero-fotos"}',
|
|
41
|
+
'::::',
|
|
42
|
+
].join('\n');
|
|
43
|
+
expect(check(md)).toEqual([]);
|
|
44
|
+
});
|
|
45
|
+
it('reports an unknown template at its id and skips its slots', () => {
|
|
46
|
+
const md = '::::page{template="tema-cjas"}\n:::frame{slot="zzz"}\nA.\n:::\n::::';
|
|
47
|
+
const found = check(md);
|
|
48
|
+
expect(found).toEqual([{ kind: 'templateUnknown', template: 'tema-cjas', fenceIndex: 0, sourceStart: md.indexOf('tema-cjas'), sourceEnd: md.indexOf('tema-cjas') + 9 }]);
|
|
49
|
+
});
|
|
50
|
+
it('reports a fence with no template at the fence line', () => {
|
|
51
|
+
const md = '::::page\nA.\n::::';
|
|
52
|
+
expect(check(md)).toEqual([{ kind: 'templateUnknown', template: '', fenceIndex: 0, sourceStart: 0, sourceEnd: 8 }]);
|
|
53
|
+
});
|
|
54
|
+
it('reports a slot the template lacks at its first slot value', () => {
|
|
55
|
+
const md = '::::page{template="tema-cajas"}\n# T\nA.\n:::frame{slot="diner"}\nB.\n:::\n:::frame{slot="dinero"}\nC.\n:::\n::resource{id="x" slot="dinero-fotos"}\n::::';
|
|
56
|
+
const found = check(md);
|
|
57
|
+
expect(found).toHaveLength(1);
|
|
58
|
+
expect(found[0]).toMatchObject({ kind: 'slotUnknown', template: 'tema-cajas', slot: 'diner' });
|
|
59
|
+
expect(md.slice(found[0].sourceStart, found[0].sourceEnd)).toBe('diner');
|
|
60
|
+
});
|
|
61
|
+
it('reports frames left empty, not optional ones nor chain targets', () => {
|
|
62
|
+
const md = '::::page{template="tema-cajas"}\n:::frame{slot="dinero"}\nC.\n:::\n::::';
|
|
63
|
+
const found = check(md);
|
|
64
|
+
expect(found.map((w) => w.kind === 'slotEmpty' && w.frame)).toEqual(['titulo', 'texto', 'dinero-fotos']);
|
|
65
|
+
expect(found[0]).toMatchObject({ sourceStart: 0, sourceEnd: md.indexOf('\n') });
|
|
66
|
+
});
|
|
67
|
+
it('a heading taken by a frame does not fill the flow frame', () => {
|
|
68
|
+
const md = '::::page{template="tema-cajas"}\n# T\n:::frame{slot="dinero"}\nC.\n:::\n::resource{id="x" slot="dinero-fotos"}\n::::';
|
|
69
|
+
expect(check(md).map((w) => w.kind === 'slotEmpty' && w.frame)).toEqual(['texto']);
|
|
70
|
+
});
|
|
71
|
+
it('content sent to an unknown slot reaches the flow frame', () => {
|
|
72
|
+
const md = '::::page{template="tema-cajas"}\n# T\n:::frame{slot="x"}\nC.\n:::\n:::frame{slot="dinero"}\nC.\n:::\n::resource{id="x" slot="dinero-fotos"}\n::::';
|
|
73
|
+
expect(check(md).map((w) => w.kind)).toEqual(['slotUnknown']);
|
|
74
|
+
});
|
|
75
|
+
it('knows frames inherited through extends and added by a variant', () => {
|
|
76
|
+
const child = {
|
|
77
|
+
id: 'hijo',
|
|
78
|
+
extends: 'tema-cajas',
|
|
79
|
+
frames: [{ name: 'texto', remove: true }, { name: 'extra', optional: true }],
|
|
80
|
+
variants: { verso: { frames: [{ name: 'margen' }] } },
|
|
81
|
+
};
|
|
82
|
+
const md = '::::page{template="hijo"}\n# T\n:::frame{slot="dinero"}\nA.\n:::\n:::frame{slot="margen"}\nB.\n:::\n:::frame{slot="texto"}\nC.\n:::\n::resource{id="x" slot="dinero-fotos"}\n::::';
|
|
83
|
+
// `texto` was removed by the child: naming it is unknown.
|
|
84
|
+
expect(check(md, [TEMA, child]).map((w) => w.kind === 'slotUnknown' && w.slot)).toEqual(['texto']);
|
|
85
|
+
});
|
|
86
|
+
it('survives an extends cycle', () => {
|
|
87
|
+
const a = { id: 'a', extends: 'b', frames: [{ name: 'x', optional: true }] };
|
|
88
|
+
const b = { id: 'b', extends: 'a', frames: [{ name: 'y', optional: true }] };
|
|
89
|
+
expect(check('::::page{template="a"}\n::::', [a, b])).toEqual([]);
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
describe('composed-page content warnings (#854)', () => {
|
|
93
|
+
const config = { pageTemplates: [TEMA] };
|
|
94
|
+
it('collectContentWarnings lists them with absolute offsets', () => {
|
|
95
|
+
const md = '---\ntitle: T\n---\n::::page{template="tema-cajas"}\n# T\nA.\n:::frame{slot="dinro"}\nB.\n:::\n::::\n';
|
|
96
|
+
const found = collectContentWarnings(md, config);
|
|
97
|
+
const unknown = found.find((w) => w.kind === 'slotUnknown');
|
|
98
|
+
expect(md.slice(unknown.sourceStart, unknown.sourceEnd)).toBe('dinro');
|
|
99
|
+
expect(found.filter((w) => w.kind === 'slotEmpty').map((w) => w.kind === 'slotEmpty' && w.frame)).toEqual(['dinero', 'dinero-fotos']);
|
|
100
|
+
expect(formatWarning(unknown)).toContain('Slot "dinro" is no frame of template "tema-cajas"');
|
|
101
|
+
});
|
|
102
|
+
it('flags a composed page written with three colons and keeps the comic', () => {
|
|
103
|
+
const md = ':::page{template="tema-cajas"}\n::panel\nA: Hola.\n:::\n';
|
|
104
|
+
const found = collectContentWarnings(md, config);
|
|
105
|
+
const w = found.find((x) => x.kind === 'pageFenceLength');
|
|
106
|
+
expect(md.slice(w.sourceStart, w.sourceEnd)).toBe(':::page{template="tema-cajas"}');
|
|
107
|
+
expect(formatWarning(w)).toContain('four colons');
|
|
108
|
+
expect(collectContentWarnings(':::page{split="50%|*"}\n::panel\nA: Hola.\n:::\n', config).some((x) => x.kind === 'pageFenceLength')).toBe(false);
|
|
109
|
+
});
|
|
110
|
+
it('formats every new kind', () => {
|
|
111
|
+
expect(formatWarning({ kind: 'templateUnknown', template: 'x', fenceIndex: 0 })).toContain('Unknown page template "x"');
|
|
112
|
+
expect(formatWarning({ kind: 'templateUnknown', template: '', fenceIndex: 0 })).toContain('names no template');
|
|
113
|
+
expect(formatWarning({ kind: 'slotEmpty', template: 't', frame: 'f', fenceIndex: 0 })).toContain('Frame "f" of template "t" receives no content');
|
|
114
|
+
});
|
|
115
|
+
it('lays the page’s content in the flow on pages of its own, in Markdown order', () => {
|
|
116
|
+
const md = [
|
|
117
|
+
'Before the page.',
|
|
118
|
+
'',
|
|
119
|
+
'::::page{template="tema-cajas"}',
|
|
120
|
+
'## Page title',
|
|
121
|
+
'',
|
|
122
|
+
':::frame{slot="dinero"}',
|
|
123
|
+
'Money text.',
|
|
124
|
+
':::',
|
|
125
|
+
'',
|
|
126
|
+
'Flow text.',
|
|
127
|
+
'::::',
|
|
128
|
+
'',
|
|
129
|
+
'After the page.',
|
|
130
|
+
].join('\n');
|
|
131
|
+
const doc = buildDocument({ markdown: md }, config);
|
|
132
|
+
const pageOf = (text) => doc.blocks.find((b) => b.lines.some((l) => l.text.includes(text)))?.pageIndex;
|
|
133
|
+
expect(pageOf('Before')).toBe(0);
|
|
134
|
+
expect(pageOf('Page title')).toBe(1);
|
|
135
|
+
expect(pageOf('Money text')).toBe(1);
|
|
136
|
+
expect(pageOf('Flow text')).toBe(1);
|
|
137
|
+
expect(pageOf('After the page')).toBe(2);
|
|
138
|
+
const order = doc.blocks.map((b) => b.lines.map((l) => l.text).join(' ')).filter(Boolean);
|
|
139
|
+
expect(order.findIndex((t) => t.includes('Page title'))).toBeLessThan(order.findIndex((t) => t.includes('Money text')));
|
|
140
|
+
expect(order.findIndex((t) => t.includes('Money text'))).toBeLessThan(order.findIndex((t) => t.includes('Flow text')));
|
|
141
|
+
expect(doc.contentWarnings?.find((w) => w.kind === 'slotEmpty')?.pageIndex).toBe(1);
|
|
142
|
+
});
|
|
143
|
+
it('a page that ends the document leaves no empty page behind', () => {
|
|
144
|
+
const doc = buildDocument({ markdown: 'Text.\n\n::::page{template="tema-cajas"}\nInside.\n::::\n' }, config);
|
|
145
|
+
expect(doc.pages).toHaveLength(2);
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
//# sourceMappingURL=slotChecks.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slotChecks.test.js","sourceRoot":"","sources":["../../../src/__tests__/composed/slotChecks.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACvF,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAI/D,qEAAqE;AACrE,MAAM,OAAO;IACX,IAAI,GAAG,EAAE,CAAC;IACV,WAAW,CAAC,CAAS;QACnB,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;IACjC,CAAC;CACF;AACA,UAAsD,CAAC,eAAe,GAAG;IACxE,UAAU;QACR,OAAO,IAAI,OAAO,EAAE,CAAC;IACvB,CAAC;CACF,CAAC;AAEF,MAAM,IAAI,GAAiB;IACzB,EAAE,EAAE,YAAY;IAChB,MAAM,EAAE;QACN,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE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