@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,761 +0,0 @@
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
- }