@open-press/core 1.3.2 → 1.3.3
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/engine/cli.mjs
CHANGED
|
@@ -87,7 +87,7 @@ Commands:
|
|
|
87
87
|
typecheck
|
|
88
88
|
image [--output <outputDir>] [--press <slug>] [--pages <selector>] [--no-build] [--dry-run]
|
|
89
89
|
pdf [--output <outputDir>/<pdf.filename>] [--press <slug>] [--no-build] [--dry-run]
|
|
90
|
-
deploy --confirm [--press <slug>] [--dry-run]
|
|
90
|
+
deploy --confirm [--press <slug>] [--no-pdf] [--dry-run]
|
|
91
91
|
doctor [--json] [--no-cache] # version + skill staleness check
|
|
92
92
|
upgrade [--dry-run] [--no-deps] [--no-skills] [--json] # apply updates; agent-driven
|
|
93
93
|
migrate [--dry-run] [--no-deps] [--no-skills] [--json] # alias for upgrade; reads migration notes
|
|
@@ -34,6 +34,7 @@ export function parseOptions(argv) {
|
|
|
34
34
|
else if (value === "--no-deps") options.noDeps = true;
|
|
35
35
|
else if (value === "--no-skills") options.noSkills = true;
|
|
36
36
|
else if (value === "--no-build") options.noBuild = true;
|
|
37
|
+
else if (value === "--no-pdf") options.noPdf = true;
|
|
37
38
|
else if (value === "--apply") options.apply = true;
|
|
38
39
|
else if (value === "--include-code") options.includeCode = true;
|
|
39
40
|
else if (value === "--case-sensitive") options.caseSensitive = true;
|
|
@@ -32,8 +32,10 @@ export async function run({ root, config, options, recurse }) {
|
|
|
32
32
|
const renderCode = await recurse("render", [root, "--renderer", "react"]);
|
|
33
33
|
if (renderCode !== 0) return renderCode;
|
|
34
34
|
await deploySync(root, config.outputDir, source);
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
if (!options.noPdf) {
|
|
36
|
+
await buildReactPdf({ root, config, outPath: path.resolve(root, source, pdfFilename), noBuild: true, recurse, pressSlug });
|
|
37
|
+
await writePdfStageDeployConfig(root, source, config, { pdfFilename });
|
|
38
|
+
}
|
|
37
39
|
const wranglerArgs = ["wrangler", "pages", "deploy", source];
|
|
38
40
|
if (projectName) wranglerArgs.push(`--project-name=${projectName}`);
|
|
39
41
|
if (commitDirty) wranglerArgs.push("--commit-dirty=true");
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
type CSSProperties,
|
|
8
8
|
type MouseEvent as ReactMouseEvent,
|
|
9
9
|
} from "react";
|
|
10
|
-
import { ChevronLeft, ChevronRight, Download,
|
|
10
|
+
import { ChevronLeft, ChevronRight, Download, Minimize2, PanelLeftClose, PanelLeftOpen, Play } from "lucide-react";
|
|
11
11
|
import { createPageObjectEntityId } from "../document-model";
|
|
12
12
|
import type { DeploymentInfo, HtmlPageBlock, ReaderDocument } from "../document-model";
|
|
13
13
|
import { pageIndexFromHash, replacePageRoute } from "./readerPageRoute";
|
|
@@ -231,12 +231,13 @@ export function SlidePublicViewer({
|
|
|
231
231
|
<div className="openpress-workbench-toolbar__group" aria-label="視圖">
|
|
232
232
|
<button
|
|
233
233
|
type="button"
|
|
234
|
-
className="openpress-workbench-toolbar-action"
|
|
234
|
+
className="openpress-workbench-toolbar-action openpress-workbench-toolbar-action--primary"
|
|
235
235
|
onClick={enterImmersive}
|
|
236
|
-
aria-label="
|
|
237
|
-
title="
|
|
236
|
+
aria-label="進入放映模式"
|
|
237
|
+
title="放映"
|
|
238
238
|
>
|
|
239
|
-
<
|
|
239
|
+
<Play aria-hidden="true" />
|
|
240
|
+
<span className="openpress-workbench-toolbar-action__label">放映</span>
|
|
240
241
|
</button>
|
|
241
242
|
{pdfHref ? (
|
|
242
243
|
<a
|