gutterpress 0.11.6-alpha.2 → 0.11.6-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/dist/api/index.d.ts +3 -3
- package/dist/api/index.js +10 -6
- package/dist/{audit-fdba6axw.js → audit-qd5q0k1m.js} +5 -5
- package/dist/{build-2gjr2rj6.js → build-38mz8d2q.js} +5 -5
- package/dist/cli-4tx0szk7.js +1251 -0
- package/dist/{cli-sekhwex4.js → cli-5vdgncmm.js} +2 -2
- package/dist/{cli-ersw5g7j.js → cli-a569p7v6.js} +1 -1
- package/dist/{cli-7k2v2sya.js → cli-q4e99n20.js} +409 -984
- package/dist/{cli-wmvvkwcc.js → cli-qt466d4e.js} +1 -1
- package/dist/cli.js +14 -14
- package/dist/{doctor-vgarhrsg.js → doctor-a98dkqnp.js} +2 -2
- package/dist/{engine-w5ed5hmb.js → engine-15dfcy85.js} +2 -2
- package/dist/{engine-cbc17ne4.js → engine-amxqsfka.js} +1 -1
- package/dist/{ext-hb5k5gga.js → ext-5wgrtygx.js} +7 -7
- package/dist/{gutterpress-viewer-k0xrt5hw.js → gutterpress-viewer-swz6bwfa.js} +25 -3
- package/dist/index-7mqst9tg.js +1302 -0
- package/dist/{index-nmykzwb4.js → index-ash0pvb9.js} +495 -1069
- package/dist/{index-6n15e1ze.js → index-gf1shk3y.js} +1 -1
- package/dist/{index-12pvhbyz.js → index-yeej2vhs.js} +2 -2
- package/dist/index.js +11 -7
- package/dist/lib/project-scaffold.d.ts +20 -0
- package/dist/lib/remote-auth/sync-messages.d.ts +7 -7
- package/dist/lib/source-provider.d.ts +24 -0
- package/dist/{lint-0pfqbs5r.js → lint-btmms4m9.js} +5 -5
- package/dist/{new-nxxx2mv2.js → new-xt38pdjk.js} +7 -7
- package/dist/{preflight-g7xjme17.js → preflight-fydrrjpz.js} +5 -5
- package/dist/{preview-j59b5hg3.js → preview-655bdb9g.js} +6 -6
- package/dist/{publish-mzct8ggw.js → publish-gz6re318.js} +6 -6
- package/dist/{source-provider-54a52bpd.js → source-provider-gy3cn7kw.js} +3 -1
- package/dist/{source-provider-a458mmec.js → source-provider-m5wes47h.js} +3 -1
- package/dist/{validate-z2drbha6.js → validate-e3vvngx0.js} +5 -5
- package/package.json +1 -1
- package/dist/cli-c9h2bk2k.js +0 -645
- package/dist/index-c5ev4r1y.js +0 -696
package/dist/cli.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
UsageError,
|
|
7
7
|
package_default,
|
|
8
8
|
rejectUnknownFlags
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-a569p7v6.js";
|
|
10
10
|
import {
|
|
11
11
|
EXIT_CODES
|
|
12
12
|
} from "./cli-46ycxe6r.js";
|
|
@@ -18,16 +18,16 @@ import {
|
|
|
18
18
|
import { defineCommand, parseArgs, runMain } from "citty";
|
|
19
19
|
import { statSync } from "node:fs";
|
|
20
20
|
var SUBCOMMANDS = {
|
|
21
|
-
new: () => import("./new-
|
|
22
|
-
preview: () => import("./preview-
|
|
23
|
-
build: () => import("./build-
|
|
24
|
-
publish: () => import("./publish-
|
|
25
|
-
lint: () => import("./lint-
|
|
26
|
-
validate: () => import("./validate-
|
|
27
|
-
audit: () => import("./audit-
|
|
28
|
-
preflight: () => import("./preflight-
|
|
29
|
-
doctor: () => import("./doctor-
|
|
30
|
-
ext: () => import("./ext-
|
|
21
|
+
new: () => import("./new-xt38pdjk.js").then((m) => m.default),
|
|
22
|
+
preview: () => import("./preview-655bdb9g.js").then((m) => m.default),
|
|
23
|
+
build: () => import("./build-38mz8d2q.js").then((m) => m.default),
|
|
24
|
+
publish: () => import("./publish-gz6re318.js").then((m) => m.default),
|
|
25
|
+
lint: () => import("./lint-btmms4m9.js").then((m) => m.default),
|
|
26
|
+
validate: () => import("./validate-e3vvngx0.js").then((m) => m.default),
|
|
27
|
+
audit: () => import("./audit-qd5q0k1m.js").then((m) => m.default),
|
|
28
|
+
preflight: () => import("./preflight-fydrrjpz.js").then((m) => m.default),
|
|
29
|
+
doctor: () => import("./doctor-a98dkqnp.js").then((m) => m.default),
|
|
30
|
+
ext: () => import("./ext-5wgrtygx.js").then((m) => m.default)
|
|
31
31
|
};
|
|
32
32
|
var VERSION = package_default.version;
|
|
33
33
|
var main = defineCommand({
|
|
@@ -52,7 +52,7 @@ async function preflightRequiredInvocations(rawArgs) {
|
|
|
52
52
|
const [command, ...commandArgs] = rawArgs;
|
|
53
53
|
try {
|
|
54
54
|
if (command === "new") {
|
|
55
|
-
const { newArgs } = await import("./new-
|
|
55
|
+
const { newArgs } = await import("./new-xt38pdjk.js");
|
|
56
56
|
rejectUnknownFlags(commandArgs, newArgs, "new");
|
|
57
57
|
const parsed = parseArgs(commandArgs, {
|
|
58
58
|
...newArgs,
|
|
@@ -64,7 +64,7 @@ async function preflightRequiredInvocations(rawArgs) {
|
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
66
|
if (command === "preflight") {
|
|
67
|
-
const { preflightArgs } = await import("./preflight-
|
|
67
|
+
const { preflightArgs } = await import("./preflight-fydrrjpz.js");
|
|
68
68
|
rejectUnknownFlags(commandArgs, preflightArgs, "preflight");
|
|
69
69
|
const parsed = parseArgs(commandArgs, {
|
|
70
70
|
...preflightArgs,
|
|
@@ -84,7 +84,7 @@ async function preflightRequiredInvocations(rawArgs) {
|
|
|
84
84
|
}
|
|
85
85
|
if (subcommand.startsWith("-"))
|
|
86
86
|
return;
|
|
87
|
-
const { EXT_SUBCOMMANDS, extAddArgs, extRemoveArgs, extEnableArgs, extDisableArgs } = await import("./ext-
|
|
87
|
+
const { EXT_SUBCOMMANDS, extAddArgs, extRemoveArgs, extEnableArgs, extDisableArgs } = await import("./ext-5wgrtygx.js");
|
|
88
88
|
if (!EXT_SUBCOMMANDS.includes(subcommand)) {
|
|
89
89
|
throw new UsageError(`gutterpress ext: unknown command "${subcommand}"`);
|
|
90
90
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getSystemDiagnostics,
|
|
3
3
|
log
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-qt466d4e.js";
|
|
5
5
|
import {
|
|
6
6
|
UsageError,
|
|
7
7
|
rejectExtraPositionals,
|
|
8
8
|
rejectUnknownFlags
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-a569p7v6.js";
|
|
10
10
|
import"./cli-c41yr7he.js";
|
|
11
11
|
import"./cli-46ycxe6r.js";
|
|
12
12
|
import"./cli-37x76zdn.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
build
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-yeej2vhs.js";
|
|
4
4
|
import {
|
|
5
5
|
BuildError,
|
|
6
6
|
RENDER_TIMEOUT_MS,
|
|
7
7
|
assertMilestone,
|
|
8
8
|
connectChromium,
|
|
9
9
|
getBrowser
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-gf1shk3y.js";
|
|
11
11
|
import"./index-37x76zdn.js";
|
|
12
12
|
|
|
13
13
|
// src/lib/engine.ts
|
|
@@ -10,21 +10,21 @@ import {
|
|
|
10
10
|
removeExtension,
|
|
11
11
|
searchNpmExtensions,
|
|
12
12
|
setExtensionEnabled
|
|
13
|
-
} from "./cli-
|
|
14
|
-
import"./cli-
|
|
13
|
+
} from "./cli-q4e99n20.js";
|
|
14
|
+
import"./cli-qt466d4e.js";
|
|
15
15
|
import {
|
|
16
16
|
UsageError,
|
|
17
17
|
exitForUsage,
|
|
18
18
|
rejectExtraPositionals,
|
|
19
19
|
rejectUnknownFlags,
|
|
20
20
|
resolveProjectDir
|
|
21
|
-
} from "./cli-
|
|
22
|
-
import"./cli-
|
|
21
|
+
} from "./cli-a569p7v6.js";
|
|
22
|
+
import"./cli-5vdgncmm.js";
|
|
23
23
|
import"./cli-c41yr7he.js";
|
|
24
24
|
import {
|
|
25
25
|
EXIT_CODES
|
|
26
26
|
} from "./cli-46ycxe6r.js";
|
|
27
|
-
import"./cli-
|
|
27
|
+
import"./cli-4tx0szk7.js";
|
|
28
28
|
import"./cli-v5mp7a6q.js";
|
|
29
29
|
import"./cli-37x76zdn.js";
|
|
30
30
|
|
|
@@ -92,12 +92,12 @@ async function requireProjectDir(dir, verb) {
|
|
|
92
92
|
info = await stat(projectDir);
|
|
93
93
|
} catch (error) {
|
|
94
94
|
if (error.code === "ENOENT") {
|
|
95
|
-
throw new UsageError(`
|
|
95
|
+
throw new UsageError(`Book folder does not exist: ${projectDir}`);
|
|
96
96
|
}
|
|
97
97
|
throw error;
|
|
98
98
|
}
|
|
99
99
|
if (!info.isDirectory()) {
|
|
100
|
-
throw new UsageError(`
|
|
100
|
+
throw new UsageError(`Book path is not a folder: ${projectDir}`);
|
|
101
101
|
}
|
|
102
102
|
return projectDir;
|
|
103
103
|
}
|
|
@@ -65,7 +65,26 @@
|
|
|
65
65
|
overflow: auto;
|
|
66
66
|
/* Standalone pages use \`--gutterpress-fit-zoom\`; embedded previews use the
|
|
67
67
|
host-owned \`--gutterpress-zoom\`. fitZoom() guarantees only one is active. */
|
|
68
|
-
zoom: calc(var(--gutterpress-zoom, 1) * var(--gutterpress-fit-zoom, 1));
|
|
68
|
+
--gp-zoom: calc(var(--gutterpress-zoom, 1) * var(--gutterpress-fit-zoom, 1));
|
|
69
|
+
/* Zoom is a pure paint transform, NEVER CSS \`zoom\`. \`zoom\` changes layout
|
|
70
|
+
inputs (font sizes and lengths are scaled before text shaping and
|
|
71
|
+
LayoutUnit snapping), so Chromium's column fragmentation broke lines at
|
|
72
|
+
different points per zoom level: in the user guide a paragraph sat on
|
|
73
|
+
page 6 at 50% and page 7 at 25%, and the same book paginated differently
|
|
74
|
+
at 25/50/75/100/150% (#318). \`transform\` leaves layout untouched, so the
|
|
75
|
+
pages are the ones print produces at every zoom.
|
|
76
|
+
Layout width is the visible width / zoom, which is what \`zoom\` gave.
|
|
77
|
+
A transform does not shrink the parent's layout box, so a scaled-down
|
|
78
|
+
stage would leave dead scroll space below it. Taking the stage out of
|
|
79
|
+
flow makes the viewport's scrollable overflow exactly its transformed
|
|
80
|
+
extent, as \`zoom\` had it. */
|
|
81
|
+
position: absolute;
|
|
82
|
+
top: 0;
|
|
83
|
+
left: 0;
|
|
84
|
+
box-sizing: border-box;
|
|
85
|
+
width: calc(100% / var(--gp-zoom));
|
|
86
|
+
transform: scale(var(--gp-zoom));
|
|
87
|
+
transform-origin: 0 0;
|
|
69
88
|
}
|
|
70
89
|
|
|
71
90
|
/* One flow strip per named-page run. Chromium fragments its content into
|
|
@@ -281,7 +300,9 @@
|
|
|
281
300
|
background: none;
|
|
282
301
|
padding: 0;
|
|
283
302
|
overflow: visible;
|
|
284
|
-
|
|
303
|
+
position: static;
|
|
304
|
+
width: auto;
|
|
305
|
+
transform: none;
|
|
285
306
|
}
|
|
286
307
|
.gp-layer,
|
|
287
308
|
.gp-warning,
|
|
@@ -1565,7 +1586,8 @@
|
|
|
1565
1586
|
return stripMetrics(strip).stride;
|
|
1566
1587
|
}
|
|
1567
1588
|
function cssZoomOf(el) {
|
|
1568
|
-
|
|
1589
|
+
const stage = el.closest(".gp-stage") ?? document.body;
|
|
1590
|
+
return new DOMMatrixReadOnly(getComputedStyle(stage).transform).a || 1;
|
|
1569
1591
|
}
|
|
1570
1592
|
function stripMetrics(strip) {
|
|
1571
1593
|
const cs = getComputedStyle(strip);
|