@open-press/cli 0.3.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 (178) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +58 -0
  3. package/dist/cli.js +365 -0
  4. package/package.json +57 -0
  5. package/template/core/.turbo/turbo-test.log +341 -0
  6. package/template/core/CHANGELOG.md +11 -0
  7. package/template/core/README.md +36 -0
  8. package/template/core/engine/chrome-pdf.d.mts +34 -0
  9. package/template/core/engine/chrome-pdf.mjs +344 -0
  10. package/template/core/engine/cli.mjs +93 -0
  11. package/template/core/engine/commands/_shared.mjs +170 -0
  12. package/template/core/engine/commands/deploy.mjs +31 -0
  13. package/template/core/engine/commands/dev.mjs +26 -0
  14. package/template/core/engine/commands/export.mjs +8 -0
  15. package/template/core/engine/commands/init.mjs +24 -0
  16. package/template/core/engine/commands/inspect.mjs +35 -0
  17. package/template/core/engine/commands/migrate-to-react.mjs +27 -0
  18. package/template/core/engine/commands/pdf.mjs +26 -0
  19. package/template/core/engine/commands/preview.mjs +26 -0
  20. package/template/core/engine/commands/render.mjs +17 -0
  21. package/template/core/engine/commands/replace.mjs +41 -0
  22. package/template/core/engine/commands/search.mjs +33 -0
  23. package/template/core/engine/commands/typecheck.mjs +5 -0
  24. package/template/core/engine/commands/validate.mjs +17 -0
  25. package/template/core/engine/config.d.mts +40 -0
  26. package/template/core/engine/config.mjs +160 -0
  27. package/template/core/engine/deploy-sync.mjs +15 -0
  28. package/template/core/engine/document-export.mjs +15 -0
  29. package/template/core/engine/file-utils.mjs +106 -0
  30. package/template/core/engine/fonts.mjs +62 -0
  31. package/template/core/engine/init.mjs +90 -0
  32. package/template/core/engine/inspection.mjs +348 -0
  33. package/template/core/engine/issue-report.mjs +44 -0
  34. package/template/core/engine/katex-assets.mjs +45 -0
  35. package/template/core/engine/page-block.mjs +30 -0
  36. package/template/core/engine/page-renderer.mjs +217 -0
  37. package/template/core/engine/pdf-media.mjs +45 -0
  38. package/template/core/engine/public-assets.mjs +19 -0
  39. package/template/core/engine/react/chapter-css.mjs +53 -0
  40. package/template/core/engine/react/comment-endpoint.d.mts +11 -0
  41. package/template/core/engine/react/comment-endpoint.mjs +128 -0
  42. package/template/core/engine/react/comment-marker.mjs +306 -0
  43. package/template/core/engine/react/document-entry.mjs +253 -0
  44. package/template/core/engine/react/document-export.mjs +392 -0
  45. package/template/core/engine/react/mdx-compile.mjs +295 -0
  46. package/template/core/engine/react/measurement-css.mjs +44 -0
  47. package/template/core/engine/react/migrate-to-react.mjs +355 -0
  48. package/template/core/engine/react/pagination-constants.mjs +3 -0
  49. package/template/core/engine/react/pagination.mjs +121 -0
  50. package/template/core/engine/react/project-asset-endpoint.d.mts +10 -0
  51. package/template/core/engine/react/project-asset-endpoint.mjs +379 -0
  52. package/template/core/engine/react/workspace-discovery.mjs +156 -0
  53. package/template/core/engine/source-text-tools.mjs +280 -0
  54. package/template/core/engine/source-workspace.mjs +76 -0
  55. package/template/core/engine/static-server.mjs +493 -0
  56. package/template/core/engine/validation.mjs +172 -0
  57. package/template/core/index.html +13 -0
  58. package/template/core/openpress.config.mjs +12 -0
  59. package/template/core/package.json +86 -0
  60. package/template/core/src/main.tsx +16 -0
  61. package/template/core/src/openpress/App.tsx +127 -0
  62. package/template/core/src/openpress/composerMentions.ts +188 -0
  63. package/template/core/src/openpress/core/basePages.tsx +87 -0
  64. package/template/core/src/openpress/core/index.tsx +20 -0
  65. package/template/core/src/openpress/core/types.ts +71 -0
  66. package/template/core/src/openpress/frameScheduler.ts +32 -0
  67. package/template/core/src/openpress/indexes.ts +329 -0
  68. package/template/core/src/openpress/inspector.ts +282 -0
  69. package/template/core/src/openpress/pageRoute.ts +21 -0
  70. package/template/core/src/openpress/pagination.ts +845 -0
  71. package/template/core/src/openpress/projectIdentity.ts +15 -0
  72. package/template/core/src/openpress/projectSources.ts +24 -0
  73. package/template/core/src/openpress/projectWorkspace.tsx +919 -0
  74. package/template/core/src/openpress/publicPage.tsx +469 -0
  75. package/template/core/src/openpress/reactDocumentMetadata.ts +41 -0
  76. package/template/core/src/openpress/readerPageRegistry.ts +41 -0
  77. package/template/core/src/openpress/readerRuntime.ts +230 -0
  78. package/template/core/src/openpress/readerScroll.ts +92 -0
  79. package/template/core/src/openpress/readerState.ts +15 -0
  80. package/template/core/src/openpress/renderer.tsx +91 -0
  81. package/template/core/src/openpress/runtimeMode.ts +22 -0
  82. package/template/core/src/openpress/types.ts +112 -0
  83. package/template/core/src/openpress/workbench.tsx +1299 -0
  84. package/template/core/src/openpress/workbenchPanels.tsx +122 -0
  85. package/template/core/src/openpress/workbenchTypes.ts +4 -0
  86. package/template/core/src/styles/openpress/app-shell.css +251 -0
  87. package/template/core/src/styles/openpress/media-workspace.css +230 -0
  88. package/template/core/src/styles/openpress/print-route.css +186 -0
  89. package/template/core/src/styles/openpress/project-workspace.css +1318 -0
  90. package/template/core/src/styles/openpress/public-viewer.css +983 -0
  91. package/template/core/src/styles/openpress/reader-runtime.css +792 -0
  92. package/template/core/src/styles/openpress/responsive.css +384 -0
  93. package/template/core/src/styles/openpress/workbench-panels.css +558 -0
  94. package/template/core/src/styles/openpress/workbench.css +720 -0
  95. package/template/core/src/styles/openpress.css +14 -0
  96. package/template/core/src/vite-env.d.ts +9 -0
  97. package/template/core/tsconfig.json +37 -0
  98. package/template/core/vite.config.ts +512 -0
  99. package/template/skills/chinese-ai-writing-polish/SKILL.md +195 -0
  100. package/template/skills/claude-document/SKILL.md +66 -0
  101. package/template/skills/claude-document/starter/document/chapters/01-document-shape/chapter.tsx +30 -0
  102. package/template/skills/claude-document/starter/document/chapters/01-document-shape/content/01-document-shape.mdx +51 -0
  103. package/template/skills/claude-document/starter/document/chapters/02-review-loop/chapter.tsx +30 -0
  104. package/template/skills/claude-document/starter/document/chapters/02-review-loop/content/01-review-loop.mdx +31 -0
  105. package/template/skills/claude-document/starter/document/components/ChapterOpenerVisual.tsx +96 -0
  106. package/template/skills/claude-document/starter/document/components/Page.tsx +27 -0
  107. package/template/skills/claude-document/starter/document/design.md +142 -0
  108. package/template/skills/claude-document/starter/document/index.tsx +89 -0
  109. package/template/skills/claude-document/starter/document/media/README.md +13 -0
  110. package/template/skills/claude-document/starter/document/openpress.config.mjs +26 -0
  111. package/template/skills/claude-document/starter/document/theme/README.md +15 -0
  112. package/template/skills/claude-document/starter/document/theme/base/page-contract.css +525 -0
  113. package/template/skills/claude-document/starter/document/theme/base/print.css +93 -0
  114. package/template/skills/claude-document/starter/document/theme/base/typography.css +612 -0
  115. package/template/skills/claude-document/starter/document/theme/fonts.css +4 -0
  116. package/template/skills/claude-document/starter/document/theme/page-surfaces/back-cover.css +72 -0
  117. package/template/skills/claude-document/starter/document/theme/page-surfaces/chapter-opener.css +236 -0
  118. package/template/skills/claude-document/starter/document/theme/page-surfaces/cover.css +309 -0
  119. package/template/skills/claude-document/starter/document/theme/page-surfaces/toc.css +213 -0
  120. package/template/skills/claude-document/starter/document/theme/patterns/_chart-frame.css +53 -0
  121. package/template/skills/claude-document/starter/document/theme/patterns/figure-grid.css +68 -0
  122. package/template/skills/claude-document/starter/document/theme/patterns/table-utilities.css +66 -0
  123. package/template/skills/claude-document/starter/document/theme/shell/reader-controls.css +789 -0
  124. package/template/skills/claude-document/starter/document/theme/tokens.css +89 -0
  125. package/template/skills/claude-document/starter/openpress.config.mjs +5 -0
  126. package/template/skills/editorial-monograph/SKILL.md +73 -0
  127. package/template/skills/editorial-monograph/starter/document/chapters/01-product-and-use-cases/content/01-product-and-use-cases.mdx +31 -0
  128. package/template/skills/editorial-monograph/starter/document/chapters/02-workflow/content/01-workflow.mdx +89 -0
  129. package/template/skills/editorial-monograph/starter/document/chapters/03-agent-skills-contributors/content/01-agent-skills-contributors.mdx +52 -0
  130. package/template/skills/editorial-monograph/starter/document/chapters/04-validation-deploy/content/01-validation-deploy.mdx +39 -0
  131. package/template/skills/editorial-monograph/starter/document/components/ChapterOpenerVisual/index.tsx +76 -0
  132. package/template/skills/editorial-monograph/starter/document/components/Page.tsx +27 -0
  133. package/template/skills/editorial-monograph/starter/document/components/TokenSwatchGrid/index.tsx +46 -0
  134. package/template/skills/editorial-monograph/starter/document/components/TokenSwatchGrid/style.css +63 -0
  135. package/template/skills/editorial-monograph/starter/document/components/TypeSpecimen/index.tsx +38 -0
  136. package/template/skills/editorial-monograph/starter/document/components/TypeSpecimen/style.css +111 -0
  137. package/template/skills/editorial-monograph/starter/document/design.md +279 -0
  138. package/template/skills/editorial-monograph/starter/document/index.tsx +73 -0
  139. package/template/skills/editorial-monograph/starter/document/media/README.md +13 -0
  140. package/template/skills/editorial-monograph/starter/document/openpress.config.mjs +26 -0
  141. package/template/skills/editorial-monograph/starter/document/theme/README.md +11 -0
  142. package/template/skills/editorial-monograph/starter/document/theme/base/page-contract.css +505 -0
  143. package/template/skills/editorial-monograph/starter/document/theme/base/print.css +93 -0
  144. package/template/skills/editorial-monograph/starter/document/theme/base/typography.css +336 -0
  145. package/template/skills/editorial-monograph/starter/document/theme/fonts.css +3 -0
  146. package/template/skills/editorial-monograph/starter/document/theme/page-surfaces/back-cover.css +43 -0
  147. package/template/skills/editorial-monograph/starter/document/theme/page-surfaces/chapter-opener.css +205 -0
  148. package/template/skills/editorial-monograph/starter/document/theme/page-surfaces/cover.css +147 -0
  149. package/template/skills/editorial-monograph/starter/document/theme/page-surfaces/toc.css +139 -0
  150. package/template/skills/editorial-monograph/starter/document/theme/patterns/_chart-frame.css +49 -0
  151. package/template/skills/editorial-monograph/starter/document/theme/patterns/figure-grid.css +68 -0
  152. package/template/skills/editorial-monograph/starter/document/theme/patterns/table-utilities.css +66 -0
  153. package/template/skills/editorial-monograph/starter/document/theme/shell/reader-controls.css +761 -0
  154. package/template/skills/editorial-monograph/starter/document/theme/tokens.css +80 -0
  155. package/template/skills/editorial-monograph/starter/openpress.config.mjs +5 -0
  156. package/template/skills/openpress/SKILL.md +114 -0
  157. package/template/skills/openpress/references/cli-commands.md +31 -0
  158. package/template/skills/openpress/references/local-review.md +43 -0
  159. package/template/skills/openpress-deploy/SKILL.md +69 -0
  160. package/template/skills/openpress-deploy/references/cloudflare-pages.md +51 -0
  161. package/template/skills/openpress-design/SKILL.md +51 -0
  162. package/template/skills/openpress-design/references/pdf-safe-css.md +29 -0
  163. package/template/skills/openpress-design/references/responsive-fixed-layout.md +48 -0
  164. package/template/skills/openpress-design/references/theme-and-components.md +77 -0
  165. package/template/skills/openpress-diagram-drawing/SKILL.md +44 -0
  166. package/template/skills/openpress-diagram-drawing/references/diagram-patterns.md +93 -0
  167. package/template/skills/openpress-document-hierarchy/SKILL.md +81 -0
  168. package/template/skills/openpress-document-hierarchy/agents/openai.yaml +4 -0
  169. package/template/skills/openpress-document-hierarchy/references/data-structures-outline.md +115 -0
  170. package/template/skills/openpress-init/SKILL.md +84 -0
  171. package/template/skills/openpress-style-pack-contributor/SKILL.md +62 -0
  172. package/template/skills/openpress-style-pack-contributor/references/starter-contract.md +49 -0
  173. package/template/skills/openpress-update/SKILL.md +88 -0
  174. package/template/skills/openpress-writing/SKILL.md +68 -0
  175. package/template/skills/openpress-writing/references/source-and-writing-rules.md +120 -0
  176. package/template/skills/teaching-notes-writing/SKILL.md +54 -0
  177. package/template/skills/teaching-notes-writing/references/programming.md +65 -0
  178. package/template/skills/teaching-notes-writing/references/teaching-patterns.md +60 -0
@@ -0,0 +1,761 @@
1
+ .reader-side-nav {
2
+ grid-area: right;
3
+ display: grid;
4
+ grid-template-rows: minmax(0, 1fr) auto;
5
+ gap: 0;
6
+ padding: 20px 0;
7
+ border-left: 1px solid rgba(255, 255, 255, 0.06);
8
+ color: var(--openpress-color-text-placeholder);
9
+ font-size: 13px;
10
+ letter-spacing: 0.06em;
11
+ user-select: none;
12
+ overflow: hidden;
13
+ }
14
+
15
+ .reader-side-nav .reader-bookmarks {
16
+ position: relative;
17
+ overflow-y: auto;
18
+ padding: 0 18px 24px 28px;
19
+ scrollbar-width: thin;
20
+ scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
21
+ }
22
+
23
+ .reader-side-nav .reader-bookmarks::-webkit-scrollbar { width: 4px; }
24
+ .reader-side-nav .reader-bookmarks::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); }
25
+
26
+ .reader-bookmarks-rail {
27
+ position: absolute;
28
+ left: 16px;
29
+ top: 0;
30
+ bottom: 24px;
31
+ width: 1px;
32
+ background: rgba(255, 255, 255, 0.1);
33
+ }
34
+
35
+ .reader-bookmarks-rail .reader-bookmarks-rail-fill {
36
+ position: absolute;
37
+ left: -1px;
38
+ top: 0;
39
+ width: 3px;
40
+ height: var(--progress, 0%);
41
+ background: var(--openpress-color-text-on-dark);
42
+ transition: height 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
43
+ }
44
+
45
+ .side-nav-indicator {
46
+ display: none;
47
+ }
48
+
49
+ .reader-side-nav .side-menu {
50
+ display: flex;
51
+ flex-direction: column;
52
+ gap: 2px;
53
+ border-top: 1px solid rgba(255, 255, 255, 0.08);
54
+ padding: 12px 18px 0 32px;
55
+ position: relative;
56
+ }
57
+
58
+ .reader-side-nav .side-menu::before {
59
+ content: "";
60
+ position: absolute;
61
+ left: 16px;
62
+ top: 14px;
63
+ bottom: 4px;
64
+ width: 1px;
65
+ background: rgba(255, 255, 255, 0.18);
66
+ }
67
+
68
+ .reader-side-nav .side-menu-item {
69
+ display: grid;
70
+ grid-template-columns: 16px 1fr;
71
+ align-items: center;
72
+ gap: 12px;
73
+ background: transparent;
74
+ border: 0;
75
+ color: var(--openpress-color-text-placeholder);
76
+ font-family: inherit;
77
+ font-size: 11px;
78
+ letter-spacing: 0.16em;
79
+ cursor: pointer;
80
+ padding: 7px 0;
81
+ text-align: left;
82
+ white-space: nowrap;
83
+ transition: color 150ms ease;
84
+ line-height: 1.4;
85
+ }
86
+
87
+ .reader-side-nav .side-menu-item:hover:not(:disabled):not(.side-menu-static) {
88
+ color: var(--openpress-color-text-on-dark);
89
+ }
90
+
91
+ .reader-side-nav .side-menu-item:disabled {
92
+ opacity: 0.3;
93
+ cursor: not-allowed;
94
+ }
95
+
96
+ .side-menu-icon {
97
+ display: inline-flex;
98
+ align-items: center;
99
+ justify-content: center;
100
+ font-size: 13px;
101
+ line-height: 1;
102
+ letter-spacing: 0;
103
+ opacity: 0.75;
104
+ }
105
+
106
+ .side-menu-label {
107
+ min-width: 0;
108
+ }
109
+
110
+ .side-menu-static {
111
+ cursor: default;
112
+ }
113
+
114
+ .side-menu-count {
115
+ font-variant-numeric: tabular-nums;
116
+ letter-spacing: 0.12em;
117
+ }
118
+
119
+ .side-menu-count .sep {
120
+ margin: 0 4px;
121
+ opacity: 0.5;
122
+ }
123
+
124
+ .reader-progress-track {
125
+ width: 2px;
126
+ height: 180px;
127
+ background: rgba(255, 255, 255, 0.12);
128
+ position: relative;
129
+ }
130
+
131
+ .reader-progress-track .reader-progress-fill {
132
+ position: absolute;
133
+ top: 0;
134
+ left: -1px;
135
+ width: 4px;
136
+ height: var(--progress, 0%);
137
+ background: rgba(255, 255, 255, 0.6);
138
+ transition: height 320ms cubic-bezier(0.22, 0.61, 0.36, 1),
139
+ width 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
140
+ }
141
+
142
+ .reader-side-count {
143
+ display: flex;
144
+ flex-direction: column;
145
+ align-items: center;
146
+ gap: 3px;
147
+ font-variant-numeric: tabular-nums;
148
+ font-size: 13px;
149
+ letter-spacing: 0.08em;
150
+ opacity: 0.7;
151
+ }
152
+
153
+ .reader-side-count .sep {
154
+ color: var(--openpress-color-border-strong);
155
+ font-size: 10px;
156
+ }
157
+
158
+ .reader-thumb-strip {
159
+ grid-area: left;
160
+ display: flex;
161
+ flex-direction: column;
162
+ gap: 14px;
163
+ width: 100%;
164
+ height: 100%;
165
+ overflow-y: auto;
166
+ padding: 20px 16px;
167
+ border-right: 1px solid rgba(255, 255, 255, 0.06);
168
+ scrollbar-width: thin;
169
+ scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
170
+ }
171
+
172
+ .reader-thumb-strip::-webkit-scrollbar { width: 4px; }
173
+ .reader-thumb-strip::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); }
174
+
175
+ .thumb-strip-item {
176
+ display: flex;
177
+ flex-direction: column;
178
+ gap: 6px;
179
+ background: transparent;
180
+ border: 0;
181
+ cursor: pointer;
182
+ padding: 0;
183
+ width: 100%;
184
+ text-align: left;
185
+ font-family: inherit;
186
+ color: var(--openpress-color-text-placeholder);
187
+ transition: color 150ms ease;
188
+ }
189
+
190
+ .thumb-strip-frame {
191
+ position: relative;
192
+ width: 100%;
193
+ aspect-ratio: 210 / 297;
194
+ overflow: hidden;
195
+ background: var(--openpress-color-document);
196
+ outline: 1px solid rgba(255, 255, 255, 0.08);
197
+ transition: outline 150ms ease;
198
+ }
199
+
200
+ .thumb-strip-content {
201
+ position: absolute;
202
+ top: 0;
203
+ left: 0;
204
+ width: 980px;
205
+ transform-origin: 0 0;
206
+ pointer-events: none;
207
+ }
208
+
209
+ .thumb-strip-item:hover .thumb-strip-frame {
210
+ outline-color: rgba(255, 255, 255, 0.25);
211
+ }
212
+
213
+ .thumb-strip-item.is-active .thumb-strip-frame {
214
+ outline: 2px solid var(--openpress-color-focus);
215
+ outline-offset: 2px;
216
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(15, 98, 254, 0.35);
217
+ }
218
+
219
+ .thumb-strip-item.is-active .thumb-strip-label {
220
+ color: var(--openpress-color-focus);
221
+ }
222
+
223
+ .thumb-strip-item.is-active {
224
+ color: var(--openpress-color-text-on-dark);
225
+ }
226
+
227
+ .thumb-strip-label {
228
+ display: flex;
229
+ align-items: baseline;
230
+ gap: 6px;
231
+ font-size: 10px;
232
+ letter-spacing: 0.06em;
233
+ padding: 0 2px;
234
+ }
235
+
236
+ .thumb-strip-index {
237
+ font-variant-numeric: tabular-nums;
238
+ letter-spacing: 0.06em;
239
+ flex-shrink: 0;
240
+ }
241
+
242
+ .thumb-strip-title {
243
+ flex: 1;
244
+ min-width: 0;
245
+ overflow: hidden;
246
+ text-overflow: ellipsis;
247
+ white-space: nowrap;
248
+ }
249
+
250
+ .reader-bookmarks {
251
+ display: flex;
252
+ flex-direction: column;
253
+ gap: 0;
254
+ width: 100%;
255
+ overflow: hidden;
256
+ padding: 0;
257
+ min-width: 0;
258
+ }
259
+
260
+ .bookmark-group {
261
+ display: flex;
262
+ flex-direction: column;
263
+ }
264
+
265
+ .bookmark-item {
266
+ display: grid;
267
+ width: 100%;
268
+ min-width: 0;
269
+ column-gap: 10px;
270
+ align-items: baseline;
271
+ padding: 7px 0;
272
+ background: transparent;
273
+ border: 0;
274
+ cursor: pointer;
275
+ text-align: left;
276
+ font-family: inherit;
277
+ letter-spacing: 0.02em;
278
+ color: var(--openpress-color-text-secondary);
279
+ transition: color 150ms ease;
280
+ }
281
+
282
+ .bookmark-title {
283
+ min-width: 0;
284
+ }
285
+
286
+ .bookmark-h2 {
287
+ grid-template-columns: 28px minmax(0, 1fr);
288
+ font-size: 14.5px;
289
+ line-height: 1.5;
290
+ font-weight: 400;
291
+ opacity: 0.7;
292
+ padding: 8px 0;
293
+ }
294
+
295
+ .bookmark-h2:hover {
296
+ opacity: 1;
297
+ }
298
+
299
+ .bookmark-h2.is-active {
300
+ opacity: 1;
301
+ color: var(--openpress-color-text-on-dark);
302
+ }
303
+
304
+ .bookmark-h3 {
305
+ grid-template-columns: 34px minmax(0, 1fr);
306
+ padding: 6px 0 6px 38px;
307
+ margin-left: 0;
308
+ font-size: 12.5px;
309
+ line-height: 1.45;
310
+ opacity: 0.5;
311
+ color: var(--openpress-color-text-placeholder);
312
+ }
313
+
314
+ .bookmark-h3:hover {
315
+ opacity: 0.85;
316
+ }
317
+
318
+ .bookmark-h3.is-active {
319
+ opacity: 1;
320
+ color: var(--openpress-color-text-on-dark);
321
+ }
322
+
323
+ .bookmark-index {
324
+ font-variant-numeric: tabular-nums;
325
+ letter-spacing: 0.06em;
326
+ color: inherit;
327
+ }
328
+
329
+ .bookmark-title {
330
+ display: -webkit-box;
331
+ -webkit-line-clamp: 2;
332
+ -webkit-box-orient: vertical;
333
+ overflow: hidden;
334
+ color: inherit;
335
+ }
336
+
337
+ .bookmark-h3 .bookmark-title {
338
+ -webkit-line-clamp: 1;
339
+ }
340
+
341
+ .bookmark-subs {
342
+ display: flex;
343
+ flex-direction: column;
344
+ overflow: hidden;
345
+ max-height: 0;
346
+ transition: max-height 220ms ease;
347
+ }
348
+
349
+ .bookmark-group.is-open .bookmark-subs {
350
+ max-height: none;
351
+ overflow: visible;
352
+ }
353
+
354
+ .bookmark-item:focus-visible {
355
+ outline: 1px solid var(--openpress-color-focus);
356
+ outline-offset: 2px;
357
+ }
358
+
359
+
360
+ .reader-thumbs {
361
+ position: fixed;
362
+ inset: 0;
363
+ z-index: 1000;
364
+ display: grid;
365
+ grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
366
+ align-content: start;
367
+ gap: 24px;
368
+ padding: 48px;
369
+ overflow-y: auto;
370
+ background: rgba(15, 15, 15, 0.96);
371
+ backdrop-filter: blur(18px);
372
+ animation: thumbs-in 140ms ease-out both;
373
+ }
374
+
375
+ .reader-thumbs[hidden] {
376
+ display: none;
377
+ }
378
+
379
+ @keyframes thumbs-in {
380
+ from { opacity: 0; }
381
+ to { opacity: 1; }
382
+ }
383
+
384
+ .thumb-item {
385
+ display: flex;
386
+ flex-direction: column;
387
+ gap: 8px;
388
+ padding: 0;
389
+ margin: 0;
390
+ background: transparent;
391
+ border: 0;
392
+ color: var(--openpress-color-text-secondary);
393
+ font-family: inherit;
394
+ text-align: left;
395
+ cursor: pointer;
396
+ }
397
+
398
+ .thumb-frame {
399
+ position: relative;
400
+ width: 100%;
401
+ aspect-ratio: 210 / 297;
402
+ overflow: hidden;
403
+ background: var(--openpress-color-document);
404
+ outline: 1px solid var(--openpress-color-border-subtle);
405
+ outline-offset: 0;
406
+ transition: outline-color 120ms ease, transform 120ms ease;
407
+ }
408
+
409
+ .thumb-item:hover .thumb-frame {
410
+ outline-color: var(--openpress-color-text-secondary);
411
+ transform: translateY(-2px);
412
+ }
413
+
414
+ .thumb-item.is-active .thumb-frame {
415
+ outline: 1px solid var(--openpress-color-text-on-dark);
416
+ }
417
+
418
+ .thumb-content {
419
+ position: absolute;
420
+ top: 0;
421
+ left: 0;
422
+ width: 980px;
423
+ transform-origin: 0 0;
424
+ pointer-events: none;
425
+ }
426
+
427
+ .thumb-label {
428
+ display: flex;
429
+ align-items: baseline;
430
+ gap: 8px;
431
+ font-size: 12px;
432
+ line-height: 1.35;
433
+ color: var(--openpress-color-text-secondary);
434
+ }
435
+
436
+ .thumb-index {
437
+ flex-shrink: 0;
438
+ color: var(--openpress-color-text-placeholder);
439
+ font-variant-numeric: tabular-nums;
440
+ font-size: 11px;
441
+ letter-spacing: 0.06em;
442
+ }
443
+
444
+ .thumb-title {
445
+ flex: 1;
446
+ min-width: 0;
447
+ overflow: hidden;
448
+ text-overflow: ellipsis;
449
+ white-space: nowrap;
450
+ }
451
+
452
+ .thumb-item.is-active .thumb-label {
453
+ color: var(--openpress-color-text-on-dark);
454
+ }
455
+
456
+ .thumb-item:focus-visible .thumb-frame {
457
+ outline: 2px solid var(--openpress-color-focus);
458
+ }
459
+
460
+ body.thumbs-open {
461
+ overflow: hidden;
462
+ }
463
+
464
+ @media screen and (max-width: 1199px) {
465
+ .reader-app,
466
+ .reader-app.is-closed-left,
467
+ .reader-app.is-closed-right,
468
+ .reader-app.is-closed-left.is-closed-right {
469
+ grid-template-columns: minmax(0, 1fr);
470
+ grid-template-areas:
471
+ "nav"
472
+ "main";
473
+ }
474
+
475
+ .reader-thumb-strip {
476
+ position: fixed;
477
+ top: 56px;
478
+ left: 0;
479
+ width: clamp(240px, 60vw, 320px);
480
+ height: calc(100vh - 56px);
481
+ z-index: 25;
482
+ background: var(--openpress-color-app-bg);
483
+ transform: translateX(0);
484
+ transition: transform 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
485
+ box-shadow: 16px 0 32px rgba(0, 0, 0, 0.55);
486
+ display: flex !important;
487
+ }
488
+
489
+ .reader-app.is-closed-left .reader-thumb-strip {
490
+ transform: translateX(-100%);
491
+ box-shadow: none;
492
+ }
493
+
494
+ .reader-side-nav {
495
+ position: fixed;
496
+ top: 56px;
497
+ right: 0;
498
+ width: clamp(280px, 70vw, 360px);
499
+ height: calc(100vh - 56px);
500
+ z-index: 25;
501
+ background: var(--openpress-color-app-bg);
502
+ transform: translateX(0);
503
+ transition: transform 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
504
+ box-shadow: -16px 0 32px rgba(0, 0, 0, 0.55);
505
+ padding: 20px 0;
506
+ display: grid !important;
507
+ }
508
+
509
+ .reader-app.is-closed-right .reader-side-nav {
510
+ transform: translateX(100%);
511
+ box-shadow: none;
512
+ }
513
+
514
+ .reader-app.is-floating-backdrop::before {
515
+ content: "";
516
+ position: fixed;
517
+ top: 56px;
518
+ inset-inline: 0;
519
+ bottom: 0;
520
+ background: rgba(0, 0, 0, 0.35);
521
+ z-index: 24;
522
+ -webkit-backdrop-filter: blur(2px);
523
+ backdrop-filter: blur(2px);
524
+ }
525
+ }
526
+
527
+ @media screen and (max-width: 767px) {
528
+ .reader-app {
529
+ grid-template-rows: 52px minmax(0, 1fr);
530
+ grid-template-columns: 1fr;
531
+ grid-template-areas:
532
+ "nav"
533
+ "main";
534
+ }
535
+
536
+ .reader-thumb-strip,
537
+ .reader-side-nav {
538
+ top: 52px;
539
+ height: calc(100vh - 52px);
540
+ }
541
+
542
+ .reader-app.is-floating-backdrop::before {
543
+ top: 52px;
544
+ }
545
+
546
+ .reader-thumb-strip {
547
+ display: none;
548
+ }
549
+
550
+ .reader-navbar {
551
+ padding: 0 14px;
552
+ grid-template-columns: 1fr auto;
553
+ }
554
+
555
+ .navbar-sub,
556
+ .navbar-hints,
557
+ [data-reader-thumbs] {
558
+ display: none;
559
+ }
560
+
561
+ .navbar-icon[data-toggle-right],
562
+ .navbar-icon[data-toggle-left] {
563
+ display: inline-flex;
564
+ align-items: center;
565
+ justify-content: center;
566
+ width: 36px;
567
+ height: 36px;
568
+ color: var(--openpress-color-text-secondary);
569
+ opacity: 1;
570
+ }
571
+
572
+ .navbar-icon[data-toggle-left] {
573
+ font-size: 18px;
574
+ }
575
+
576
+ .navbar-mark {
577
+ font-size: 16px;
578
+ }
579
+
580
+ .navbar-btn,
581
+ .navbar-menu-btn {
582
+ display: none;
583
+ }
584
+
585
+ .reader-stage {
586
+ overflow: auto;
587
+ -webkit-overflow-scrolling: touch;
588
+ background: var(--openpress-color-app-bg);
589
+ }
590
+
591
+ .reader-pages {
592
+ display: flex;
593
+ gap: 18px;
594
+ padding: 16px 14px calc(128px + env(safe-area-inset-bottom));
595
+ height: auto;
596
+ background: var(--openpress-color-app-bg);
597
+ --reader-page-width: calc(100cqw - 28px);
598
+ }
599
+
600
+ .reader-page,
601
+ .reader-page.is-active,
602
+ .reader-page--cover.is-active,
603
+ .reader-page--back-cover.is-active {
604
+ width: var(--reader-page-width);
605
+ min-height: calc(var(--reader-page-width) * 297 / 210);
606
+ height: auto;
607
+ overflow: visible;
608
+ margin: 0;
609
+ --openpress-space-1: 0.8cqw;
610
+ --openpress-space-2: 1.45cqw;
611
+ --openpress-space-3: 2.2cqw;
612
+ --openpress-space-4: 3.1cqw;
613
+ --openpress-space-5: 4.4cqw;
614
+ animation: none !important;
615
+ transform: none !important;
616
+ }
617
+
618
+ .reader-page .page-frame {
619
+ height: auto;
620
+ min-height: inherit;
621
+ grid-template-rows: var(--page-header-height) minmax(max-content, 1fr) var(--page-footer-height);
622
+ }
623
+
624
+ .reader-page.no-footer .page-frame {
625
+ grid-template-rows: var(--page-header-height) minmax(max-content, 1fr);
626
+ }
627
+
628
+ .reader-page.measurement {
629
+ display: block !important;
630
+ width: var(--openpress-page-width);
631
+ height: var(--openpress-page-height);
632
+ min-height: var(--openpress-page-height);
633
+ overflow: hidden;
634
+ }
635
+
636
+ .reader-page--cover,
637
+ .reader-page--back-cover {
638
+ margin-bottom: 0;
639
+ }
640
+
641
+ .cover-meta,
642
+ .back-cover-meta,
643
+ .cover-byline,
644
+ .back-cover-byline {
645
+ font-size: 1.5cqw;
646
+ letter-spacing: 0.08em;
647
+ }
648
+
649
+ .cover-title {
650
+ font-size: 9.2cqw;
651
+ }
652
+
653
+ .cover-tagline {
654
+ font-size: 2.55cqw;
655
+ }
656
+
657
+ .cover-subtitle {
658
+ font-size: 2.25cqw;
659
+ line-height: 1.45;
660
+ }
661
+
662
+ .cover-summary {
663
+ max-width: 100%;
664
+ font-size: 1.8cqw;
665
+ line-height: 1.7;
666
+ }
667
+
668
+ .cover-visual,
669
+ .back-cover-visual {
670
+ margin-top: var(--openpress-space-2);
671
+ }
672
+
673
+ .cover-visual img,
674
+ .back-cover-visual img {
675
+ max-height: 28cqw;
676
+ }
677
+
678
+ .reader-page--toc {
679
+ margin-bottom: 0;
680
+ border-top: 0;
681
+ }
682
+
683
+ .back-cover-kicker {
684
+ font-size: 8cqw;
685
+ }
686
+
687
+ .back-cover-rule {
688
+ width: 5.2cqw;
689
+ }
690
+
691
+ .back-cover-statement {
692
+ max-width: 100%;
693
+ font-size: 2.35cqw;
694
+ line-height: 1.45;
695
+ }
696
+
697
+ .back-cover-summary {
698
+ max-width: 100%;
699
+ font-size: 1.8cqw;
700
+ line-height: 1.7;
701
+ }
702
+
703
+ h2 {
704
+ font-size: 3.35cqw;
705
+ }
706
+
707
+ h2::before {
708
+ width: 5.2cqw;
709
+ }
710
+
711
+ h3 {
712
+ font-size: 2.4cqw;
713
+ }
714
+
715
+ h4 {
716
+ font-size: 2.05cqw;
717
+ }
718
+
719
+ p,
720
+ ol,
721
+ ul {
722
+ font-size: 1.86cqw;
723
+ }
724
+
725
+ table {
726
+ font-size: 1.45cqw;
727
+ }
728
+
729
+ figcaption,
730
+ caption {
731
+ font-size: 1.38cqw;
732
+ }
733
+
734
+ .reader-page--content .page-body > figure {
735
+ width: 100%;
736
+ }
737
+
738
+ th, td {
739
+ padding: 0.9cqw 1cqw;
740
+ }
741
+
742
+ .toc-list a {
743
+ grid-template-columns: 8cqw 1fr 6cqw;
744
+ padding: 1.6cqw 0;
745
+ font-size: 2cqw;
746
+ }
747
+
748
+ .reader-thumbs {
749
+ padding: 16px;
750
+ gap: 12px;
751
+ grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
752
+ }
753
+
754
+ .thumb-label {
755
+ font-size: 10px;
756
+ }
757
+
758
+ .reader-side-nav {
759
+ width: clamp(260px, 80vw, 340px);
760
+ }
761
+ }