@file-viewer/pptx 3.0.1 → 3.0.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.en.md +2 -0
- package/README.md +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/worker/pptx.worker.js +2 -2
- package/dist/worker-location.d.ts +2 -0
- package/dist/worker-location.js +8 -0
- package/dist/worker.d.ts +2 -0
- package/dist/worker.js +19 -0
- package/package.json +5 -5
package/README.en.md
CHANGED
|
@@ -9,6 +9,8 @@ Native PPTX rendering engine extracted from Flyfish File Viewer. It is maintaine
|
|
|
9
9
|
- Preserves the latest native Flyfish rendering path for themes, images, shapes, tables, text, and basic charts.
|
|
10
10
|
- Supports `fitMode`, `zoomPercent`, custom Worker URLs, and Worker factories for private deployment and strict CSP environments.
|
|
11
11
|
|
|
12
|
+
`resolvePptxPackageWorkerUrl()` lets integrations identify an emitted or directly served package Worker URL. It returns `undefined` when the location is not recognized, not as proof that a file is missing; integrations can then use their asset-copy strategy or explicit Worker configuration.
|
|
13
|
+
|
|
12
14
|
## Usage
|
|
13
15
|
|
|
14
16
|
```ts
|
package/README.md
CHANGED
|
@@ -9,6 +9,8 @@ Flyfish File Viewer 的原生 PPTX 渲染引擎包,从历史稳定实现中独
|
|
|
9
9
|
- 保留历史原生解析链路中的主题、图片、形状、表格、文本和基础图表处理。
|
|
10
10
|
- 支持 `fitMode`、`zoomPercent`、自定义 Worker URL / Worker factory,方便内网、离线和 CSP 场景。
|
|
11
11
|
|
|
12
|
+
`resolvePptxPackageWorkerUrl()` 可供集成层识别打包器已输出或包目录直接提供的 Worker URL。未识别时返回 `undefined`,不代表文件不存在;集成层仍可使用自己的资产复制策略或显式 Worker 配置。
|
|
13
|
+
|
|
12
14
|
## 使用
|
|
13
15
|
|
|
14
16
|
```ts
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { PptxViewer } from './viewer';
|
|
2
2
|
export { PptxPresentation } from './presentation';
|
|
3
3
|
export type { PptxPresentationLabels, PptxPresentationState } from './presentation';
|
|
4
|
-
export { createPptxWorker } from './worker';
|
|
4
|
+
export { createPptxWorker, resolvePptxPackageWorkerUrl } from './worker';
|
|
5
5
|
export { registerPptxChartLibraryLoader } from './chart';
|
|
6
6
|
export type { PptxChartLibraries, PptxChartLibraryLoader } from './chart';
|
|
7
7
|
export { RECOMMENDED_ZIP_LIMITS, createDefaultPptxOptions, resolvePptxEngineOptions, } from './options';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { PptxViewer } from './viewer.js';
|
|
2
2
|
export { PptxPresentation } from './presentation.js';
|
|
3
|
-
export { createPptxWorker } from './worker.js';
|
|
3
|
+
export { createPptxWorker, resolvePptxPackageWorkerUrl } from './worker.js';
|
|
4
4
|
export { registerPptxChartLibraryLoader } from './chart.js';
|
|
5
5
|
export { RECOMMENDED_ZIP_LIMITS, createDefaultPptxOptions, resolvePptxEngineOptions, } from './options.js';
|