gutterpress 0.11.21 → 0.11.22-alpha.2
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 +11 -0
- package/dist/api/index.d.ts +5 -1
- package/dist/api/index.js +68 -47
- package/dist/{build-0neyk5h6.js → build-84retk4k.js} +16 -10
- package/dist/{index-sth219v1.js → cli-2ppw6q9v.js} +26 -6
- package/dist/cli-3twpesca.js +103 -0
- package/dist/cli-5et23z83.js +2089 -0
- package/dist/{cli-j79451n6.js → cli-5qhjwne5.js} +5 -76
- package/dist/cli-80t93x2r.js +75 -0
- package/dist/{cli-j0drzb6f.js → cli-885pcze8.js} +885 -5481
- package/dist/{cli-b57adna7.js → cli-9pk65fqf.js} +9 -201
- package/dist/{cli-sqkccnm7.js → cli-d8xjns66.js} +1 -102
- package/dist/cli-h3phdstf.js +200 -0
- package/dist/{index-qf7y4d85.js → cli-habkc5ng.js} +12 -258
- package/dist/cli-hndkg7bn.js +196 -0
- package/dist/cli-pn3z0y9p.js +3073 -0
- package/dist/cli.js +15 -13
- package/dist/{doctor-fptq8tvn.js → doctor-fmzpg7ag.js} +7 -4
- package/dist/engine/shared/print-area.d.ts +77 -1
- package/dist/{engine-x07q927h.js → engine-5p8tn9b4.js} +4 -3
- package/dist/{engine-0b8bt05n.js → engine-9710cd7x.js} +3 -2
- package/dist/{ext-gp624t5c.js → ext-hsdnad5c.js} +21 -14
- package/dist/extension-restore-05pae3cp.js +16 -0
- package/dist/extension-restore-3r7phztr.js +20 -0
- package/dist/{gutterpress-viewer-w7njnkj7.js → gutterpress-viewer-w9jzx6sb.js} +56 -52
- package/dist/{index-t7r8g75c.js → index-2d8j0enc.js} +4 -2
- package/dist/{cli-sth219v1.js → index-2ppw6q9v.js} +26 -6
- package/dist/{index-mr7zs8mv.js → index-3wcr69ba.js} +5579 -10055
- package/dist/{cli-5qr3z0qa.js → index-93pqkvty.js} +63 -207
- package/dist/{index-mr72vt8n.js → index-apc8w9w8.js} +55 -267
- package/dist/index-ew7cyk7c.js +2208 -0
- package/dist/index-jsz0s3dy.js +213 -0
- package/dist/index-kx03e4m4.js +3244 -0
- package/dist/index-r7jcsk6h.js +200 -0
- package/dist/index.js +71 -50
- package/dist/lib/extension-manifest.d.ts +22 -1
- package/dist/lib/markdown/assemble.d.ts +3 -2
- package/dist/lib/markdown/plugins.d.ts +20 -0
- package/dist/lib/markdown/two-versions.d.ts +32 -0
- package/dist/lib/page-size.d.ts +3 -4
- package/dist/lib/pdf-inspect.d.ts +12 -0
- package/dist/lib/project-scaffold.d.ts +3 -3
- package/dist/lib/publish/plugin-provider.d.ts +16 -0
- package/dist/lib/publish/run-publish.d.ts +13 -5
- package/dist/lib/publish/types.d.ts +34 -2
- package/dist/lib/text-diff.d.ts +43 -0
- package/dist/lib/two-versions-markers.d.ts +26 -0
- package/dist/lib/version-changes.d.ts +87 -0
- package/dist/{manifest.schema-n292sb77.json → manifest.schema-nvawq0xv.json} +2 -2
- package/dist/{new-dre6aw05.js → new-fqtt022k.js} +23 -16
- package/dist/{pdf-inspect-zdmy7qca.js → pdf-inspect-wnw4za71.js} +1 -1
- package/dist/plugins-gfvsgnxb.js +24 -0
- package/dist/plugins-nfxr831f.js +26 -0
- package/dist/{preflight-1k1zkg1p.js → preflight-gr9mscjw.js} +18 -11
- package/dist/{preview-dtrksvxf.js → preview-52w9pdps.js} +19 -13
- package/dist/{publish-g1ytnrmr.js → publish-esmcyhpb.js} +40 -23
- package/dist/render.js +706 -0
- package/dist/schema/manifest.types.d.ts +8 -3
- package/dist/{source-provider-pzmz0br9.js → source-provider-2r74a7wp.js} +2 -1
- package/dist/{source-provider-qbthnmqw.js → source-provider-qbfknhyy.js} +2 -1
- package/dist/{validate-yrrq8639.js → validate-vt1d7h6k.js} +16 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -274,6 +274,17 @@ gutterpress publish --provider gdrive --connect
|
|
|
274
274
|
gutterpress publish --provider gdrive ./my-book
|
|
275
275
|
```
|
|
276
276
|
|
|
277
|
+
**Publishing plugins (experimental — may change or be removed).** `--provider`
|
|
278
|
+
also takes the package name of a publishing plugin listed in the book's
|
|
279
|
+
`extensions:`. `--list` shows those plugins after the built-ins with the status
|
|
280
|
+
`experimental` (`experimental: true` in `--json`). A plugin whose downloaded
|
|
281
|
+
copy is missing is downloaded first, as for `build` (a failed download exits 3
|
|
282
|
+
with the reason); publishing to a built-in never loads plugins. See
|
|
283
|
+
[User Guide: Chapter 8 — Publishing](https://github.com/dimm-city/gutterpress/blob/main/examples/gutterpress-user-guide/08-publishing.md)
|
|
284
|
+
for authors and
|
|
285
|
+
[Chapter 5 — Plugins](https://github.com/dimm-city/gutterpress/blob/main/examples/gutterpress-user-guide/05-plugins.md)
|
|
286
|
+
for the plugin contract.
|
|
287
|
+
|
|
277
288
|
### `gutterpress validate`
|
|
278
289
|
|
|
279
290
|
Run the validation pipeline (pre-build source checks and/or post-build PDF checks). Tools that aren't installed are skipped with a warning — they don't fail the run. See [User Guide: Chapter 6 — Validation](https://github.com/dimm-city/gutterpress/blob/main/examples/gutterpress-user-guide/06-validation.md) for the full check list and [User Guide: Chapter 7 — System Setup](https://github.com/dimm-city/gutterpress/blob/main/examples/gutterpress-user-guide/07-system-setup.md) for which external tools each check needs.
|
package/dist/api/index.d.ts
CHANGED
|
@@ -55,6 +55,8 @@ export { readPageSetup, setPageSetup } from "../lib/page-size.ts";
|
|
|
55
55
|
export type { PageSetup, PageSizeChoice, PageSizePoints } from "../lib/page-size.ts";
|
|
56
56
|
export { providerFor, restoreVersionWithBackup, isNoChangesError, countUnversionedChanges, whenGitIdle, AUTO_SNAPSHOT_MESSAGE, RESTORE_BACKUP_MESSAGE, HISTORY_PAGE_LIMIT, listLocalBranches, switchBranch, SWITCH_BRANCH_SNAPSHOT_MESSAGE, } from "../lib/source-provider.ts";
|
|
57
57
|
export type { ListHistoryOptions, HistoryPage, UnversionedChanges, LocalBranches, SwitchBranchOptions, SwitchBranchResult, } from "../lib/source-provider.ts";
|
|
58
|
+
export { describeVersions, listOnlineVersions, compareVersionFile, exportVersionTree, VERSION_CHANGES_SHOWN, } from "../lib/version-changes.ts";
|
|
59
|
+
export type { VersionEntry, VersionFileChange, CompareRow } from "../lib/version-changes.ts";
|
|
58
60
|
export { autoSnapshotDelayMs, autoSyncDelayMs, isGitInternalPath, AUTO_SNAPSHOT_DEFAULT_MINUTES, AUTO_SYNC_MIN_MINUTES, AUTO_SYNC_MAX_MINUTES, AUTO_SYNC_DEFAULT_MINUTES, AUTO_SYNC_PUSH_INTERVAL_MINUTES, } from "../lib/host-policy.ts";
|
|
59
61
|
export type { AutoSnapshotPolicy, AutoSyncPolicy, } from "../lib/host-policy.ts";
|
|
60
62
|
export { FileTokenStore, defaultConfigDir, extractUrlCredential, } from "../lib/remote-auth/token-store.ts";
|
|
@@ -85,6 +87,8 @@ export type { SnapshotEntry, InitVersionHistoryOptions, SnapshotOptions, Restore
|
|
|
85
87
|
export { runPublish, resolvePublishRequest, resolvePublishFormat, } from "../lib/publish/run-publish.ts";
|
|
86
88
|
export type { RunPublishOptions, RunPublishResult, } from "../lib/publish/run-publish.ts";
|
|
87
89
|
export { listPublishProviders, publishProviderFor, } from "../lib/publish/registry.ts";
|
|
90
|
+
export { listBookPublishProviders, resolvePublishProvider, } from "../lib/publish/plugin-provider.ts";
|
|
91
|
+
export type { PublishBook } from "../lib/publish/plugin-provider.ts";
|
|
88
92
|
export { connectPublishProvider, disconnectPublishCredential } from "../lib/publish/connect.ts";
|
|
89
93
|
export type { ConnectPublishProviderOptions, DisconnectPublishCredentialOptions, } from "../lib/publish/connect.ts";
|
|
90
94
|
export { publishConnectionStatus, publishCredentialKey, listPublishAccounts, } from "../lib/publish/types.ts";
|
|
@@ -92,6 +96,6 @@ export type { PublishSavedAccount } from "../lib/publish/types.ts";
|
|
|
92
96
|
export { PublishSelectionsStore } from "../lib/publish/selections.ts";
|
|
93
97
|
export type { PublishAccountSelection } from "../lib/publish/selections.ts";
|
|
94
98
|
export { readPublishSettings, setPublishProviderConfig, } from "../lib/publish/manifest-publish.ts";
|
|
95
|
-
export type { PublishProvider, PublishProviderId, PublishProviderInfo, PublishProviderKind, PublishConfigField, PublishArtifact, PublishArtifactFormat, PublishAuthStatus, PublishDeps, PublishListingMetadata, PublishOutcome, PublishProduct, PublishProject, PublishRequest, PreflightIssue, CommandRunner, CommandResult, } from "../lib/publish/types.ts";
|
|
99
|
+
export type { PublishProvider, PublishProviderId, PublishProviderInfo, PublishProviderKind, PublishConfigField, PublishArtifact, PublishArtifactFormat, PublishAuthStatus, PublishDeps, PublishListingMetadata, PublishOutcome, PublishProduct, PublishProject, PublishRequest, PreflightIssue, CommandRunner, CommandResult, PublishPluginContext, PublishPluginFunction, PublishPluginResult, } from "../lib/publish/types.ts";
|
|
96
100
|
export { resolveLogger } from "../lib/remote-auth/operation-log.ts";
|
|
97
101
|
export type { OperationLogger, LogData } from "../lib/remote-auth/operation-log.ts";
|
package/dist/api/index.js
CHANGED
|
@@ -4,69 +4,50 @@ import {
|
|
|
4
4
|
AUTO_SYNC_MAX_MINUTES,
|
|
5
5
|
AUTO_SYNC_MIN_MINUTES,
|
|
6
6
|
AUTO_SYNC_PUSH_INTERVAL_MINUTES,
|
|
7
|
-
BUILT_IN_STYLE_SET_IDS,
|
|
8
7
|
BUILT_IN_TEMPLATE_IDS,
|
|
9
|
-
BUNDLED_EXTENSIONS,
|
|
10
|
-
DEFAULT_NPM_REGISTRY,
|
|
11
|
-
EXTENSIONS_DIR,
|
|
12
8
|
EXTENSION_KINDS,
|
|
13
|
-
EXTENSION_MANIFEST_FILENAME,
|
|
14
9
|
FileTokenStore,
|
|
15
10
|
GDRIVE_HOST,
|
|
16
11
|
GITHUB_HOST,
|
|
17
12
|
GOOGLE_NOT_CONFIGURED_MESSAGE,
|
|
18
13
|
GitHubAuthProvider,
|
|
19
14
|
GoogleAuthProvider,
|
|
20
|
-
MANIFEST_FILENAMES,
|
|
21
15
|
MAX_SEARCH_BYTES,
|
|
22
|
-
PRESETS,
|
|
23
|
-
PRESET_IDS,
|
|
24
16
|
PublishSelectionsStore,
|
|
25
|
-
RECOMMENDED_EXTENSIONS,
|
|
26
17
|
REPAIR_SNAPSHOT_MESSAGE,
|
|
27
18
|
RESERVED_PREFIX,
|
|
28
19
|
SEARCH_KEYWORDS,
|
|
29
20
|
SNIPPETS_DIR,
|
|
30
21
|
SYNC_SNAPSHOT_MESSAGE,
|
|
31
|
-
|
|
32
|
-
TARGET_IDS,
|
|
33
|
-
addBuiltInStyleSet,
|
|
34
|
-
addExtension,
|
|
22
|
+
VERSION_CHANGES_SHOWN,
|
|
35
23
|
adoptFolder,
|
|
36
|
-
assertExtensionContained,
|
|
37
24
|
autoSnapshotDelayMs,
|
|
38
25
|
autoSyncDelayMs,
|
|
39
|
-
checkExtensionUpdates,
|
|
40
26
|
checkRemoteUpdates,
|
|
41
27
|
cloneRepository,
|
|
28
|
+
compareVersionFile,
|
|
42
29
|
connectGenericHost,
|
|
43
30
|
connectGoogleDrive,
|
|
44
31
|
connectPublishProvider,
|
|
45
32
|
defaultConfigDir,
|
|
46
33
|
deleteSnippet,
|
|
47
|
-
|
|
34
|
+
describeVersions,
|
|
48
35
|
diagnoseProjectRemote,
|
|
49
36
|
disconnectPublishCredential,
|
|
50
|
-
ensureProjectGitignore,
|
|
51
37
|
escapeYamlScalar,
|
|
52
|
-
|
|
53
|
-
extensionEntry,
|
|
54
|
-
extensionStyleList,
|
|
38
|
+
exportVersionTree,
|
|
55
39
|
extractUrlCredential,
|
|
56
40
|
extractVariables,
|
|
57
41
|
forgeKindForHost,
|
|
58
42
|
getSystemDiagnostics,
|
|
59
|
-
hasProjectManifest,
|
|
60
43
|
importExtensionFromFile,
|
|
61
44
|
importExtensionFromUrl,
|
|
62
45
|
importTemplateFromFolder,
|
|
63
|
-
isBundledExtension,
|
|
64
46
|
isGitInternalPath,
|
|
65
|
-
isPathSpecifier,
|
|
66
47
|
isSshRemoteUrl,
|
|
67
48
|
isValidRepositoryName,
|
|
68
49
|
knownForgeTokenUrl,
|
|
69
|
-
|
|
50
|
+
listBookPublishProviders,
|
|
70
51
|
listBuiltInTemplates,
|
|
71
52
|
listCustomTemplates,
|
|
72
53
|
listGitHubBranches,
|
|
@@ -74,48 +55,34 @@ import {
|
|
|
74
55
|
listLocationVariants,
|
|
75
56
|
listMarkerComponents,
|
|
76
57
|
listMergedSnippets,
|
|
77
|
-
|
|
78
|
-
listProjectExtensions,
|
|
58
|
+
listOnlineVersions,
|
|
79
59
|
listProjectStyles,
|
|
80
60
|
listPublishAccounts,
|
|
81
61
|
listPublishProviders,
|
|
82
62
|
listRepoBooks,
|
|
83
63
|
listSnippets,
|
|
84
|
-
loadManifestWithPath,
|
|
85
|
-
npmRegistryUrl,
|
|
86
|
-
parseExtensionSpecifier,
|
|
87
64
|
parseRemoteOrigin,
|
|
88
|
-
pathEscapesFolder,
|
|
89
65
|
pkceChallengeFromVerifier,
|
|
90
66
|
publishConnectionStatus,
|
|
91
67
|
publishCredentialKey,
|
|
92
68
|
publishProviderFor,
|
|
93
|
-
publishTargetFor,
|
|
94
|
-
readExtensionCss,
|
|
95
|
-
readExtensionMeta,
|
|
96
69
|
readManifestFields,
|
|
97
70
|
readPageSetup,
|
|
98
71
|
readPublishSettings,
|
|
99
72
|
refreshRemoteCopies,
|
|
100
|
-
removeExtension,
|
|
101
|
-
reorderExtensions,
|
|
102
73
|
repairOnlineBackup,
|
|
103
74
|
requireGoogleClientCredentials,
|
|
104
75
|
resolveActiveStyles,
|
|
105
|
-
resolveConfig,
|
|
106
|
-
resolveExtension,
|
|
107
76
|
resolveExtensionPrefix,
|
|
108
77
|
resolveGitHubClientId,
|
|
109
78
|
resolveGoogleClientId,
|
|
110
79
|
resolveGoogleClientSecret,
|
|
111
80
|
resolvePublishFormat,
|
|
81
|
+
resolvePublishProvider,
|
|
112
82
|
resolvePublishRequest,
|
|
113
|
-
restoreFailureMessage,
|
|
114
|
-
restorePinnedExtensions,
|
|
115
83
|
revokeGoogleCredential,
|
|
116
84
|
runBuild,
|
|
117
85
|
runPublish,
|
|
118
|
-
sameExtension,
|
|
119
86
|
sanitizeCloneFolderName,
|
|
120
87
|
saveProjectAsTemplate,
|
|
121
88
|
saveSnippet,
|
|
@@ -124,7 +91,6 @@ import {
|
|
|
124
91
|
scorchedEarth,
|
|
125
92
|
searchNpmExtensions,
|
|
126
93
|
setActiveStyles,
|
|
127
|
-
setExtensionEnabled,
|
|
128
94
|
setManifestFields,
|
|
129
95
|
setPageSetup,
|
|
130
96
|
setPublishProviderConfig,
|
|
@@ -134,15 +100,61 @@ import {
|
|
|
134
100
|
startPreviewServer,
|
|
135
101
|
substituteVariables,
|
|
136
102
|
syncProject,
|
|
137
|
-
testRemoteAccess
|
|
103
|
+
testRemoteAccess
|
|
104
|
+
} from "../index-3wcr69ba.js";
|
|
105
|
+
import {
|
|
106
|
+
BUILT_IN_STYLE_SET_IDS,
|
|
107
|
+
BUNDLED_EXTENSIONS,
|
|
108
|
+
DEFAULT_NPM_REGISTRY,
|
|
109
|
+
EXTENSIONS_DIR,
|
|
110
|
+
MANIFEST_FILENAMES,
|
|
111
|
+
PRESETS,
|
|
112
|
+
PRESET_IDS,
|
|
113
|
+
RECOMMENDED_EXTENSIONS,
|
|
114
|
+
TARGETS,
|
|
115
|
+
TARGET_IDS,
|
|
116
|
+
addBuiltInStyleSet,
|
|
117
|
+
addExtension,
|
|
118
|
+
checkExtensionUpdates,
|
|
119
|
+
describeExtension,
|
|
120
|
+
ensureProjectGitignore,
|
|
121
|
+
hasProjectManifest,
|
|
122
|
+
isBundledExtension,
|
|
123
|
+
isPathSpecifier,
|
|
124
|
+
listBuiltInStyleSets,
|
|
125
|
+
listNpmVersions,
|
|
126
|
+
listProjectExtensions,
|
|
127
|
+
loadManifestWithPath,
|
|
128
|
+
npmRegistryUrl,
|
|
129
|
+
parseExtensionSpecifier,
|
|
130
|
+
publishTargetFor,
|
|
131
|
+
readExtensionCss,
|
|
132
|
+
removeExtension,
|
|
133
|
+
reorderExtensions,
|
|
134
|
+
resolveConfig,
|
|
135
|
+
restoreFailureMessage,
|
|
136
|
+
restorePinnedExtensions,
|
|
137
|
+
sameExtension,
|
|
138
|
+
setExtensionEnabled,
|
|
138
139
|
updateExtensions,
|
|
139
140
|
validateProjectExtensions
|
|
140
|
-
} from "../index-
|
|
141
|
+
} from "../index-ew7cyk7c.js";
|
|
142
|
+
import {
|
|
143
|
+
EXTENSION_MANIFEST_FILENAME,
|
|
144
|
+
assertExtensionContained,
|
|
145
|
+
extensionCarries,
|
|
146
|
+
extensionEntry,
|
|
147
|
+
extensionStyleList,
|
|
148
|
+
pathEscapesFolder,
|
|
149
|
+
readExtensionMeta,
|
|
150
|
+
resolveExtension
|
|
151
|
+
} from "../index-kx03e4m4.js";
|
|
141
152
|
import"../index-ht1bcqdd.js";
|
|
153
|
+
import"../index-apc8w9w8.js";
|
|
142
154
|
import {
|
|
143
155
|
BuildError
|
|
144
|
-
} from "../index-
|
|
145
|
-
import"../index-
|
|
156
|
+
} from "../index-jsz0s3dy.js";
|
|
157
|
+
import"../index-2ppw6q9v.js";
|
|
146
158
|
import {
|
|
147
159
|
DEFAULT_PRINT_OPTS,
|
|
148
160
|
assertMilestone,
|
|
@@ -151,7 +163,6 @@ import {
|
|
|
151
163
|
import {
|
|
152
164
|
AUTO_SNAPSHOT_MESSAGE,
|
|
153
165
|
HISTORY_PAGE_LIMIT,
|
|
154
|
-
PLUGINS_DIR,
|
|
155
166
|
RESTORE_BACKUP_MESSAGE,
|
|
156
167
|
SWITCH_BRANCH_SNAPSHOT_MESSAGE,
|
|
157
168
|
countUnversionedChanges,
|
|
@@ -162,7 +173,10 @@ import {
|
|
|
162
173
|
restoreVersionWithBackup,
|
|
163
174
|
switchBranch,
|
|
164
175
|
whenGitIdle
|
|
165
|
-
} from "../index-
|
|
176
|
+
} from "../index-93pqkvty.js";
|
|
177
|
+
import {
|
|
178
|
+
PLUGINS_DIR
|
|
179
|
+
} from "../index-r7jcsk6h.js";
|
|
166
180
|
import {
|
|
167
181
|
capabilitiesFor,
|
|
168
182
|
detectProjectSource,
|
|
@@ -203,6 +217,7 @@ export {
|
|
|
203
217
|
restorePinnedExtensions,
|
|
204
218
|
restoreFailureMessage,
|
|
205
219
|
resolvePublishRequest,
|
|
220
|
+
resolvePublishProvider,
|
|
206
221
|
resolvePublishFormat,
|
|
207
222
|
resolveLogger,
|
|
208
223
|
resolveGoogleClientSecret,
|
|
@@ -242,6 +257,7 @@ export {
|
|
|
242
257
|
listPublishAccounts,
|
|
243
258
|
listProjectStyles,
|
|
244
259
|
listProjectExtensions,
|
|
260
|
+
listOnlineVersions,
|
|
245
261
|
listNpmVersions,
|
|
246
262
|
listMergedSnippets,
|
|
247
263
|
listMarkerComponents,
|
|
@@ -252,6 +268,7 @@ export {
|
|
|
252
268
|
listCustomTemplates,
|
|
253
269
|
listBuiltInTemplates,
|
|
254
270
|
listBuiltInStyleSets,
|
|
271
|
+
listBookPublishProviders,
|
|
255
272
|
knownForgeTokenUrl,
|
|
256
273
|
isValidRepositoryName,
|
|
257
274
|
isSshRemoteUrl,
|
|
@@ -271,11 +288,13 @@ export {
|
|
|
271
288
|
extensionStyleList,
|
|
272
289
|
extensionEntry,
|
|
273
290
|
extensionCarries,
|
|
291
|
+
exportVersionTree,
|
|
274
292
|
escapeYamlScalar,
|
|
275
293
|
ensureProjectGitignore,
|
|
276
294
|
disconnectPublishCredential,
|
|
277
295
|
diagnoseProjectRemote,
|
|
278
296
|
detectProjectSource,
|
|
297
|
+
describeVersions,
|
|
279
298
|
describeExtension,
|
|
280
299
|
deleteSnippet,
|
|
281
300
|
defaultConfigDir,
|
|
@@ -283,6 +302,7 @@ export {
|
|
|
283
302
|
connectPublishProvider,
|
|
284
303
|
connectGoogleDrive,
|
|
285
304
|
connectGenericHost,
|
|
305
|
+
compareVersionFile,
|
|
286
306
|
cloneRepository,
|
|
287
307
|
checkRemoteUpdates,
|
|
288
308
|
checkExtensionUpdates,
|
|
@@ -294,6 +314,7 @@ export {
|
|
|
294
314
|
adoptFolder,
|
|
295
315
|
addExtension,
|
|
296
316
|
addBuiltInStyleSet,
|
|
317
|
+
VERSION_CHANGES_SHOWN,
|
|
297
318
|
TARGET_IDS,
|
|
298
319
|
TARGETS,
|
|
299
320
|
SYNC_SNAPSHOT_MESSAGE,
|
|
@@ -1,27 +1,33 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runBuild,
|
|
3
3
|
splitOutPath
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-885pcze8.js";
|
|
5
|
+
import"./cli-5qhjwne5.js";
|
|
6
|
+
import"./cli-ht1bcqdd.js";
|
|
7
|
+
import"./cli-9pk65fqf.js";
|
|
8
|
+
import"./cli-2ppw6q9v.js";
|
|
9
|
+
import"./cli-eyyggect.js";
|
|
10
|
+
import"./cli-asap4t1z.js";
|
|
11
|
+
import"./cli-habkc5ng.js";
|
|
12
|
+
import"./cli-v5mp7a6q.js";
|
|
13
|
+
import"./cli-5et23z83.js";
|
|
14
|
+
import"./cli-pn3z0y9p.js";
|
|
5
15
|
import {
|
|
6
16
|
log
|
|
7
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-80t93x2r.js";
|
|
8
18
|
import {
|
|
9
19
|
UsageError,
|
|
10
20
|
parseFormat,
|
|
11
21
|
parsePdfxFlavor,
|
|
12
22
|
rejectExtraPositionals,
|
|
13
23
|
rejectUnknownFlags
|
|
14
|
-
} from "./cli-
|
|
15
|
-
import"./cli-
|
|
16
|
-
import"./cli-
|
|
24
|
+
} from "./cli-d8xjns66.js";
|
|
25
|
+
import"./cli-3twpesca.js";
|
|
26
|
+
import"./cli-hndkg7bn.js";
|
|
17
27
|
import {
|
|
18
28
|
BuildError
|
|
19
29
|
} from "./cli-46ycxe6r.js";
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-eyyggect.js";
|
|
22
|
-
import"./cli-asap4t1z.js";
|
|
23
|
-
import"./cli-5qr3z0qa.js";
|
|
24
|
-
import"./cli-v5mp7a6q.js";
|
|
30
|
+
import"./cli-h3phdstf.js";
|
|
25
31
|
import"./cli-37x76zdn.js";
|
|
26
32
|
|
|
27
33
|
// src/commands/build.ts
|
|
@@ -168,6 +168,14 @@ function getTextPass(doc) {
|
|
|
168
168
|
return p;
|
|
169
169
|
}
|
|
170
170
|
var opCache = new WeakMap;
|
|
171
|
+
var opSet = (names) => new Set(names.map((name) => OPS[name]).filter((op) => op !== undefined));
|
|
172
|
+
var IMAGE_OPS = opSet([
|
|
173
|
+
"paintImageXObject",
|
|
174
|
+
"paintImageXObjectRepeat",
|
|
175
|
+
"paintInlineImageXObject",
|
|
176
|
+
"paintImageMaskXObject",
|
|
177
|
+
"paintJpegXObject"
|
|
178
|
+
]);
|
|
171
179
|
function multiply(m1, m2) {
|
|
172
180
|
return [
|
|
173
181
|
m1[0] * m2[0] + m1[2] * m2[1],
|
|
@@ -219,14 +227,27 @@ function getOpPass(doc) {
|
|
|
219
227
|
ctm = stack.pop() ?? ctm;
|
|
220
228
|
} else if (fn === OPS.transform) {
|
|
221
229
|
ctm = multiply(ctm, args);
|
|
222
|
-
} else if (fn === OPS.
|
|
230
|
+
} else if (fn === OPS.paintFormXObjectBegin) {
|
|
231
|
+
stack.push(ctm.slice());
|
|
232
|
+
const matrix = args[0];
|
|
233
|
+
if (Array.isArray(matrix))
|
|
234
|
+
ctm = multiply(ctm, matrix);
|
|
235
|
+
} else if (fn === OPS.paintFormXObjectEnd) {
|
|
236
|
+
ctm = stack.pop() ?? ctm;
|
|
237
|
+
} else if (IMAGE_OPS.has(fn)) {
|
|
223
238
|
const name = typeof args[0] === "string" ? args[0] : "(inline)";
|
|
239
|
+
const [a, b, c, d, e, f] = ctm;
|
|
240
|
+
const xs = [e, a + e, c + e, a + c + e];
|
|
241
|
+
const ys = [f, b + f, d + f, b + d + f];
|
|
242
|
+
const x0 = Math.min(...xs);
|
|
243
|
+
const y0 = Math.min(...ys);
|
|
224
244
|
pageImages.push({
|
|
225
245
|
name,
|
|
226
|
-
placedW: Math.hypot(
|
|
227
|
-
placedH: Math.hypot(
|
|
228
|
-
x:
|
|
229
|
-
y:
|
|
246
|
+
placedW: Math.hypot(a, b),
|
|
247
|
+
placedH: Math.hypot(c, d),
|
|
248
|
+
x: e,
|
|
249
|
+
y: f,
|
|
250
|
+
bounds: { x: x0, y: y0, w: Math.max(...xs) - x0, h: Math.max(...ys) - y0 },
|
|
230
251
|
page: i
|
|
231
252
|
});
|
|
232
253
|
} else if (fn === OPS.setFont) {
|
|
@@ -254,7 +275,6 @@ function getOpPass(doc) {
|
|
|
254
275
|
}
|
|
255
276
|
return p;
|
|
256
277
|
}
|
|
257
|
-
var opSet = (names) => new Set(names.map((name) => OPS[name]).filter((op) => op !== undefined));
|
|
258
278
|
var FILL_COLOR_OPS = opSet(["setFillGray", "setFillRGBColor", "setFillCMYKColor", "setFillColor"]);
|
|
259
279
|
var STROKE_COLOR_OPS = opSet(["setStrokeGray", "setStrokeRGBColor", "setStrokeCMYKColor", "setStrokeColor"]);
|
|
260
280
|
var SHOW_TEXT_OPS = opSet(["showText", "showSpacedText", "nextLineShowText", "nextLineSetSpacingShowText"]);
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// package.json
|
|
2
|
+
var package_default = {
|
|
3
|
+
name: "gutterpress",
|
|
4
|
+
version: "0.11.22-alpha.2",
|
|
5
|
+
description: "Markdown-to-PDF converter for professional print layout using a native Chromium print engine and Ghostscript.",
|
|
6
|
+
author: "itlackey",
|
|
7
|
+
license: "MPL-2.0",
|
|
8
|
+
keywords: [
|
|
9
|
+
"markdown",
|
|
10
|
+
"pdf",
|
|
11
|
+
"print",
|
|
12
|
+
"ghostscript",
|
|
13
|
+
"book",
|
|
14
|
+
"publishing",
|
|
15
|
+
"zine"
|
|
16
|
+
],
|
|
17
|
+
repository: {
|
|
18
|
+
type: "git",
|
|
19
|
+
url: "https://github.com/dimm-city/gutterpress.git"
|
|
20
|
+
},
|
|
21
|
+
homepage: "https://github.com/dimm-city/gutterpress#readme",
|
|
22
|
+
bugs: {
|
|
23
|
+
url: "https://github.com/dimm-city/gutterpress/issues"
|
|
24
|
+
},
|
|
25
|
+
type: "module",
|
|
26
|
+
main: "./dist/index.js",
|
|
27
|
+
types: "./dist/index.d.ts",
|
|
28
|
+
bin: {
|
|
29
|
+
gutterpress: "./dist/cli.js"
|
|
30
|
+
},
|
|
31
|
+
exports: {
|
|
32
|
+
".": {
|
|
33
|
+
types: "./dist/index.d.ts",
|
|
34
|
+
default: "./dist/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./api": {
|
|
37
|
+
types: "./dist/api/index.d.ts",
|
|
38
|
+
default: "./dist/api/index.js"
|
|
39
|
+
},
|
|
40
|
+
"./render": {
|
|
41
|
+
types: "./dist/render.d.ts",
|
|
42
|
+
default: "./dist/render.js"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
files: [
|
|
46
|
+
"dist/",
|
|
47
|
+
"README.md",
|
|
48
|
+
"LICENSE"
|
|
49
|
+
],
|
|
50
|
+
scripts: {
|
|
51
|
+
"build:library": "bun scripts/build-engine-bundles.mjs && rimraf dist && bun build src/index.ts src/api/index.ts --target=node --packages=external --splitting --outdir=dist && bun build src/render.ts --target=node --packages=external --outdir=dist && node scripts/check-render-pure.mjs && tsc -p tsconfig.build.json",
|
|
52
|
+
build: "bun run build:library && bun build src/cli.ts --target=node --packages=external --splitting --outdir=dist",
|
|
53
|
+
prepublishOnly: "bun run build",
|
|
54
|
+
test: "bun test",
|
|
55
|
+
typecheck: "tsc --noEmit",
|
|
56
|
+
"typecheck:engine-browser": "tsc --noEmit -p src/engine/browser.tsconfig.json",
|
|
57
|
+
"parity:gate": "bun scripts/native-parity-gate.ts"
|
|
58
|
+
},
|
|
59
|
+
engines: {
|
|
60
|
+
bun: ">=1.0.0",
|
|
61
|
+
node: ">=22.0.0"
|
|
62
|
+
},
|
|
63
|
+
dependencies: {
|
|
64
|
+
chokidar: "^5.0.0",
|
|
65
|
+
citty: "^0.2.0",
|
|
66
|
+
diff3: "0.0.3",
|
|
67
|
+
fflate: "0.8.3",
|
|
68
|
+
glob: "^13.0.0",
|
|
69
|
+
htmlhint: "^1.9.2",
|
|
70
|
+
ignore: "^5.3.2",
|
|
71
|
+
"isomorphic-git": "^1.38.4",
|
|
72
|
+
"markdown-it": "^14.3.2",
|
|
73
|
+
"markdown-it-abbr": "^2.0.0",
|
|
74
|
+
"markdown-it-attrs": "^4.3.0",
|
|
75
|
+
"markdown-it-deflist": "^3.0.1",
|
|
76
|
+
"markdown-it-footnote": "^4.0.0",
|
|
77
|
+
"markdown-it-mark": "^4.0.0",
|
|
78
|
+
"markdown-it-source-map": "^0.1.1",
|
|
79
|
+
"markdown-it-sub": "^2.0.0",
|
|
80
|
+
"markdown-it-sup": "^2.0.0",
|
|
81
|
+
markdownlint: "^0.40.0",
|
|
82
|
+
"pdf-lib": "^1.17.1",
|
|
83
|
+
postcss: "^8.5.18",
|
|
84
|
+
"resolve.exports": "2.0.3",
|
|
85
|
+
semver: "7.8.0",
|
|
86
|
+
tar: "7.5.22",
|
|
87
|
+
unpdf: "^1.6.2",
|
|
88
|
+
ws: "^8.21.0",
|
|
89
|
+
yaml: "^2.8.2"
|
|
90
|
+
},
|
|
91
|
+
devDependencies: {
|
|
92
|
+
"@types/bun": "1.3.14",
|
|
93
|
+
"@types/markdown-it": "^14.1.2",
|
|
94
|
+
"@types/node": "^22.0.0",
|
|
95
|
+
"@types/semver": "^7.7.1",
|
|
96
|
+
"@types/ws": "^8.5.13",
|
|
97
|
+
playwright: "^1.60.0",
|
|
98
|
+
rimraf: "^6.0.0",
|
|
99
|
+
typescript: "^5"
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export { package_default };
|