gutterpress 0.11.23-alpha.4 → 0.11.23-alpha.5

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.
Files changed (38) hide show
  1. package/dist/api/index.d.ts +1 -1
  2. package/dist/api/index.js +6 -4
  3. package/dist/{build-c48eer6f.js → build-4qv9wvrx.js} +7 -7
  4. package/dist/{cli-pspjxnc8.js → cli-2t3krcfy.js} +1 -1
  5. package/dist/{cli-54xt7pjg.js → cli-58fsk6d7.js} +2 -2
  6. package/dist/{cli-rqh295j9.js → cli-de8ydmm7.js} +1 -1
  7. package/dist/{cli-d9mm3vvh.js → cli-nk0efg2x.js} +1 -1
  8. package/dist/{cli-93mkaw6v.js → cli-pth362d8.js} +51 -21
  9. package/dist/{cli-y6d1arem.js → cli-w97xcpag.js} +2 -2
  10. package/dist/{cli-gnpea9dx.js → cli-yxfznmsq.js} +1 -1
  11. package/dist/cli.js +12 -12
  12. package/dist/{doctor-ptb346k8.js → doctor-5nh3t346.js} +3 -3
  13. package/dist/{engine-4rzdx6af.js → engine-4rabsgwq.js} +1 -1
  14. package/dist/{engine-6txhxmmv.js → engine-wm4fggac.js} +2 -2
  15. package/dist/{ext-gy8szg3x.js → ext-nhcep6h6.js} +7 -7
  16. package/dist/{extension-restore-dymzcasz.js → extension-restore-55kp0ksq.js} +2 -2
  17. package/dist/{extension-restore-m8tj43e7.js → extension-restore-x3mtn844.js} +4 -4
  18. package/dist/{index-5kh4c78h.js → index-2vxzxyyj.js} +2 -2
  19. package/dist/{index-8ywkd2sv.js → index-9ye22m7r.js} +1 -1
  20. package/dist/{index-ea94zbq4.js → index-agrkfbkv.js} +91 -22
  21. package/dist/{index-kaks3mm2.js → index-t3jkavdz.js} +1 -1
  22. package/dist/{index-yc3xj266.js → index-wm4x7xbf.js} +1 -1
  23. package/dist/index.js +7 -5
  24. package/dist/lib/publish/connect.d.ts +8 -1
  25. package/dist/lib/publish/manifest-publish.d.ts +26 -2
  26. package/dist/lib/publish/selections.d.ts +12 -1
  27. package/dist/lib/publish/types.d.ts +15 -5
  28. package/dist/{manifest.schema-w86c1xw1.json → manifest.schema-93sd7zje.json} +13 -6
  29. package/dist/{new-t2t28ccb.js → new-5a4w2vkh.js} +7 -7
  30. package/dist/{plugins-sqa4msdk.js → plugins-cfzf26b8.js} +3 -3
  31. package/dist/{plugins-fec8t2bh.js → plugins-mm8270tn.js} +1 -1
  32. package/dist/{preflight-srq8fktp.js → preflight-jma71n0j.js} +7 -7
  33. package/dist/{preview-interface-nnmrxyqm.js → preview-interface-0xdh0r5b.js} +3 -66
  34. package/dist/{preview-zsp9hstd.js → preview-kmx4h7gv.js} +7 -7
  35. package/dist/{publish-hhy31gr9.js → publish-62843020.js} +7 -7
  36. package/dist/schema/manifest.types.d.ts +18 -3
  37. package/dist/{validate-r9jdz85h.js → validate-vvmrd85g.js} +7 -7
  38. package/package.json +1 -1
@@ -82,18 +82,16 @@
82
82
  return (bestArea > 0 ? best : nearest) + 1;
83
83
  }
84
84
 
85
- function scrollToCurrentPage(smooth) {
85
+ function scrollToCurrentPage() {
86
86
  if (pages.length === 0) return;
87
87
  var page = clampPage(currentPage);
88
88
  currentPage = page;
89
- // A smooth scroll is still moving when the plain 300ms guard expires, and
90
- // detectVisiblePage would then report the page it is passing through.
91
- ignoreScrollUntil = Date.now() + (smooth ? 700 : 300);
89
+ ignoreScrollUntil = Date.now() + 300;
92
90
  // Native's rows can be wider than the viewport (a long chapter scrolls
93
91
  // horizontally within its own row) — align the target sheet's left edge
94
92
  // to the viewport's left edge (matching detectVisiblePage's `refX`).
95
93
  pages[page - 1].scrollIntoView({
96
- behavior: smooth ? 'smooth' : 'instant',
94
+ behavior: 'instant',
97
95
  block: 'start',
98
96
  inline: 'start'
99
97
  });
@@ -1562,67 +1560,6 @@
1562
1560
  });
1563
1561
  window.addEventListener('resize', scheduleViewportChanged);
1564
1562
 
1565
- // Wheel / trackpad page flip (#301). Viewer tooling, not pagination: it
1566
- // only chooses which already-laid-out page to show. It lives here, in the
1567
- // book document, because wheel events over a cross-origin iframe never
1568
- // reach the host page.
1569
- //
1570
- // One flick turns one step — the same 1 page (single view) or 2 pages
1571
- // (spread) the arrow keys move. A gesture is every wheel event until the
1572
- // wheel has been quiet for WHEEL_GESTURE_IDLE_MS, so a fast mouse spin or a
1573
- // trackpad's inertia tail turns exactly one step.
1574
- //
1575
- // A page taller than the viewport (fit-width on a short window, high zoom)
1576
- // is READ first: while there is more of it in the wheel's direction, the
1577
- // wheel scrolls normally, and only a gesture that starts at its edge turns
1578
- // the page. The choice is made once per gesture, so the momentum of reading
1579
- // down to a page's end never turns the page by itself. Pinch / Ctrl+wheel
1580
- // (zoom), sideways swipes and in-place editing are left alone.
1581
- var WHEEL_FLIP_PX = 50;
1582
- var WHEEL_GESTURE_IDLE_MS = 220;
1583
- var wheelGesture = null; // null | 'scroll' | 'flip'
1584
- var wheelAccum = 0;
1585
- var wheelTurned = false;
1586
- var wheelIdleTimer = null;
1587
- function wheelDeltaPx(e) {
1588
- if (e.deltaMode === 1) return e.deltaY * 16; // lines
1589
- if (e.deltaMode === 2) return e.deltaY * window.innerHeight; // pages
1590
- return e.deltaY;
1591
- }
1592
- // More of the current page lies beyond the viewport edge in direction `dir`.
1593
- function pageContinuesPastViewport(dir) {
1594
- if (pages.length === 0) refreshPages();
1595
- var sheet = pages[clampPage(currentPage) - 1];
1596
- if (!sheet) return false;
1597
- var r = sheet.getBoundingClientRect();
1598
- return dir > 0 ? r.bottom > window.innerHeight + 1 : r.top < -1;
1599
- }
1600
- window.addEventListener('wheel', function (e) {
1601
- if (e.ctrlKey || edit || e.deltaY === 0 || Math.abs(e.deltaX) > Math.abs(e.deltaY)) return;
1602
- if (wheelIdleTimer) clearTimeout(wheelIdleTimer);
1603
- wheelIdleTimer = setTimeout(function () {
1604
- wheelIdleTimer = null;
1605
- wheelGesture = null;
1606
- wheelAccum = 0;
1607
- wheelTurned = false;
1608
- }, WHEEL_GESTURE_IDLE_MS);
1609
- if (wheelGesture === null) {
1610
- wheelGesture = pageContinuesPastViewport(e.deltaY > 0 ? 1 : -1) ? 'scroll' : 'flip';
1611
- }
1612
- if (wheelGesture === 'scroll') return;
1613
- e.preventDefault();
1614
- if (wheelTurned) return;
1615
- wheelAccum += wheelDeltaPx(e);
1616
- if (Math.abs(wheelAccum) < WHEEL_FLIP_PX) return;
1617
- wheelTurned = true;
1618
- refreshPages();
1619
- var target = clampPage(currentPage + (wheelAccum > 0 ? 1 : -1) * pageStep());
1620
- if (target === currentPage) return;
1621
- currentPage = target;
1622
- scrollToCurrentPage(true);
1623
- api.notifyPageChange();
1624
- }, { passive: false });
1625
-
1626
1563
  // Reset to page 1, scroll to top, and announce completion once the native
1627
1564
  // viewer's pagination finishes.
1628
1565
  function onRenderingComplete() {
@@ -3,23 +3,23 @@ import {
3
3
  runBuild,
4
4
  splitOutPath,
5
5
  startPreviewServer
6
- } from "./cli-93mkaw6v.js";
7
- import"./cli-d9mm3vvh.js";
6
+ } from "./cli-pth362d8.js";
7
+ import"./cli-nk0efg2x.js";
8
8
  import {
9
9
  previewArgs
10
10
  } from "./cli-75qkn0k5.js";
11
11
  import"./cli-ht1bcqdd.js";
12
- import"./cli-54xt7pjg.js";
12
+ import"./cli-58fsk6d7.js";
13
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-y6d1arem.js";
19
- import"./cli-rqh295j9.js";
18
+ import"./cli-w97xcpag.js";
19
+ import"./cli-de8ydmm7.js";
20
20
  import {
21
21
  log
22
- } from "./cli-pspjxnc8.js";
22
+ } from "./cli-2t3krcfy.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-gnpea9dx.js";
31
+ import"./cli-yxfznmsq.js";
32
32
  import {
33
33
  BuildError
34
34
  } from "./cli-46ycxe6r.js";
@@ -10,12 +10,12 @@ import {
10
10
  resolvePublishFormat,
11
11
  resolvePublishProvider,
12
12
  runPublish
13
- } from "./cli-93mkaw6v.js";
13
+ } from "./cli-pth362d8.js";
14
14
  import {
15
15
  FileTokenStore
16
- } from "./cli-d9mm3vvh.js";
16
+ } from "./cli-nk0efg2x.js";
17
17
  import"./cli-ht1bcqdd.js";
18
- import"./cli-54xt7pjg.js";
18
+ import"./cli-58fsk6d7.js";
19
19
  import"./cli-5crpmz42.js";
20
20
  import"./cli-eyyggect.js";
21
21
  import"./cli-asap4t1z.js";
@@ -23,17 +23,17 @@ import"./cli-a35w7wzg.js";
23
23
  import"./cli-v5mp7a6q.js";
24
24
  import {
25
25
  loadManifestWithPath
26
- } from "./cli-y6d1arem.js";
27
- import"./cli-rqh295j9.js";
26
+ } from "./cli-w97xcpag.js";
27
+ import"./cli-de8ydmm7.js";
28
28
  import {
29
29
  log
30
- } from "./cli-pspjxnc8.js";
30
+ } from "./cli-2t3krcfy.js";
31
31
  import {
32
32
  UsageError,
33
33
  rejectExtraPositionals,
34
34
  rejectUnknownFlags
35
35
  } from "./cli-d8xjns66.js";
36
- import"./cli-gnpea9dx.js";
36
+ import"./cli-yxfznmsq.js";
37
37
  import {
38
38
  BuildError,
39
39
  EXIT_CODES
@@ -46,11 +46,16 @@ export interface ExtensionConfig {
46
46
  * The name (label) of the SAVED credential this book uses for a provider, when
47
47
  * the user keeps more than one (e.g. two itch.io accounts). It is NOT a secret
48
48
  * — just a reference into the host credential store's named entries; empty/
49
- * absent uses the default (bare-host) credential. This book-level choice
50
- * overrides any project/global default.
49
+ * absent uses the default (bare-host) credential. The desktop app keeps this
50
+ * choice (and an output folder outside the book) in the person's own private
51
+ * settings, which win over the manifest's; a value written here still applies
52
+ * to a book that has none (older books, the CLI) and overrides any front-end
53
+ * default. Everything else in a section is the team's, shared.
51
54
  */
52
55
  interface PublishSettings {
53
56
  itch?: {
57
+ /** Whether the desktop's Publish view ticks this destination for the book (the team's choice, shared). */
58
+ enabled?: boolean;
54
59
  /** itch.io project as `user/game` (the butler push target). */
55
60
  target?: string;
56
61
  /** butler channel name (default: "pdf"). */
@@ -59,17 +64,25 @@ interface PublishSettings {
59
64
  credential?: string;
60
65
  };
61
66
  drivethrurpg?: {
67
+ /** Whether the desktop's Publish view ticks this destination for the book (the team's choice, shared). */
68
+ enabled?: boolean;
62
69
  /** Existing product page URL, when updating a published title. */
63
70
  productUrl?: string;
64
71
  };
65
- kdp?: Record<string, never>;
72
+ kdp?: {
73
+ enabled?: boolean;
74
+ };
66
75
  "azure-swa"?: {
76
+ /** Whether the desktop's Publish view ticks this destination for the book (the team's choice, shared). */
77
+ enabled?: boolean;
67
78
  /** Deploy environment (default: "production"). */
68
79
  env?: string;
69
80
  /** Saved-credential label to use (see PublishSettings doc). */
70
81
  credential?: string;
71
82
  };
72
83
  shopify?: {
84
+ /** Whether the desktop's Publish view ticks this destination for the book (the team's choice, shared). */
85
+ enabled?: boolean;
73
86
  /** The store domain, e.g. `my-store.myshopify.com`. */
74
87
  shop?: string;
75
88
  /** Existing product GID/id to update instead of creating a new one. */
@@ -80,6 +93,8 @@ interface PublishSettings {
80
93
  credential?: string;
81
94
  };
82
95
  gdrive?: {
96
+ /** Whether the desktop's Publish view ticks this destination for the book (the team's choice, shared). */
97
+ enabled?: boolean;
83
98
  /** Display name of the target Drive folder; created at My Drive root if
84
99
  * missing. Default when unset: "Gutterpress". */
85
100
  folder?: string;
@@ -1,25 +1,25 @@
1
1
  import {
2
2
  executeAndReport
3
- } from "./cli-93mkaw6v.js";
4
- import"./cli-d9mm3vvh.js";
3
+ } from "./cli-pth362d8.js";
4
+ import"./cli-nk0efg2x.js";
5
5
  import"./cli-ht1bcqdd.js";
6
- import"./cli-54xt7pjg.js";
6
+ import"./cli-58fsk6d7.js";
7
7
  import"./cli-5crpmz42.js";
8
8
  import"./cli-eyyggect.js";
9
9
  import"./cli-asap4t1z.js";
10
10
  import"./cli-a35w7wzg.js";
11
11
  import"./cli-v5mp7a6q.js";
12
- import"./cli-y6d1arem.js";
13
- import"./cli-rqh295j9.js";
12
+ import"./cli-w97xcpag.js";
13
+ import"./cli-de8ydmm7.js";
14
14
  import {
15
15
  log
16
- } from "./cli-pspjxnc8.js";
16
+ } from "./cli-2t3krcfy.js";
17
17
  import {
18
18
  UsageError,
19
19
  rejectExtraPositionals,
20
20
  rejectUnknownFlags
21
21
  } from "./cli-d8xjns66.js";
22
- import"./cli-gnpea9dx.js";
22
+ import"./cli-yxfznmsq.js";
23
23
  import {
24
24
  BuildError,
25
25
  EXIT_CODES
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gutterpress",
3
- "version": "0.11.23-alpha.4",
3
+ "version": "0.11.23-alpha.5",
4
4
  "description": "Markdown-to-PDF converter for professional print layout using a native Chromium print engine and Ghostscript.",
5
5
  "author": "itlackey",
6
6
  "license": "MPL-2.0",