@open-press/cli 0.8.0 → 1.0.0

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 (153) hide show
  1. package/README.md +25 -14
  2. package/dist/cli.js +44 -195
  3. package/package.json +4 -5
  4. package/template/core/AGENTS.md +18 -14
  5. package/template/core/CHANGELOG.md +12 -9
  6. package/template/core/README.md +6 -3
  7. package/template/core/engine/cli.mjs +8 -8
  8. package/template/core/engine/commands/_shared.mjs +37 -15
  9. package/template/core/engine/commands/image.mjs +29 -0
  10. package/template/core/engine/commands/skills-sync.mjs +71 -0
  11. package/template/core/engine/commands/typecheck.mjs +63 -1
  12. package/template/core/engine/commands/upgrade.mjs +3 -3
  13. package/template/core/engine/document-export.mjs +1 -1
  14. package/template/core/engine/output/chrome-pdf.mjs +92 -0
  15. package/template/core/engine/output/static-server.mjs +48 -9
  16. package/template/core/engine/react/comment-marker.mjs +13 -13
  17. package/template/core/engine/react/document-entry.mjs +35 -28
  18. package/template/core/engine/react/document-export.mjs +309 -170
  19. package/template/core/engine/react/mdx-compile.mjs +30 -0
  20. package/template/core/engine/react/measurement-css.mjs +21 -0
  21. package/template/core/engine/react/object-entities.mjs +85 -0
  22. package/template/core/engine/react/pagination/allocator.mjs +48 -3
  23. package/template/core/engine/react/pagination.mjs +1 -1
  24. package/template/core/engine/react/pipeline/allocate.mjs +31 -65
  25. package/template/core/engine/react/pipeline/frame-measurement.mjs +4 -0
  26. package/template/core/engine/react/press-tree-inspection.mjs +172 -0
  27. package/template/core/engine/react/sources/mdx-resolver.mjs +1 -1
  28. package/template/core/engine/react/style-discovery.mjs +22 -4
  29. package/template/core/engine/runtime/config.d.mts +8 -0
  30. package/template/core/engine/runtime/config.mjs +57 -60
  31. package/template/core/engine/runtime/file-utils.mjs +9 -1
  32. package/template/core/engine/runtime/page-geometry.mjs +131 -0
  33. package/template/core/engine/runtime/source-text-tools.mjs +1 -1
  34. package/template/core/engine/runtime/source-workspace.mjs +12 -3
  35. package/template/core/engine/runtime/validation.mjs +19 -10
  36. package/template/core/openpress.config.mjs +3 -7
  37. package/template/core/package.json +3 -5
  38. package/template/core/src/openpress/app/OpenPressApp.tsx +173 -17
  39. package/template/core/src/openpress/app/OpenPressRuntime.tsx +10 -2
  40. package/template/core/src/openpress/app/WorkspaceGalleryPage.tsx +219 -0
  41. package/template/core/src/openpress/core/Frame.tsx +20 -7
  42. package/template/core/src/openpress/core/FrameContext.tsx +2 -0
  43. package/template/core/src/openpress/core/Press.tsx +25 -4
  44. package/template/core/src/openpress/core/Workspace.tsx +36 -0
  45. package/template/core/src/openpress/core/index.tsx +10 -3
  46. package/template/core/src/openpress/core/primitives.tsx +48 -1
  47. package/template/core/src/openpress/core/types.ts +86 -41
  48. package/template/core/src/openpress/core/useSource.ts +1 -1
  49. package/template/core/src/openpress/document-model/documentTypes.ts +9 -0
  50. package/template/core/src/openpress/document-model/index.ts +1 -0
  51. package/template/core/src/openpress/document-model/objectEntityModel.ts +4 -0
  52. package/template/core/src/openpress/document-model/workspaceManifestModel.ts +57 -0
  53. package/template/core/src/openpress/mdx/index.ts +15 -7
  54. package/template/core/src/openpress/reader/PageThumbnailsPanel.tsx +168 -0
  55. package/template/core/src/openpress/reader/index.ts +1 -0
  56. package/template/core/src/openpress/workbench/Workbench.tsx +120 -21
  57. package/template/core/src/openpress/workbench/actions/ExportImageControl.tsx +96 -0
  58. package/template/core/src/openpress/workbench/actions/SearchControl.tsx +3 -3
  59. package/template/core/src/openpress/workbench/actions/index.ts +1 -0
  60. package/template/core/src/openpress/workbench/inspector/useInspectorComments.ts +7 -1
  61. package/template/core/src/openpress/workbench/panels/PendingCommentsPanel.tsx +5 -1
  62. package/template/core/src/openpress/workbench/project/ProjectEntryPanel.tsx +4 -2
  63. package/template/core/src/openpress/workbench/workbenchFormatters.ts +2 -2
  64. package/template/core/src/styles/openpress/reader-runtime.css +9 -0
  65. package/template/core/src/styles/openpress/workbench-panels.css +113 -0
  66. package/template/core/src/styles/openpress/workspace-gallery.css +300 -0
  67. package/template/core/src/styles/openpress.css +1 -0
  68. package/template/core/tsconfig.json +1 -1
  69. package/template/core/engine/commands/init.mjs +0 -24
  70. package/template/core/engine/init.mjs +0 -90
  71. package/template/packs/academic-paper/document/chapters/01-introduction/content/01-introduction.mdx +0 -35
  72. package/template/packs/academic-paper/document/chapters/02-methods/content/01-methods.mdx +0 -50
  73. package/template/packs/academic-paper/document/chapters/03-results-and-discussion/content/01-results.mdx +0 -47
  74. package/template/packs/academic-paper/document/chapters/04-acknowledgment/content/01-acknowledgment.mdx +0 -26
  75. package/template/packs/academic-paper/document/chapters/05-references/content/01-references.mdx +0 -32
  76. package/template/packs/academic-paper/document/components/ChapterOpenerVisual/index.tsx +0 -76
  77. package/template/packs/academic-paper/document/components/Page.tsx +0 -60
  78. package/template/packs/academic-paper/document/components/TokenSwatchGrid/index.tsx +0 -46
  79. package/template/packs/academic-paper/document/components/TokenSwatchGrid/style.css +0 -63
  80. package/template/packs/academic-paper/document/components/TypeSpecimen/index.tsx +0 -38
  81. package/template/packs/academic-paper/document/components/TypeSpecimen/style.css +0 -111
  82. package/template/packs/academic-paper/document/design.md +0 -279
  83. package/template/packs/academic-paper/document/index.tsx +0 -123
  84. package/template/packs/academic-paper/document/media/README.md +0 -13
  85. package/template/packs/academic-paper/document/media/figure-placeholder.svg +0 -9
  86. package/template/packs/academic-paper/document/openpress.config.mjs +0 -26
  87. package/template/packs/academic-paper/document/theme/README.md +0 -11
  88. package/template/packs/academic-paper/document/theme/base/page-contract.css +0 -522
  89. package/template/packs/academic-paper/document/theme/base/print.css +0 -93
  90. package/template/packs/academic-paper/document/theme/base/typography.css +0 -333
  91. package/template/packs/academic-paper/document/theme/fonts.css +0 -3
  92. package/template/packs/academic-paper/document/theme/page-surfaces/back-cover.css +0 -43
  93. package/template/packs/academic-paper/document/theme/page-surfaces/chapter-opener.css +0 -205
  94. package/template/packs/academic-paper/document/theme/page-surfaces/cover.css +0 -294
  95. package/template/packs/academic-paper/document/theme/page-surfaces/toc.css +0 -149
  96. package/template/packs/academic-paper/document/theme/patterns/_chart-frame.css +0 -49
  97. package/template/packs/academic-paper/document/theme/patterns/figure-grid.css +0 -68
  98. package/template/packs/academic-paper/document/theme/patterns/table-utilities.css +0 -66
  99. package/template/packs/academic-paper/document/theme/shell/reader-controls.css +0 -761
  100. package/template/packs/academic-paper/document/theme/tokens.css +0 -80
  101. package/template/packs/academic-paper/openpress.config.mjs +0 -5
  102. package/template/packs/claude-document/document/chapters/01-document-shape/content/01-document-shape.mdx +0 -51
  103. package/template/packs/claude-document/document/chapters/02-review-loop/content/01-review-loop.mdx +0 -31
  104. package/template/packs/claude-document/document/components/ChapterOpenerVisual.tsx +0 -96
  105. package/template/packs/claude-document/document/components/Page.tsx +0 -37
  106. package/template/packs/claude-document/document/design.md +0 -142
  107. package/template/packs/claude-document/document/index.tsx +0 -94
  108. package/template/packs/claude-document/document/media/README.md +0 -13
  109. package/template/packs/claude-document/document/openpress.config.mjs +0 -26
  110. package/template/packs/claude-document/document/theme/README.md +0 -15
  111. package/template/packs/claude-document/document/theme/base/page-contract.css +0 -525
  112. package/template/packs/claude-document/document/theme/base/print.css +0 -93
  113. package/template/packs/claude-document/document/theme/base/typography.css +0 -612
  114. package/template/packs/claude-document/document/theme/fonts.css +0 -4
  115. package/template/packs/claude-document/document/theme/page-surfaces/back-cover.css +0 -72
  116. package/template/packs/claude-document/document/theme/page-surfaces/chapter-opener.css +0 -236
  117. package/template/packs/claude-document/document/theme/page-surfaces/cover.css +0 -309
  118. package/template/packs/claude-document/document/theme/page-surfaces/toc.css +0 -225
  119. package/template/packs/claude-document/document/theme/patterns/_chart-frame.css +0 -53
  120. package/template/packs/claude-document/document/theme/patterns/figure-grid.css +0 -68
  121. package/template/packs/claude-document/document/theme/patterns/table-utilities.css +0 -66
  122. package/template/packs/claude-document/document/theme/shell/reader-controls.css +0 -789
  123. package/template/packs/claude-document/document/theme/tokens.css +0 -89
  124. package/template/packs/claude-document/openpress.config.mjs +0 -5
  125. package/template/packs/editorial-monograph/document/chapters/01-product-and-use-cases/content/01-product-and-use-cases.mdx +0 -31
  126. package/template/packs/editorial-monograph/document/chapters/02-workflow/content/01-workflow.mdx +0 -89
  127. package/template/packs/editorial-monograph/document/chapters/03-agent-skills-contributors/content/01-agent-skills-contributors.mdx +0 -51
  128. package/template/packs/editorial-monograph/document/chapters/04-validation-deploy/content/01-validation-deploy.mdx +0 -39
  129. package/template/packs/editorial-monograph/document/components/ChapterOpenerVisual/index.tsx +0 -76
  130. package/template/packs/editorial-monograph/document/components/Page.tsx +0 -37
  131. package/template/packs/editorial-monograph/document/components/TokenSwatchGrid/index.tsx +0 -46
  132. package/template/packs/editorial-monograph/document/components/TokenSwatchGrid/style.css +0 -63
  133. package/template/packs/editorial-monograph/document/components/TypeSpecimen/index.tsx +0 -38
  134. package/template/packs/editorial-monograph/document/components/TypeSpecimen/style.css +0 -111
  135. package/template/packs/editorial-monograph/document/design.md +0 -279
  136. package/template/packs/editorial-monograph/document/index.tsx +0 -97
  137. package/template/packs/editorial-monograph/document/media/README.md +0 -13
  138. package/template/packs/editorial-monograph/document/openpress.config.mjs +0 -26
  139. package/template/packs/editorial-monograph/document/theme/README.md +0 -11
  140. package/template/packs/editorial-monograph/document/theme/base/page-contract.css +0 -505
  141. package/template/packs/editorial-monograph/document/theme/base/print.css +0 -93
  142. package/template/packs/editorial-monograph/document/theme/base/typography.css +0 -336
  143. package/template/packs/editorial-monograph/document/theme/fonts.css +0 -3
  144. package/template/packs/editorial-monograph/document/theme/page-surfaces/back-cover.css +0 -43
  145. package/template/packs/editorial-monograph/document/theme/page-surfaces/chapter-opener.css +0 -205
  146. package/template/packs/editorial-monograph/document/theme/page-surfaces/cover.css +0 -147
  147. package/template/packs/editorial-monograph/document/theme/page-surfaces/toc.css +0 -149
  148. package/template/packs/editorial-monograph/document/theme/patterns/_chart-frame.css +0 -49
  149. package/template/packs/editorial-monograph/document/theme/patterns/figure-grid.css +0 -68
  150. package/template/packs/editorial-monograph/document/theme/patterns/table-utilities.css +0 -66
  151. package/template/packs/editorial-monograph/document/theme/shell/reader-controls.css +0 -761
  152. package/template/packs/editorial-monograph/document/theme/tokens.css +0 -80
  153. package/template/packs/editorial-monograph/openpress.config.mjs +0 -5
@@ -1,123 +0,0 @@
1
- import { Frame, Press } from "@open-press/core";
2
- import type { Manifest } from "@open-press/core";
3
- import { mdxSource } from "@open-press/core/mdx";
4
- import { Sections } from "@open-press/core/manuscript";
5
- import Page from "./components/Page";
6
-
7
- export const config: Manifest = {
8
- title: "Your article title goes here",
9
- subtitle: "This is a non-peer reviewed Express letter submitted to J SEDI",
10
- organization: "open-press · academic-paper",
11
- sourceDir: "chapters",
12
- mediaDir: "media",
13
- themeDir: "theme",
14
- designDoc: "design.md",
15
- componentsDir: "components",
16
- publicDir: "public/openpress",
17
- outputDir: "dist-react",
18
- pdf: {
19
- filename: "paper.pdf",
20
- },
21
- deploy: {
22
- adapter: "cloudflare-pages",
23
- source: ".deploy/document",
24
- projectName: null,
25
- commitDirty: false,
26
- requiresConfirmation: true,
27
- },
28
- };
29
-
30
- export const sources = {
31
- story: mdxSource({ preset: "section-folders", root: "chapters" }),
32
- };
33
-
34
- function Cover() {
35
- return (
36
- <Frame
37
- frameKey="cover"
38
- role="manuscript.cover"
39
- chrome={false}
40
- className="reader-page--cover"
41
- data-page-title="Title page"
42
- aria-labelledby="paper-title"
43
- >
44
- <div className="paper-cover">
45
- <p className="paper-cover-date">May 18, 2026 – This is a non-peer reviewed Express letter submitted to J SEDI</p>
46
- <p className="paper-cover-lead">This is a non-peer reviewed Express letter submitted to J SEDI</p>
47
- <p className="paper-cover-short-title">Your short title goes here</p>
48
- <h1 id="paper-title" className="paper-title">
49
- Your article title goes here
50
- <sup>*</sup>
51
- </h1>
52
- <p className="paper-author-contact-note">
53
- <span aria-hidden="true">∗</span> Corresponding author:
54
- firstauthor@university.jp
55
- </p>
56
-
57
- <p className="paper-author-line" aria-label="Authors">
58
- Name Firstauthor<sup>1</sup>, Name Secondauthor<sup>2</sup>, Name
59
- Thirdauthor<sup>1,3</sup>
60
- </p>
61
-
62
- <ol className="paper-author-affiliations" aria-label="Author affiliations">
63
- <li className="paper-author">
64
- <p className="paper-author-affiliation">
65
- 1 Department of Earth Sciences, A University, City, Country
66
- </p>
67
- </li>
68
- <li className="paper-author">
69
- <p className="paper-author-affiliation">
70
- 2 School of Earth Sciences, Another University, City, Country
71
- </p>
72
- </li>
73
- <li className="paper-author">
74
- <p className="paper-author-affiliation">
75
- 3 Center for Studying Cool Things, University of X, City, Country
76
- </p>
77
- </li>
78
- </ol>
79
-
80
- <section className="paper-contributions" aria-label="Author contributions">
81
- <p>
82
- <span className="paper-section-label">Author contributions:</span>{" "}
83
- Conceptualization: Name Firstauthor, Name Thirdauthor. Formal
84
- Analysis: Name Firstauthor, Name Secondauthor.
85
- </p>
86
- <p>
87
- <span className="paper-section-label">Writing - Original draft:</span>{" "}
88
- Name Firstauthor.{" "}
89
- <span className="paper-section-label">
90
- Writing - Review &amp; Editing:
91
- </span>{" "}
92
- Name Firstauthor, Name Secondauthor, Name Thirdauthor.
93
- </p>
94
- </section>
95
-
96
- <section className="paper-abstract" aria-label="Abstract">
97
- <p>
98
- <span className="paper-abstract-label">Abstract</span> The text for the
99
- first abstract goes here. This should be in English, no longer than
100
- 200 words, and should not include references.
101
- </p>
102
- </section>
103
-
104
- <section className="paper-nontechnical-summary" aria-label="Non-technical summary">
105
- <p>
106
- <span className="paper-abstract-label">Non-technical summary</span> The
107
- text for the non-technical summary goes here. Again, no longer than
108
- 200 words, no reference.
109
- </p>
110
- </section>
111
- </div>
112
- </Frame>
113
- );
114
- }
115
-
116
- export default function AcademicPaperPress() {
117
- return (
118
- <Press>
119
- <Cover />
120
- <Sections source="story" page={Page} />
121
- </Press>
122
- );
123
- }
@@ -1,13 +0,0 @@
1
- # media/
2
-
3
- 放這份文件用到的所有圖片、icon、品牌 asset。Markdown 內以 `media/<file>` 引用,會被解析為 `document/media/<file>`。
4
-
5
- 建議檔名規則:
6
-
7
- - 截圖:`<topic>-<screen>.png`
8
- - 場域 / 情境照片:`<topic>-<scene>.jpeg`
9
- - 品牌標誌:`logo-<name>.svg` 或 `logo-<name>.png`
10
- - 概念示意圖:`concept-<name>.png` / `concept-<name>.svg`
11
- - 人物照:`person-<name>.jpg`
12
-
13
- 統一用小寫 + 連字號;非必要避免空白與大寫。
@@ -1,9 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="900" height="540" viewBox="0 0 900 540" role="img" aria-labelledby="title desc">
2
- <title id="title">Figure placeholder</title>
3
- <desc id="desc">Simple figure placeholder graphic with gray border and label</desc>
4
- <rect width="100%" height="100%" fill="#f3f4f6"/>
5
- <rect x="24" y="24" width="852" height="492" fill="none" stroke="#9ca3af" stroke-width="4" stroke-dasharray="18 12" rx="8" />
6
- <text x="50%" y="50%" fill="#4b5563" font-size="44" font-family="Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" text-anchor="middle" dominant-baseline="middle">
7
- Example Figure Placeholder
8
- </text>
9
- </svg>
@@ -1,26 +0,0 @@
1
- // academic-paper starter — replace with your paper's metadata.
2
- export default {
3
- title: "Paper Title",
4
- subtitle: "An academic-paper draft built with open-press",
5
- organization: "Department · Institution",
6
-
7
- sourceDir: "chapters",
8
- mediaDir: "media",
9
- themeDir: "theme",
10
- designDoc: "design.md",
11
- componentsDir: "components",
12
- publicDir: "public/openpress",
13
- outputDir: "dist-react",
14
-
15
- pdf: {
16
- filename: "paper.pdf",
17
- },
18
-
19
- deploy: {
20
- adapter: "cloudflare-pages",
21
- source: ".deploy/document",
22
- projectName: null,
23
- commitDirty: false,
24
- requiresConfirmation: true,
25
- },
26
- };
@@ -1,11 +0,0 @@
1
- # Theme
2
-
3
- This folder is the source of the document visual system. Keep the layers narrow so agents can change the right file without guessing.
4
-
5
- - `tokens.css`: design variables only. Colors, font families, type scale, spacing, chart colors, and shared numeric tokens live here.
6
- - `base/`: global document rules. Page contract, headings, paragraphs, lists, figures, tables, captions, and print safeguards live here.
7
- - `page-surfaces/`: whole-page layouts routed by `kind`, including cover, TOC, optional chapter opener, and back cover.
8
- - `patterns/`: named document patterns and specimens. Put chart frames, visual blocks, design swatches, image grids, and other class-based content patterns here.
9
- - `shell/`: exported reader controls around the document. Do not put document typography or component styling here.
10
-
11
- Use `document/components/ComponentName/style.css` for CSS that belongs to a React component. Generated files in `public/openpress/` and `dist-react/` are output only.
@@ -1,522 +0,0 @@
1
- @page {
2
- size: var(--openpress-page-width) var(--openpress-page-height);
3
- margin: var(--openpress-page-margin);
4
- }
5
-
6
- * {
7
- box-sizing: border-box;
8
- }
9
-
10
- html {
11
- background: var(--openpress-color-app-bg);
12
- scroll-behavior: smooth;
13
- }
14
-
15
- body {
16
- margin: 0;
17
- color: var(--openpress-color-text-on-dark);
18
- background: #1a1a1a;
19
- font-family: var(--openpress-font-body);
20
- font-size: var(--openpress-text-md);
21
- line-height: var(--openpress-leading-body);
22
- -webkit-print-color-adjust: exact;
23
- print-color-adjust: exact;
24
- touch-action: manipulation;
25
- -webkit-tap-highlight-color: transparent;
26
- }
27
-
28
- .reader-app {
29
- display: grid;
30
- grid-template-rows: 56px minmax(0, 1fr);
31
- grid-template-columns: 200px minmax(0, 1fr) 340px;
32
- grid-template-areas:
33
- "nav nav nav"
34
- "left main right";
35
- min-height: 100vh;
36
- height: 100vh;
37
- overflow: hidden;
38
- transition: grid-template-columns 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
39
- }
40
-
41
- button,
42
- .reader-stage {
43
- outline: none;
44
- }
45
-
46
- body.exporting .reader-page,
47
- body.exporting .reader-page.is-active {
48
- animation: none !important;
49
- transform: none !important;
50
- transition: none !important;
51
- }
52
-
53
- button:focus,
54
- .reader-stage:focus {
55
- outline: none;
56
- }
57
-
58
- button:focus-visible {
59
- outline: 1px solid rgba(255, 255, 255, 0.4);
60
- outline-offset: 2px;
61
- }
62
-
63
- .reader-app.is-closed-left {
64
- grid-template-columns: 0 minmax(0, 1fr) 340px;
65
- }
66
-
67
- .reader-app.is-closed-right {
68
- grid-template-columns: 200px minmax(0, 1fr) 0;
69
- }
70
-
71
- .reader-app.is-closed-left.is-closed-right {
72
- grid-template-columns: 0 minmax(0, 1fr) 0;
73
- }
74
-
75
- .reader-app.is-closed-left .reader-thumb-strip,
76
- .reader-app.is-closed-right .reader-side-nav {
77
- display: none;
78
- }
79
-
80
- .reader-navbar {
81
- grid-area: nav;
82
- display: grid;
83
- grid-template-columns: 1fr auto 1fr;
84
- align-items: center;
85
- padding: 0 24px;
86
- gap: 24px;
87
- border-bottom: 1px solid rgba(255, 255, 255, 0.08);
88
- background: rgba(22, 22, 22, 0.6);
89
- position: relative;
90
- }
91
-
92
- .navbar-section {
93
- display: flex;
94
- align-items: center;
95
- gap: 12px;
96
- min-width: 0;
97
- }
98
-
99
- .navbar-left {
100
- justify-self: start;
101
- }
102
-
103
- .navbar-right {
104
- justify-self: end;
105
- }
106
-
107
- .navbar-brand {
108
- display: flex;
109
- align-items: baseline;
110
- gap: 14px;
111
- color: var(--openpress-color-text-on-dark);
112
- min-width: 0;
113
- }
114
-
115
- .navbar-icon {
116
- display: flex;
117
- align-items: center;
118
- justify-content: center;
119
- width: 32px;
120
- height: 32px;
121
- padding: 0;
122
- background: transparent;
123
- border: 0;
124
- color: var(--openpress-color-text-placeholder);
125
- font-size: 16px;
126
- line-height: 1;
127
- cursor: pointer;
128
- opacity: 0.6;
129
- transition: opacity 150ms ease, color 150ms ease;
130
- }
131
-
132
- .navbar-icon:hover {
133
- opacity: 1;
134
- color: var(--openpress-color-text-on-dark);
135
- }
136
-
137
- .navbar-icon[aria-pressed="false"] {
138
- opacity: 0.35;
139
- }
140
-
141
- .navbar-hints {
142
- justify-self: center;
143
- display: flex;
144
- align-items: center;
145
- gap: 10px;
146
- color: var(--openpress-color-text-placeholder);
147
- font-size: 11px;
148
- letter-spacing: 0.1em;
149
- opacity: 0.7;
150
- }
151
-
152
- .navbar-hints .navbar-sep {
153
- color: var(--openpress-color-border-strong);
154
- }
155
-
156
- .navbar-icon-hamburger {
157
- flex-direction: column;
158
- gap: 4px;
159
- width: 36px;
160
- height: 36px;
161
- }
162
-
163
- .navbar-icon-hamburger span {
164
- display: block;
165
- width: 16px;
166
- height: 1px;
167
- background: currentColor;
168
- transition: transform 180ms ease, opacity 180ms ease;
169
- }
170
-
171
- .navbar-icon-hamburger[aria-pressed="true"] span:nth-child(1) {
172
- transform: translateY(0);
173
- }
174
-
175
- .navbar-icon-hamburger[aria-pressed="false"] span {
176
- opacity: 0.6;
177
- }
178
-
179
-
180
- .navbar-mark {
181
- font-family: var(--openpress-font-serif);
182
- font-size: 18px;
183
- font-weight: 400;
184
- letter-spacing: 0.02em;
185
- }
186
-
187
- .navbar-sub {
188
- font-size: 11px;
189
- color: var(--openpress-color-text-placeholder);
190
- letter-spacing: 0.1em;
191
- }
192
-
193
- .navbar-actions {
194
- display: flex;
195
- gap: 8px;
196
- justify-self: end;
197
- }
198
-
199
- .navbar-btn {
200
- height: 32px;
201
- padding: 0 14px;
202
- background: transparent;
203
- border: 1px solid rgba(255, 255, 255, 0.18);
204
- color: var(--openpress-color-text-secondary);
205
- font-family: inherit;
206
- font-size: 11px;
207
- letter-spacing: 0.1em;
208
- cursor: pointer;
209
- transition: border-color 150ms, color 150ms;
210
- }
211
-
212
- .navbar-btn:hover {
213
- border-color: rgba(255, 255, 255, 0.45);
214
- color: var(--openpress-color-text-on-dark);
215
- }
216
-
217
- .navbar-menu-btn {
218
- display: none;
219
- width: 36px;
220
- height: 36px;
221
- background: transparent;
222
- border: 0;
223
- color: var(--openpress-color-text-secondary);
224
- font-family: inherit;
225
- font-size: 22px;
226
- line-height: 1;
227
- cursor: pointer;
228
- padding: 0;
229
- letter-spacing: 0.08em;
230
- }
231
-
232
- .navbar-menu-btn:hover {
233
- color: var(--openpress-color-text-on-dark);
234
- }
235
-
236
- .mobile-menu {
237
- position: fixed;
238
- inset: 0;
239
- z-index: 30;
240
- display: flex;
241
- align-items: flex-end;
242
- animation: mobile-menu-in 180ms ease-out both;
243
- }
244
-
245
- .mobile-menu[hidden] {
246
- display: none;
247
- }
248
-
249
- @keyframes mobile-menu-in {
250
- from { opacity: 0; }
251
- to { opacity: 1; }
252
- }
253
-
254
- .mobile-menu-backdrop {
255
- position: absolute;
256
- inset: 0;
257
- background: rgba(15, 15, 15, 0.55);
258
- -webkit-backdrop-filter: blur(8px);
259
- backdrop-filter: blur(8px);
260
- }
261
-
262
- .mobile-menu-sheet {
263
- position: relative;
264
- z-index: 1;
265
- width: 100%;
266
- padding: 14px;
267
- padding-bottom: calc(14px + env(safe-area-inset-bottom));
268
- display: flex;
269
- flex-direction: column;
270
- gap: 8px;
271
- animation: mobile-menu-sheet-in 220ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
272
- }
273
-
274
- @keyframes mobile-menu-sheet-in {
275
- from { transform: translateY(12px); opacity: 0; }
276
- to { transform: translateY(0); opacity: 1; }
277
- }
278
-
279
- .mobile-menu-item,
280
- .mobile-menu-cancel {
281
- width: 100%;
282
- height: 54px;
283
- font-family: inherit;
284
- font-size: 15px;
285
- letter-spacing: 0.06em;
286
- color: var(--openpress-color-text-on-dark);
287
- cursor: pointer;
288
- padding: 0;
289
- }
290
-
291
- .mobile-menu-item {
292
- background: rgba(40, 40, 40, 0.85);
293
- -webkit-backdrop-filter: blur(20px);
294
- backdrop-filter: blur(20px);
295
- border: 1px solid rgba(255, 255, 255, 0.08);
296
- }
297
-
298
- .mobile-menu-item:active {
299
- background: rgba(60, 60, 60, 0.92);
300
- }
301
-
302
- .mobile-menu-cancel {
303
- margin-top: 4px;
304
- background: rgba(70, 70, 70, 0.88);
305
- -webkit-backdrop-filter: blur(20px);
306
- backdrop-filter: blur(20px);
307
- border: 0;
308
- letter-spacing: 0.08em;
309
- font-weight: 500;
310
- }
311
-
312
- .reader-stage {
313
- grid-area: main;
314
- min-width: 0;
315
- min-height: 0;
316
- display: flex;
317
- align-items: flex-start;
318
- justify-content: center;
319
- overflow: auto;
320
- overscroll-behavior: contain;
321
- scroll-behavior: smooth;
322
- container-type: inline-size;
323
- scrollbar-width: thin;
324
- scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
325
- }
326
-
327
- .reader-stage::-webkit-scrollbar {
328
- width: 8px;
329
- height: 8px;
330
- }
331
-
332
- .reader-stage::-webkit-scrollbar-track {
333
- background: transparent;
334
- }
335
-
336
- .reader-stage::-webkit-scrollbar-thumb {
337
- background: rgba(255, 255, 255, 0.15);
338
- border-radius: 0;
339
- border: 2px solid transparent;
340
- background-clip: padding-box;
341
- }
342
-
343
- .reader-stage::-webkit-scrollbar-thumb:hover {
344
- background: rgba(255, 255, 255, 0.28);
345
- background-clip: padding-box;
346
- border: 2px solid transparent;
347
- }
348
-
349
- .reader-stage::-webkit-scrollbar-corner {
350
- background: transparent;
351
- }
352
-
353
- .reader-pages {
354
- min-height: 0;
355
- width: 100%;
356
- height: auto;
357
- display: flex;
358
- flex-direction: column;
359
- align-items: center;
360
- gap: 28px;
361
- padding: 32px 24px 48px;
362
- --reader-page-width: min(var(--openpress-page-width), calc(100cqw - 48px));
363
- }
364
-
365
- .reader-pages.is-spread {
366
- --reader-page-width: min(var(--openpress-page-width), calc((100cqw - 84px) / 2));
367
- }
368
-
369
- .reader-spread {
370
- display: grid;
371
- grid-template-columns: minmax(0, var(--reader-page-width));
372
- justify-content: center;
373
- gap: 28px;
374
- width: 100%;
375
- }
376
-
377
- .reader-spread.has-two {
378
- grid-template-columns: repeat(2, minmax(0, var(--reader-page-width)));
379
- }
380
-
381
- .reader-page {
382
- display: none;
383
- position: relative;
384
- width: var(--reader-page-width, var(--openpress-page-width));
385
- height: calc(var(--reader-page-width, var(--openpress-page-width)) * var(--openpress-page-height) / var(--openpress-page-width));
386
- --page-margin-x: clamp(20px, 3.8cqw, 34px);
387
- --page-margin-top: clamp(18px, 3.5cqw, 30px);
388
- --page-margin-bottom: clamp(14px, 2.4cqw, 24px);
389
- --page-header-height: clamp(10px, 1.6cqw, 16px);
390
- --page-footer-height: clamp(16px, 2.2cqw, 22px);
391
- --page-frame-gap: clamp(5px, 1.1cqw, 11px);
392
- overflow: hidden;
393
- color: var(--openpress-color-ink);
394
- background: var(--openpress-color-document);
395
- container-type: inline-size;
396
- box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
397
- transition: box-shadow 180ms ease;
398
- }
399
-
400
- .reader-app.is-ready .reader-page,
401
- .reader-page.measurement {
402
- display: block;
403
- }
404
-
405
- .page-frame {
406
- width: 100%;
407
- height: 100%;
408
- min-height: inherit;
409
- display: grid;
410
- grid-template-rows: var(--page-header-height) minmax(0, 1fr) var(--page-footer-height);
411
- row-gap: var(--page-frame-gap);
412
- padding: var(--page-margin-top) var(--page-margin-x) var(--page-margin-bottom);
413
- background: var(--openpress-color-document);
414
- }
415
-
416
- .reader-page.no-footer .page-frame {
417
- grid-template-rows: var(--page-header-height) minmax(0, 1fr);
418
- }
419
-
420
- .reader-page.no-footer .page-footer {
421
- display: none;
422
- }
423
-
424
- .page-header,
425
- .page-footer {
426
- min-width: 0;
427
- overflow: hidden;
428
- }
429
-
430
- .page-header {
431
- display: flex;
432
- align-items: baseline;
433
- justify-content: space-between;
434
- gap: var(--openpress-space-3);
435
- color: var(--openpress-color-muted);
436
- font-family: var(--openpress-font-body);
437
- font-size: clamp(8px, 1.2cqw, 9px);
438
- letter-spacing: normal;
439
- opacity: 0.82;
440
- pointer-events: none;
441
- line-height: 1.2;
442
- }
443
-
444
- .running-head-left,
445
- .running-head-right {
446
- min-width: 0;
447
- overflow: hidden;
448
- text-overflow: ellipsis;
449
- white-space: nowrap;
450
- }
451
-
452
- .running-head-right {
453
- max-width: 45%;
454
- text-align: right;
455
- }
456
-
457
- .page-body {
458
- min-width: 0;
459
- min-height: 0;
460
- overflow: visible;
461
- }
462
-
463
- .page-footer {
464
- display: flex;
465
- justify-content: space-between;
466
- align-items: baseline;
467
- gap: 12px;
468
- font-size: clamp(8px, 1.2cqw, 9px);
469
- color: var(--openpress-color-muted);
470
- letter-spacing: normal;
471
- opacity: 0.7;
472
- pointer-events: none;
473
- }
474
-
475
- .page-footer .footer-left {
476
- flex: 1;
477
- min-width: 0;
478
- overflow: hidden;
479
- text-overflow: ellipsis;
480
- white-space: nowrap;
481
- }
482
-
483
- .page-footer .footer-right {
484
- font-variant-numeric: tabular-nums;
485
- letter-spacing: 0.02em;
486
- flex-shrink: 0;
487
- }
488
-
489
- @media screen and (max-width: 767px) {
490
- .page-footer {
491
- font-size: clamp(5.5pt, 1.4cqw, 7pt);
492
- }
493
- }
494
-
495
- .reader-page.measurement {
496
- display: block !important;
497
- position: absolute;
498
- left: -99999px;
499
- top: 0;
500
- visibility: hidden;
501
- box-shadow: none;
502
- outline: 0;
503
- transform: none !important;
504
- }
505
-
506
- .reader-page.is-active.page-in-forward {
507
- animation: page-in-fwd 280ms cubic-bezier(0.33, 1, 0.68, 1) both;
508
- }
509
-
510
- .reader-page.is-active.page-in-backward {
511
- animation: page-in-bwd 280ms cubic-bezier(0.33, 1, 0.68, 1) both;
512
- }
513
-
514
- @keyframes page-in-fwd {
515
- 0% { opacity: 0; transform: translateX(10px); }
516
- 100% { opacity: 1; transform: translateX(0); }
517
- }
518
-
519
- @keyframes page-in-bwd {
520
- 0% { opacity: 0; transform: translateX(-10px); }
521
- 100% { opacity: 1; transform: translateX(0); }
522
- }