@open-press/cli 0.8.0 → 1.1.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/README.md +33 -23
- package/dist/cli.js +320 -252
- package/package.json +9 -8
- package/template/core/AGENTS.md +0 -126
- package/template/core/CHANGELOG.md +0 -215
- package/template/core/README.md +0 -40
- package/template/core/engine/cli.mjs +0 -96
- package/template/core/engine/commands/_shared.mjs +0 -177
- package/template/core/engine/commands/deploy.mjs +0 -31
- package/template/core/engine/commands/dev.mjs +0 -49
- package/template/core/engine/commands/doctor.mjs +0 -229
- package/template/core/engine/commands/export.mjs +0 -8
- package/template/core/engine/commands/init.mjs +0 -24
- package/template/core/engine/commands/inspect.mjs +0 -35
- package/template/core/engine/commands/pdf.mjs +0 -26
- package/template/core/engine/commands/preview.mjs +0 -26
- package/template/core/engine/commands/render.mjs +0 -17
- package/template/core/engine/commands/replace.mjs +0 -41
- package/template/core/engine/commands/search.mjs +0 -33
- package/template/core/engine/commands/typecheck.mjs +0 -5
- package/template/core/engine/commands/upgrade.mjs +0 -159
- package/template/core/engine/commands/validate.mjs +0 -17
- package/template/core/engine/document-export.mjs +0 -15
- package/template/core/engine/init.mjs +0 -90
- package/template/core/engine/output/chrome-pdf.d.mts +0 -34
- package/template/core/engine/output/chrome-pdf.mjs +0 -358
- package/template/core/engine/output/deploy-sync.mjs +0 -15
- package/template/core/engine/output/fonts.mjs +0 -62
- package/template/core/engine/output/katex-assets.mjs +0 -45
- package/template/core/engine/output/page-block.mjs +0 -30
- package/template/core/engine/output/pdf-media.mjs +0 -45
- package/template/core/engine/output/public-assets.mjs +0 -19
- package/template/core/engine/output/static-server.mjs +0 -532
- package/template/core/engine/react/caption-numbering.mjs +0 -73
- package/template/core/engine/react/comment-endpoint.d.mts +0 -11
- package/template/core/engine/react/comment-endpoint.mjs +0 -102
- package/template/core/engine/react/comment-marker.mjs +0 -374
- package/template/core/engine/react/document-entry.mjs +0 -324
- package/template/core/engine/react/document-export.mjs +0 -373
- package/template/core/engine/react/http-json.mjs +0 -24
- package/template/core/engine/react/mdx-compile.mjs +0 -599
- package/template/core/engine/react/measurement-css.mjs +0 -136
- package/template/core/engine/react/object-entities.mjs +0 -119
- package/template/core/engine/react/pagination/allocator.mjs +0 -122
- package/template/core/engine/react/pagination/regions.mjs +0 -81
- package/template/core/engine/react/pagination-constants.mjs +0 -3
- package/template/core/engine/react/pagination.mjs +0 -9
- package/template/core/engine/react/pipeline/allocate.mjs +0 -251
- package/template/core/engine/react/pipeline/final-render.mjs +0 -94
- package/template/core/engine/react/pipeline/frame-measurement.mjs +0 -302
- package/template/core/engine/react/pipeline/press-tree.mjs +0 -135
- package/template/core/engine/react/project-asset-endpoint.d.mts +0 -10
- package/template/core/engine/react/project-asset-endpoint.mjs +0 -361
- package/template/core/engine/react/section-css.mjs +0 -56
- package/template/core/engine/react/source-edit-endpoint.d.mts +0 -10
- package/template/core/engine/react/source-edit-endpoint.mjs +0 -75
- package/template/core/engine/react/sources/heading-numbering.mjs +0 -132
- package/template/core/engine/react/sources/mdx-resolver.mjs +0 -439
- package/template/core/engine/react/style-discovery.mjs +0 -142
- package/template/core/engine/runtime/config.d.mts +0 -40
- package/template/core/engine/runtime/config.mjs +0 -175
- package/template/core/engine/runtime/file-utils.mjs +0 -106
- package/template/core/engine/runtime/file-walk.mjs +0 -22
- package/template/core/engine/runtime/inspection.mjs +0 -328
- package/template/core/engine/runtime/issue-report.mjs +0 -44
- package/template/core/engine/runtime/path-utils.mjs +0 -20
- package/template/core/engine/runtime/source-text-tools.d.mts +0 -102
- package/template/core/engine/runtime/source-text-tools.mjs +0 -832
- package/template/core/engine/runtime/source-workspace.mjs +0 -159
- package/template/core/engine/runtime/validation.mjs +0 -174
- package/template/core/index.html +0 -13
- package/template/core/openpress.config.mjs +0 -12
- package/template/core/package.json +0 -91
- package/template/core/src/main.tsx +0 -16
- package/template/core/src/openpress/app/OpenPressApp.tsx +0 -140
- package/template/core/src/openpress/app/OpenPressRuntime.tsx +0 -94
- package/template/core/src/openpress/app/index.ts +0 -2
- package/template/core/src/openpress/core/Frame.tsx +0 -78
- package/template/core/src/openpress/core/FrameContext.tsx +0 -24
- package/template/core/src/openpress/core/MdxArea.tsx +0 -34
- package/template/core/src/openpress/core/Press.tsx +0 -34
- package/template/core/src/openpress/core/cn.ts +0 -4
- package/template/core/src/openpress/core/index.tsx +0 -40
- package/template/core/src/openpress/core/primitives.tsx +0 -44
- package/template/core/src/openpress/core/types.ts +0 -191
- package/template/core/src/openpress/core/useSource.ts +0 -28
- package/template/core/src/openpress/document-model/anchorMapModel.ts +0 -27
- package/template/core/src/openpress/document-model/documentIndexes.ts +0 -329
- package/template/core/src/openpress/document-model/documentTypes.ts +0 -138
- package/template/core/src/openpress/document-model/index.ts +0 -6
- package/template/core/src/openpress/document-model/objectEntityModel.ts +0 -51
- package/template/core/src/openpress/document-model/projectIdentityModel.ts +0 -15
- package/template/core/src/openpress/document-model/reactDocumentMetadataModel.ts +0 -27
- package/template/core/src/openpress/manuscript/index.tsx +0 -238
- package/template/core/src/openpress/mdx/index.ts +0 -88
- package/template/core/src/openpress/numbering/index.ts +0 -294
- package/template/core/src/openpress/reader/PublicReaderPage.tsx +0 -267
- package/template/core/src/openpress/reader/ReaderNavigationPanel.tsx +0 -123
- package/template/core/src/openpress/reader/index.ts +0 -10
- package/template/core/src/openpress/reader/pageViewportScaleModel.ts +0 -73
- package/template/core/src/openpress/reader/readerPageRegistry.ts +0 -41
- package/template/core/src/openpress/reader/readerPageRoute.ts +0 -21
- package/template/core/src/openpress/reader/readerScroll.ts +0 -92
- package/template/core/src/openpress/reader/readerStateModel.ts +0 -15
- package/template/core/src/openpress/reader/readerTypes.ts +0 -4
- package/template/core/src/openpress/reader/usePageViewportScale.ts +0 -119
- package/template/core/src/openpress/reader/usePanelState.ts +0 -56
- package/template/core/src/openpress/reader/useReaderHashSync.ts +0 -61
- package/template/core/src/openpress/reader/useReaderKeyboardNav.ts +0 -48
- package/template/core/src/openpress/reader/useReaderRuntime.ts +0 -146
- package/template/core/src/openpress/reader/useReaderScrollAnchor.ts +0 -64
- package/template/core/src/openpress/shared/Panel.tsx +0 -77
- package/template/core/src/openpress/shared/frameScheduler.ts +0 -32
- package/template/core/src/openpress/shared/index.ts +0 -4
- package/template/core/src/openpress/shared/numberUtils.ts +0 -3
- package/template/core/src/openpress/shared/runtimeMode.ts +0 -11
- package/template/core/src/openpress/workbench/Workbench.tsx +0 -407
- package/template/core/src/openpress/workbench/actions/DeploymentControl.tsx +0 -157
- package/template/core/src/openpress/workbench/actions/PageZoomControl.tsx +0 -182
- package/template/core/src/openpress/workbench/actions/SearchControl.tsx +0 -345
- package/template/core/src/openpress/workbench/actions/deploymentStatusModel.ts +0 -112
- package/template/core/src/openpress/workbench/actions/index.ts +0 -5
- package/template/core/src/openpress/workbench/actions/useDeploymentWorkbench.ts +0 -136
- package/template/core/src/openpress/workbench/dialog/WorkbenchDialog.tsx +0 -72
- package/template/core/src/openpress/workbench/dialog/index.ts +0 -1
- package/template/core/src/openpress/workbench/document/components/DocumentPanel.tsx +0 -127
- package/template/core/src/openpress/workbench/document/components/InlineSourceEditorLayer.tsx +0 -207
- package/template/core/src/openpress/workbench/document/components/ReaderStage.tsx +0 -9
- package/template/core/src/openpress/workbench/document/hooks/useDocumentWorkbenchModel.ts +0 -34
- package/template/core/src/openpress/workbench/document/hooks/useInlineDocumentEditor.ts +0 -525
- package/template/core/src/openpress/workbench/document/index.ts +0 -10
- package/template/core/src/openpress/workbench/index.ts +0 -2
- package/template/core/src/openpress/workbench/inspector/InlineInspectorLayer.tsx +0 -459
- package/template/core/src/openpress/workbench/inspector/index.ts +0 -5
- package/template/core/src/openpress/workbench/inspector/inlineCommentModel.ts +0 -125
- package/template/core/src/openpress/workbench/inspector/inspectorGeometryModel.ts +0 -160
- package/template/core/src/openpress/workbench/inspector/inspectorModel.ts +0 -408
- package/template/core/src/openpress/workbench/inspector/useInspectorComments.ts +0 -248
- package/template/core/src/openpress/workbench/mentions/MentionSuggestionList.tsx +0 -41
- package/template/core/src/openpress/workbench/mentions/index.ts +0 -2
- package/template/core/src/openpress/workbench/mentions/useComposerMentions.ts +0 -185
- package/template/core/src/openpress/workbench/panels/Panel.tsx +0 -1
- package/template/core/src/openpress/workbench/panels/PendingCommentsPanel.tsx +0 -76
- package/template/core/src/openpress/workbench/panels/WorkbenchControlPanel.tsx +0 -29
- package/template/core/src/openpress/workbench/panels/index.ts +0 -3
- package/template/core/src/openpress/workbench/project/ProjectEntryPanel.tsx +0 -523
- package/template/core/src/openpress/workbench/project/ProjectPreviewDialog.tsx +0 -35
- package/template/core/src/openpress/workbench/project/index.ts +0 -2
- package/template/core/src/openpress/workbench/project/projectPreviewTypes.ts +0 -11
- package/template/core/src/openpress/workbench/project/projectSourceModel.ts +0 -24
- package/template/core/src/openpress/workbench/shell/WorkbenchShell.tsx +0 -167
- package/template/core/src/openpress/workbench/shell/index.ts +0 -1
- package/template/core/src/openpress/workbench/workbenchFormatters.ts +0 -120
- package/template/core/src/openpress/workbench/workbenchTypes.ts +0 -35
- package/template/core/src/styles/openpress/app-shell.css +0 -251
- package/template/core/src/styles/openpress/media-workspace.css +0 -230
- package/template/core/src/styles/openpress/print-route.css +0 -184
- package/template/core/src/styles/openpress/project-preview-panel.css +0 -924
- package/template/core/src/styles/openpress/public-viewer.css +0 -688
- package/template/core/src/styles/openpress/reader-runtime.css +0 -980
- package/template/core/src/styles/openpress/responsive.css +0 -245
- package/template/core/src/styles/openpress/workbench-panels.css +0 -594
- package/template/core/src/styles/openpress/workbench.css +0 -1255
- package/template/core/src/styles/openpress.css +0 -14
- package/template/core/src/vite-env.d.ts +0 -9
- package/template/core/tsconfig.json +0 -40
- package/template/core/vite.config.ts +0 -584
- package/template/packs/academic-paper/document/chapters/01-introduction/content/01-introduction.mdx +0 -35
- package/template/packs/academic-paper/document/chapters/02-methods/content/01-methods.mdx +0 -50
- package/template/packs/academic-paper/document/chapters/03-results-and-discussion/content/01-results.mdx +0 -47
- package/template/packs/academic-paper/document/chapters/04-acknowledgment/content/01-acknowledgment.mdx +0 -26
- package/template/packs/academic-paper/document/chapters/05-references/content/01-references.mdx +0 -32
- package/template/packs/academic-paper/document/components/ChapterOpenerVisual/index.tsx +0 -76
- package/template/packs/academic-paper/document/components/Page.tsx +0 -60
- package/template/packs/academic-paper/document/components/TokenSwatchGrid/index.tsx +0 -46
- package/template/packs/academic-paper/document/components/TokenSwatchGrid/style.css +0 -63
- package/template/packs/academic-paper/document/components/TypeSpecimen/index.tsx +0 -38
- package/template/packs/academic-paper/document/components/TypeSpecimen/style.css +0 -111
- package/template/packs/academic-paper/document/design.md +0 -279
- package/template/packs/academic-paper/document/index.tsx +0 -123
- package/template/packs/academic-paper/document/media/README.md +0 -13
- package/template/packs/academic-paper/document/media/figure-placeholder.svg +0 -9
- package/template/packs/academic-paper/document/openpress.config.mjs +0 -26
- package/template/packs/academic-paper/document/theme/README.md +0 -11
- package/template/packs/academic-paper/document/theme/base/page-contract.css +0 -522
- package/template/packs/academic-paper/document/theme/base/print.css +0 -93
- package/template/packs/academic-paper/document/theme/base/typography.css +0 -333
- package/template/packs/academic-paper/document/theme/fonts.css +0 -3
- package/template/packs/academic-paper/document/theme/page-surfaces/back-cover.css +0 -43
- package/template/packs/academic-paper/document/theme/page-surfaces/chapter-opener.css +0 -205
- package/template/packs/academic-paper/document/theme/page-surfaces/cover.css +0 -294
- package/template/packs/academic-paper/document/theme/page-surfaces/toc.css +0 -149
- package/template/packs/academic-paper/document/theme/patterns/_chart-frame.css +0 -49
- package/template/packs/academic-paper/document/theme/patterns/figure-grid.css +0 -68
- package/template/packs/academic-paper/document/theme/patterns/table-utilities.css +0 -66
- package/template/packs/academic-paper/document/theme/shell/reader-controls.css +0 -761
- package/template/packs/academic-paper/document/theme/tokens.css +0 -80
- package/template/packs/academic-paper/openpress.config.mjs +0 -5
- package/template/packs/claude-document/document/chapters/01-document-shape/content/01-document-shape.mdx +0 -51
- package/template/packs/claude-document/document/chapters/02-review-loop/content/01-review-loop.mdx +0 -31
- package/template/packs/claude-document/document/components/ChapterOpenerVisual.tsx +0 -96
- package/template/packs/claude-document/document/components/Page.tsx +0 -37
- package/template/packs/claude-document/document/design.md +0 -142
- package/template/packs/claude-document/document/index.tsx +0 -94
- package/template/packs/claude-document/document/media/README.md +0 -13
- package/template/packs/claude-document/document/openpress.config.mjs +0 -26
- package/template/packs/claude-document/document/theme/README.md +0 -15
- package/template/packs/claude-document/document/theme/base/page-contract.css +0 -525
- package/template/packs/claude-document/document/theme/base/print.css +0 -93
- package/template/packs/claude-document/document/theme/base/typography.css +0 -612
- package/template/packs/claude-document/document/theme/fonts.css +0 -4
- package/template/packs/claude-document/document/theme/page-surfaces/back-cover.css +0 -72
- package/template/packs/claude-document/document/theme/page-surfaces/chapter-opener.css +0 -236
- package/template/packs/claude-document/document/theme/page-surfaces/cover.css +0 -309
- package/template/packs/claude-document/document/theme/page-surfaces/toc.css +0 -225
- package/template/packs/claude-document/document/theme/patterns/_chart-frame.css +0 -53
- package/template/packs/claude-document/document/theme/patterns/figure-grid.css +0 -68
- package/template/packs/claude-document/document/theme/patterns/table-utilities.css +0 -66
- package/template/packs/claude-document/document/theme/shell/reader-controls.css +0 -789
- package/template/packs/claude-document/document/theme/tokens.css +0 -89
- package/template/packs/claude-document/openpress.config.mjs +0 -5
- package/template/packs/editorial-monograph/document/chapters/01-product-and-use-cases/content/01-product-and-use-cases.mdx +0 -31
- package/template/packs/editorial-monograph/document/chapters/02-workflow/content/01-workflow.mdx +0 -89
- package/template/packs/editorial-monograph/document/chapters/03-agent-skills-contributors/content/01-agent-skills-contributors.mdx +0 -51
- package/template/packs/editorial-monograph/document/chapters/04-validation-deploy/content/01-validation-deploy.mdx +0 -39
- package/template/packs/editorial-monograph/document/components/ChapterOpenerVisual/index.tsx +0 -76
- package/template/packs/editorial-monograph/document/components/Page.tsx +0 -37
- package/template/packs/editorial-monograph/document/components/TokenSwatchGrid/index.tsx +0 -46
- package/template/packs/editorial-monograph/document/components/TokenSwatchGrid/style.css +0 -63
- package/template/packs/editorial-monograph/document/components/TypeSpecimen/index.tsx +0 -38
- package/template/packs/editorial-monograph/document/components/TypeSpecimen/style.css +0 -111
- package/template/packs/editorial-monograph/document/design.md +0 -279
- package/template/packs/editorial-monograph/document/index.tsx +0 -97
- package/template/packs/editorial-monograph/document/media/README.md +0 -13
- package/template/packs/editorial-monograph/document/openpress.config.mjs +0 -26
- package/template/packs/editorial-monograph/document/theme/README.md +0 -11
- package/template/packs/editorial-monograph/document/theme/base/page-contract.css +0 -505
- package/template/packs/editorial-monograph/document/theme/base/print.css +0 -93
- package/template/packs/editorial-monograph/document/theme/base/typography.css +0 -336
- package/template/packs/editorial-monograph/document/theme/fonts.css +0 -3
- package/template/packs/editorial-monograph/document/theme/page-surfaces/back-cover.css +0 -43
- package/template/packs/editorial-monograph/document/theme/page-surfaces/chapter-opener.css +0 -205
- package/template/packs/editorial-monograph/document/theme/page-surfaces/cover.css +0 -147
- package/template/packs/editorial-monograph/document/theme/page-surfaces/toc.css +0 -149
- package/template/packs/editorial-monograph/document/theme/patterns/_chart-frame.css +0 -49
- package/template/packs/editorial-monograph/document/theme/patterns/figure-grid.css +0 -68
- package/template/packs/editorial-monograph/document/theme/patterns/table-utilities.css +0 -66
- package/template/packs/editorial-monograph/document/theme/shell/reader-controls.css +0 -761
- package/template/packs/editorial-monograph/document/theme/tokens.css +0 -80
- package/template/packs/editorial-monograph/openpress.config.mjs +0 -5
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
/* 深色 chrome(navbar / sidebar / app background) */
|
|
3
|
-
--openpress-color-app-bg: #161616;
|
|
4
|
-
--openpress-color-border-subtle: #393939;
|
|
5
|
-
--openpress-color-border-strong: #6f6f6f;
|
|
6
|
-
--openpress-color-text-on-dark: #f4f4f4;
|
|
7
|
-
--openpress-color-text-secondary: #c6c6c6;
|
|
8
|
-
--openpress-color-text-placeholder: #8d8d8d;
|
|
9
|
-
--openpress-color-focus: #0f62fe;
|
|
10
|
-
|
|
11
|
-
/* 文件本身(白底文件、墨色內文) */
|
|
12
|
-
--openpress-color-document: #ffffff;
|
|
13
|
-
--openpress-color-ink: #161616;
|
|
14
|
-
--openpress-color-muted: #6f6f6f;
|
|
15
|
-
--openpress-color-line: #e0e0e0;
|
|
16
|
-
--openpress-color-soft-line: #f4f4f4;
|
|
17
|
-
|
|
18
|
-
/* 表格狀態符號 */
|
|
19
|
-
--openpress-color-green: #24a148;
|
|
20
|
-
|
|
21
|
-
/* 圖表 palette(柔和暖色系)
|
|
22
|
-
* 用於 data-foundation、milestone-roadmap、cost-donut、revenue-line-chart 等元件。
|
|
23
|
-
* 排序由淺到深,可以對應 phase / tier 的進階感:
|
|
24
|
-
* gold (起始 / current) → coral (中期) → coral-deep (後期) → dark (anchor / 成熟)
|
|
25
|
-
*/
|
|
26
|
-
--openpress-chart-gold: #FFB000;
|
|
27
|
-
--openpress-chart-coral: #FF6A4D;
|
|
28
|
-
--openpress-chart-coral-deep: #C9522B;
|
|
29
|
-
--openpress-chart-dark: #1F2328;
|
|
30
|
-
--openpress-chart-cream: #FFF3DB;
|
|
31
|
-
--openpress-chart-warm-gray: #B0A89A;
|
|
32
|
-
|
|
33
|
-
/* 對應的背景 tint(較飽和、用於 phase / tier 卡片) */
|
|
34
|
-
--openpress-chart-gold-bg: rgba(255, 176, 0, 0.20);
|
|
35
|
-
--openpress-chart-coral-bg: rgba(255, 106, 77, 0.16);
|
|
36
|
-
--openpress-chart-coral-deep-bg: rgba(201, 82, 43, 0.14);
|
|
37
|
-
--openpress-chart-dark-bg: rgba(31, 35, 40, 0.09);
|
|
38
|
-
|
|
39
|
-
/* 對應的中等飽和邊框色(配合 background tint) */
|
|
40
|
-
--openpress-chart-gold-border: rgba(255, 176, 0, 0.55);
|
|
41
|
-
--openpress-chart-coral-border: rgba(255, 106, 77, 0.5);
|
|
42
|
-
--openpress-chart-coral-deep-border: rgba(201, 82, 43, 0.42);
|
|
43
|
-
--openpress-chart-dark-border: rgba(31, 35, 40, 0.28);
|
|
44
|
-
|
|
45
|
-
/* Status — 文件內行內語意強調色(warn / success / info),
|
|
46
|
-
* 用於 <span class="status-warn|status-success|status-info">。
|
|
47
|
-
* 避免按色相命名(accent-gold 之類)以強制走語意。 */
|
|
48
|
-
--openpress-status-warn: #C9522B;
|
|
49
|
-
--openpress-status-success: #5C8C4F;
|
|
50
|
-
--openpress-status-info: #4A6B8A;
|
|
51
|
-
|
|
52
|
-
/* 字型 */
|
|
53
|
-
--openpress-font-body: "IBM Plex Sans", "PingFang TC", "Noto Sans TC", "Hiragino Sans", "Microsoft JhengHei", sans-serif;
|
|
54
|
-
--openpress-font-serif: "Noto Serif TC", "Songti TC", "Source Han Serif TC", "PMingLiU", serif;
|
|
55
|
-
--openpress-font-mono: "SFMono-Regular", "Menlo", "Consolas", monospace;
|
|
56
|
-
|
|
57
|
-
/* 字級(固定 pt 用於小元素;標題改用 container queries 算) */
|
|
58
|
-
--openpress-text-sm: 9.5pt;
|
|
59
|
-
--openpress-text-md: 10.5pt;
|
|
60
|
-
|
|
61
|
-
/* 行距 */
|
|
62
|
-
--openpress-leading-body: 1.72;
|
|
63
|
-
--openpress-leading-table: 1.45;
|
|
64
|
-
|
|
65
|
-
/* 間距系統(mm 為主、適合 print 與 A4 視覺節奏) */
|
|
66
|
-
--openpress-space-1: 2mm;
|
|
67
|
-
--openpress-space-2: 4mm;
|
|
68
|
-
--openpress-space-3: 6mm;
|
|
69
|
-
--openpress-space-4: 9mm;
|
|
70
|
-
--openpress-space-5: 13mm;
|
|
71
|
-
|
|
72
|
-
/* Page geometry — A4 預設。
|
|
73
|
-
* 換成 B5 / Letter / 16:9 投影片時改這三條,其他 CSS 與 page-contract `@page`
|
|
74
|
-
* 都會跟著走。注意:@page size 改用 length pair 時,PDF 與瀏覽器 print 都會吃。 */
|
|
75
|
-
--openpress-page-width: 210mm;
|
|
76
|
-
--openpress-page-height: 297mm;
|
|
77
|
-
--openpress-page-aspect-ratio: 210 / 297;
|
|
78
|
-
--openpress-page-height-ratio: calc(297 / 210);
|
|
79
|
-
--openpress-page-margin: 18mm;
|
|
80
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
## Document Shape
|
|
2
|
-
|
|
3
|
-
### Start With A Clear Claim
|
|
4
|
-
|
|
5
|
-
Claude-style documents work best when every section has one clear claim, enough context to understand it, and a concrete artifact that the reader can inspect.
|
|
6
|
-
|
|
7
|
-
Use prose to explain the decision first. Then use a table, figure, quote, or code block only when it makes the argument easier to verify.
|
|
8
|
-
|
|
9
|
-
> A good working document should feel calm enough to read slowly, but structured enough for an agent to edit safely.
|
|
10
|
-
|
|
11
|
-
### Keep The Evidence Close
|
|
12
|
-
|
|
13
|
-
Readers should not hunt for why a section exists. Put the evidence directly under the claim, and keep the table focused on the comparison being made.
|
|
14
|
-
|
|
15
|
-
<TableCaption>Document section roles</TableCaption>
|
|
16
|
-
|
|
17
|
-
| section part | purpose | writing rule |
|
|
18
|
-
| --- | --- | --- |
|
|
19
|
-
| claim | tells the reader what this section is saying | keep it short and concrete |
|
|
20
|
-
| context | explains why the claim matters | avoid background that does not change the decision |
|
|
21
|
-
| evidence | gives examples, data, or constraints | keep it near the claim |
|
|
22
|
-
| next step | names what should happen after reading | make the action explicit |
|
|
23
|
-
|
|
24
|
-
### One Figure, One Idea
|
|
25
|
-
|
|
26
|
-
Figures should explain a single relationship. Put longer reasoning in the paragraphs before or after the visual.
|
|
27
|
-
|
|
28
|
-
<figure className="chart-frame">
|
|
29
|
-
<svg viewBox="0 0 640 220" role="img" aria-label="Document moves from context to decision to next step">
|
|
30
|
-
<g fill="none" stroke="currentColor" strokeWidth="2">
|
|
31
|
-
<rect x="48" y="72" width="132" height="72" rx="4" />
|
|
32
|
-
<rect x="254" y="72" width="132" height="72" rx="4" />
|
|
33
|
-
<rect x="460" y="72" width="132" height="72" rx="4" />
|
|
34
|
-
<path d="M180 108 H254 M386 108 H460" />
|
|
35
|
-
<path d="M238 92 256 108 238 124 M444 92 462 108 444 124" />
|
|
36
|
-
</g>
|
|
37
|
-
<g fill="currentColor">
|
|
38
|
-
<text x="114" y="114" textAnchor="middle">context</text>
|
|
39
|
-
<text x="320" y="114" textAnchor="middle">decision</text>
|
|
40
|
-
<text x="526" y="114" textAnchor="middle">next</text>
|
|
41
|
-
</g>
|
|
42
|
-
</svg>
|
|
43
|
-
<figcaption>A section should move from context to decision to next step.</figcaption>
|
|
44
|
-
</figure>
|
|
45
|
-
|
|
46
|
-
#### Authoring Checklist
|
|
47
|
-
|
|
48
|
-
- Keep one concept per figure.
|
|
49
|
-
- Keep tables narrow enough to scan.
|
|
50
|
-
- Move exceptions into a table when they need comparison.
|
|
51
|
-
- Use surrounding prose for interpretation, not crowded text inside the visual.
|
package/template/packs/claude-document/document/chapters/02-review-loop/content/01-review-loop.mdx
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
## Review Loop
|
|
2
|
-
|
|
3
|
-
### Use Review As A Page-Level Workflow
|
|
4
|
-
|
|
5
|
-
Use review pages to make a document actionable. A review page should gather open decisions, risks, and edits without replacing the reader-facing document.
|
|
6
|
-
|
|
7
|
-
The goal is not to add process noise. The goal is to make the next editing pass obvious.
|
|
8
|
-
|
|
9
|
-
### Track Decisions
|
|
10
|
-
|
|
11
|
-
<TableCaption>Review pass tracker</TableCaption>
|
|
12
|
-
|
|
13
|
-
| area | question | current decision |
|
|
14
|
-
| --- | --- | --- |
|
|
15
|
-
| audience | who should understand this document first? | primary reader |
|
|
16
|
-
| structure | does every section have a clear claim? | revise weak headings |
|
|
17
|
-
| evidence | are examples close to the claims they support? | keep tables near prose |
|
|
18
|
-
| output | will the page survive PDF and mobile preview? | validate after edits |
|
|
19
|
-
|
|
20
|
-
### Close The Loop
|
|
21
|
-
|
|
22
|
-
Keep the closing section concise. It should tell the reader what changed and what remains unresolved.
|
|
23
|
-
|
|
24
|
-
<TableCaption>Final review checklist</TableCaption>
|
|
25
|
-
|
|
26
|
-
| check | pass condition |
|
|
27
|
-
| --- | --- |
|
|
28
|
-
| title and summary | the document promise is visible on the first page |
|
|
29
|
-
| headings | H2/H3 structure matches the table of contents |
|
|
30
|
-
| tables and figures | every visual has a caption and one clear job |
|
|
31
|
-
| unresolved facts | placeholders are explicit and easy to search |
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
const VISUALS = {
|
|
2
|
-
overview: `<svg viewBox="0 0 520 330" focusable="false" aria-hidden="true">
|
|
3
|
-
<rect class="chapter-opener-illustration__paper" x="58" y="52" width="318" height="174" rx="6" />
|
|
4
|
-
<path class="chapter-opener-illustration__thin" d="M58 92 H376 M96 72 H124 M144 72 H172 M192 72 H220" />
|
|
5
|
-
<path class="chapter-opener-illustration__stroke" d="M132 116 104 144 132 172 M302 116 330 144 302 172" />
|
|
6
|
-
<path class="chapter-opener-illustration__thin" d="M162 122 H244 M162 148 H276 M162 174 H224" />
|
|
7
|
-
<path class="chapter-opener-illustration__thin" d="M244 122 276 148 244 174 M276 148 H324" />
|
|
8
|
-
<circle class="chapter-opener-illustration__node" cx="244" cy="122" r="9" />
|
|
9
|
-
<circle class="chapter-opener-illustration__node" cx="276" cy="148" r="9" />
|
|
10
|
-
<circle class="chapter-opener-illustration__dot" cx="244" cy="174" r="8" />
|
|
11
|
-
<circle class="chapter-opener-illustration__dot" cx="324" cy="148" r="8" />
|
|
12
|
-
<path class="chapter-opener-illustration__paper" d="M398 42 466 56 486 122 438 166 370 140 374 72Z" />
|
|
13
|
-
<path class="chapter-opener-illustration__thin" d="M428 74 V132 M398 102 H460 M410 84 446 120" />
|
|
14
|
-
<circle class="chapter-opener-illustration__node" cx="428" cy="74" r="11" />
|
|
15
|
-
<circle class="chapter-opener-illustration__node" cx="398" cy="102" r="10" />
|
|
16
|
-
<circle class="chapter-opener-illustration__node" cx="460" cy="102" r="10" />
|
|
17
|
-
<circle class="chapter-opener-illustration__dot" cx="428" cy="132" r="9" />
|
|
18
|
-
<rect class="chapter-opener-illustration__paper" x="86" y="256" width="68" height="44" rx="4" />
|
|
19
|
-
<rect class="chapter-opener-illustration__paper" x="214" y="256" width="68" height="44" rx="4" />
|
|
20
|
-
<rect class="chapter-opener-illustration__paper" x="342" y="256" width="68" height="44" rx="4" />
|
|
21
|
-
<path class="chapter-opener-illustration__stroke" d="M154 278 H214 M282 278 H342" />
|
|
22
|
-
<path class="chapter-opener-illustration__arrow" d="M198 262 216 278 198 294 M326 262 344 278 326 294" />
|
|
23
|
-
<path class="chapter-opener-illustration__thin" d="M110 278 H132 M238 278 H260 M366 278 H388" />
|
|
24
|
-
</svg>`,
|
|
25
|
-
structure: `<svg viewBox="0 0 520 330" focusable="false" aria-hidden="true">
|
|
26
|
-
<rect class="chapter-opener-illustration__paper" x="42" y="96" width="116" height="82" rx="4" />
|
|
27
|
-
<rect class="chapter-opener-illustration__paper" x="204" y="96" width="116" height="82" rx="4" />
|
|
28
|
-
<rect class="chapter-opener-illustration__paper" x="366" y="96" width="116" height="82" rx="4" />
|
|
29
|
-
<path class="chapter-opener-illustration__stroke" d="M158 137 H204" />
|
|
30
|
-
<path class="chapter-opener-illustration__stroke" d="M320 137 H366" />
|
|
31
|
-
<path class="chapter-opener-illustration__arrow" d="M190 122 206 137 190 152" />
|
|
32
|
-
<path class="chapter-opener-illustration__arrow" d="M352 122 368 137 352 152" />
|
|
33
|
-
<path class="chapter-opener-illustration__thin" d="M72 128 H118 M72 150 H128 M234 128 H280 M234 150 H286 M396 128 H442 M396 150 H452" />
|
|
34
|
-
<circle class="chapter-opener-illustration__node" cx="144" cy="137" r="13" />
|
|
35
|
-
<circle class="chapter-opener-illustration__node" cx="306" cy="137" r="13" />
|
|
36
|
-
<circle class="chapter-opener-illustration__node" cx="468" cy="137" r="13" />
|
|
37
|
-
<path class="chapter-opener-illustration__stroke" d="M262 178 C262 222 220 244 158 244 C98 244 68 222 68 190" />
|
|
38
|
-
<path class="chapter-opener-illustration__arrow" d="M52 204 68 188 84 204" />
|
|
39
|
-
</svg>`,
|
|
40
|
-
model: `<svg viewBox="0 0 520 330" focusable="false" aria-hidden="true">
|
|
41
|
-
<path class="chapter-opener-illustration__paper" d="M232 40 316 40 352 86 330 132 218 132 194 86Z" />
|
|
42
|
-
<path class="chapter-opener-illustration__paper" d="M88 198 170 178 228 218 204 288 100 288 58 240Z" />
|
|
43
|
-
<path class="chapter-opener-illustration__paper" d="M314 198 400 176 466 224 450 292 328 292 282 238Z" />
|
|
44
|
-
<path class="chapter-opener-illustration__stroke" d="M262 118 160 214 M270 118 374 214" />
|
|
45
|
-
<path class="chapter-opener-illustration__stroke" d="M160 214 122 258 M160 214 204 258 M374 214 330 258 M374 214 420 258" />
|
|
46
|
-
<circle class="chapter-opener-illustration__node" cx="266" cy="100" r="24" />
|
|
47
|
-
<circle class="chapter-opener-illustration__node" cx="160" cy="214" r="22" />
|
|
48
|
-
<circle class="chapter-opener-illustration__node" cx="374" cy="214" r="22" />
|
|
49
|
-
<circle class="chapter-opener-illustration__dot" cx="122" cy="258" r="13" />
|
|
50
|
-
<circle class="chapter-opener-illustration__dot" cx="204" cy="258" r="13" />
|
|
51
|
-
<circle class="chapter-opener-illustration__dot" cx="330" cy="258" r="13" />
|
|
52
|
-
<circle class="chapter-opener-illustration__dot" cx="420" cy="258" r="13" />
|
|
53
|
-
</svg>`,
|
|
54
|
-
draft: `<svg viewBox="0 0 520 330" focusable="false" aria-hidden="true">
|
|
55
|
-
<path class="chapter-opener-illustration__paper" d="M92 52 338 52 386 104 386 286 92 286Z" />
|
|
56
|
-
<path class="chapter-opener-illustration__paper" d="M348 82 438 82 476 122 452 226 356 226 326 154Z" />
|
|
57
|
-
<path class="chapter-opener-illustration__thin" d="M132 112 H250 M132 146 H292 M132 180 H238 M132 214 H276" />
|
|
58
|
-
<path class="chapter-opener-illustration__stroke" d="M308 114 C340 122 356 148 356 180 C356 220 332 244 292 250" />
|
|
59
|
-
<path class="chapter-opener-illustration__arrow" d="M304 226 288 250 316 260" />
|
|
60
|
-
<path class="chapter-opener-illustration__stroke" d="M406 124 V202" />
|
|
61
|
-
<circle class="chapter-opener-illustration__node" cx="406" cy="124" r="17" />
|
|
62
|
-
<circle class="chapter-opener-illustration__node" cx="406" cy="202" r="17" />
|
|
63
|
-
</svg>`,
|
|
64
|
-
review: `<svg viewBox="0 0 520 330" focusable="false" aria-hidden="true">
|
|
65
|
-
<path class="chapter-opener-illustration__paper" d="M128 44 396 44 440 90 418 292 104 292 82 86Z" />
|
|
66
|
-
<path class="chapter-opener-illustration__thin" d="M178 116 H350 M178 168 H350 M178 220 H322" />
|
|
67
|
-
<path class="chapter-opener-illustration__stroke" d="M128 112 148 134 190 88" />
|
|
68
|
-
<path class="chapter-opener-illustration__stroke" d="M128 164 148 186 190 140" />
|
|
69
|
-
<path class="chapter-opener-illustration__stroke" d="M128 216 148 238 190 192" />
|
|
70
|
-
<circle class="chapter-opener-illustration__node" cx="386" cy="92" r="18" />
|
|
71
|
-
<path class="chapter-opener-illustration__stroke" d="M386 92 C420 126 424 172 394 208" />
|
|
72
|
-
<path class="chapter-opener-illustration__arrow" d="M380 186 394 210 420 200" />
|
|
73
|
-
</svg>`,
|
|
74
|
-
} as const;
|
|
75
|
-
|
|
76
|
-
type ChapterOpenerVisualVariant = keyof typeof VISUALS;
|
|
77
|
-
type ChapterOpenerVisualTone = "sage" | "lavender" | "mint" | "amber";
|
|
78
|
-
|
|
79
|
-
export interface ChapterOpenerVisualProps {
|
|
80
|
-
variant?: ChapterOpenerVisualVariant;
|
|
81
|
-
tone?: ChapterOpenerVisualTone;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export default function ChapterOpenerVisual({
|
|
85
|
-
variant = "structure",
|
|
86
|
-
tone = "sage",
|
|
87
|
-
}: ChapterOpenerVisualProps) {
|
|
88
|
-
const html = VISUALS[variant] ?? VISUALS.structure;
|
|
89
|
-
return (
|
|
90
|
-
<figure
|
|
91
|
-
className={`chapter-opener-illustration chapter-opener-illustration--${variant} chapter-opener-tone--${tone}`}
|
|
92
|
-
aria-hidden="true"
|
|
93
|
-
dangerouslySetInnerHTML={{ __html: html }}
|
|
94
|
-
/>
|
|
95
|
-
);
|
|
96
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Frame, MdxArea } from "@open-press/core";
|
|
2
|
-
import type { SectionsPageProps } from "@open-press/core/manuscript";
|
|
3
|
-
|
|
4
|
-
export default function Page({
|
|
5
|
-
frameKey,
|
|
6
|
-
chainId,
|
|
7
|
-
pageIndex,
|
|
8
|
-
totalPages,
|
|
9
|
-
sectionSlug,
|
|
10
|
-
sectionTitle,
|
|
11
|
-
sectionTone,
|
|
12
|
-
}: SectionsPageProps) {
|
|
13
|
-
return (
|
|
14
|
-
<Frame
|
|
15
|
-
frameKey={frameKey}
|
|
16
|
-
role="manuscript.content"
|
|
17
|
-
className="reader-page--content"
|
|
18
|
-
data-page-index={pageIndex}
|
|
19
|
-
data-total-pages={totalPages}
|
|
20
|
-
data-section-id={sectionSlug}
|
|
21
|
-
data-chapter-tone={sectionTone}
|
|
22
|
-
>
|
|
23
|
-
<div className="page-frame">
|
|
24
|
-
<header className="page-header" aria-hidden="true" />
|
|
25
|
-
<main className="page-body">
|
|
26
|
-
<MdxArea chainId={chainId} />
|
|
27
|
-
</main>
|
|
28
|
-
<footer className="page-footer" aria-hidden="true">
|
|
29
|
-
<span className="footer-left">{sectionTitle}</span>
|
|
30
|
-
<span className="footer-right">
|
|
31
|
-
{totalPages > 1 ? `${pageIndex + 1}/${totalPages}` : pageIndex + 1}
|
|
32
|
-
</span>
|
|
33
|
-
</footer>
|
|
34
|
-
</div>
|
|
35
|
-
</Frame>
|
|
36
|
-
);
|
|
37
|
-
}
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
# Claude Document 樣式規格
|
|
2
|
-
|
|
3
|
-
> Claude-like A4 文件樣式:暖紙張、細線、清楚章節、安靜的 editorial 節奏與可被 AI 穩定維護的內容區塊。
|
|
4
|
-
> 本文件給內容作者、AI 編輯助手、style pack contributor 共用。
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## 1. 風格目標與使用場景
|
|
9
|
-
|
|
10
|
-
這套樣板面向 Claude-style 工作文件:可以是筆記、研究摘要、產品 brief、規格草稿、教材、提案或內部說明。它不是簡報、海報或科技感 landing page,而是一套能列印、能標註、能長時間閱讀的 A4 文件系統。
|
|
11
|
-
|
|
12
|
-
風格基調是溫暖、理性、乾淨。頁面使用米白紙紋背景、深藍灰標題、霧藍細線與淡實色資訊區塊;裝飾只保留必要的章節標籤、表格線、caption 與簡單概念圖。
|
|
13
|
-
|
|
14
|
-
### 設計原則
|
|
15
|
-
|
|
16
|
-
| 原則 | 規則 | Agent 操作提醒 |
|
|
17
|
-
| --- | --- | --- |
|
|
18
|
-
| 文件優先 | 第一眼像正式工作文件,不像投影片或宣傳頁 | 不加入大面積深色背景、炫光、電路紋或複雜裝飾 |
|
|
19
|
-
| 紙面一致 | 每張 A4 頁面共用淡紙紋與極弱縱向節奏 | 背景只能提供紙本感,不應搶過正文 |
|
|
20
|
-
| 可被 AI 維護 | prose、table、figure、caption 各自有清楚職責 | 不把關鍵結論鎖在截圖或不可編輯 SVG |
|
|
21
|
-
| 一圖一概念 | 一張圖只說明一個關係、決策或狀態變化 | 不把定義、流程、風險與結論塞進同一張圖 |
|
|
22
|
-
| 公開可交付 | Starter 不放私人名稱、客戶資料、部署密鑰 | 文件可以作為新專案起點,不是個人作業紙 |
|
|
23
|
-
| 輸出穩定 | 所有樣式支援 reader、mobile preview 與 PDF | 避免 uncontrolled overflow、孤立 caption 與跨 footer 元件 |
|
|
24
|
-
|
|
25
|
-
### 使用場景
|
|
26
|
-
|
|
27
|
-
| 場景 | 適合原因 | 不適合方向 |
|
|
28
|
-
| --- | --- | --- |
|
|
29
|
-
| 工作筆記 | 需要脈絡、決策、證據與下一步共存 | 鬆散聊天紀錄 |
|
|
30
|
-
| 產品 brief / spec | 需要清楚章節、表格、風險與輸出 | Dashboard-like 操作面板 |
|
|
31
|
-
| 研究摘要 | 需要長文閱讀、引用式說明與圖表 | 過度行銷語氣 |
|
|
32
|
-
| 教材與公開說明 | 需要可列印、可投影、可批註 | 花俏簡報版型 |
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## 2. Tokens
|
|
37
|
-
|
|
38
|
-
### Typography Scale
|
|
39
|
-
|
|
40
|
-
Claude Document 以 sans 作為主要閱讀字體,讓正文、表格與長段落保持穩定;H1/H2/H3 與目錄標題使用 serif display stack,讓主要章節有 editorial title 的質感;需要呈現程式碼、路徑或識別字時使用 monospace。
|
|
41
|
-
|
|
42
|
-
若 style pack 後續引入非系統字體,字型檔必須放在 `document/theme/fonts/`,並由 `document/theme/fonts.css` 的 `@font-face` 載入。不要只依賴 `local(...)`,否則公開頁面、iPad 與 PDF 可能不一致。
|
|
43
|
-
|
|
44
|
-
| 用途 | CSS selector / token | 字體 | 大小 | 使用規則 |
|
|
45
|
-
| --- | --- | --- | --- | --- |
|
|
46
|
-
| 封面主標 | `.cover-title` | `--openpress-font-serif` | notebook cover scale | 文件名稱或工作主題;不放私人填寫欄位 |
|
|
47
|
-
| H2 章節標題 | `h2` | `--openpress-font-serif` | 約 26pt 視覺層級 | 每個 `##` 產生主要章節與 bookmark |
|
|
48
|
-
| H3 子章節標題 | `h3` | `--openpress-font-serif` | 約 18pt 視覺層級 | 章節內概念分段 |
|
|
49
|
-
| H4 項目標題 | `h4` | `--openpress-font-body` | 約 13pt 視覺層級 | 局部規則、操作、風險或小型 procedure |
|
|
50
|
-
| 內文 | `p`, `li` | `--openpress-font-body` | 約 11pt 系統層級 | 長文閱讀基準 |
|
|
51
|
-
| 程式碼 / literal | `pre code`, `code` | `--openpress-font-mono` | 約 10.5pt 系統層級 | 程式碼區塊、識別字、命令、路徑 |
|
|
52
|
-
| 表格內容 | `table` | `--openpress-font-body` | 約 10.5pt 系統層級 | 規格表、比較表、決策表、檢查表 |
|
|
53
|
-
| caption | `figcaption`, `caption` | `--openpress-font-body` | 約 9pt 系統層級 | 圖表下方置中,由 renderer 自動編號 |
|
|
54
|
-
|
|
55
|
-
### Color Tokens
|
|
56
|
-
|
|
57
|
-
| Token | 用途 |
|
|
58
|
-
| --- | --- |
|
|
59
|
-
| `--openpress-color-document` | 淡黃紙;封面、目錄、內文共用頁面底紙 |
|
|
60
|
-
| `--openpress-color-ink` | 深藍灰;標題、主線條、章節標籤 |
|
|
61
|
-
| `--openpress-color-body` | 深灰;正文閱讀文字 |
|
|
62
|
-
| `--openpress-color-muted` | 霧藍;輔助標題、頁碼、次要線條 |
|
|
63
|
-
| `--openpress-color-soft-line` | 淡黃灰;程式碼、表頭、區塊背景 |
|
|
64
|
-
| `--openpress-color-block` | code block 與圖表的淡實色底;蓋住頁面格線 |
|
|
65
|
-
|
|
66
|
-
文件頁面以淡黃紙為統一底色,搭配深藍灰文字與少量霧藍輔助資訊。色彩服務文件層級,不做強烈科技感或裝飾性漸層。
|
|
67
|
-
|
|
68
|
-
### Page Geometry
|
|
69
|
-
|
|
70
|
-
文件實體尺寸由 page geometry token 共同決定,page-contract 的 `@page`、reader runtime、shell measurement、PDF print route 都讀同一組值。切頁模式下每一張 `.reader-page` 都必須維持固定 page ratio;若內容超出,應回到 pagination / component overflow 修正,不能讓單張頁面自行長高。
|
|
71
|
-
|
|
72
|
-
| Token | Default | 用途 |
|
|
73
|
-
| --- | --- | --- |
|
|
74
|
-
| `--openpress-page-width` | `210mm` | 紙張寬 |
|
|
75
|
-
| `--openpress-page-height` | `297mm` | 紙張高 |
|
|
76
|
-
| `--openpress-page-aspect-ratio` | `210 / 297` | CSS `aspect-ratio` |
|
|
77
|
-
| `--openpress-page-height-ratio` | `1.4142857143` | responsive height 計算 |
|
|
78
|
-
| `--openpress-page-margin` | `18mm` | `@page` CSS print 邊距 |
|
|
79
|
-
|
|
80
|
-
---
|
|
81
|
-
|
|
82
|
-
## 3. Components
|
|
83
|
-
|
|
84
|
-
### Page Surfaces
|
|
85
|
-
|
|
86
|
-
| 元件 | Source 寫法 | Agent 使用時機 |
|
|
87
|
-
| --- | --- | --- |
|
|
88
|
-
| Cover | `kind: cover` + cover JSX | 文件開場,建立文件身份 |
|
|
89
|
-
| TOC | `kind: toc` 或 exporter 插入 | 不手寫目錄內容 |
|
|
90
|
-
| Chapter opener | `kind: chapter-opener` | 書籍、教材、手冊等章節相對獨立的文件 |
|
|
91
|
-
| Chapter page | `##` heading | 每個主要概念一個 `##` |
|
|
92
|
-
| Back cover | `kind: back-cover` | 文件結尾與品牌收束 |
|
|
93
|
-
|
|
94
|
-
### Text Components
|
|
95
|
-
|
|
96
|
-
- **Paragraph**:處理脈絡、判斷、說明與轉折。
|
|
97
|
-
- **Ordered list**:表示流程、階段、優先順序。
|
|
98
|
-
- **Unordered list**:表示同層級規則、注意事項或檢查項。
|
|
99
|
-
- **Code block**:只在需要 literal、命令或程式碼時使用;完整大型檔案應拆成附錄或 repo link。
|
|
100
|
-
- **Table**:比較角色、規則、風險、決策、狀態追蹤與 edge cases。
|
|
101
|
-
- **Caption**:必須能獨立說明圖表用途,不只寫「示意圖」。
|
|
102
|
-
|
|
103
|
-
### Tables
|
|
104
|
-
|
|
105
|
-
Markdown table 前使用 `<TableCaption>...</TableCaption>`,內容只寫說明文字;export pipeline 會輸出 `表 N:...`。不要手寫表號,也不要使用舊 `表:...` marker。
|
|
106
|
-
|
|
107
|
-
<TableCaption>表格使用規則</TableCaption>
|
|
108
|
-
|
|
109
|
-
| 表格類型 | 欄位建議 | 注意事項 |
|
|
110
|
-
| --- | --- | --- |
|
|
111
|
-
| 決策表 | option / tradeoff / decision | 讓讀者快速比較選項 |
|
|
112
|
-
| 追蹤表 | step / state / result | 適合流程、審稿、狀態變化 |
|
|
113
|
-
| 比較表 | item / rule / action | 避免超過四欄;長說明移到段落 |
|
|
114
|
-
|
|
115
|
-
### Figures
|
|
116
|
-
|
|
117
|
-
Figure component 應輸出標準 `<figure><figcaption>...</figcaption></figure>`。`figcaption` 只放 caption 文字,不放手寫圖號;export pipeline 會依 content pages 的 DOM 順序產生可見的 `圖 N:` / `表 N:` 前綴,並加上統一的 `data-openpress-caption="true"` 與 `data-openpress-caption-label`。
|
|
118
|
-
|
|
119
|
-
### Diagram Rules
|
|
120
|
-
|
|
121
|
-
| 規則 | 說明 |
|
|
122
|
-
| --- | --- |
|
|
123
|
-
| 一圖一概念 | 圖表標題與 caption 要能回答「這張圖說明什麼關係」 |
|
|
124
|
-
| 資料歸資料 | chart data 透過 React props 或鄰近 data module 傳入,不寫死在 CSS |
|
|
125
|
-
| 樣式歸樣式 | chart frame 等通用規則放在 `document/theme/patterns/` |
|
|
126
|
-
| 元件歸元件 | 一個可重用視覺 = 一個 `document/components/ComponentName/` 包 |
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
## 4. CSS 權責
|
|
131
|
-
|
|
132
|
-
| Layer | Path | Owns |
|
|
133
|
-
| --- | --- | --- |
|
|
134
|
-
| Tokens | `document/theme/tokens.css` | 色彩、字體、間距、page geometry |
|
|
135
|
-
| Fonts | `document/theme/fonts.css` | webfont import / bundled font-face |
|
|
136
|
-
| Base | `document/theme/base/` | page contract、typography、table、figure、caption、print |
|
|
137
|
-
| Page surfaces | `document/theme/page-surfaces/` | cover、TOC、chapter opener、back cover |
|
|
138
|
-
| Patterns | `document/theme/patterns/` | chart frame、figure grid、table utilities |
|
|
139
|
-
| Shell | `document/theme/shell/` | reader controls around the document |
|
|
140
|
-
| Components | `document/components/<Component>/style.css` | component-local visuals |
|
|
141
|
-
|
|
142
|
-
Generated files in `public/openpress/`, `dist-react/`, and `.deploy/` are output only. Do not hand-edit them.
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { Frame, Press } from "@open-press/core";
|
|
2
|
-
import type { Manifest } from "@open-press/core";
|
|
3
|
-
import { mdxSource } from "@open-press/core/mdx";
|
|
4
|
-
import { Sections, Toc } from "@open-press/core/manuscript";
|
|
5
|
-
import ChapterOpenerVisual from "@/components/ChapterOpenerVisual";
|
|
6
|
-
import Page from "./components/Page";
|
|
7
|
-
|
|
8
|
-
export const config: Manifest = {
|
|
9
|
-
title: "Claude Document",
|
|
10
|
-
subtitle: "Warm Editorial Working Notes",
|
|
11
|
-
organization: "OpenPress",
|
|
12
|
-
sourceDir: "chapters",
|
|
13
|
-
mediaDir: "media",
|
|
14
|
-
themeDir: "theme",
|
|
15
|
-
componentsDir: "components",
|
|
16
|
-
publicDir: "public/openpress",
|
|
17
|
-
outputDir: "dist-react",
|
|
18
|
-
pdf: {
|
|
19
|
-
filename: "claude-document.pdf",
|
|
20
|
-
},
|
|
21
|
-
deploy: {
|
|
22
|
-
adapter: "cloudflare-pages",
|
|
23
|
-
source: ".deploy/claude-document",
|
|
24
|
-
projectName: null,
|
|
25
|
-
commitDirty: false,
|
|
26
|
-
requiresConfirmation: true,
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export const sources = {
|
|
31
|
-
story: mdxSource({ preset: "section-folders", root: "chapters" }),
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
function Cover() {
|
|
35
|
-
return (
|
|
36
|
-
<Frame
|
|
37
|
-
frameKey="cover"
|
|
38
|
-
role="manuscript.cover"
|
|
39
|
-
chrome={false}
|
|
40
|
-
className="reader-page--cover no-footer"
|
|
41
|
-
data-page-title="Cover"
|
|
42
|
-
aria-labelledby="document-title"
|
|
43
|
-
>
|
|
44
|
-
<ChapterOpenerVisual variant="overview" tone="sage" />
|
|
45
|
-
<div className="cover-main">
|
|
46
|
-
<h1 id="document-title" className="cover-title">
|
|
47
|
-
Claude
|
|
48
|
-
<br />
|
|
49
|
-
Document
|
|
50
|
-
</h1>
|
|
51
|
-
<p className="cover-author">
|
|
52
|
-
<span>Prepared for</span>
|
|
53
|
-
<strong>Working Notes</strong>
|
|
54
|
-
</p>
|
|
55
|
-
</div>
|
|
56
|
-
</Frame>
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function BackCover() {
|
|
61
|
-
return (
|
|
62
|
-
<Frame
|
|
63
|
-
frameKey="back-cover"
|
|
64
|
-
role="manuscript.back-cover"
|
|
65
|
-
chrome={false}
|
|
66
|
-
className="reader-page--back-cover no-footer"
|
|
67
|
-
data-page-title="Back cover"
|
|
68
|
-
>
|
|
69
|
-
<ChapterOpenerVisual variant="overview" tone="sage" />
|
|
70
|
-
<div className="back-cover-main">
|
|
71
|
-
<h2 className="back-cover-title">
|
|
72
|
-
Claude
|
|
73
|
-
<br />
|
|
74
|
-
Document
|
|
75
|
-
</h2>
|
|
76
|
-
<p className="cover-author">
|
|
77
|
-
<span>Prepared for</span>
|
|
78
|
-
<strong>Working Notes</strong>
|
|
79
|
-
</p>
|
|
80
|
-
</div>
|
|
81
|
-
</Frame>
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export default function ClaudeDocumentPress() {
|
|
86
|
-
return (
|
|
87
|
-
<Press>
|
|
88
|
-
<Cover />
|
|
89
|
-
<Toc source="story" heading={<h2 id="toc-title" className="toc-heading">Contents</h2>} />
|
|
90
|
-
<Sections source="story" page={Page} />
|
|
91
|
-
<BackCover />
|
|
92
|
-
</Press>
|
|
93
|
-
);
|
|
94
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# media/
|
|
2
|
-
|
|
3
|
-
放這份文件用到的所有圖片、icon、品牌 asset。Markdown 內以 `media/<file>` 引用,會被解析為 `document/media/<file>`。
|
|
4
|
-
|
|
5
|
-
建議檔名規則:
|
|
6
|
-
|
|
7
|
-
- 截圖:`<topic>-<screen>.png`
|
|
8
|
-
- 場域 / 情境照片:`<topic>-<scene>.jpeg`
|
|
9
|
-
- 品牌標誌:`logo-<name>.svg` 或 `logo-<name>.png`
|
|
10
|
-
- 概念示意圖:`concept-<name>.png` / `concept-<name>.svg`
|
|
11
|
-
- 人物照:`person-<name>.jpg`
|
|
12
|
-
|
|
13
|
-
統一用小寫 + 連字號;非必要避免空白與大寫。
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// claude-document starter — apply, then fill in project metadata.
|
|
2
|
-
export default {
|
|
3
|
-
title: "Claude Document",
|
|
4
|
-
subtitle: "Warm Editorial Working Notes",
|
|
5
|
-
organization: "OpenPress",
|
|
6
|
-
|
|
7
|
-
sourceDir: "chapters",
|
|
8
|
-
mediaDir: "media",
|
|
9
|
-
themeDir: "theme",
|
|
10
|
-
designDoc: "design.md",
|
|
11
|
-
componentsDir: "components",
|
|
12
|
-
publicDir: "public/openpress",
|
|
13
|
-
outputDir: "dist-react",
|
|
14
|
-
|
|
15
|
-
pdf: {
|
|
16
|
-
filename: "claude-document.pdf",
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
deploy: {
|
|
20
|
-
adapter: "cloudflare-pages",
|
|
21
|
-
source: ".deploy/claude-document",
|
|
22
|
-
projectName: null,
|
|
23
|
-
commitDirty: false,
|
|
24
|
-
requiresConfirmation: true,
|
|
25
|
-
},
|
|
26
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# Theme
|
|
2
|
-
|
|
3
|
-
This folder is the source of the document visual system. Keep the layers narrow so agents can change the right file without guessing.
|
|
4
|
-
|
|
5
|
-
- `tokens.css`: design variables only. Colors, font families, type scale, spacing, chart colors, and shared numeric tokens live here.
|
|
6
|
-
- `fonts.css` + `fonts/`: portable font contract. Any non-system font used by tokens must be loaded in `fonts.css` and bundled under `theme/fonts/`, so export can copy it to `/openpress/fonts/`.
|
|
7
|
-
- `base/`: global document rules. Page contract, cover/back-cover, TOC, headings, paragraphs, lists, figures, tables, captions, and print safeguards live here.
|
|
8
|
-
- `page-surfaces/`: whole-page layouts routed by `kind`, including cover, TOC, optional chapter opener, and back cover.
|
|
9
|
-
- `patterns/`: named document patterns and specimens. Put chart frames, visual blocks, design-system swatches, image grids, and other class-based content patterns here.
|
|
10
|
-
- `shell/`: exported reader controls around the document. Do not put document typography or component styling here.
|
|
11
|
-
|
|
12
|
-
Component-local stylesheets live alongside their TSX in `document/components/<Component>/style.css` (auto-loaded by the engine). Generated files in `public/openpress/` and `dist-react/` are output only.
|
|
13
|
-
|
|
14
|
-
Current typography uses the portable sans / mono stack from `tokens.css`.
|
|
15
|
-
Only add a font file to `theme/fonts/` when a token actually references that family.
|