@arcships/pptx-core 0.5.1 → 0.5.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/README.md CHANGED
@@ -2,14 +2,16 @@
2
2
 
3
3
  ## 当前状态
4
4
 
5
- 本包提供 PPTX 静态预览、播放模型、文档会话、播放控制器、页面切换和受控媒体,从 `0.3.0` 起公开发布。实现范围和验收结果见 [实现设计](../../docs/pptx-playback-implementation-design.md) 与 [正式播放验收记录](../../docs/pptx-playback-acceptance-results.md)。
5
+ 本包提供 PPTX、PPTM、PPSX、PPSM、POTX、POTM 的纵向列表/单页静态预览、播放模型、文档会话、播放控制器、页面切换和受控媒体。宏内容不会执行。实现范围和验收结果见 [实现设计](../../docs/pptx-playback-implementation-design.md) 与 [正式播放验收记录](../../docs/pptx-playback-acceptance-results.md)。
6
6
 
7
7
  ```bash
8
- pnpm add @arcships/pptx-core@0.4.0
8
+ pnpm add @arcships/pptx-core@0.5.3
9
9
  ```
10
10
 
11
11
  浏览器能力从 `@arcships/pptx-core/browser` 导入。补丁后的渲染器代码已经包含在浏览器入口中,使用方不需要安装或配置 `@aiden0z/pptx-renderer`;其普通运行依赖由 npm 自动安装。
12
12
 
13
+ `createPptxPreviewSession()` 默认使用 `renderMode: "list"`,纵向连续渲染全部幻灯片并按可视区域挂载。`createPptxDocumentSession()` 默认使用 `renderMode: "slide"`,供动画播放控制器使用。两者都可以通过会话选项显式指定 `renderMode`;`listOptions` 控制窗口化、初始挂载页数和预渲染范围。
14
+
13
15
  ## 入口边界
14
16
 
15
17
  - `src/index.ts`、`src/types.ts`:平台无关的公开类型、错误和默认限制;
package/dist/browser.d.ts CHANGED
@@ -22,8 +22,20 @@ interface PptxPreviewSessionOptions {
22
22
  limits?: PptxPreviewLimits;
23
23
  fitMode?: "contain" | "none";
24
24
  zoomPercent?: number;
25
+ /** Explicit scroll owner used by list virtualization and Surface zoom anchoring. */
26
+ scrollContainer?: HTMLElement;
25
27
  lazyMedia?: boolean;
26
28
  lazySlides?: boolean;
29
+ /** Static previews use a vertical page list; presentation playback uses one slide. */
30
+ renderMode?: "list" | "slide";
31
+ listOptions?: {
32
+ windowed?: boolean;
33
+ batchSize?: number;
34
+ initialSlides?: number;
35
+ overscanViewport?: number;
36
+ showSlideLabels?: boolean;
37
+ };
38
+ onSlideChange?: (index: number) => void;
27
39
  }
28
40
  type PptxApproximationPolicy = "off" | "safe";
29
41
  interface PptxDocumentSessionOptions extends PptxPreviewSessionOptions {