@open-press/cli 0.5.0 → 0.7.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.
- package/dist/cli.js +114 -23
- package/package.json +1 -1
- package/template/core/CHANGELOG.md +97 -1
- package/template/core/README.md +9 -5
- package/template/core/engine/cli.mjs +2 -5
- package/template/core/engine/commands/_shared.mjs +4 -4
- package/template/core/engine/commands/deploy.mjs +1 -1
- package/template/core/engine/commands/inspect.mjs +3 -3
- package/template/core/engine/commands/replace.mjs +1 -1
- package/template/core/engine/commands/search.mjs +1 -1
- package/template/core/engine/commands/validate.mjs +2 -2
- package/template/core/engine/document-export.mjs +1 -1
- package/template/core/engine/{chrome-pdf.mjs → output/chrome-pdf.mjs} +1 -2
- package/template/core/engine/{deploy-sync.mjs → output/deploy-sync.mjs} +2 -2
- package/template/core/engine/{fonts.mjs → output/fonts.mjs} +1 -1
- package/template/core/engine/{public-assets.mjs → output/public-assets.mjs} +2 -2
- package/template/core/engine/{static-server.mjs → output/static-server.mjs} +2 -2
- package/template/core/engine/react/caption-numbering.mjs +73 -0
- package/template/core/engine/react/comment-marker.mjs +54 -10
- package/template/core/engine/react/document-entry.mjs +124 -64
- package/template/core/engine/react/document-export.mjs +252 -311
- package/template/core/engine/react/mdx-compile.mjs +123 -3
- package/template/core/engine/react/measurement-css.mjs +3 -3
- package/template/core/engine/react/pagination/allocator.mjs +122 -0
- package/template/core/engine/react/pagination/regions.mjs +81 -0
- package/template/core/engine/react/pagination.mjs +9 -121
- package/template/core/engine/react/pipeline/allocate.mjs +248 -0
- package/template/core/engine/react/pipeline/final-render.mjs +94 -0
- package/template/core/engine/react/pipeline/frame-measurement.mjs +271 -0
- package/template/core/engine/react/pipeline/press-tree.mjs +135 -0
- package/template/core/engine/react/project-asset-endpoint.mjs +2 -2
- package/template/core/engine/react/{chapter-css.mjs → section-css.mjs} +12 -9
- package/template/core/engine/react/sources/heading-numbering.mjs +132 -0
- package/template/core/engine/react/sources/mdx-resolver.mjs +441 -0
- package/template/core/engine/react/{workspace-discovery.mjs → style-discovery.mjs} +29 -40
- package/template/core/engine/{config.mjs → runtime/config.mjs} +15 -0
- package/template/core/engine/{file-utils.mjs → runtime/file-utils.mjs} +1 -1
- package/template/core/engine/{inspection.mjs → runtime/inspection.mjs} +3 -4
- package/template/core/engine/{source-text-tools.mjs → runtime/source-text-tools.mjs} +24 -7
- package/template/core/engine/runtime/source-workspace.mjs +186 -0
- package/template/core/engine/{validation.mjs → runtime/validation.mjs} +19 -17
- package/template/core/package.json +5 -2
- package/template/core/src/openpress/anchorMap.ts +27 -0
- package/template/core/src/openpress/core/Frame.tsx +80 -0
- package/template/core/src/openpress/core/FrameContext.tsx +19 -0
- package/template/core/src/openpress/core/MdxArea.tsx +35 -0
- package/template/core/src/openpress/core/Press.tsx +34 -0
- package/template/core/src/openpress/core/index.tsx +34 -15
- package/template/core/src/openpress/core/primitives.tsx +23 -0
- package/template/core/src/openpress/core/types.ts +131 -19
- package/template/core/src/openpress/core/useSource.ts +28 -0
- package/template/core/src/openpress/manuscript/index.tsx +196 -0
- package/template/core/src/openpress/mdx/index.ts +88 -0
- package/template/core/src/openpress/numbering/index.ts +294 -0
- package/template/core/src/openpress/publicPage.tsx +4 -186
- package/template/core/src/openpress/reactDocumentMetadata.ts +2 -16
- package/template/core/src/openpress/types.ts +0 -16
- package/template/core/src/openpress/workbench.tsx +2 -36
- package/template/core/src/styles/openpress/responsive.css +0 -14
- package/template/core/tsconfig.json +4 -1
- package/template/core/vite.config.ts +10 -3
- package/template/packs/academic-paper/document/chapters/01-introduction/content/01-introduction.mdx +21 -0
- package/template/packs/academic-paper/document/chapters/02-methods/content/01-methods.mdx +30 -0
- package/template/packs/academic-paper/document/chapters/03-results-and-discussion/content/01-results.mdx +29 -0
- package/template/packs/academic-paper/document/chapters/04-acknowledgment/content/01-acknowledgment.mdx +12 -0
- package/template/packs/academic-paper/document/chapters/05-references/content/01-references.mdx +27 -0
- package/template/packs/academic-paper/document/components/ChapterOpenerVisual/index.tsx +76 -0
- package/template/packs/academic-paper/document/components/Page.tsx +37 -0
- package/template/packs/academic-paper/document/components/TokenSwatchGrid/index.tsx +46 -0
- package/template/packs/academic-paper/document/components/TokenSwatchGrid/style.css +63 -0
- package/template/packs/academic-paper/document/components/TypeSpecimen/index.tsx +38 -0
- package/template/packs/academic-paper/document/components/TypeSpecimen/style.css +111 -0
- package/template/packs/academic-paper/document/design.md +279 -0
- package/template/packs/academic-paper/document/index.tsx +131 -0
- package/template/packs/academic-paper/document/media/README.md +13 -0
- package/template/packs/academic-paper/document/openpress.config.mjs +26 -0
- package/template/packs/academic-paper/document/theme/README.md +11 -0
- package/template/packs/academic-paper/document/theme/base/page-contract.css +505 -0
- package/template/packs/academic-paper/document/theme/base/print.css +93 -0
- package/template/packs/academic-paper/document/theme/base/typography.css +336 -0
- package/template/packs/academic-paper/document/theme/fonts.css +3 -0
- package/template/packs/academic-paper/document/theme/page-surfaces/back-cover.css +43 -0
- package/template/packs/academic-paper/document/theme/page-surfaces/chapter-opener.css +205 -0
- package/template/packs/academic-paper/document/theme/page-surfaces/cover.css +267 -0
- package/template/packs/academic-paper/document/theme/page-surfaces/toc.css +149 -0
- package/template/packs/academic-paper/document/theme/patterns/_chart-frame.css +49 -0
- package/template/packs/academic-paper/document/theme/patterns/figure-grid.css +68 -0
- package/template/packs/academic-paper/document/theme/patterns/table-utilities.css +66 -0
- package/template/packs/academic-paper/document/theme/shell/reader-controls.css +761 -0
- package/template/packs/academic-paper/document/theme/tokens.css +80 -0
- package/template/packs/academic-paper/openpress.config.mjs +5 -0
- package/template/packs/claude-document/document/components/Page.tsx +24 -14
- package/template/packs/claude-document/document/design.md +2 -2
- package/template/packs/claude-document/document/index.tsx +67 -62
- package/template/packs/claude-document/document/theme/page-surfaces/toc.css +19 -7
- package/template/packs/editorial-monograph/document/components/Page.tsx +24 -14
- package/template/packs/editorial-monograph/document/design.md +2 -2
- package/template/packs/editorial-monograph/document/index.tsx +71 -47
- package/template/packs/editorial-monograph/document/theme/page-surfaces/toc.css +19 -9
- package/template/core/engine/commands/migrate-to-react.mjs +0 -27
- package/template/core/engine/page-renderer.mjs +0 -217
- package/template/core/engine/react/migrate-to-react.mjs +0 -355
- package/template/core/engine/source-workspace.mjs +0 -76
- package/template/core/src/openpress/core/basePages.tsx +0 -87
- package/template/core/src/openpress/pagination.ts +0 -845
- package/template/packs/claude-document/document/chapters/01-document-shape/chapter.tsx +0 -30
- package/template/packs/claude-document/document/chapters/02-review-loop/chapter.tsx +0 -30
- /package/template/core/engine/{chrome-pdf.d.mts → output/chrome-pdf.d.mts} +0 -0
- /package/template/core/engine/{katex-assets.mjs → output/katex-assets.mjs} +0 -0
- /package/template/core/engine/{page-block.mjs → output/page-block.mjs} +0 -0
- /package/template/core/engine/{pdf-media.mjs → output/pdf-media.mjs} +0 -0
- /package/template/core/engine/{config.d.mts → runtime/config.d.mts} +0 -0
- /package/template/core/engine/{issue-report.mjs → runtime/issue-report.mjs} +0 -0
|
@@ -0,0 +1,505 @@
|
|
|
1
|
+
@page {
|
|
2
|
+
size: var(--openpress-page-width) var(--openpress-page-height);
|
|
3
|
+
margin: var(--openpress-page-margin);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
* {
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
html {
|
|
11
|
+
background: var(--openpress-color-app-bg);
|
|
12
|
+
scroll-behavior: smooth;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
body {
|
|
16
|
+
margin: 0;
|
|
17
|
+
color: var(--openpress-color-text-on-dark);
|
|
18
|
+
background: #1a1a1a;
|
|
19
|
+
font-family: var(--openpress-font-body);
|
|
20
|
+
font-size: var(--openpress-text-md);
|
|
21
|
+
line-height: var(--openpress-leading-body);
|
|
22
|
+
-webkit-print-color-adjust: exact;
|
|
23
|
+
print-color-adjust: exact;
|
|
24
|
+
touch-action: manipulation;
|
|
25
|
+
-webkit-tap-highlight-color: transparent;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.reader-app {
|
|
29
|
+
display: grid;
|
|
30
|
+
grid-template-rows: 56px minmax(0, 1fr);
|
|
31
|
+
grid-template-columns: 200px minmax(0, 1fr) 340px;
|
|
32
|
+
grid-template-areas:
|
|
33
|
+
"nav nav nav"
|
|
34
|
+
"left main right";
|
|
35
|
+
min-height: 100vh;
|
|
36
|
+
height: 100vh;
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
transition: grid-template-columns 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
button,
|
|
42
|
+
.reader-stage {
|
|
43
|
+
outline: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
body.exporting .reader-page,
|
|
47
|
+
body.exporting .reader-page.is-active {
|
|
48
|
+
animation: none !important;
|
|
49
|
+
transform: none !important;
|
|
50
|
+
transition: none !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
button:focus,
|
|
54
|
+
.reader-stage:focus {
|
|
55
|
+
outline: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
button:focus-visible {
|
|
59
|
+
outline: 1px solid rgba(255, 255, 255, 0.4);
|
|
60
|
+
outline-offset: 2px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.reader-app.is-closed-left {
|
|
64
|
+
grid-template-columns: 0 minmax(0, 1fr) 340px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.reader-app.is-closed-right {
|
|
68
|
+
grid-template-columns: 200px minmax(0, 1fr) 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.reader-app.is-closed-left.is-closed-right {
|
|
72
|
+
grid-template-columns: 0 minmax(0, 1fr) 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.reader-app.is-closed-left .reader-thumb-strip,
|
|
76
|
+
.reader-app.is-closed-right .reader-side-nav {
|
|
77
|
+
display: none;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.reader-navbar {
|
|
81
|
+
grid-area: nav;
|
|
82
|
+
display: grid;
|
|
83
|
+
grid-template-columns: 1fr auto 1fr;
|
|
84
|
+
align-items: center;
|
|
85
|
+
padding: 0 24px;
|
|
86
|
+
gap: 24px;
|
|
87
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
|
88
|
+
background: rgba(22, 22, 22, 0.6);
|
|
89
|
+
position: relative;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.navbar-section {
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
gap: 12px;
|
|
96
|
+
min-width: 0;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.navbar-left {
|
|
100
|
+
justify-self: start;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.navbar-right {
|
|
104
|
+
justify-self: end;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.navbar-brand {
|
|
108
|
+
display: flex;
|
|
109
|
+
align-items: baseline;
|
|
110
|
+
gap: 14px;
|
|
111
|
+
color: var(--openpress-color-text-on-dark);
|
|
112
|
+
min-width: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.navbar-icon {
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
justify-content: center;
|
|
119
|
+
width: 32px;
|
|
120
|
+
height: 32px;
|
|
121
|
+
padding: 0;
|
|
122
|
+
background: transparent;
|
|
123
|
+
border: 0;
|
|
124
|
+
color: var(--openpress-color-text-placeholder);
|
|
125
|
+
font-size: 16px;
|
|
126
|
+
line-height: 1;
|
|
127
|
+
cursor: pointer;
|
|
128
|
+
opacity: 0.6;
|
|
129
|
+
transition: opacity 150ms ease, color 150ms ease;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.navbar-icon:hover {
|
|
133
|
+
opacity: 1;
|
|
134
|
+
color: var(--openpress-color-text-on-dark);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.navbar-icon[aria-pressed="false"] {
|
|
138
|
+
opacity: 0.35;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.navbar-hints {
|
|
142
|
+
justify-self: center;
|
|
143
|
+
display: flex;
|
|
144
|
+
align-items: center;
|
|
145
|
+
gap: 10px;
|
|
146
|
+
color: var(--openpress-color-text-placeholder);
|
|
147
|
+
font-size: 11px;
|
|
148
|
+
letter-spacing: 0.1em;
|
|
149
|
+
opacity: 0.7;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.navbar-hints .navbar-sep {
|
|
153
|
+
color: var(--openpress-color-border-strong);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.navbar-icon-hamburger {
|
|
157
|
+
flex-direction: column;
|
|
158
|
+
gap: 4px;
|
|
159
|
+
width: 36px;
|
|
160
|
+
height: 36px;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.navbar-icon-hamburger span {
|
|
164
|
+
display: block;
|
|
165
|
+
width: 16px;
|
|
166
|
+
height: 1px;
|
|
167
|
+
background: currentColor;
|
|
168
|
+
transition: transform 180ms ease, opacity 180ms ease;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.navbar-icon-hamburger[aria-pressed="true"] span:nth-child(1) {
|
|
172
|
+
transform: translateY(0);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.navbar-icon-hamburger[aria-pressed="false"] span {
|
|
176
|
+
opacity: 0.6;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
.navbar-mark {
|
|
181
|
+
font-family: var(--openpress-font-serif);
|
|
182
|
+
font-size: 18px;
|
|
183
|
+
font-weight: 400;
|
|
184
|
+
letter-spacing: 0.02em;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.navbar-sub {
|
|
188
|
+
font-size: 11px;
|
|
189
|
+
color: var(--openpress-color-text-placeholder);
|
|
190
|
+
letter-spacing: 0.1em;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.navbar-actions {
|
|
194
|
+
display: flex;
|
|
195
|
+
gap: 8px;
|
|
196
|
+
justify-self: end;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.navbar-btn {
|
|
200
|
+
height: 32px;
|
|
201
|
+
padding: 0 14px;
|
|
202
|
+
background: transparent;
|
|
203
|
+
border: 1px solid rgba(255, 255, 255, 0.18);
|
|
204
|
+
color: var(--openpress-color-text-secondary);
|
|
205
|
+
font-family: inherit;
|
|
206
|
+
font-size: 11px;
|
|
207
|
+
letter-spacing: 0.1em;
|
|
208
|
+
cursor: pointer;
|
|
209
|
+
transition: border-color 150ms, color 150ms;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.navbar-btn:hover {
|
|
213
|
+
border-color: rgba(255, 255, 255, 0.45);
|
|
214
|
+
color: var(--openpress-color-text-on-dark);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.navbar-menu-btn {
|
|
218
|
+
display: none;
|
|
219
|
+
width: 36px;
|
|
220
|
+
height: 36px;
|
|
221
|
+
background: transparent;
|
|
222
|
+
border: 0;
|
|
223
|
+
color: var(--openpress-color-text-secondary);
|
|
224
|
+
font-family: inherit;
|
|
225
|
+
font-size: 22px;
|
|
226
|
+
line-height: 1;
|
|
227
|
+
cursor: pointer;
|
|
228
|
+
padding: 0;
|
|
229
|
+
letter-spacing: 0.08em;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.navbar-menu-btn:hover {
|
|
233
|
+
color: var(--openpress-color-text-on-dark);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.mobile-menu {
|
|
237
|
+
position: fixed;
|
|
238
|
+
inset: 0;
|
|
239
|
+
z-index: 30;
|
|
240
|
+
display: flex;
|
|
241
|
+
align-items: flex-end;
|
|
242
|
+
animation: mobile-menu-in 180ms ease-out both;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.mobile-menu[hidden] {
|
|
246
|
+
display: none;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
@keyframes mobile-menu-in {
|
|
250
|
+
from { opacity: 0; }
|
|
251
|
+
to { opacity: 1; }
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.mobile-menu-backdrop {
|
|
255
|
+
position: absolute;
|
|
256
|
+
inset: 0;
|
|
257
|
+
background: rgba(15, 15, 15, 0.55);
|
|
258
|
+
-webkit-backdrop-filter: blur(8px);
|
|
259
|
+
backdrop-filter: blur(8px);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.mobile-menu-sheet {
|
|
263
|
+
position: relative;
|
|
264
|
+
z-index: 1;
|
|
265
|
+
width: 100%;
|
|
266
|
+
padding: 14px;
|
|
267
|
+
padding-bottom: calc(14px + env(safe-area-inset-bottom));
|
|
268
|
+
display: flex;
|
|
269
|
+
flex-direction: column;
|
|
270
|
+
gap: 8px;
|
|
271
|
+
animation: mobile-menu-sheet-in 220ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
@keyframes mobile-menu-sheet-in {
|
|
275
|
+
from { transform: translateY(12px); opacity: 0; }
|
|
276
|
+
to { transform: translateY(0); opacity: 1; }
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.mobile-menu-item,
|
|
280
|
+
.mobile-menu-cancel {
|
|
281
|
+
width: 100%;
|
|
282
|
+
height: 54px;
|
|
283
|
+
font-family: inherit;
|
|
284
|
+
font-size: 15px;
|
|
285
|
+
letter-spacing: 0.06em;
|
|
286
|
+
color: var(--openpress-color-text-on-dark);
|
|
287
|
+
cursor: pointer;
|
|
288
|
+
padding: 0;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.mobile-menu-item {
|
|
292
|
+
background: rgba(40, 40, 40, 0.85);
|
|
293
|
+
-webkit-backdrop-filter: blur(20px);
|
|
294
|
+
backdrop-filter: blur(20px);
|
|
295
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.mobile-menu-item:active {
|
|
299
|
+
background: rgba(60, 60, 60, 0.92);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.mobile-menu-cancel {
|
|
303
|
+
margin-top: 4px;
|
|
304
|
+
background: rgba(70, 70, 70, 0.88);
|
|
305
|
+
-webkit-backdrop-filter: blur(20px);
|
|
306
|
+
backdrop-filter: blur(20px);
|
|
307
|
+
border: 0;
|
|
308
|
+
letter-spacing: 0.08em;
|
|
309
|
+
font-weight: 500;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.reader-stage {
|
|
313
|
+
grid-area: main;
|
|
314
|
+
min-width: 0;
|
|
315
|
+
min-height: 0;
|
|
316
|
+
display: flex;
|
|
317
|
+
align-items: flex-start;
|
|
318
|
+
justify-content: center;
|
|
319
|
+
overflow: auto;
|
|
320
|
+
overscroll-behavior: contain;
|
|
321
|
+
scroll-behavior: smooth;
|
|
322
|
+
container-type: inline-size;
|
|
323
|
+
scrollbar-width: thin;
|
|
324
|
+
scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.reader-stage::-webkit-scrollbar {
|
|
328
|
+
width: 8px;
|
|
329
|
+
height: 8px;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.reader-stage::-webkit-scrollbar-track {
|
|
333
|
+
background: transparent;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.reader-stage::-webkit-scrollbar-thumb {
|
|
337
|
+
background: rgba(255, 255, 255, 0.15);
|
|
338
|
+
border-radius: 0;
|
|
339
|
+
border: 2px solid transparent;
|
|
340
|
+
background-clip: padding-box;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.reader-stage::-webkit-scrollbar-thumb:hover {
|
|
344
|
+
background: rgba(255, 255, 255, 0.28);
|
|
345
|
+
background-clip: padding-box;
|
|
346
|
+
border: 2px solid transparent;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.reader-stage::-webkit-scrollbar-corner {
|
|
350
|
+
background: transparent;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.reader-pages {
|
|
354
|
+
min-height: 0;
|
|
355
|
+
width: 100%;
|
|
356
|
+
height: auto;
|
|
357
|
+
display: flex;
|
|
358
|
+
flex-direction: column;
|
|
359
|
+
align-items: center;
|
|
360
|
+
gap: 28px;
|
|
361
|
+
padding: 32px 24px 48px;
|
|
362
|
+
--reader-page-width: min(var(--openpress-page-width), calc(100cqw - 48px));
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.reader-pages.is-spread {
|
|
366
|
+
--reader-page-width: min(var(--openpress-page-width), calc((100cqw - 84px) / 2));
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.reader-spread {
|
|
370
|
+
display: grid;
|
|
371
|
+
grid-template-columns: minmax(0, var(--reader-page-width));
|
|
372
|
+
justify-content: center;
|
|
373
|
+
gap: 28px;
|
|
374
|
+
width: 100%;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.reader-spread.has-two {
|
|
378
|
+
grid-template-columns: repeat(2, minmax(0, var(--reader-page-width)));
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.reader-page {
|
|
382
|
+
display: none;
|
|
383
|
+
position: relative;
|
|
384
|
+
width: var(--reader-page-width, var(--openpress-page-width));
|
|
385
|
+
height: calc(var(--reader-page-width, var(--openpress-page-width)) * var(--openpress-page-height) / var(--openpress-page-width));
|
|
386
|
+
--page-margin-x: clamp(28px, 5cqw, 48px);
|
|
387
|
+
--page-margin-top: clamp(28px, 5cqw, 48px);
|
|
388
|
+
--page-margin-bottom: clamp(18px, 3cqw, 28px);
|
|
389
|
+
--page-header-height: clamp(12px, 1.9cqw, 20px);
|
|
390
|
+
--page-footer-height: clamp(18px, 2.6cqw, 26px);
|
|
391
|
+
--page-frame-gap: clamp(8px, 1.4cqw, 14px);
|
|
392
|
+
overflow: hidden;
|
|
393
|
+
color: var(--openpress-color-ink);
|
|
394
|
+
background: var(--openpress-color-document);
|
|
395
|
+
container-type: inline-size;
|
|
396
|
+
box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
|
|
397
|
+
transition: box-shadow 180ms ease;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.reader-app.is-ready .reader-page,
|
|
401
|
+
.reader-page.measurement {
|
|
402
|
+
display: block;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.page-frame {
|
|
406
|
+
width: 100%;
|
|
407
|
+
height: 100%;
|
|
408
|
+
min-height: inherit;
|
|
409
|
+
display: grid;
|
|
410
|
+
grid-template-rows: var(--page-header-height) minmax(0, 1fr) var(--page-footer-height);
|
|
411
|
+
row-gap: var(--page-frame-gap);
|
|
412
|
+
padding: var(--page-margin-top) var(--page-margin-x) var(--page-margin-bottom);
|
|
413
|
+
background: var(--openpress-color-document);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.reader-page.no-footer .page-frame {
|
|
417
|
+
grid-template-rows: var(--page-header-height) minmax(0, 1fr);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.reader-page.no-footer .page-footer {
|
|
421
|
+
display: none;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.page-header,
|
|
425
|
+
.page-footer {
|
|
426
|
+
min-width: 0;
|
|
427
|
+
overflow: hidden;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.page-header {
|
|
431
|
+
display: flex;
|
|
432
|
+
align-items: flex-start;
|
|
433
|
+
color: var(--openpress-color-muted);
|
|
434
|
+
font-size: clamp(7pt, 1.2cqw, 8pt);
|
|
435
|
+
letter-spacing: 0.1em;
|
|
436
|
+
opacity: 0.62;
|
|
437
|
+
pointer-events: none;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.page-body {
|
|
441
|
+
min-width: 0;
|
|
442
|
+
min-height: 0;
|
|
443
|
+
overflow: visible;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.page-footer {
|
|
447
|
+
display: flex;
|
|
448
|
+
justify-content: space-between;
|
|
449
|
+
align-items: baseline;
|
|
450
|
+
gap: 12px;
|
|
451
|
+
font-size: clamp(7pt, 1.25cqw, 8pt);
|
|
452
|
+
color: var(--openpress-color-muted);
|
|
453
|
+
letter-spacing: 0.1em;
|
|
454
|
+
opacity: 0.7;
|
|
455
|
+
pointer-events: none;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.page-footer .footer-left {
|
|
459
|
+
flex: 1;
|
|
460
|
+
min-width: 0;
|
|
461
|
+
overflow: hidden;
|
|
462
|
+
text-overflow: ellipsis;
|
|
463
|
+
white-space: nowrap;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.page-footer .footer-right {
|
|
467
|
+
font-variant-numeric: tabular-nums;
|
|
468
|
+
letter-spacing: 0.14em;
|
|
469
|
+
flex-shrink: 0;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
@media screen and (max-width: 767px) {
|
|
473
|
+
.page-footer {
|
|
474
|
+
font-size: clamp(5.5pt, 1.4cqw, 7pt);
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.reader-page.measurement {
|
|
479
|
+
display: block !important;
|
|
480
|
+
position: absolute;
|
|
481
|
+
left: -99999px;
|
|
482
|
+
top: 0;
|
|
483
|
+
visibility: hidden;
|
|
484
|
+
box-shadow: none;
|
|
485
|
+
outline: 0;
|
|
486
|
+
transform: none !important;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.reader-page.is-active.page-in-forward {
|
|
490
|
+
animation: page-in-fwd 280ms cubic-bezier(0.33, 1, 0.68, 1) both;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.reader-page.is-active.page-in-backward {
|
|
494
|
+
animation: page-in-bwd 280ms cubic-bezier(0.33, 1, 0.68, 1) both;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
@keyframes page-in-fwd {
|
|
498
|
+
0% { opacity: 0; transform: translateX(10px); }
|
|
499
|
+
100% { opacity: 1; transform: translateX(0); }
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
@keyframes page-in-bwd {
|
|
503
|
+
0% { opacity: 0; transform: translateX(-10px); }
|
|
504
|
+
100% { opacity: 1; transform: translateX(0); }
|
|
505
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
@media print {
|
|
2
|
+
html,
|
|
3
|
+
body {
|
|
4
|
+
background: #fff;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.reader-app {
|
|
8
|
+
display: block;
|
|
9
|
+
height: auto;
|
|
10
|
+
overflow: visible;
|
|
11
|
+
grid-template-columns: none !important;
|
|
12
|
+
grid-template-rows: none !important;
|
|
13
|
+
grid-template-areas: none !important;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.reader-navbar,
|
|
17
|
+
.reader-side-nav,
|
|
18
|
+
.reader-thumb-strip,
|
|
19
|
+
.reader-thumbs,
|
|
20
|
+
.reader-page.measurement {
|
|
21
|
+
display: none !important;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.reader-stage,
|
|
25
|
+
.reader-pages {
|
|
26
|
+
display: block;
|
|
27
|
+
padding: 0;
|
|
28
|
+
perspective: none;
|
|
29
|
+
width: auto;
|
|
30
|
+
height: auto;
|
|
31
|
+
background: #fff;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.reader-page,
|
|
35
|
+
.reader-page.is-active,
|
|
36
|
+
.reader-page--cover.is-active,
|
|
37
|
+
.reader-page--back-cover.is-active {
|
|
38
|
+
display: block;
|
|
39
|
+
width: auto;
|
|
40
|
+
aspect-ratio: auto;
|
|
41
|
+
max-height: none;
|
|
42
|
+
overflow: visible;
|
|
43
|
+
box-shadow: none;
|
|
44
|
+
outline: 0;
|
|
45
|
+
margin: 0;
|
|
46
|
+
break-after: auto;
|
|
47
|
+
animation: none !important;
|
|
48
|
+
transform: none !important;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.reader-page--cover,
|
|
52
|
+
.reader-page--toc,
|
|
53
|
+
.reader-page--content,
|
|
54
|
+
.reader-page--back-cover {
|
|
55
|
+
padding: 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.reader-page--toc {
|
|
59
|
+
break-before: page;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.reader-page--back-cover {
|
|
63
|
+
break-before: page;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.reader-page--content .page-body > h2:first-child {
|
|
67
|
+
break-before: page;
|
|
68
|
+
break-after: avoid;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
h2,
|
|
72
|
+
h3,
|
|
73
|
+
h4 {
|
|
74
|
+
break-after: avoid;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
figure,
|
|
78
|
+
table,
|
|
79
|
+
.toc-list {
|
|
80
|
+
break-inside: avoid;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.toc-list a {
|
|
84
|
+
display: grid;
|
|
85
|
+
grid-template-columns: 10mm 1fr 14mm;
|
|
86
|
+
gap: 4mm;
|
|
87
|
+
align-items: baseline;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
a {
|
|
91
|
+
color: inherit;
|
|
92
|
+
}
|
|
93
|
+
}
|