@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,612 +0,0 @@
1
- /* Page-surface styles (cover, back-cover, toc) live in
2
- * document/theme/page-surfaces/. */
3
-
4
- .reader-page--content {
5
- padding: 0;
6
- }
7
-
8
- .content-body {
9
- background: var(--openpress-color-document);
10
- }
11
-
12
- h2,
13
- h3,
14
- h4 {
15
- break-after: avoid;
16
- color: var(--openpress-color-ink);
17
- letter-spacing: 0.04em;
18
- }
19
-
20
- h2 {
21
- margin: 0 0 var(--openpress-space-4);
22
- padding: 0;
23
- font-family: var(--openpress-font-serif);
24
- font-size: clamp(5.7pt, 3.4cqw, 17pt);
25
- line-height: 1.45;
26
- font-weight: 300;
27
- border: 0;
28
- }
29
-
30
- h2::before {
31
- content: "";
32
- display: block;
33
- width: 36px;
34
- height: 1px;
35
- background: var(--openpress-color-ink);
36
- margin-bottom: var(--openpress-space-4);
37
- }
38
-
39
- .reader-page--content .page-body > h2:first-child {
40
- display: flex;
41
- align-items: baseline;
42
- gap: 0.55em;
43
- margin: 0 0 var(--openpress-space-4);
44
- }
45
-
46
- .reader-page--content .page-body > h2:first-child::before {
47
- content: attr(data-chapter);
48
- display: inline-block;
49
- flex-shrink: 0;
50
- font-family: var(--openpress-font-serif);
51
- font-size: 1.55em;
52
- font-weight: 300;
53
- color: var(--openpress-color-muted);
54
- line-height: 1;
55
- letter-spacing: 0.06em;
56
- width: auto;
57
- min-width: 0;
58
- height: auto;
59
- background: transparent;
60
- padding: 0;
61
- margin: 0;
62
- border: 0;
63
- }
64
-
65
- .reader-page--content h3[data-section] {
66
- display: flex;
67
- align-items: baseline;
68
- gap: 0.55em;
69
- }
70
-
71
- .reader-page--content h3[data-section]::before {
72
- content: attr(data-section);
73
- flex-shrink: 0;
74
- font-family: var(--openpress-font-serif);
75
- font-size: 0.95em;
76
- font-weight: 300;
77
- color: var(--openpress-color-muted);
78
- letter-spacing: 0.08em;
79
- line-height: inherit;
80
- }
81
-
82
- h2 + p,
83
- h2 + h3 {
84
- margin-top: var(--openpress-space-3);
85
- }
86
-
87
- h3 {
88
- margin: var(--openpress-space-3) 0 var(--openpress-space-2);
89
- font-family: var(--openpress-font-serif);
90
- font-size: clamp(4.8pt, 2.4cqw, 13pt);
91
- line-height: 1.55;
92
- font-weight: 400;
93
- color: var(--openpress-color-ink);
94
- letter-spacing: 0.03em;
95
- }
96
-
97
- .reader-page--content .page-body > h3:first-child {
98
- margin-top: 0;
99
- }
100
-
101
- h4 {
102
- margin: var(--openpress-space-3) 0 var(--openpress-space-1);
103
- font-family: var(--openpress-font-body);
104
- font-size: clamp(4.4pt, 1.9cqw, 11pt);
105
- font-weight: 500;
106
- color: var(--openpress-color-muted);
107
- letter-spacing: 0.04em;
108
- }
109
-
110
- p {
111
- margin: 0 0 var(--openpress-space-2);
112
- font-size: clamp(4.2pt, 1.85cqw, 10.5pt);
113
- line-height: 1.85;
114
- }
115
-
116
- .openpress-equation {
117
- display: block;
118
- width: fit-content;
119
- max-width: 100%;
120
- margin: var(--openpress-space-2) auto var(--openpress-space-3);
121
- border-block: 1px solid color-mix(in srgb, var(--openpress-color-line) 76%, transparent);
122
- padding: 0.55em 1.15em;
123
- background: color-mix(in srgb, var(--openpress-color-panel) 78%, var(--openpress-color-document));
124
- color: var(--openpress-color-ink);
125
- font-family: var(--openpress-font-mono);
126
- font-size: clamp(4.4pt, 1.95cqw, 11pt);
127
- line-height: 1.7;
128
- text-align: center;
129
- letter-spacing: 0;
130
- overflow-x: auto;
131
- }
132
-
133
- .openpress-equation sup {
134
- font-size: 0.68em;
135
- line-height: 0;
136
- }
137
-
138
- .reader-page--content p,
139
- .reader-page--content li,
140
- .reader-page--content td {
141
- hanging-punctuation: first allow-end;
142
- }
143
-
144
- .reader-page--content.is-chapter-end .page-body::after {
145
- content: "―";
146
- display: block;
147
- text-align: center;
148
- margin-top: var(--openpress-space-1);
149
- color: var(--openpress-color-muted);
150
- font-size: 1em;
151
- letter-spacing: 0.4em;
152
- opacity: 0.45;
153
- }
154
-
155
- strong {
156
- font-weight: 600;
157
- color: var(--openpress-color-ink);
158
- }
159
-
160
- em {
161
- font-style: italic;
162
- font-family: var(--openpress-font-serif);
163
- color: var(--openpress-color-ink);
164
- }
165
-
166
- del,
167
- s {
168
- color: var(--openpress-color-muted);
169
- text-decoration-thickness: 1px;
170
- text-decoration-color: var(--openpress-color-muted);
171
- }
172
-
173
- mark {
174
- background: var(--openpress-chart-gold-bg);
175
- color: var(--openpress-color-ink);
176
- padding: 0 0.15em;
177
- border-radius: 1px;
178
- }
179
-
180
- a {
181
- color: var(--openpress-color-ink);
182
- text-decoration-line: underline;
183
- text-decoration-style: dotted;
184
- text-decoration-color: var(--openpress-color-muted);
185
- text-underline-offset: 2px;
186
- }
187
-
188
- /* Inline 語意強調 — 受控 status 色票
189
- * Markdown 內用 <span class="status-warn|status-success|status-info">。
190
- * 不提供 .accent-<color>(按色相命名)以避免破壞語意系統。
191
- */
192
- .status-warn {
193
- color: var(--openpress-status-warn);
194
- font-weight: 600;
195
- }
196
-
197
- .status-success {
198
- color: var(--openpress-status-success);
199
- font-weight: 600;
200
- }
201
-
202
- .status-info {
203
- color: var(--openpress-status-info);
204
- font-weight: 600;
205
- }
206
-
207
- .text-muted {
208
- color: var(--openpress-color-muted);
209
- }
210
-
211
- figcaption,
212
- caption {
213
- margin-top: 2mm;
214
- color: var(--openpress-color-muted);
215
- font-size: clamp(3.8pt, 1.45cqw, 8.5pt);
216
- line-height: 1.5;
217
- letter-spacing: 0.02em;
218
- text-align: center;
219
- }
220
-
221
- caption {
222
- caption-side: bottom;
223
- margin: var(--openpress-space-1) 0 0;
224
- text-align: center;
225
- }
226
-
227
- ol,
228
- ul {
229
- margin: 0 0 var(--openpress-space-3);
230
- padding-left: 7mm;
231
- font-size: clamp(4.2pt, 1.85cqw, 10.5pt);
232
- line-height: 1.85;
233
- }
234
-
235
- ol {
236
- list-style: decimal outside;
237
- }
238
-
239
- ul {
240
- list-style: disc outside;
241
- }
242
-
243
- li {
244
- margin: 0 0 1.4mm;
245
- padding-left: 1mm;
246
- }
247
-
248
- figure {
249
- break-inside: avoid;
250
- margin: var(--openpress-space-4) 0 var(--openpress-space-2);
251
- }
252
-
253
- figure img {
254
- display: block;
255
- max-width: 100%;
256
- max-height: 135mm;
257
- margin: 0 auto;
258
- padding: 6px;
259
- border: 1px solid var(--openpress-color-line);
260
- background: var(--openpress-color-paper);
261
- box-sizing: border-box;
262
- }
263
-
264
- .reader-page--content .page-body > figure {
265
- width: min(86%, 150mm);
266
- margin-left: auto;
267
- margin-right: auto;
268
- }
269
-
270
- .reader-page--content .page-body > figure img {
271
- width: 100%;
272
- max-height: 92mm;
273
- object-fit: contain;
274
- }
275
-
276
- table {
277
- width: 100%;
278
- margin: var(--openpress-space-3) 0 var(--openpress-space-4);
279
- border-collapse: collapse;
280
- border: 0;
281
- border-top: 1px solid var(--openpress-color-ink);
282
- background: transparent;
283
- font-size: clamp(3.5pt, 1.55cqw, 9pt);
284
- line-height: var(--openpress-leading-table);
285
- break-inside: avoid;
286
- }
287
-
288
- thead {
289
- display: table-header-group;
290
- }
291
-
292
- th,
293
- td {
294
- padding: 3.4mm 2.4mm;
295
- border: 0;
296
- border-bottom: 1px solid var(--openpress-color-line);
297
- vertical-align: top;
298
- min-width: 0;
299
- overflow-wrap: anywhere;
300
- word-break: normal;
301
- }
302
-
303
- th {
304
- color: var(--openpress-color-ink);
305
- background: transparent;
306
- border-bottom: 1px solid var(--openpress-color-ink);
307
- text-align: left;
308
- font-weight: 500;
309
- letter-spacing: 0.02em;
310
- white-space: nowrap;
311
- }
312
-
313
- .reader-page--content tbody tr:nth-child(even) td {
314
- background: rgba(247, 243, 234, 0.55);
315
- }
316
-
317
- .reader-page--content table:not(.figure-grid) tbody tr:last-child td {
318
- border-bottom: 1px solid var(--openpress-color-ink);
319
- }
320
-
321
- code {
322
- font-family: var(--openpress-font-mono);
323
- font-size: 0.92em;
324
- padding: 0.05em 0.25em;
325
- background: rgba(29, 40, 50, 0.045);
326
- border-radius: 2px;
327
- overflow-wrap: anywhere;
328
- word-break: normal;
329
- }
330
-
331
- pre {
332
- max-width: 100%;
333
- margin: var(--openpress-space-2) 0 var(--openpress-space-3);
334
- padding: 2.6mm 3.2mm;
335
- white-space: pre-wrap;
336
- overflow-wrap: anywhere;
337
- word-break: normal;
338
- background: var(--openpress-color-block);
339
- border: 0;
340
- border-top: 1px solid var(--openpress-color-line);
341
- border-bottom: 1px solid var(--openpress-color-line);
342
- }
343
-
344
- pre code {
345
- display: block;
346
- padding: 0;
347
- background: transparent;
348
- border-radius: 0;
349
- font-size: clamp(4pt, 1.65cqw, 9.2pt);
350
- line-height: 1.65;
351
- color: var(--openpress-color-ink);
352
- }
353
-
354
- hr {
355
- margin: var(--openpress-space-4) 0;
356
- border: 0;
357
- border-top: 1px solid var(--openpress-color-line);
358
- }
359
-
360
- /* Claude document overrides.
361
- * The visual language is intentionally quiet: serif H2, clean sans body, paper texture,
362
- * mist-blue hairlines, and print-safe document blocks.
363
- */
364
-
365
- .content-body {
366
- background: transparent;
367
- }
368
-
369
- .reader-page--content {
370
- color: var(--openpress-color-body);
371
- }
372
-
373
- h2,
374
- h3,
375
- h4 {
376
- font-family: var(--openpress-font-body);
377
- color: var(--openpress-color-ink);
378
- letter-spacing: 0;
379
- }
380
-
381
- h2 {
382
- display: block;
383
- margin: 0 0 var(--openpress-space-4);
384
- padding-bottom: 0;
385
- border-bottom: 0;
386
- font-family: var(--openpress-font-serif);
387
- font-size: clamp(
388
- calc(14pt - var(--openpress-type-step-down)),
389
- calc(4.4cqw - var(--openpress-type-step-down)),
390
- calc(26pt - var(--openpress-type-step-down))
391
- );
392
- font-weight: 300;
393
- line-height: 1.3;
394
- }
395
-
396
- h2::before {
397
- content: none;
398
- }
399
-
400
- .reader-page--content .page-body > h2:first-child {
401
- display: grid;
402
- grid-template-columns: auto minmax(0, 1fr);
403
- column-gap: 3mm;
404
- align-items: baseline;
405
- margin: 0 0 var(--openpress-space-4);
406
- }
407
-
408
- .reader-page--content .page-body > h2:first-child::before {
409
- content: attr(data-chapter-marker);
410
- display: inline-block;
411
- width: auto;
412
- height: auto;
413
- border: 0;
414
- background: transparent;
415
- font-family: var(--openpress-font-serif);
416
- font-size: 1em;
417
- font-weight: 400;
418
- color: var(--openpress-color-muted);
419
- letter-spacing: 0;
420
- line-height: inherit;
421
- transform: none;
422
- }
423
-
424
- h2 + p,
425
- h2 + h3 {
426
- margin-top: 0;
427
- }
428
-
429
- h3 {
430
- margin: var(--openpress-space-4) 0 var(--openpress-space-2);
431
- padding-left: 0;
432
- border-left: 0;
433
- font-family: var(--openpress-font-serif);
434
- font-size: clamp(
435
- calc(11pt - var(--openpress-type-step-down)),
436
- calc(2.9cqw - var(--openpress-type-step-down)),
437
- calc(18pt - var(--openpress-type-step-down))
438
- );
439
- font-weight: 400;
440
- line-height: 1.4;
441
- color: var(--openpress-color-ink);
442
- }
443
-
444
- .reader-page--content h3[data-section] {
445
- display: flex;
446
- gap: 0.6em;
447
- align-items: baseline;
448
- }
449
-
450
- .reader-page--content h3[data-section]::before {
451
- content: attr(data-section);
452
- flex-shrink: 0;
453
- font-family: var(--openpress-font-serif);
454
- font-size: 0.9em;
455
- font-weight: 400;
456
- color: var(--openpress-color-muted);
457
- letter-spacing: 0;
458
- }
459
-
460
- .reader-page--content h3[data-section]::after {
461
- content: "";
462
- flex: 1 1 12mm;
463
- min-width: 8mm;
464
- border-bottom: 1px solid var(--openpress-color-line);
465
- transform: translateY(-0.28em);
466
- }
467
-
468
- h4 {
469
- margin: var(--openpress-space-3) 0 var(--openpress-space-1);
470
- font-size: clamp(
471
- calc(10.4pt - var(--openpress-type-step-down)),
472
- calc(2.25cqw - var(--openpress-type-step-down)),
473
- calc(13.4pt - var(--openpress-type-step-down))
474
- );
475
- font-weight: 500;
476
- color: var(--openpress-color-muted);
477
- }
478
-
479
- p,
480
- ol,
481
- ul {
482
- color: var(--openpress-color-body);
483
- font-size: clamp(
484
- calc(8.6pt - var(--openpress-type-step-down)),
485
- calc(1.92cqw - var(--openpress-type-step-down)),
486
- calc(11pt - var(--openpress-type-step-down))
487
- );
488
- line-height: 1.8;
489
- }
490
-
491
- li {
492
- margin-bottom: 1.2mm;
493
- }
494
-
495
- strong {
496
- color: var(--openpress-color-ink);
497
- font-weight: 700;
498
- }
499
-
500
- figcaption,
501
- caption {
502
- color: var(--openpress-color-muted);
503
- font-family: var(--openpress-font-body);
504
- font-size: clamp(
505
- calc(9pt - var(--openpress-type-step-down)),
506
- calc(1.72cqw - var(--openpress-type-step-down)),
507
- calc(10.5pt - var(--openpress-type-step-down))
508
- );
509
- font-weight: 500;
510
- line-height: 1.55;
511
- letter-spacing: 0;
512
- text-align: center;
513
- }
514
-
515
- figure figcaption[class],
516
- table caption {
517
- color: var(--openpress-color-muted);
518
- font-family: var(--openpress-font-body);
519
- font-size: clamp(
520
- calc(9pt - var(--openpress-type-step-down)),
521
- calc(1.72cqw - var(--openpress-type-step-down)),
522
- calc(10.5pt - var(--openpress-type-step-down))
523
- );
524
- font-weight: 500;
525
- line-height: 1.55;
526
- letter-spacing: 0;
527
- text-align: center;
528
- }
529
-
530
- caption {
531
- caption-side: bottom;
532
- margin: 2.6mm 0 0;
533
- }
534
-
535
- table {
536
- border: 1px solid var(--openpress-color-line-strong);
537
- border-collapse: collapse;
538
- background: rgba(255, 253, 248, 0.78);
539
- font-size: clamp(
540
- calc(8pt - var(--openpress-type-step-down)),
541
- calc(1.65cqw - var(--openpress-type-step-down)),
542
- calc(10.5pt - var(--openpress-type-step-down))
543
- );
544
- line-height: var(--openpress-leading-table);
545
- }
546
-
547
- th,
548
- td {
549
- padding: 2.7mm 2.4mm;
550
- border-right: 1px solid var(--openpress-color-line);
551
- border-bottom: 1px solid var(--openpress-color-line);
552
- }
553
-
554
- th:last-child,
555
- td:last-child {
556
- border-right: 0;
557
- }
558
-
559
- th {
560
- color: var(--openpress-color-ink);
561
- background: var(--openpress-color-soft-line);
562
- border-bottom: 1px solid var(--openpress-color-line-strong);
563
- font-weight: 700;
564
- }
565
-
566
- .reader-page--content tbody tr:nth-child(even) td {
567
- background: rgba(242, 238, 228, 0.48);
568
- }
569
-
570
- .reader-page--content table:not(.figure-grid) tbody tr:last-child td {
571
- border-bottom: 0;
572
- }
573
-
574
- code {
575
- font-family: var(--openpress-font-mono);
576
- color: var(--openpress-color-ink);
577
- background: var(--openpress-color-block);
578
- border: 1px solid var(--openpress-color-line);
579
- border-radius: 0;
580
- font-size: 0.92em;
581
- }
582
-
583
- pre {
584
- margin: var(--openpress-space-3) 0 var(--openpress-space-4);
585
- padding: 4mm 4.5mm;
586
- background: var(--openpress-color-block);
587
- border: 1px solid var(--openpress-color-line-strong);
588
- white-space: pre-wrap;
589
- overflow-wrap: anywhere;
590
- }
591
-
592
- pre code {
593
- font-family: var(--openpress-font-mono);
594
- font-size: clamp(
595
- calc(8.2pt - var(--openpress-type-step-down)),
596
- calc(1.72cqw - var(--openpress-type-step-down)),
597
- calc(10.5pt - var(--openpress-type-step-down))
598
- );
599
- font-weight: 400;
600
- line-height: 1.6;
601
- color: var(--openpress-color-ink);
602
- background: transparent;
603
- border: 0;
604
- }
605
-
606
- figure {
607
- margin: var(--openpress-space-4) 0;
608
- }
609
-
610
- .reader-page--content .page-body > figure {
611
- width: min(92%, 156mm);
612
- }
@@ -1,4 +0,0 @@
1
- /* OpenPress copies this file to /openpress/fonts.css during export. */
2
- @import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Noto+Sans+TC:wght@300;400;500;600;700&display=swap");
3
-
4
- /* Add @font-face declarations here only when a token references a bundled font. */
@@ -1,72 +0,0 @@
1
- /* page-surfaces / back-cover
2
- * Refinements on top of cover.css. The current document keeps the back cover
3
- * aligned with the chapter-opener composition: illustration, title, author.
4
- */
5
-
6
- .back-cover-main {
7
- align-items: flex-start;
8
- justify-content: flex-end;
9
- text-align: left;
10
- max-width: 124mm;
11
- bottom: 36mm;
12
- padding-bottom: 0;
13
- }
14
-
15
- .back-cover-main--quiet {
16
- flex: 0 1 auto;
17
- gap: var(--openpress-space-2);
18
- }
19
-
20
- .back-cover-main--quiet .lecture-mark {
21
- margin: 0 0 var(--openpress-space-2);
22
- background: rgba(255, 253, 248, 0.72);
23
- }
24
-
25
- .back-cover-kicker {
26
- margin: 0;
27
- font-family: var(--openpress-font-body);
28
- font-size: calc(9.5pt - var(--openpress-type-step-down));
29
- font-weight: 700;
30
- line-height: 1.2;
31
- letter-spacing: 0;
32
- padding: 2.2mm 6mm;
33
- border: 1px solid currentColor;
34
- border-radius: 999px;
35
- background: transparent;
36
- color: var(--chapter-opener-title);
37
- }
38
-
39
- .back-cover-statement {
40
- margin: 0;
41
- max-width: 118mm;
42
- font-family: var(--openpress-font-serif);
43
- font-size: clamp(
44
- calc(24pt - var(--openpress-type-step-down)),
45
- calc(5.2cqw - var(--openpress-type-step-down)),
46
- calc(42pt - var(--openpress-type-step-down))
47
- );
48
- font-weight: 700;
49
- line-height: 1.18;
50
- letter-spacing: 0;
51
- color: var(--chapter-opener-title);
52
- }
53
-
54
- .back-cover-summary {
55
- margin: var(--openpress-space-2) 0 0;
56
- max-width: 106mm;
57
- font-family: var(--openpress-font-body);
58
- font-size: clamp(
59
- calc(9pt - var(--openpress-type-step-down)),
60
- calc(1.65cqw - var(--openpress-type-step-down)),
61
- calc(10.5pt - var(--openpress-type-step-down))
62
- );
63
- line-height: 1.8;
64
- color: var(--chapter-opener-title);
65
- }
66
-
67
- .reader-page--back-cover .chapter-opener-illustration {
68
- top: 26mm;
69
- right: 18mm;
70
- width: min(96mm, 46%);
71
- opacity: 1;
72
- }