gutterpress 0.11.23-alpha.2 → 0.11.23-alpha.4
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 +10 -13
- package/dist/{README-8ef336pp.md → README-syg2hn83.md} +13 -19
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +5 -5
- package/dist/{build-encgnv0c.js → build-c48eer6f.js} +8 -8
- package/dist/checks/asset/extensions.d.ts +1 -1
- package/dist/checks/asset/index.d.ts +0 -1
- package/dist/checks/policy.d.ts +5 -4
- package/dist/checks/source/config-file.d.ts +9 -6
- package/dist/checks/source/dangling-links.d.ts +1 -1
- package/dist/checks/types.d.ts +2 -2
- package/dist/{cli-pz4bn98t.js → cli-54xt7pjg.js} +19 -13
- package/dist/{index-2ppw6q9v.js → cli-5crpmz42.js} +80 -1
- package/dist/{cli-xq6djqbj.js → cli-93mkaw6v.js} +166 -308
- package/dist/{cli-evg8sbht.js → cli-d9mm3vvh.js} +7 -2
- package/dist/{cli-kh8v4vvw.js → cli-gnpea9dx.js} +1 -1
- package/dist/{cli-aqh6brew.js → cli-pspjxnc8.js} +1 -1
- package/dist/{cli-pwwfxdgb.js → cli-rqh295j9.js} +15 -21
- package/dist/{index-x3ema2w3.js → cli-y6d1arem.js} +321 -272
- package/dist/cli.js +12 -12
- package/dist/{doctor-5gtpgpd1.js → doctor-ptb346k8.js} +4 -3
- package/dist/engine/shared/gcpm-extract.d.ts +8 -0
- package/dist/engine/shared/print-area.d.ts +16 -4
- package/dist/{engine-mc5br8g8.js → engine-4rzdx6af.js} +1 -1
- package/dist/{engine-tn13gk0b.js → engine-6txhxmmv.js} +2 -2
- package/dist/{ext-wn2a5afq.js → ext-gy8szg3x.js} +8 -8
- package/dist/{extension-restore-s3x1618g.js → extension-restore-dymzcasz.js} +2 -2
- package/dist/{extension-restore-g8jnmmzq.js → extension-restore-m8tj43e7.js} +4 -4
- package/dist/{gutterpress-viewer-701vf4qp.js → gutterpress-viewer-mafsby5k.js} +9 -2
- package/dist/{cli-2ppw6q9v.js → index-5crpmz42.js} +80 -1
- package/dist/{index-0skhjx3e.js → index-5kh4c78h.js} +19 -13
- package/dist/{index-2bjcghze.js → index-8ywkd2sv.js} +15 -21
- package/dist/{index-j5z86r4a.js → index-ea94zbq4.js} +329 -488
- package/dist/{cli-sdmv4bba.js → index-kaks3mm2.js} +448 -156
- package/dist/{index-4x6y8krm.js → index-yc3xj266.js} +1 -1
- package/dist/index.js +6 -6
- package/dist/lib/build-preflight.d.ts +4 -10
- package/dist/lib/build-runner.d.ts +1 -1
- package/dist/lib/extension-manager.d.ts +8 -7
- package/dist/lib/extension-manifest.d.ts +1 -13
- package/dist/lib/ghostscript.d.ts +5 -2
- package/dist/lib/lint-rules.d.ts +5 -1
- package/dist/lib/manifest-config.d.ts +3 -2
- package/dist/lib/manifest-old-spellings.d.ts +64 -0
- package/dist/lib/manifest.d.ts +15 -1
- package/dist/lib/markdown/assemble.d.ts +4 -3
- package/dist/lib/markdown/chapter-id.d.ts +1 -1
- package/dist/lib/markdown/index.d.ts +1 -1
- package/dist/lib/markdown/table.d.ts +5 -3
- package/dist/lib/page-size.d.ts +45 -33
- package/dist/lib/pdf-inspect.d.ts +27 -0
- package/dist/lib/presets.d.ts +10 -8
- package/dist/lib/printsafe.d.ts +2 -1
- package/dist/lib/project-scaffold.d.ts +1 -1
- package/dist/lib/project-templates.d.ts +9 -0
- package/dist/lib/remote-auth/sync-messages.d.ts +2 -2
- package/dist/lib/targets.d.ts +4 -4
- package/dist/lib/validation-exec.d.ts +4 -4
- package/dist/manifest-2kc56wvw.yaml +22 -0
- package/dist/manifest-41ddzm13.yaml +18 -0
- package/dist/manifest-79zsgkpn.yaml +26 -0
- package/dist/manifest-sqzm4681.yaml +22 -0
- package/dist/{manifest.schema-t7nx2stg.json → manifest.schema-w86c1xw1.json} +30 -308
- package/dist/{new-mhs46pw3.js → new-t2t28ccb.js} +9 -15
- package/dist/{package-aenwjew3.json → package-awwkt7sa.json} +0 -1
- package/dist/{page-rules-nsj3aw42.css → page-rules-ytj9p04v.css} +12 -40
- package/dist/{pdf-inspect-wnw4za71.js → pdf-inspect-b3mf81ex.js} +3 -1
- package/dist/{plugin.test.js-xgxrd8hf.tpl → plugin.test.js-gxzqqfdh.tpl} +0 -1
- package/dist/{plugins-2cek4mz1.js → plugins-fec8t2bh.js} +1 -1
- package/dist/{plugins-1sxe0dkz.js → plugins-sqa4msdk.js} +3 -3
- package/dist/{preflight-3k2b1x8e.js → preflight-srq8fktp.js} +8 -8
- package/dist/preview/file-watcher.d.ts +1 -3
- package/dist/{preview-6p9v6rht.js → preview-zsp9hstd.js} +8 -8
- package/dist/{publish-qgsngy8s.js → publish-hhy31gr9.js} +8 -8
- package/dist/render.js +30 -562
- package/dist/schema/manifest.types.d.ts +60 -105
- package/dist/{tokens-7984461t.css → tokens-n82t4k9h.css} +12 -12
- package/dist/{validate-0v7xw6wa.js → validate-r9jdz85h.js} +8 -8
- package/package.json +1 -1
- package/dist/checks/asset/approved-fonts.d.ts +0 -3
- package/dist/manifest-eagfhba6.yaml +0 -19
- package/dist/manifest-n1gh3qw5.yaml +0 -9
|
@@ -2,9 +2,16 @@
|
|
|
2
2
|
* {{NAME}} — 5. PAGE RULES
|
|
3
3
|
*
|
|
4
4
|
* OWNS
|
|
5
|
-
* The CSS `@page` at-rules: the
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* The CSS `@page` at-rules: the margin boxes that carry running heads and
|
|
6
|
+
* folios, and the named-page wiring that connects a markdown `@page .name`
|
|
7
|
+
* to a CSS `@page name`.
|
|
8
|
+
*
|
|
9
|
+
* NOT the page geometry. The trim size and the margins are the BOOK's,
|
|
10
|
+
* recorded in its manifest (`preset:`, `page:` — Setup > Book in the
|
|
11
|
+
* app) and written by the build after every stylesheet, so a `size` here
|
|
12
|
+
* would be ignored (and reported) and a `margin` here would hold only
|
|
13
|
+
* until the author sets margins in the app. Design the furniture below to
|
|
14
|
+
* sit in whatever margin the book gives it.
|
|
8
15
|
*
|
|
9
16
|
* This is standard CSS Paged Media and GCPM. Everything here is what the
|
|
10
17
|
* spec says, not something Gutterpress invented — `string-set`,
|
|
@@ -26,39 +33,9 @@
|
|
|
26
33
|
* ======================================================================== */
|
|
27
34
|
|
|
28
35
|
@layer pages {
|
|
29
|
-
/*
|
|
30
|
-
|
|
31
|
-
* be declared in CSS: with no `size:` anywhere, Chromium falls back to US
|
|
32
|
-
* Letter and prints a book at the wrong trim with no error at all. That is
|
|
33
|
-
* the single most expensive silent failure in this whole stack, which is
|
|
34
|
-
* why it is the first thing in the file.
|
|
35
|
-
*
|
|
36
|
-
* KEEP IT IN STEP WITH THE MANIFEST. The book's `preset:`/`page:` is what
|
|
37
|
-
* validation, the publish targets and the PDF/X boxes measure against, and
|
|
38
|
-
* `gutterpress validate` fails the build when the produced PDF does not
|
|
39
|
-
* match it. So the manifest is the source of truth and this line is the
|
|
40
|
-
* instruction that satisfies it — change one and change the other.
|
|
41
|
-
*
|
|
42
|
-
* 6in × 9in is the neutral trade-book size the `book` preset declares.
|
|
43
|
-
* Common alternatives: 5.5in 8.5in (digest), 8.5in 11in (US Letter),
|
|
44
|
-
* 210mm 297mm (A4).
|
|
45
|
-
*
|
|
46
|
-
* Deliberately a literal, not `var(--…)`. A custom property does resolve
|
|
47
|
-
* here, but an indirection whose failure mode is "silently prints Letter"
|
|
48
|
-
* is not worth the tidiness.
|
|
49
|
-
* ---------------------------------------------------------------------- */
|
|
50
|
-
@page {
|
|
51
|
-
size: 6in 9in;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/* Mirrored margins for a bound book: the inner edge needs the extra room,
|
|
55
|
-
and which edge is "inner" flips every page. */
|
|
36
|
+
/* The furniture of a bound book: the folio on the outer corner and the
|
|
37
|
+
running head, which swap sides with the page. */
|
|
56
38
|
@page :left {
|
|
57
|
-
margin: var(--{{PREFIX}}page-margin-top)
|
|
58
|
-
var(--{{PREFIX}}page-margin-inner)
|
|
59
|
-
var(--{{PREFIX}}page-margin-bottom)
|
|
60
|
-
var(--{{PREFIX}}page-margin-outer);
|
|
61
|
-
|
|
62
39
|
@bottom-left {
|
|
63
40
|
content: counter(page);
|
|
64
41
|
font-family: var(--{{PREFIX}}font-body);
|
|
@@ -82,11 +59,6 @@
|
|
|
82
59
|
}
|
|
83
60
|
|
|
84
61
|
@page :right {
|
|
85
|
-
margin: var(--{{PREFIX}}page-margin-top)
|
|
86
|
-
var(--{{PREFIX}}page-margin-outer)
|
|
87
|
-
var(--{{PREFIX}}page-margin-bottom)
|
|
88
|
-
var(--{{PREFIX}}page-margin-inner);
|
|
89
|
-
|
|
90
62
|
@bottom-right {
|
|
91
63
|
content: counter(page);
|
|
92
64
|
font-family: var(--{{PREFIX}}font-body);
|
|
@@ -11,15 +11,17 @@ import {
|
|
|
11
11
|
isLoadable,
|
|
12
12
|
loadPdf,
|
|
13
13
|
pageHasMarks,
|
|
14
|
+
pagesWithVisibleShadingPaints,
|
|
14
15
|
pendingGraceDestroyCount,
|
|
15
16
|
retainPdfCache,
|
|
16
17
|
unsplittableTextReasons
|
|
17
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-5crpmz42.js";
|
|
18
19
|
import"./cli-37x76zdn.js";
|
|
19
20
|
export {
|
|
20
21
|
unsplittableTextReasons,
|
|
21
22
|
retainPdfCache,
|
|
22
23
|
pendingGraceDestroyCount,
|
|
24
|
+
pagesWithVisibleShadingPaints,
|
|
23
25
|
pageHasMarks,
|
|
24
26
|
loadPdf,
|
|
25
27
|
isLoadable,
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
loadPlugins,
|
|
9
9
|
loadPluginsWithCss,
|
|
10
10
|
loadPublishFunction
|
|
11
|
-
} from "./cli-
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
11
|
+
} from "./cli-rqh295j9.js";
|
|
12
|
+
import"./cli-pspjxnc8.js";
|
|
13
|
+
import"./cli-gnpea9dx.js";
|
|
14
14
|
import"./cli-y28j019d.js";
|
|
15
15
|
import"./cli-37x76zdn.js";
|
|
16
16
|
export {
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
2
|
executeValidation,
|
|
3
3
|
reportMissingTools
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-93mkaw6v.js";
|
|
5
|
+
import"./cli-d9mm3vvh.js";
|
|
6
6
|
import"./cli-ht1bcqdd.js";
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
7
|
+
import"./cli-54xt7pjg.js";
|
|
8
|
+
import"./cli-5crpmz42.js";
|
|
9
9
|
import"./cli-eyyggect.js";
|
|
10
10
|
import"./cli-asap4t1z.js";
|
|
11
11
|
import"./cli-a35w7wzg.js";
|
|
12
12
|
import"./cli-v5mp7a6q.js";
|
|
13
13
|
import {
|
|
14
14
|
publishTargetFor
|
|
15
|
-
} from "./cli-
|
|
16
|
-
import"./cli-
|
|
15
|
+
} from "./cli-y6d1arem.js";
|
|
16
|
+
import"./cli-rqh295j9.js";
|
|
17
17
|
import {
|
|
18
18
|
log
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-pspjxnc8.js";
|
|
20
20
|
import {
|
|
21
21
|
UsageError,
|
|
22
22
|
rejectExtraPositionals,
|
|
23
23
|
rejectUnknownFlags
|
|
24
24
|
} from "./cli-d8xjns66.js";
|
|
25
|
-
import"./cli-
|
|
25
|
+
import"./cli-gnpea9dx.js";
|
|
26
26
|
import {
|
|
27
27
|
BuildError,
|
|
28
28
|
EXIT_CODES
|
|
@@ -43,9 +43,7 @@ export declare function generateAndWriteHtml(inputPath: string, tempDir: string,
|
|
|
43
43
|
title?: string;
|
|
44
44
|
language?: string;
|
|
45
45
|
styles?: string[];
|
|
46
|
-
|
|
47
|
-
files?: string[] | null;
|
|
48
|
-
};
|
|
46
|
+
chapters?: string[] | null;
|
|
49
47
|
extensions?: ResolvedExtensionConfig[];
|
|
50
48
|
print?: PrintPadding;
|
|
51
49
|
page?: {
|
|
@@ -3,23 +3,23 @@ import {
|
|
|
3
3
|
runBuild,
|
|
4
4
|
splitOutPath,
|
|
5
5
|
startPreviewServer
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-
|
|
6
|
+
} from "./cli-93mkaw6v.js";
|
|
7
|
+
import"./cli-d9mm3vvh.js";
|
|
8
8
|
import {
|
|
9
9
|
previewArgs
|
|
10
10
|
} from "./cli-75qkn0k5.js";
|
|
11
11
|
import"./cli-ht1bcqdd.js";
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
12
|
+
import"./cli-54xt7pjg.js";
|
|
13
|
+
import"./cli-5crpmz42.js";
|
|
14
14
|
import"./cli-eyyggect.js";
|
|
15
15
|
import"./cli-asap4t1z.js";
|
|
16
16
|
import"./cli-a35w7wzg.js";
|
|
17
17
|
import"./cli-v5mp7a6q.js";
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
18
|
+
import"./cli-y6d1arem.js";
|
|
19
|
+
import"./cli-rqh295j9.js";
|
|
20
20
|
import {
|
|
21
21
|
log
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-pspjxnc8.js";
|
|
23
23
|
import {
|
|
24
24
|
UsageError,
|
|
25
25
|
parseFormat,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
rejectUnknownFlags,
|
|
29
29
|
resolvePort
|
|
30
30
|
} from "./cli-d8xjns66.js";
|
|
31
|
-
import"./cli-
|
|
31
|
+
import"./cli-gnpea9dx.js";
|
|
32
32
|
import {
|
|
33
33
|
BuildError
|
|
34
34
|
} from "./cli-46ycxe6r.js";
|
|
@@ -10,30 +10,30 @@ import {
|
|
|
10
10
|
resolvePublishFormat,
|
|
11
11
|
resolvePublishProvider,
|
|
12
12
|
runPublish
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-93mkaw6v.js";
|
|
14
14
|
import {
|
|
15
15
|
FileTokenStore
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-d9mm3vvh.js";
|
|
17
17
|
import"./cli-ht1bcqdd.js";
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
18
|
+
import"./cli-54xt7pjg.js";
|
|
19
|
+
import"./cli-5crpmz42.js";
|
|
20
20
|
import"./cli-eyyggect.js";
|
|
21
21
|
import"./cli-asap4t1z.js";
|
|
22
22
|
import"./cli-a35w7wzg.js";
|
|
23
23
|
import"./cli-v5mp7a6q.js";
|
|
24
24
|
import {
|
|
25
25
|
loadManifestWithPath
|
|
26
|
-
} from "./cli-
|
|
27
|
-
import"./cli-
|
|
26
|
+
} from "./cli-y6d1arem.js";
|
|
27
|
+
import"./cli-rqh295j9.js";
|
|
28
28
|
import {
|
|
29
29
|
log
|
|
30
|
-
} from "./cli-
|
|
30
|
+
} from "./cli-pspjxnc8.js";
|
|
31
31
|
import {
|
|
32
32
|
UsageError,
|
|
33
33
|
rejectExtraPositionals,
|
|
34
34
|
rejectUnknownFlags
|
|
35
35
|
} from "./cli-d8xjns66.js";
|
|
36
|
-
import"./cli-
|
|
36
|
+
import"./cli-gnpea9dx.js";
|
|
37
37
|
import {
|
|
38
38
|
BuildError,
|
|
39
39
|
EXIT_CODES
|