@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,789 @@
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: var(--openpress-page-aspect-ratio);
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-subgroup {
324
+ display: flex;
325
+ flex-direction: column;
326
+ }
327
+
328
+ .bookmark-h4 {
329
+ grid-template-columns: 42px minmax(0, 1fr);
330
+ padding: 4px 0 4px 58px;
331
+ font-size: 11.5px;
332
+ line-height: 1.4;
333
+ opacity: 0.44;
334
+ color: var(--openpress-color-text-placeholder);
335
+ }
336
+
337
+ .bookmark-h4:hover {
338
+ opacity: 0.78;
339
+ }
340
+
341
+ .bookmark-h4.is-active {
342
+ opacity: 1;
343
+ color: var(--openpress-color-text-on-dark);
344
+ }
345
+
346
+ .bookmark-index {
347
+ font-variant-numeric: tabular-nums;
348
+ letter-spacing: 0.06em;
349
+ color: inherit;
350
+ }
351
+
352
+ .bookmark-title {
353
+ display: -webkit-box;
354
+ -webkit-line-clamp: 2;
355
+ -webkit-box-orient: vertical;
356
+ overflow: hidden;
357
+ color: inherit;
358
+ }
359
+
360
+ .bookmark-h3 .bookmark-title {
361
+ -webkit-line-clamp: 1;
362
+ }
363
+
364
+ .bookmark-h4 .bookmark-title {
365
+ -webkit-line-clamp: 1;
366
+ }
367
+
368
+ .bookmark-subs {
369
+ display: flex;
370
+ flex-direction: column;
371
+ overflow: hidden;
372
+ max-height: 0;
373
+ transition: max-height 220ms ease;
374
+ }
375
+
376
+ .bookmark-group.is-open .bookmark-subs {
377
+ max-height: none;
378
+ overflow: visible;
379
+ }
380
+
381
+ .bookmark-item:focus-visible {
382
+ outline: 1px solid var(--openpress-color-focus);
383
+ outline-offset: 2px;
384
+ }
385
+
386
+
387
+ .reader-thumbs {
388
+ position: fixed;
389
+ inset: 0;
390
+ z-index: 1000;
391
+ display: grid;
392
+ grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
393
+ align-content: start;
394
+ gap: 24px;
395
+ padding: 48px;
396
+ overflow-y: auto;
397
+ background: rgba(15, 15, 15, 0.96);
398
+ backdrop-filter: blur(18px);
399
+ animation: thumbs-in 140ms ease-out both;
400
+ }
401
+
402
+ .reader-thumbs[hidden] {
403
+ display: none;
404
+ }
405
+
406
+ @keyframes thumbs-in {
407
+ from { opacity: 0; }
408
+ to { opacity: 1; }
409
+ }
410
+
411
+ .thumb-item {
412
+ display: flex;
413
+ flex-direction: column;
414
+ gap: 8px;
415
+ padding: 0;
416
+ margin: 0;
417
+ background: transparent;
418
+ border: 0;
419
+ color: var(--openpress-color-text-secondary);
420
+ font-family: inherit;
421
+ text-align: left;
422
+ cursor: pointer;
423
+ }
424
+
425
+ .thumb-frame {
426
+ position: relative;
427
+ width: 100%;
428
+ aspect-ratio: var(--openpress-page-aspect-ratio);
429
+ overflow: hidden;
430
+ background: var(--openpress-color-document);
431
+ outline: 1px solid var(--openpress-color-border-subtle);
432
+ outline-offset: 0;
433
+ transition: outline-color 120ms ease, transform 120ms ease;
434
+ }
435
+
436
+ .thumb-item:hover .thumb-frame {
437
+ outline-color: var(--openpress-color-text-secondary);
438
+ transform: translateY(-2px);
439
+ }
440
+
441
+ .thumb-item.is-active .thumb-frame {
442
+ outline: 1px solid var(--openpress-color-text-on-dark);
443
+ }
444
+
445
+ .thumb-content {
446
+ position: absolute;
447
+ top: 0;
448
+ left: 0;
449
+ width: 980px;
450
+ transform-origin: 0 0;
451
+ pointer-events: none;
452
+ }
453
+
454
+ .thumb-label {
455
+ display: flex;
456
+ align-items: baseline;
457
+ gap: 8px;
458
+ font-size: 12px;
459
+ line-height: 1.35;
460
+ color: var(--openpress-color-text-secondary);
461
+ }
462
+
463
+ .thumb-index {
464
+ flex-shrink: 0;
465
+ color: var(--openpress-color-text-placeholder);
466
+ font-variant-numeric: tabular-nums;
467
+ font-size: 11px;
468
+ letter-spacing: 0.06em;
469
+ }
470
+
471
+ .thumb-title {
472
+ flex: 1;
473
+ min-width: 0;
474
+ overflow: hidden;
475
+ text-overflow: ellipsis;
476
+ white-space: nowrap;
477
+ }
478
+
479
+ .thumb-item.is-active .thumb-label {
480
+ color: var(--openpress-color-text-on-dark);
481
+ }
482
+
483
+ .thumb-item:focus-visible .thumb-frame {
484
+ outline: 2px solid var(--openpress-color-focus);
485
+ }
486
+
487
+ body.thumbs-open {
488
+ overflow: hidden;
489
+ }
490
+
491
+ @media screen and (max-width: 1199px) {
492
+ .reader-app,
493
+ .reader-app.is-closed-left,
494
+ .reader-app.is-closed-right,
495
+ .reader-app.is-closed-left.is-closed-right {
496
+ grid-template-columns: minmax(0, 1fr);
497
+ grid-template-areas:
498
+ "nav"
499
+ "main";
500
+ }
501
+
502
+ .reader-thumb-strip {
503
+ position: fixed;
504
+ top: 56px;
505
+ left: 0;
506
+ width: clamp(240px, 60vw, 320px);
507
+ height: calc(100vh - 56px);
508
+ z-index: 25;
509
+ background: var(--openpress-color-app-bg);
510
+ transform: translateX(0);
511
+ transition: transform 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
512
+ box-shadow: 16px 0 32px rgba(0, 0, 0, 0.55);
513
+ display: flex !important;
514
+ }
515
+
516
+ .reader-app.is-closed-left .reader-thumb-strip {
517
+ transform: translateX(-100%);
518
+ box-shadow: none;
519
+ }
520
+
521
+ .reader-side-nav {
522
+ position: fixed;
523
+ top: 56px;
524
+ right: 0;
525
+ width: clamp(280px, 70vw, 360px);
526
+ height: calc(100vh - 56px);
527
+ z-index: 25;
528
+ background: var(--openpress-color-app-bg);
529
+ transform: translateX(0);
530
+ transition: transform 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
531
+ box-shadow: -16px 0 32px rgba(0, 0, 0, 0.55);
532
+ padding: 20px 0;
533
+ display: grid !important;
534
+ }
535
+
536
+ .reader-app.is-closed-right .reader-side-nav {
537
+ transform: translateX(100%);
538
+ box-shadow: none;
539
+ }
540
+
541
+ .reader-app.is-floating-backdrop::before {
542
+ content: "";
543
+ position: fixed;
544
+ top: 56px;
545
+ inset-inline: 0;
546
+ bottom: 0;
547
+ background: rgba(0, 0, 0, 0.35);
548
+ z-index: 24;
549
+ -webkit-backdrop-filter: blur(2px);
550
+ backdrop-filter: blur(2px);
551
+ }
552
+ }
553
+
554
+ @media screen and (max-width: 767px) {
555
+ .reader-app {
556
+ grid-template-rows: 52px minmax(0, 1fr);
557
+ grid-template-columns: 1fr;
558
+ grid-template-areas:
559
+ "nav"
560
+ "main";
561
+ }
562
+
563
+ .reader-thumb-strip,
564
+ .reader-side-nav {
565
+ top: 52px;
566
+ height: calc(100vh - 52px);
567
+ }
568
+
569
+ .reader-app.is-floating-backdrop::before {
570
+ top: 52px;
571
+ }
572
+
573
+ .reader-thumb-strip {
574
+ display: none;
575
+ }
576
+
577
+ .reader-navbar {
578
+ padding: 0 14px;
579
+ grid-template-columns: 1fr auto;
580
+ }
581
+
582
+ .navbar-sub,
583
+ .navbar-hints,
584
+ [data-reader-thumbs] {
585
+ display: none;
586
+ }
587
+
588
+ .navbar-icon[data-toggle-right],
589
+ .navbar-icon[data-toggle-left] {
590
+ display: inline-flex;
591
+ align-items: center;
592
+ justify-content: center;
593
+ width: 36px;
594
+ height: 36px;
595
+ color: var(--openpress-color-text-secondary);
596
+ opacity: 1;
597
+ }
598
+
599
+ .navbar-icon[data-toggle-left] {
600
+ font-size: 18px;
601
+ }
602
+
603
+ .navbar-mark {
604
+ font-size: 16px;
605
+ }
606
+
607
+ .navbar-btn,
608
+ .navbar-menu-btn {
609
+ display: none;
610
+ }
611
+
612
+ .reader-stage {
613
+ overflow: auto;
614
+ -webkit-overflow-scrolling: touch;
615
+ background: var(--openpress-color-app-bg);
616
+ }
617
+
618
+ .reader-pages {
619
+ display: flex;
620
+ gap: 18px;
621
+ padding: 16px 14px calc(128px + env(safe-area-inset-bottom));
622
+ height: auto;
623
+ background: var(--openpress-color-app-bg);
624
+ --reader-page-width: calc(100cqw - 28px);
625
+ }
626
+
627
+ .reader-page,
628
+ .reader-page.is-active,
629
+ .reader-page.reader-page--cover.is-active,
630
+ .reader-page.reader-page--back-cover.is-active {
631
+ width: var(--reader-page-width);
632
+ min-height: calc(var(--reader-page-width) * var(--openpress-page-height-ratio));
633
+ aspect-ratio: var(--openpress-page-aspect-ratio);
634
+ height: auto;
635
+ overflow: visible;
636
+ margin: 0;
637
+ --openpress-space-1: 0.8cqw;
638
+ --openpress-space-2: 1.45cqw;
639
+ --openpress-space-3: 2.2cqw;
640
+ --openpress-space-4: 3.1cqw;
641
+ --openpress-space-5: 4.4cqw;
642
+ animation: none !important;
643
+ transform: none !important;
644
+ }
645
+
646
+ .reader-page .page-frame {
647
+ height: auto;
648
+ min-height: inherit;
649
+ grid-template-rows: var(--page-header-height) minmax(max-content, 1fr) var(--page-footer-height);
650
+ }
651
+
652
+ .reader-page.no-footer .page-frame {
653
+ grid-template-rows: var(--page-header-height) minmax(max-content, 1fr);
654
+ }
655
+
656
+ .reader-page.measurement {
657
+ display: block !important;
658
+ width: var(--openpress-page-width);
659
+ height: var(--openpress-page-height);
660
+ min-height: var(--openpress-page-height);
661
+ overflow: hidden;
662
+ }
663
+
664
+ .reader-page--cover,
665
+ .reader-page--back-cover {
666
+ margin-bottom: 0;
667
+ }
668
+
669
+ .cover-meta,
670
+ .back-cover-meta,
671
+ .cover-byline,
672
+ .back-cover-byline {
673
+ font-size: 1.5cqw;
674
+ letter-spacing: 0.08em;
675
+ }
676
+
677
+ .cover-title {
678
+ font-size: 9.2cqw;
679
+ }
680
+
681
+ .cover-tagline {
682
+ font-size: 2.55cqw;
683
+ }
684
+
685
+ .cover-subtitle {
686
+ font-size: 2.25cqw;
687
+ line-height: 1.45;
688
+ }
689
+
690
+ .cover-summary {
691
+ max-width: 100%;
692
+ font-size: 1.8cqw;
693
+ line-height: 1.7;
694
+ }
695
+
696
+ .cover-visual,
697
+ .back-cover-visual {
698
+ margin-top: var(--openpress-space-2);
699
+ }
700
+
701
+ .cover-visual img,
702
+ .back-cover-visual img {
703
+ max-height: 28cqw;
704
+ }
705
+
706
+ .reader-page--toc {
707
+ margin-bottom: 0;
708
+ border-top: 0;
709
+ }
710
+
711
+ .back-cover-kicker {
712
+ font-size: 8cqw;
713
+ }
714
+
715
+ .back-cover-rule {
716
+ width: 5.2cqw;
717
+ }
718
+
719
+ .back-cover-statement {
720
+ max-width: 100%;
721
+ font-size: 2.35cqw;
722
+ line-height: 1.45;
723
+ }
724
+
725
+ .back-cover-summary {
726
+ max-width: 100%;
727
+ font-size: 1.8cqw;
728
+ line-height: 1.7;
729
+ }
730
+
731
+ h2 {
732
+ font-size: 3.35cqw;
733
+ }
734
+
735
+ h2::before {
736
+ width: 5.2cqw;
737
+ }
738
+
739
+ h3 {
740
+ font-size: 2.4cqw;
741
+ }
742
+
743
+ h4 {
744
+ font-size: 2.05cqw;
745
+ }
746
+
747
+ p,
748
+ ol,
749
+ ul {
750
+ font-size: 1.86cqw;
751
+ }
752
+
753
+ table {
754
+ font-size: 1.45cqw;
755
+ }
756
+
757
+ figcaption,
758
+ caption {
759
+ font-size: 1.38cqw;
760
+ }
761
+
762
+ .reader-page--content .page-body > figure {
763
+ width: 100%;
764
+ }
765
+
766
+ th, td {
767
+ padding: 0.9cqw 1cqw;
768
+ }
769
+
770
+ .toc-list a {
771
+ grid-template-columns: 8cqw 1fr 6cqw;
772
+ padding: 1.6cqw 0;
773
+ font-size: 2cqw;
774
+ }
775
+
776
+ .reader-thumbs {
777
+ padding: 16px;
778
+ gap: 12px;
779
+ grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
780
+ }
781
+
782
+ .thumb-label {
783
+ font-size: 10px;
784
+ }
785
+
786
+ .reader-side-nav {
787
+ width: clamp(260px, 80vw, 340px);
788
+ }
789
+ }