gutterpress 0.9.0-alpha.2 → 0.10.0-alpha.3
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 +18 -4
- package/dist/api/index.d.ts +11 -5
- package/dist/api/index.js +20 -15
- package/dist/assets/preview/scripts/preview-bridge.d.ts +1 -0
- package/dist/assets/preview/scripts/preview-interface.d.ts +1 -0
- package/dist/{audit-nhn2pjz3.js → audit-xxegv0t0.js} +10 -7
- package/dist/{build-san7fv2z.js → build-w0vb6mgq.js} +14 -8
- package/dist/checks/source/index.d.ts +1 -0
- package/dist/checks/source/layout-markers.d.ts +3 -0
- package/dist/checks/source/local-ref-parser.d.ts +28 -0
- package/dist/cli-46ycxe6r.js +18 -0
- package/dist/{cli-k4bd06sd.js → cli-5czby0dd.js} +4986 -5889
- package/dist/cli-c41yr7he.js +241 -0
- package/dist/{cli-e5zhb0xs.js → cli-f4rcbt2t.js} +17 -24
- package/dist/{cli-najycadg.js → cli-gk3wsdpb.js} +69 -253
- package/dist/{index-yzrh708h.js → cli-k1065rkg.js} +2 -5
- package/dist/{cli-506tg37g.js → cli-revgt4pr.js} +2 -1
- package/dist/{cli-wchtvxvw.js → cli-v5mp7a6q.js} +14 -1
- package/dist/cli-yp3p0sf2.js +2343 -0
- package/dist/cli.js +20 -18
- package/dist/{doctor-hrk0kxxz.js → doctor-ctgn1dnt.js} +4 -2
- package/dist/engine/compiler/build.d.ts +139 -0
- package/dist/engine/compiler/postprocess.d.ts +23 -0
- package/dist/engine/compiler/tier2.d.ts +78 -0
- package/dist/engine/shared/cdp.d.ts +104 -0
- package/dist/engine/shared/content-value.d.ts +64 -0
- package/dist/engine/shared/gcpm-extract.d.ts +119 -0
- package/dist/engine/shared/margin-box-support.d.ts +12 -0
- package/dist/engine/shared/pdf-inspect.d.ts +24 -0
- package/dist/engine/shared/synthesis.d.ts +155 -0
- package/dist/engine-eng4xh2q.js +41 -0
- package/dist/engine-q5skhgms.js +40 -0
- package/dist/gutterpress-agent-1ctgfz92.js +576 -0
- package/dist/gutterpress-viewer-cem7dmr5.js +2349 -0
- package/dist/index-a4kr77td.js +1907 -0
- package/dist/{cli-yzrh708h.js → index-mdefp0y5.js} +1 -1
- package/dist/index-mvehxh0e.js +708 -0
- package/dist/{index-bynn850m.js → index-s416qpdv.js} +3049 -4015
- package/dist/{index-wchtvxvw.js → index-v5mp7a6q.js} +14 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +24 -17
- package/dist/lib/asset-inline.d.ts +36 -0
- package/dist/lib/browser-pool.d.ts +18 -0
- package/dist/lib/build-error.d.ts +1 -1
- package/dist/lib/build-preflight.d.ts +35 -2
- package/dist/lib/build-runner.d.ts +45 -17
- package/dist/lib/build-staging.d.ts +9 -55
- package/dist/lib/cli-args.d.ts +8 -0
- package/dist/lib/desktop.d.ts +2 -2
- package/dist/lib/embedded-assets.d.ts +1 -1
- package/dist/lib/engine.d.ts +33 -0
- package/dist/lib/ghostscript.d.ts +46 -1
- package/dist/lib/markdown/assemble.d.ts +18 -10
- package/dist/lib/markdown/gp-pin-scope.d.ts +1 -0
- package/dist/lib/markdown/gutterpress-css.d.ts +125 -0
- package/dist/lib/markdown/images.d.ts +26 -0
- package/dist/lib/markdown/index.d.ts +4 -2
- package/dist/lib/markdown/inline-source.d.ts +10 -0
- package/dist/lib/markdown/markers.d.ts +32 -0
- package/dist/lib/markdown/renderer.d.ts +8 -3
- package/dist/lib/markdown/source-range.d.ts +61 -0
- package/dist/lib/missing-asset-placeholder.d.ts +52 -0
- package/dist/lib/presets.d.ts +1 -1
- package/dist/lib/printsafe.d.ts +2 -3
- package/dist/lib/remote-auth/converge-merge.d.ts +48 -0
- package/dist/lib/remote-auth/image-clash.d.ts +17 -0
- package/dist/lib/remote-auth/recovery/classify.d.ts +55 -67
- package/dist/lib/remote-auth/recovery/inspect.d.ts +14 -13
- package/dist/lib/remote-auth/recovery/locks.d.ts +20 -0
- package/dist/lib/remote-auth/recovery/repair.d.ts +29 -0
- package/dist/lib/remote-auth/recovery/types.d.ts +8 -204
- package/dist/lib/remote-auth/sync-messages.d.ts +2 -3
- package/dist/lib/remote-auth/sync-types.d.ts +35 -63
- package/dist/lib/remote-auth/sync.d.ts +11 -18
- package/dist/lib/remote-auth/transport.d.ts +14 -7
- package/dist/lib/theme-import.d.ts +4 -5
- package/dist/{lint-96j9hrj4.js → lint-gsh6qwrq.js} +10 -7
- package/dist/{manifest.schema-z61rzw44.json → manifest.schema-zxgxnbg7.json} +21 -0
- package/dist/{new-8p38wavc.js → new-nkhycqy4.js} +12 -8
- package/dist/{plugin-ees6nhkc.js → plugin-129wcs93.js} +10 -7
- package/dist/{preflight-1q6c2edh.js → preflight-41hcejg9.js} +10 -7
- package/dist/preview/file-watcher.d.ts +13 -17
- package/dist/preview/lifecycle.d.ts +1 -1
- package/dist/{pagedjs-bridge-vn4hk9fx.js → preview-bridge-fz7vpk8m.js} +8 -0
- package/dist/preview-interface-fnqb2y4v.js +1015 -0
- package/dist/{preview-y5a2zen1.js → preview-pftsvr9z.js} +16 -9
- package/dist/preview-shell-c5mfa3q0.js +346 -0
- package/dist/{project-source-p0gn1wd5.js → project-source-ekcyp63q.js} +1 -1
- package/dist/{publish-rm9yb3wh.js → publish-dnjvb4jg.js} +10 -7
- package/dist/render.d.ts +3 -4
- package/dist/render.js +728 -64
- package/dist/{repair-zgq7q2g6.js → repair-a3enjttn.js} +45 -79
- package/dist/schema/manifest.types.d.ts +38 -0
- package/dist/{source-provider-c1rjm2c0.js → source-provider-3tcj6qg2.js} +2 -2
- package/dist/source-provider-vanafrt9.js +40 -0
- package/dist/{theme-zz2ktzqs.css → theme-h5recz6c.css} +8 -7
- package/dist/{theme-570zmh2t.css → theme-j2bagrfx.css} +8 -7
- package/dist/{theme-nya4nqh6.css → theme-nn6d53zy.css} +8 -7
- package/dist/types.d.ts +7 -0
- package/dist/{validate-nr0xa6sa.js → validate-ph1xffqy.js} +10 -7
- package/package.json +6 -6
- package/dist/cli-yja077f6.js +0 -92
- package/dist/git-http-yrb4ag6z.js +0 -17
- package/dist/index-yja077f6.js +0 -92
- package/dist/lib/markdown/markdown-it-paged.d.ts +0 -30
- package/dist/lib/pagedjs-marker.d.ts +0 -42
- package/dist/lib/pagedjs.d.ts +0 -26
- package/dist/lib/pagination.d.ts +0 -149
- package/dist/lib/remote-auth/conflict-resolution.d.ts +0 -29
- package/dist/lib/remote-auth/recovery/abort-interrupted-operation.d.ts +0 -103
- package/dist/lib/remote-auth/recovery/backup.d.ts +0 -113
- package/dist/lib/remote-auth/recovery/context.d.ts +0 -47
- package/dist/lib/remote-auth/recovery/dispatch.d.ts +0 -28
- package/dist/lib/remote-auth/recovery/failsafe.d.ts +0 -33
- package/dist/lib/remote-auth/recovery/manual-guidance.d.ts +0 -28
- package/dist/lib/remote-auth/recovery/outcome-mapping.d.ts +0 -59
- package/dist/lib/remote-auth/recovery/policy.d.ts +0 -47
- package/dist/lib/remote-auth/recovery/recover-auth.d.ts +0 -42
- package/dist/lib/remote-auth/recovery/recover-binary-conflict.d.ts +0 -37
- package/dist/lib/remote-auth/recovery/recover-corrupt-index.d.ts +0 -40
- package/dist/lib/remote-auth/recovery/recover-detached-head.d.ts +0 -70
- package/dist/lib/remote-auth/recovery/recover-interrupted-cherry-pick.d.ts +0 -23
- package/dist/lib/remote-auth/recovery/recover-interrupted-merge.d.ts +0 -28
- package/dist/lib/remote-auth/recovery/recover-interrupted-rebase.d.ts +0 -39
- package/dist/lib/remote-auth/recovery/recover-merge-conflict.d.ts +0 -34
- package/dist/lib/remote-auth/recovery/recover-missing-git-dir.d.ts +0 -37
- package/dist/lib/remote-auth/recovery/recover-missing-objects.d.ts +0 -56
- package/dist/lib/remote-auth/recovery/recover-network.d.ts +0 -34
- package/dist/lib/remote-auth/recovery/recover-non-fast-forward.d.ts +0 -27
- package/dist/lib/remote-auth/recovery/recover-stale-lock.d.ts +0 -68
- package/dist/lib/remote-auth/recovery/recover-unrelated-histories.d.ts +0 -44
- package/dist/lib/remote-auth/recovery/recover-wrong-remote.d.ts +0 -35
- package/dist/lib/remote-auth/resolution-plan.d.ts +0 -64
- package/dist/paged.polyfill-n95pbxfn.js +0 -33288
- package/dist/pagedjs-interface-qxvzgwd7.js +0 -557
- package/dist/preview-shell-6dqexx1m.js +0 -581
- /package/dist/assets/{preview/scripts/pagedjs-bridge.d.ts → engine/gutterpress-agent.d.ts} +0 -0
- /package/dist/assets/{preview/scripts/pagedjs-interface.d.ts → engine/gutterpress-viewer.d.ts} +0 -0
|
@@ -15,25 +15,28 @@ import type { HostCredential, TokenStore } from "./token-store.ts";
|
|
|
15
15
|
* the root cause of the 0.5.0 "sync uses 2 GB" report.
|
|
16
16
|
*/
|
|
17
17
|
export type GitCache = Record<string, unknown>;
|
|
18
|
-
/**
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
export interface ConflictFile {
|
|
28
|
-
path: string;
|
|
29
|
-
kind: ConflictKind;
|
|
30
|
-
}
|
|
31
|
-
/** Author's per-file decision for a conflicted file (ADR 0006 D5). */
|
|
32
|
-
export interface ConflictResolution {
|
|
18
|
+
/**
|
|
19
|
+
* One image file that changed on both sides. Sync already converged (the
|
|
20
|
+
* NEWER side's bytes are on disk and committed — the safe default); this
|
|
21
|
+
* record lets a host offer a non-blocking side-by-side picker afterwards.
|
|
22
|
+
* Both blob oids are pinned by the merge commit's two parents, so the picker
|
|
23
|
+
* can never go stale.
|
|
24
|
+
*/
|
|
25
|
+
export interface ImageClash {
|
|
26
|
+
/** Repo-relative path of the image. */
|
|
33
27
|
path: string;
|
|
34
|
-
|
|
28
|
+
/** Blob oid of the local version. */
|
|
29
|
+
localOid: string;
|
|
30
|
+
/** Blob oid of the online version. */
|
|
31
|
+
remoteOid: string;
|
|
32
|
+
/** Which side the automatic newer-wins policy kept on disk. */
|
|
33
|
+
kept: "local" | "online";
|
|
35
34
|
}
|
|
36
|
-
/** Outcome of a sync
|
|
35
|
+
/** Outcome of a sync attempt. Sync always converges — there is no "conflict"
|
|
36
|
+
* arm: overlapping text edits land in the file inside standard git conflict
|
|
37
|
+
* markers (`combinedFiles`), clashing binaries keep the newer side
|
|
38
|
+
* (`imageClashes` for images), and the other version is always reachable in
|
|
39
|
+
* history. Owner ruling 2026-08-14. */
|
|
37
40
|
export type SyncOutcome = {
|
|
38
41
|
status: "synced";
|
|
39
42
|
message: string;
|
|
@@ -43,20 +46,15 @@ export type SyncOutcome = {
|
|
|
43
46
|
mergedRemoteChanges: boolean;
|
|
44
47
|
/** True when pulling online changes changed the local working tree. */
|
|
45
48
|
filesChanged?: boolean;
|
|
49
|
+
/** Files whose text now holds BOTH versions inside git conflict markers. */
|
|
50
|
+
combinedFiles?: string[];
|
|
51
|
+
/** Clashing images (newer kept) for the host's non-blocking picker. */
|
|
52
|
+
imageClashes?: ImageClash[];
|
|
46
53
|
} | {
|
|
47
54
|
status: "up-to-date";
|
|
48
55
|
message: string;
|
|
49
56
|
snapshotId?: string;
|
|
50
57
|
filesChanged?: boolean;
|
|
51
|
-
} | {
|
|
52
|
-
status: "conflict";
|
|
53
|
-
message: string;
|
|
54
|
-
files: ConflictFile[];
|
|
55
|
-
/** Local branch tip the conflict was computed against. */
|
|
56
|
-
localId: string;
|
|
57
|
-
/** Online tip the conflict was computed against. */
|
|
58
|
-
remoteId: string;
|
|
59
|
-
snapshotId?: string;
|
|
60
58
|
} | {
|
|
61
59
|
status: "auth";
|
|
62
60
|
message: string;
|
|
@@ -71,11 +69,11 @@ export type SyncOutcome = {
|
|
|
71
69
|
status: "error";
|
|
72
70
|
message: string;
|
|
73
71
|
/**
|
|
74
|
-
* Stable machine-readable signal
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
72
|
+
* Stable machine-readable signal so a host UI can route without
|
|
73
|
+
* string-matching `message` (which stays free to reword):
|
|
74
|
+
* "needs-connection-setup" — the project isn't set up right (no
|
|
75
|
+
* remote / SSH remote / no named branch); route to the connect/setup
|
|
76
|
+
* surface.
|
|
79
77
|
*/
|
|
80
78
|
code?: "needs-connection-setup";
|
|
81
79
|
snapshotId?: string;
|
|
@@ -83,9 +81,8 @@ export type SyncOutcome = {
|
|
|
83
81
|
};
|
|
84
82
|
/**
|
|
85
83
|
* Outcome of a pull-only attempt ({@link pullChanges}): fetch + fast-forward/
|
|
86
|
-
* merge of the online changes, NEVER a push.
|
|
87
|
-
*
|
|
88
|
-
* with conflict markers).
|
|
84
|
+
* converge-merge of the online changes, NEVER a push. The merge always lands
|
|
85
|
+
* (see converge-merge.ts) — there is no "conflict" arm.
|
|
89
86
|
*/
|
|
90
87
|
export type PullOutcome = {
|
|
91
88
|
status: "pulled";
|
|
@@ -102,17 +99,14 @@ export type PullOutcome = {
|
|
|
102
99
|
* from before) — the host should refresh its preview.
|
|
103
100
|
*/
|
|
104
101
|
filesChanged: boolean;
|
|
102
|
+
/** Files whose text now holds BOTH versions inside git conflict markers. */
|
|
103
|
+
combinedFiles?: string[];
|
|
104
|
+
/** Clashing images (newer kept) for the host's non-blocking picker. */
|
|
105
|
+
imageClashes?: ImageClash[];
|
|
105
106
|
} | {
|
|
106
107
|
status: "up-to-date";
|
|
107
108
|
message: string;
|
|
108
109
|
snapshotId?: string;
|
|
109
|
-
} | {
|
|
110
|
-
status: "conflict";
|
|
111
|
-
message: string;
|
|
112
|
-
files: ConflictFile[];
|
|
113
|
-
localId: string;
|
|
114
|
-
remoteId: string;
|
|
115
|
-
snapshotId?: string;
|
|
116
110
|
} | {
|
|
117
111
|
status: "auth";
|
|
118
112
|
message: string;
|
|
@@ -193,28 +187,6 @@ export interface SyncRetryOptions {
|
|
|
193
187
|
/** Injectable delay (tests only); defaults to a real timer. */
|
|
194
188
|
sleep?: (ms: number) => Promise<void>;
|
|
195
189
|
}
|
|
196
|
-
export interface ResolveConflictsOptions {
|
|
197
|
-
projectDir: string;
|
|
198
|
-
resolutions: ConflictResolution[];
|
|
199
|
-
/** The `localId` from the conflict outcome. */
|
|
200
|
-
localId: string;
|
|
201
|
-
/** The `remoteId` from the conflict outcome. */
|
|
202
|
-
remoteId: string;
|
|
203
|
-
credential?: HostCredential;
|
|
204
|
-
tokenStore?: TokenStore;
|
|
205
|
-
authorName?: string;
|
|
206
|
-
authorEmail?: string;
|
|
207
|
-
httpClient?: typeof httpNode;
|
|
208
|
-
/**
|
|
209
|
-
* When true, the merge is allowed to combine two commits that share no
|
|
210
|
-
* common ancestor (unrelated histories). Set by the unrelated-histories
|
|
211
|
-
* recovery path; regular merge conflicts leave this false (the local and
|
|
212
|
-
* remote share a common base, so `allowUnrelatedHistories` is unnecessary).
|
|
213
|
-
*/
|
|
214
|
-
allowUnrelatedHistories?: boolean;
|
|
215
|
-
/** Optional log file for debugging conflict resolution steps. */
|
|
216
|
-
logFile?: string;
|
|
217
|
-
}
|
|
218
190
|
/** Resolved project remote + credential used by every transport call. */
|
|
219
191
|
export interface RemoteTransport {
|
|
220
192
|
remote: string;
|
|
@@ -1,30 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { onAuthFor } from "./transport.ts";
|
|
2
2
|
import type { PullOutcome, PushOutcome, SyncOutcome, SyncProjectOptions } from "./sync-types.ts";
|
|
3
|
-
export { onAuthFor
|
|
4
|
-
export { onlineCopyPath, resolveConflicts } from "./conflict-resolution.ts";
|
|
3
|
+
export { onAuthFor };
|
|
5
4
|
export { SYNC_SNAPSHOT_MESSAGE } from "./sync-messages.ts";
|
|
6
|
-
export type {
|
|
5
|
+
export type { ImageClash, PullOutcome, PushOutcome, SyncOutcome, SyncProjectOptions, } from "./sync-types.ts";
|
|
7
6
|
/**
|
|
8
7
|
* Snapshot-first sync (ADR 0006 D5) — the composition of {@link pullChanges}
|
|
9
8
|
* then {@link pushChanges}. If someone pushes between our pull and our push,
|
|
10
|
-
* the push reports pull-first and the pair re-runs (their commits
|
|
11
|
-
* the next pass), with a short backoff between passes. The loop is ALWAYS
|
|
12
|
-
* bounded by `retry.attempts
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* snapshot-first guarantee holds on every path (the work is saved locally
|
|
16
|
-
* before any network step). Never throws for expected outcomes — everything is
|
|
17
|
-
* reported through the {@link SyncOutcome} union.
|
|
9
|
+
* the push reports pull-first and the pair re-runs (their commits converge in
|
|
10
|
+
* on the next pass), with a short backoff between passes. The loop is ALWAYS
|
|
11
|
+
* bounded by `retry.attempts`; a remote that races every pass surfaces a
|
|
12
|
+
* friendly "try again in a moment" rather than looping forever. Never throws
|
|
13
|
+
* for expected outcomes — everything is reported through {@link SyncOutcome}.
|
|
18
14
|
*/
|
|
19
15
|
export declare function syncProject(options: SyncProjectOptions): Promise<SyncOutcome>;
|
|
20
16
|
/**
|
|
21
17
|
* Pull-only operation (the History tab's "Pull"): snapshot-if-needed →
|
|
22
|
-
* fetch → fast-forward or
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* working tree completely untouched and the conflict comes back as
|
|
26
|
-
* `{ status: "conflict", files }` for the per-file choices dialog. Serialized
|
|
27
|
-
* on the per-repo lock; one function-scoped object cache, released on return.
|
|
18
|
+
* fetch → fast-forward or CONVERGE-merge of the online changes — NEVER a
|
|
19
|
+
* push, never a question. Serialized on the per-repo lock; one
|
|
20
|
+
* function-scoped object cache, released on return.
|
|
28
21
|
*/
|
|
29
22
|
export declare function pullChanges(options: SyncProjectOptions): Promise<PullOutcome>;
|
|
30
23
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import httpNode from "isomorphic-git/http/node";
|
|
2
2
|
import { type HostCredential, type TokenStore } from "./token-store.ts";
|
|
3
|
-
import type {
|
|
3
|
+
import type { OperationLogger } from "./operation-log.ts";
|
|
4
|
+
import type { GitCache, RemoteTransport } from "./sync-types.ts";
|
|
4
5
|
/**
|
|
5
6
|
* The git repo directory for a project dir. A project IS its git repo, so this
|
|
6
7
|
* walks up to the enclosing repo root (opening a subfolder syncs the whole
|
|
@@ -47,12 +48,6 @@ export declare function failureOutcome(e: unknown, snapshotId?: string): {
|
|
|
47
48
|
message: string;
|
|
48
49
|
snapshotId?: string;
|
|
49
50
|
};
|
|
50
|
-
export declare function conflictFilesFrom(data: {
|
|
51
|
-
filepaths: string[];
|
|
52
|
-
bothModified: string[];
|
|
53
|
-
deleteByUs: string[];
|
|
54
|
-
deleteByTheirs: string[];
|
|
55
|
-
}): ConflictFile[];
|
|
56
51
|
/** Friendly setup-problem message for the expected gate errors, else null. */
|
|
57
52
|
export declare function setupErrorMessage(e: unknown): string | null;
|
|
58
53
|
/**
|
|
@@ -70,6 +65,18 @@ export declare function snapshotBeforeAction(args: {
|
|
|
70
65
|
authorEmail?: string;
|
|
71
66
|
cache: GitCache;
|
|
72
67
|
}): Promise<string | undefined>;
|
|
68
|
+
/**
|
|
69
|
+
* Structural preflight — never touch the tree of a damaged repo. An interrupted
|
|
70
|
+
* merge/rebase/cherry-pick, detached HEAD, stale lock, or missing `.git` must be
|
|
71
|
+
* REPAIRED before any sync work: snapshot-first would otherwise commit whatever
|
|
72
|
+
* is on disk (e.g. the literal conflict markers a half-done native-git merge
|
|
73
|
+
* leaves in tracked files) and push it to every collaborator. Throwing the
|
|
74
|
+
* typed error routes the caller through the recover() path.
|
|
75
|
+
* `checkLocalChanges: false` — only the structural flags matter here.
|
|
76
|
+
*
|
|
77
|
+
* Runs INSIDE the caller's repo lock. Shared by pullChanges and pushChanges.
|
|
78
|
+
*/
|
|
79
|
+
export declare function assertNoStructuralDamage(projectDir: string, logger: OperationLogger): Promise<void>;
|
|
73
80
|
export declare function currentBranchOrThrow(dir: string): Promise<string>;
|
|
74
81
|
/**
|
|
75
82
|
* Run `fn` (a fetch that moves remote-tracking refs) with a rollback guard
|
|
@@ -29,11 +29,10 @@ export declare function locateThemeRoot(names: string[]): string | null;
|
|
|
29
29
|
/**
|
|
30
30
|
* Split print-safety findings into the one that REJECTS the import (a CSS
|
|
31
31
|
* syntax/parse failure — the stylesheet is unusable) vs. WARN findings the
|
|
32
|
-
* author should still see (remote URLs, risky print effects
|
|
33
|
-
*
|
|
34
|
-
* severity
|
|
35
|
-
*
|
|
36
|
-
* refuses.
|
|
32
|
+
* author should still see (remote URLs, risky print effects) that import
|
|
33
|
+
* anyway. The discriminator is the rule id, not severity: `no-remote-urls` is
|
|
34
|
+
* `error`-severity but the #106 spec still imports it with a warning; only
|
|
35
|
+
* `syntax-error` refuses.
|
|
37
36
|
*/
|
|
38
37
|
export declare function classifyThemeCssFindings(findings: PrintSafeWarning[]): {
|
|
39
38
|
reject: PrintSafeWarning | null;
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MANIFEST_FILENAMES,
|
|
3
3
|
runLint
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-5czby0dd.js";
|
|
5
5
|
import {
|
|
6
6
|
log
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-gk3wsdpb.js";
|
|
8
8
|
import {
|
|
9
|
-
EXIT_CODES,
|
|
10
9
|
UsageError,
|
|
11
10
|
rejectExtraPositionals,
|
|
12
11
|
rejectUnknownFlags
|
|
13
|
-
} from "./cli-
|
|
14
|
-
import"./cli-
|
|
15
|
-
import"./cli-
|
|
16
|
-
import
|
|
12
|
+
} from "./cli-f4rcbt2t.js";
|
|
13
|
+
import"./cli-yp3p0sf2.js";
|
|
14
|
+
import"./cli-c41yr7he.js";
|
|
15
|
+
import {
|
|
16
|
+
EXIT_CODES
|
|
17
|
+
} from "./cli-46ycxe6r.js";
|
|
18
|
+
import"./cli-k1065rkg.js";
|
|
19
|
+
import"./cli-v5mp7a6q.js";
|
|
17
20
|
import"./cli-37x76zdn.js";
|
|
18
21
|
|
|
19
22
|
// src/commands/lint.ts
|
|
@@ -29,6 +29,27 @@
|
|
|
29
29
|
"enum": ["dtrpg", "book", "custom"],
|
|
30
30
|
"examples": ["dtrpg", "book", "custom"]
|
|
31
31
|
},
|
|
32
|
+
"engine": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "Pagination engine. Paged.js has been removed — the Gutterpress engine (native Chromium pagination) is the only engine, and \"native\" is the only meaningful value. \"paged\" is accepted for backward-compatible manifest parsing only: it produces a one-line warning and the build proceeds natively regardless. `--engine` on the CLI is likewise an accepted-but-ignored no-op.",
|
|
35
|
+
"enum": ["paged", "native"],
|
|
36
|
+
"default": "native",
|
|
37
|
+
"examples": ["native"]
|
|
38
|
+
},
|
|
39
|
+
"engineStyles": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"description": "Engine-conditional stylesheets, appended AFTER `styles`. `.native` is the only list that still applies; `.paged` is accepted-but-ignored (a warning fires if it has entries) now that Paged.js has been removed.",
|
|
42
|
+
"properties": {
|
|
43
|
+
"paged": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"description": "REMOVED — Paged.js has been deleted. Accepted for backward-compatible manifest parsing only; entries here are ignored with a warning.",
|
|
46
|
+
"items": { "type": "string" }
|
|
47
|
+
},
|
|
48
|
+
"native": { "type": "array", "items": { "type": "string" } }
|
|
49
|
+
},
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"examples": [{ "native": ["css/native-furniture.css"] }]
|
|
52
|
+
},
|
|
32
53
|
"targets": {
|
|
33
54
|
"type": "array",
|
|
34
55
|
"description": "Where the book is published (ADR 0008): publish targets whose requirements `gutterpress validate` checks the built PDF against — each target is validated separately, so one book can target several destinations. Omitting it uses the preset's default (dtrpg -> [\"dtrpg\"]; book/custom -> []).",
|
|
@@ -5,20 +5,24 @@ import {
|
|
|
5
5
|
TARGETS,
|
|
6
6
|
TARGET_IDS,
|
|
7
7
|
scaffoldProject
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-5czby0dd.js";
|
|
9
9
|
import {
|
|
10
|
-
isToolAvailable,
|
|
11
10
|
resolveGhostscript
|
|
12
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-gk3wsdpb.js";
|
|
13
12
|
import {
|
|
14
|
-
EXIT_CODES,
|
|
15
13
|
UsageError,
|
|
16
14
|
rejectExtraPositionals,
|
|
17
15
|
rejectUnknownFlags
|
|
18
|
-
} from "./cli-
|
|
19
|
-
import"./cli-
|
|
20
|
-
import
|
|
21
|
-
|
|
16
|
+
} from "./cli-f4rcbt2t.js";
|
|
17
|
+
import"./cli-yp3p0sf2.js";
|
|
18
|
+
import {
|
|
19
|
+
isToolAvailable
|
|
20
|
+
} from "./cli-c41yr7he.js";
|
|
21
|
+
import {
|
|
22
|
+
EXIT_CODES
|
|
23
|
+
} from "./cli-46ycxe6r.js";
|
|
24
|
+
import"./cli-k1065rkg.js";
|
|
25
|
+
import"./cli-v5mp7a6q.js";
|
|
22
26
|
import"./cli-37x76zdn.js";
|
|
23
27
|
|
|
24
28
|
// src/commands/new.ts
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addNpmPlugin,
|
|
3
3
|
parseNpmPluginSpec
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-5czby0dd.js";
|
|
5
|
+
import"./cli-gk3wsdpb.js";
|
|
6
6
|
import {
|
|
7
|
-
EXIT_CODES,
|
|
8
7
|
UsageError,
|
|
9
8
|
rejectExtraPositionals,
|
|
10
9
|
rejectUnknownFlags
|
|
11
|
-
} from "./cli-
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
14
|
-
import
|
|
10
|
+
} from "./cli-f4rcbt2t.js";
|
|
11
|
+
import"./cli-yp3p0sf2.js";
|
|
12
|
+
import"./cli-c41yr7he.js";
|
|
13
|
+
import {
|
|
14
|
+
EXIT_CODES
|
|
15
|
+
} from "./cli-46ycxe6r.js";
|
|
16
|
+
import"./cli-k1065rkg.js";
|
|
17
|
+
import"./cli-v5mp7a6q.js";
|
|
15
18
|
import"./cli-37x76zdn.js";
|
|
16
19
|
|
|
17
20
|
// src/commands/plugin.ts
|
|
@@ -2,19 +2,22 @@ import {
|
|
|
2
2
|
executeValidation,
|
|
3
3
|
publishTargetFor,
|
|
4
4
|
reportMissingTools
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-5czby0dd.js";
|
|
6
6
|
import {
|
|
7
7
|
log
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-gk3wsdpb.js";
|
|
9
9
|
import {
|
|
10
|
-
EXIT_CODES,
|
|
11
10
|
UsageError,
|
|
12
11
|
rejectExtraPositionals,
|
|
13
12
|
rejectUnknownFlags
|
|
14
|
-
} from "./cli-
|
|
15
|
-
import"./cli-
|
|
16
|
-
import"./cli-
|
|
17
|
-
import
|
|
13
|
+
} from "./cli-f4rcbt2t.js";
|
|
14
|
+
import"./cli-yp3p0sf2.js";
|
|
15
|
+
import"./cli-c41yr7he.js";
|
|
16
|
+
import {
|
|
17
|
+
EXIT_CODES
|
|
18
|
+
} from "./cli-46ycxe6r.js";
|
|
19
|
+
import"./cli-k1065rkg.js";
|
|
20
|
+
import"./cli-v5mp7a6q.js";
|
|
18
21
|
import"./cli-37x76zdn.js";
|
|
19
22
|
|
|
20
23
|
// src/commands/preflight.ts
|
|
@@ -14,24 +14,20 @@ import type { ResolvedPluginConfig } from '../schema/manifest.types';
|
|
|
14
14
|
*/
|
|
15
15
|
export declare function incrementalPreviewEnabled(): boolean;
|
|
16
16
|
/**
|
|
17
|
-
* Rewrite rendered book HTML for the live preview
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* - The polyfill is 904 KB and copying it per open is wasted IO
|
|
26
|
-
* (one of the worst-case Defender scan targets on Windows).
|
|
27
|
-
* - The per-process extracted copy is identical across opens so
|
|
28
|
-
* serving it from a stable disk path lets the OS file-cache
|
|
29
|
-
* and Defender hash-cache stay warm across sessions.
|
|
17
|
+
* Rewrite rendered book HTML for the live preview: inject the Gutterpress
|
|
18
|
+
* engine's viewer bundle (`/engine/gutterpress-viewer.js`, embedded the same
|
|
19
|
+
* way as every other preview asset — see lib/embedded-assets.ts) PLUS the
|
|
20
|
+
* preview-interface.js/preview-bridge.js pair, before `</head>`.
|
|
21
|
+
* preview-interface.js defines `window.previewAPI` for in-iframe controls;
|
|
22
|
+
* preview-bridge.js is the postMessage bridge for the cross-origin desktop
|
|
23
|
+
* toolbar — together they make the desktop's whole
|
|
24
|
+
* `gutterpress:cmd/reply/event` command protocol work.
|
|
30
25
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
26
|
+
* `pageIsolateChapters` is reserved for the one-source render. The full book
|
|
27
|
+
* always paginates as one document: native preview updates use a full iframe
|
|
28
|
+
* swap, so forcing every source wrapper to a new page buys no incremental
|
|
29
|
+
* splice boundary and diverges from the PDF whenever a source file begins in
|
|
30
|
+
* the middle of a printed page.
|
|
35
31
|
*/
|
|
36
32
|
export declare function injectPreviewScripts(html: string, pageIsolateChapters: boolean): string;
|
|
37
33
|
/**
|
|
@@ -42,7 +42,7 @@ export declare function validateInputPath(inputPath: string): Promise<void>;
|
|
|
42
42
|
* For empty input (no-input mode), skip manifest loading entirely and
|
|
43
43
|
* return a default resolved config.
|
|
44
44
|
*/
|
|
45
|
-
export declare function initializeConfiguration(inputPath: string): Promise<ResolvedConfig>;
|
|
45
|
+
export declare function initializeConfiguration(inputPath: string, engine?: "paged" | "native"): Promise<ResolvedConfig>;
|
|
46
46
|
/**
|
|
47
47
|
* Restart the preview server with a new input directory.
|
|
48
48
|
*
|
|
@@ -71,9 +71,17 @@
|
|
|
71
71
|
window.addEventListener('sourceLineChanged', function (e) {
|
|
72
72
|
post({ type: 'gutterpress:event', name: 'sourceLineChanged', detail: e.detail });
|
|
73
73
|
});
|
|
74
|
+
window.addEventListener('viewportChanged', function (e) {
|
|
75
|
+
post({ type: 'gutterpress:event', name: 'viewportChanged', detail: e.detail });
|
|
76
|
+
});
|
|
74
77
|
window.addEventListener('elementActivated', function (e) {
|
|
75
78
|
post({ type: 'gutterpress:event', name: 'elementActivated', detail: e.detail });
|
|
76
79
|
});
|
|
80
|
+
// docs/inline-editing-plan.md §3.1/§3.2 (protocol v4): right-click / keyboard
|
|
81
|
+
// context-menu target request.
|
|
82
|
+
window.addEventListener('contextMenuRequested', function (e) {
|
|
83
|
+
post({ type: 'gutterpress:event', name: 'contextMenuRequested', detail: e.detail });
|
|
84
|
+
});
|
|
77
85
|
|
|
78
86
|
// Announce readiness as soon as previewAPI is defined.
|
|
79
87
|
function announceReady() {
|