@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.
Files changed (113) hide show
  1. package/dist/cli.js +114 -23
  2. package/package.json +1 -1
  3. package/template/core/CHANGELOG.md +97 -1
  4. package/template/core/README.md +9 -5
  5. package/template/core/engine/cli.mjs +2 -5
  6. package/template/core/engine/commands/_shared.mjs +4 -4
  7. package/template/core/engine/commands/deploy.mjs +1 -1
  8. package/template/core/engine/commands/inspect.mjs +3 -3
  9. package/template/core/engine/commands/replace.mjs +1 -1
  10. package/template/core/engine/commands/search.mjs +1 -1
  11. package/template/core/engine/commands/validate.mjs +2 -2
  12. package/template/core/engine/document-export.mjs +1 -1
  13. package/template/core/engine/{chrome-pdf.mjs → output/chrome-pdf.mjs} +1 -2
  14. package/template/core/engine/{deploy-sync.mjs → output/deploy-sync.mjs} +2 -2
  15. package/template/core/engine/{fonts.mjs → output/fonts.mjs} +1 -1
  16. package/template/core/engine/{public-assets.mjs → output/public-assets.mjs} +2 -2
  17. package/template/core/engine/{static-server.mjs → output/static-server.mjs} +2 -2
  18. package/template/core/engine/react/caption-numbering.mjs +73 -0
  19. package/template/core/engine/react/comment-marker.mjs +54 -10
  20. package/template/core/engine/react/document-entry.mjs +124 -64
  21. package/template/core/engine/react/document-export.mjs +252 -311
  22. package/template/core/engine/react/mdx-compile.mjs +123 -3
  23. package/template/core/engine/react/measurement-css.mjs +3 -3
  24. package/template/core/engine/react/pagination/allocator.mjs +122 -0
  25. package/template/core/engine/react/pagination/regions.mjs +81 -0
  26. package/template/core/engine/react/pagination.mjs +9 -121
  27. package/template/core/engine/react/pipeline/allocate.mjs +248 -0
  28. package/template/core/engine/react/pipeline/final-render.mjs +94 -0
  29. package/template/core/engine/react/pipeline/frame-measurement.mjs +271 -0
  30. package/template/core/engine/react/pipeline/press-tree.mjs +135 -0
  31. package/template/core/engine/react/project-asset-endpoint.mjs +2 -2
  32. package/template/core/engine/react/{chapter-css.mjs → section-css.mjs} +12 -9
  33. package/template/core/engine/react/sources/heading-numbering.mjs +132 -0
  34. package/template/core/engine/react/sources/mdx-resolver.mjs +441 -0
  35. package/template/core/engine/react/{workspace-discovery.mjs → style-discovery.mjs} +29 -40
  36. package/template/core/engine/{config.mjs → runtime/config.mjs} +15 -0
  37. package/template/core/engine/{file-utils.mjs → runtime/file-utils.mjs} +1 -1
  38. package/template/core/engine/{inspection.mjs → runtime/inspection.mjs} +3 -4
  39. package/template/core/engine/{source-text-tools.mjs → runtime/source-text-tools.mjs} +24 -7
  40. package/template/core/engine/runtime/source-workspace.mjs +186 -0
  41. package/template/core/engine/{validation.mjs → runtime/validation.mjs} +19 -17
  42. package/template/core/package.json +5 -2
  43. package/template/core/src/openpress/anchorMap.ts +27 -0
  44. package/template/core/src/openpress/core/Frame.tsx +80 -0
  45. package/template/core/src/openpress/core/FrameContext.tsx +19 -0
  46. package/template/core/src/openpress/core/MdxArea.tsx +35 -0
  47. package/template/core/src/openpress/core/Press.tsx +34 -0
  48. package/template/core/src/openpress/core/index.tsx +34 -15
  49. package/template/core/src/openpress/core/primitives.tsx +23 -0
  50. package/template/core/src/openpress/core/types.ts +131 -19
  51. package/template/core/src/openpress/core/useSource.ts +28 -0
  52. package/template/core/src/openpress/manuscript/index.tsx +196 -0
  53. package/template/core/src/openpress/mdx/index.ts +88 -0
  54. package/template/core/src/openpress/numbering/index.ts +294 -0
  55. package/template/core/src/openpress/publicPage.tsx +4 -186
  56. package/template/core/src/openpress/reactDocumentMetadata.ts +2 -16
  57. package/template/core/src/openpress/types.ts +0 -16
  58. package/template/core/src/openpress/workbench.tsx +2 -36
  59. package/template/core/src/styles/openpress/responsive.css +0 -14
  60. package/template/core/tsconfig.json +4 -1
  61. package/template/core/vite.config.ts +10 -3
  62. package/template/packs/academic-paper/document/chapters/01-introduction/content/01-introduction.mdx +21 -0
  63. package/template/packs/academic-paper/document/chapters/02-methods/content/01-methods.mdx +30 -0
  64. package/template/packs/academic-paper/document/chapters/03-results-and-discussion/content/01-results.mdx +29 -0
  65. package/template/packs/academic-paper/document/chapters/04-acknowledgment/content/01-acknowledgment.mdx +12 -0
  66. package/template/packs/academic-paper/document/chapters/05-references/content/01-references.mdx +27 -0
  67. package/template/packs/academic-paper/document/components/ChapterOpenerVisual/index.tsx +76 -0
  68. package/template/packs/academic-paper/document/components/Page.tsx +37 -0
  69. package/template/packs/academic-paper/document/components/TokenSwatchGrid/index.tsx +46 -0
  70. package/template/packs/academic-paper/document/components/TokenSwatchGrid/style.css +63 -0
  71. package/template/packs/academic-paper/document/components/TypeSpecimen/index.tsx +38 -0
  72. package/template/packs/academic-paper/document/components/TypeSpecimen/style.css +111 -0
  73. package/template/packs/academic-paper/document/design.md +279 -0
  74. package/template/packs/academic-paper/document/index.tsx +131 -0
  75. package/template/packs/academic-paper/document/media/README.md +13 -0
  76. package/template/packs/academic-paper/document/openpress.config.mjs +26 -0
  77. package/template/packs/academic-paper/document/theme/README.md +11 -0
  78. package/template/packs/academic-paper/document/theme/base/page-contract.css +505 -0
  79. package/template/packs/academic-paper/document/theme/base/print.css +93 -0
  80. package/template/packs/academic-paper/document/theme/base/typography.css +336 -0
  81. package/template/packs/academic-paper/document/theme/fonts.css +3 -0
  82. package/template/packs/academic-paper/document/theme/page-surfaces/back-cover.css +43 -0
  83. package/template/packs/academic-paper/document/theme/page-surfaces/chapter-opener.css +205 -0
  84. package/template/packs/academic-paper/document/theme/page-surfaces/cover.css +267 -0
  85. package/template/packs/academic-paper/document/theme/page-surfaces/toc.css +149 -0
  86. package/template/packs/academic-paper/document/theme/patterns/_chart-frame.css +49 -0
  87. package/template/packs/academic-paper/document/theme/patterns/figure-grid.css +68 -0
  88. package/template/packs/academic-paper/document/theme/patterns/table-utilities.css +66 -0
  89. package/template/packs/academic-paper/document/theme/shell/reader-controls.css +761 -0
  90. package/template/packs/academic-paper/document/theme/tokens.css +80 -0
  91. package/template/packs/academic-paper/openpress.config.mjs +5 -0
  92. package/template/packs/claude-document/document/components/Page.tsx +24 -14
  93. package/template/packs/claude-document/document/design.md +2 -2
  94. package/template/packs/claude-document/document/index.tsx +67 -62
  95. package/template/packs/claude-document/document/theme/page-surfaces/toc.css +19 -7
  96. package/template/packs/editorial-monograph/document/components/Page.tsx +24 -14
  97. package/template/packs/editorial-monograph/document/design.md +2 -2
  98. package/template/packs/editorial-monograph/document/index.tsx +71 -47
  99. package/template/packs/editorial-monograph/document/theme/page-surfaces/toc.css +19 -9
  100. package/template/core/engine/commands/migrate-to-react.mjs +0 -27
  101. package/template/core/engine/page-renderer.mjs +0 -217
  102. package/template/core/engine/react/migrate-to-react.mjs +0 -355
  103. package/template/core/engine/source-workspace.mjs +0 -76
  104. package/template/core/src/openpress/core/basePages.tsx +0 -87
  105. package/template/core/src/openpress/pagination.ts +0 -845
  106. package/template/packs/claude-document/document/chapters/01-document-shape/chapter.tsx +0 -30
  107. package/template/packs/claude-document/document/chapters/02-review-loop/chapter.tsx +0 -30
  108. /package/template/core/engine/{chrome-pdf.d.mts → output/chrome-pdf.d.mts} +0 -0
  109. /package/template/core/engine/{katex-assets.mjs → output/katex-assets.mjs} +0 -0
  110. /package/template/core/engine/{page-block.mjs → output/page-block.mjs} +0 -0
  111. /package/template/core/engine/{pdf-media.mjs → output/pdf-media.mjs} +0 -0
  112. /package/template/core/engine/{config.d.mts → runtime/config.d.mts} +0 -0
  113. /package/template/core/engine/{issue-report.mjs → runtime/issue-report.mjs} +0 -0
@@ -1,30 +0,0 @@
1
- import ChapterOpenerVisual from "@/components/ChapterOpenerVisual";
2
-
3
- export const meta = {
4
- slug: "document-shape",
5
- title: "Document Shape",
6
- tone: "sage",
7
- };
8
-
9
- export const opener = (
10
- <section
11
- className="reader-page reader-page--chapter-opener no-footer"
12
- data-page-kind="chapter-opener"
13
- data-page-footer="false"
14
- data-page-title="Document Shape"
15
- aria-labelledby="chapter-opener-document-shape"
16
- >
17
- <div className="page-frame">
18
- <header className="page-header" aria-hidden="true" />
19
- <main className="page-body">
20
- <p className="chapter-opener-kicker">Chapter 1</p>
21
- <h2 id="chapter-opener-document-shape" className="chapter-opener-title">
22
- Document Shape
23
- </h2>
24
- <div className="chapter-opener-body">
25
- <ChapterOpenerVisual variant="structure" tone="sage" />
26
- </div>
27
- </main>
28
- </div>
29
- </section>
30
- );
@@ -1,30 +0,0 @@
1
- import ChapterOpenerVisual from "@/components/ChapterOpenerVisual";
2
-
3
- export const meta = {
4
- slug: "review-loop",
5
- title: "Review Loop",
6
- tone: "mint",
7
- };
8
-
9
- export const opener = (
10
- <section
11
- className="reader-page reader-page--chapter-opener no-footer"
12
- data-page-kind="chapter-opener"
13
- data-page-footer="false"
14
- data-page-title="Review Loop"
15
- aria-labelledby="chapter-opener-review-loop"
16
- >
17
- <div className="page-frame">
18
- <header className="page-header" aria-hidden="true" />
19
- <main className="page-body">
20
- <p className="chapter-opener-kicker">Chapter 2</p>
21
- <h2 id="chapter-opener-review-loop" className="chapter-opener-title">
22
- Review Loop
23
- </h2>
24
- <div className="chapter-opener-body">
25
- <ChapterOpenerVisual variant="review" tone="mint" />
26
- </div>
27
- </main>
28
- </div>
29
- </section>
30
- );