pptx-angular-viewer 4.24.3 → 4.26.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/CHANGELOG.md +65 -0
- package/README.md +9 -9
- package/ng-package.json +25 -0
- package/package.json +45 -20
- package/scripts/finalize-dist.mjs +24 -0
- package/scripts/inline-shared.mjs +43 -0
- package/tsconfig.lib.json +13 -0
- package/vitest-setup.ts +12 -0
- package/fesm2022/pptx-angular-viewer-bar-chart-3d-hit-test-B6eCwecE.mjs +0 -9855
- package/fesm2022/pptx-angular-viewer-bar-chart-3d-hit-test-B6eCwecE.mjs.map +0 -1
- package/fesm2022/pptx-angular-viewer-chart-3d-view-scene-IqColhvd.mjs +0 -1594
- package/fesm2022/pptx-angular-viewer-chart-3d-view-scene-IqColhvd.mjs.map +0 -1
- package/fesm2022/pptx-angular-viewer-chat-history-idb-7dzD77Ju.mjs +0 -73
- package/fesm2022/pptx-angular-viewer-chat-history-idb-7dzD77Ju.mjs.map +0 -1
- package/fesm2022/pptx-angular-viewer-chat-history-store-Ckeu-olx.mjs +0 -121
- package/fesm2022/pptx-angular-viewer-chat-history-store-Ckeu-olx.mjs.map +0 -1
- package/fesm2022/pptx-angular-viewer-view-overflow-BBD8nZlq.mjs +0 -1418
- package/fesm2022/pptx-angular-viewer-view-overflow-BBD8nZlq.mjs.map +0 -1
- package/fesm2022/pptx-angular-viewer-view-scene-htTUkvvA.mjs +0 -836
- package/fesm2022/pptx-angular-viewer-view-scene-htTUkvvA.mjs.map +0 -1
- package/fesm2022/pptx-angular-viewer.mjs +0 -169944
- package/fesm2022/pptx-angular-viewer.mjs.map +0 -1
- package/i18n/de.cjs +0 -4165
- package/i18n/de.d.cts +0 -3
- package/i18n/de.d.mts +0 -3
- package/i18n/de.mjs +0 -4138
- package/i18n/es.cjs +0 -4165
- package/i18n/es.d.cts +0 -3
- package/i18n/es.d.mts +0 -3
- package/i18n/es.mjs +0 -4138
- package/i18n/fr.cjs +0 -4165
- package/i18n/fr.d.cts +0 -3
- package/i18n/fr.d.mts +0 -3
- package/i18n/fr.mjs +0 -4138
- package/i18n/zh-CN.cjs +0 -4198
- package/i18n/zh-CN.d.cts +0 -3
- package/i18n/zh-CN.d.mts +0 -3
- package/i18n/zh-CN.mjs +0 -4171
- package/pptx-angular-viewer.css +0 -2
- package/types/pptx-angular-viewer.d.ts +0 -60042
- package/types/pptx-angular-viewer.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,64 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
All notable changes to this project are documented here.
|
|
4
|
+
This file is generated from [Conventional Commits](https://www.conventionalcommits.org)
|
|
5
|
+
by [git-cliff](https://git-cliff.org); do not edit it by hand.
|
|
6
|
+
A release listed with no entries carried no Conventional Commit in this package's
|
|
7
|
+
scope: scripts/release-plan.mjs releases whenever any published file changes, not only on
|
|
8
|
+
conventional commits.
|
|
9
|
+
|
|
10
|
+
## [4.26.0](https://github.com/ChristopherVR/ooxml/releases/tag/pptx-angular-viewer@4.26.0) - 2026-10-07
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- **pptx:** Add PowerPoint's built-in SmartArt layout definitions ([9c6cd97](https://github.com/ChristopherVR/ooxml/commit/9c6cd97ba6276a441aadf0d527d3bdc81fabce5e))
|
|
15
|
+
- **pptx:** Apply built-in SmartArt layouts synchronously and save them ([4ddf31c](https://github.com/ChristopherVR/ooxml/commit/4ddf31c5f2f2a1b17e8af411ecd42bee7deaa491))
|
|
16
|
+
- **shared:** Offer PowerPoint's built-in SmartArt layouts in every binding ([29100c4](https://github.com/ChristopherVR/ooxml/commit/29100c431c61983400e5af19ffd7d85ec2653463))
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
- **shared:** Size SmartArt 3D labels to their text and sharpen them ([79318b6](https://github.com/ChristopherVR/ooxml/commit/79318b60fe12b81612c16de58e1c47584a2af008))
|
|
21
|
+
- **shared:** Draw SmartArt connectors in the 3D view ([5795dcf](https://github.com/ChristopherVR/ooxml/commit/5795dcff0b489e9e79722781d000bba6d9b2f7a7))
|
|
22
|
+
|
|
23
|
+
## [4.25.0](https://github.com/ChristopherVR/ooxml/releases/tag/pptx-angular-viewer@4.25.0) - 2026-10-06
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
- **pptx:** Parse chart legend overlay from c:overlay ([dce36c6](https://github.com/ChristopherVR/ooxml/commit/dce36c6134cdaded271b73f541091b37223b6da2))
|
|
28
|
+
- **chart:** Move pie, radar, treemap and trendline helpers from pptx viewer ([c08a02b](https://github.com/ChristopherVR/ooxml/commit/c08a02b91b210c0f99c8c2dfbde02c2e1329fc57))
|
|
29
|
+
- **color:** Move text contrast and unit rgb helpers from pptx viewer ([2dcc341](https://github.com/ChristopherVR/ooxml/commit/2dcc341bd931610a9e9a8f4e8d53483cffbed8ec))
|
|
30
|
+
- **text:** Move tab leader and decimal tab helpers from pptx viewer ([3a5bcf0](https://github.com/ChristopherVR/ooxml/commit/3a5bcf0f4675db3d6831430c37db0c66c6814ef3))
|
|
31
|
+
- **geometry:** Move snap guides and align/distribute from pptx viewer ([3400e87](https://github.com/ChristopherVR/ooxml/commit/3400e8776661df9e2148e1be78819b1c12564b79))
|
|
32
|
+
- **pptx:** Forward the viewer's duplicated chart and theme helpers ([c22b276](https://github.com/ChristopherVR/ooxml/commit/c22b2766272ec08218ea14fadfc3cafd3c2b9ff6))
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
- **pptx:** Clear the old layout definition on a SmartArt layout switch ([086e06c](https://github.com/ChristopherVR/ooxml/commit/086e06cc28b0389da820f35b5fd4f482f2312de8))
|
|
37
|
+
- **shared:** Make 3D SmartArt editing and layout switching reliable in every binding ([43e3e07](https://github.com/ChristopherVR/ooxml/commit/43e3e07e6f4996c9777d175ffd3536a341dadc86))
|
|
38
|
+
- **shared:** Hide the fill swatches when the pointer leaves a 3D SmartArt node ([c718e77](https://github.com/ChristopherVR/ooxml/commit/c718e77bb15f7d74721c252189bf99b1f77a9d0d))
|
|
39
|
+
- **xlsx:** Harden code-scanning findings across areas ([90ee4b3](https://github.com/ChristopherVR/ooxml/commit/90ee4b33e1253f21cd0df299af468d550f85eddc))
|
|
40
|
+
- **xlsx:** Use Reflect for dynamic property writes and tighten sanitizers ([b663413](https://github.com/ChristopherVR/ooxml/commit/b66341384d972d73182b06c6b4c706c0462f9364))
|
|
41
|
+
|
|
42
|
+
### Refactor
|
|
43
|
+
|
|
44
|
+
- Move the library into src/core, next to src/ui ([3933a88](https://github.com/ChristopherVR/ooxml/commit/3933a88e36784ce5f4bfab0af1ca12eb65d3cd0c))
|
|
45
|
+
|
|
46
|
+
### Documentation
|
|
47
|
+
|
|
48
|
+
- Bring the pptx docs and agent guide up to date with the move ([8cc3f5e](https://github.com/ChristopherVR/ooxml/commit/8cc3f5e364232d39d2a2286e25056fd67b594108))
|
|
49
|
+
|
|
50
|
+
### Build & CI
|
|
51
|
+
|
|
52
|
+
- **deps:** Adopt ooxml-ui 0.29.1 and ooxml-core 0.21.1 ([56e1979](https://github.com/ChristopherVR/ooxml/commit/56e197912df02e3d6ce674025115dab206338138))
|
|
53
|
+
- **pptx:** Move the pptx demos and browser tests to the repository root ([a23994d](https://github.com/ChristopherVR/ooxml/commit/a23994d534fc34721f182d5eba9cd4abb97e44f8))
|
|
54
|
+
- **release:** Publish the pptx viewer packages from this repository ([21e790f](https://github.com/ChristopherVR/ooxml/commit/21e790f582b3d7072f3770d7a1bd9fc2ad035e53))
|
|
55
|
+
|
|
56
|
+
### Chores
|
|
57
|
+
|
|
58
|
+
- **viewers:** Import the pptx-viewer repository with its history ([dde62be](https://github.com/ChristopherVR/ooxml/commit/dde62beb12d38f53fcddf016a4de243fe7151712))
|
|
59
|
+
|
|
60
|
+
# Changelog
|
|
61
|
+
|
|
3
62
|
All notable changes to this project are documented here.
|
|
4
63
|
This file is generated from [Conventional Commits](https://www.conventionalcommits.org)
|
|
5
64
|
by [git-cliff](https://git-cliff.org); do not edit it by hand.
|
|
@@ -7,6 +66,12 @@ A release listed with no entries carried no Conventional Commit in this package'
|
|
|
7
66
|
scope: scripts/release-plan.mjs re-releases a package whenever any of its files
|
|
8
67
|
change, not only on conventional ones.
|
|
9
68
|
|
|
69
|
+
## [4.24.3](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-angular-viewer@4.24.3) - 2026-10-06
|
|
70
|
+
|
|
71
|
+
### Bug Fixes
|
|
72
|
+
|
|
73
|
+
- **shared:** Make 3D SmartArt rotate, edit and recolour like the 2D diagram (by @ChristopherVR) ([29473d4](https://github.com/ChristopherVR/pptx-viewer/commit/29473d42fdfd8a1b5dff4f2259ecad68ecbd57bc))
|
|
74
|
+
|
|
10
75
|
## [4.24.2](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-angular-viewer@4.24.2) - 2026-10-05
|
|
11
76
|
|
|
12
77
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
# pptx-angular-viewer
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/pptx-angular-viewer)
|
|
4
|
-
[](https://github.com/ChristopherVR/
|
|
4
|
+
[](https://github.com/ChristopherVR/ooxml/blob/main/viewers/pptx/LICENSE)
|
|
5
5
|
|
|
6
6
|
Show, edit, and present Microsoft PowerPoint (`.pptx`) files directly in an
|
|
7
7
|
Angular app: no server, no conversion step, no PowerPoint install required. Drop
|
|
8
8
|
in a `<pptx-viewer>` component, hand it the file's bytes, and it renders slides
|
|
9
9
|
as real HTML and CSS with full editing and export support.
|
|
10
10
|
|
|
11
|
-

|
|
12
12
|
|
|
13
13
|
The rendering is done by the framework-agnostic [`pptx-viewer-core`](https://www.npmjs.com/package/pptx-viewer-core) engine, which turns a `.pptx` file into a structured slide model. This package is the Angular layer that draws that model on screen, and the engine is **bundled in**, so you install just one package.
|
|
14
14
|
|
|
15
|
-
<samp>**[▶️ Try the live demo](https://christophervr.github.io/pptx
|
|
15
|
+
<samp>**[▶️ Try the live demo](https://christophervr.github.io/ooxml/pptx/demo-angular/)** · **[📦 npm](https://www.npmjs.com/package/pptx-angular-viewer)** · **[📖 Full docs](https://christophervr.github.io/ooxml/pptx/)** · **[🧩 Core SDK](https://www.npmjs.com/package/pptx-viewer-core)**</samp>
|
|
16
16
|
|
|
17
17
|
## Features
|
|
18
18
|
|
|
@@ -126,7 +126,7 @@ bootstrapApplication(AppComponent, {
|
|
|
126
126
|
|
|
127
127
|
Two ready-made presets ship with the package: `vermilionLightTheme` (warm paper
|
|
128
128
|
canvas) and `vermilionDarkTheme` (dimmed presenter room), the same vermilion
|
|
129
|
-
brand look as the [documentation site](https://christophervr.github.io/pptx
|
|
129
|
+
brand look as the [documentation site](https://christophervr.github.io/ooxml/pptx/):
|
|
130
130
|
|
|
131
131
|
```ts
|
|
132
132
|
import { vermilionLightTheme } from 'pptx-angular-viewer';
|
|
@@ -244,7 +244,7 @@ geometry or user zoom. See the [cross-binding defaults](../../docs/guide/viewpor
|
|
|
244
244
|
| `surfaceChart3D`, `barChart3D`, `lineChart3D`, `areaChart3D`, `pieChart3D` | `boolean` | `false` | Independently opt in to interactive Three.js renderers for the matching 3D chart kinds; each falls back to SVG when WebGL is unavailable. |
|
|
245
245
|
| `ai` | `PptxAiConfig` | n/a | Optional AI assistant configuration. The SDK peer loads only when its panel is opened. |
|
|
246
246
|
| `hiddenActions` | `ToolbarActionId[]` | `[]` | Toolbar buttons/ribbon tabs to hide individually (e.g. `['share', 'broadcast']`), instead of hiding the whole toolbar. |
|
|
247
|
-
| `customization` | `ViewerCustomization` | - | Hide, lock or remap any part of the UI (ribbon tabs/buttons, File > Options pages/sections/settings, File tab, context menus, shortcuts, panels, AI/collaboration, dialogs); the same helpers (`hideRibbonTab`, `lockSetting`, ...) are on the component instance. See the [UI Customization guide](https://christophervr.github.io/pptx
|
|
247
|
+
| `customization` | `ViewerCustomization` | - | Hide, lock or remap any part of the UI (ribbon tabs/buttons, File > Options pages/sections/settings, File tab, context menus, shortcuts, panels, AI/collaboration, dialogs); the same helpers (`hideRibbonTab`, `lockSetting`, ...) are on the component instance. See the [UI Customization guide](https://christophervr.github.io/ooxml/pptx/guide/customization). |
|
|
248
248
|
| `defaultThemeKey` | `string` | n/a | Initial File > Options > Appearance selection when no persisted preference exists. |
|
|
249
249
|
| `availableThemes` | `ThemeCatalogEntry[]` | n/a | Theme choices offered by File > Options > Appearance (defaults to the built-in catalog). |
|
|
250
250
|
| `onThemeChange` | `(key: string) => void` | n/a | Host hook for the appearance picker; when set, the host owns persisting the choice. |
|
|
@@ -303,7 +303,7 @@ following slide/element manipulation methods are also available:
|
|
|
303
303
|
`addElement(element)`, `updateElement(id, patch)`, `deleteElements(ids)`, and
|
|
304
304
|
`duplicateElement(id)`.
|
|
305
305
|
|
|
306
|
-
See [element insertion](https://christophervr.github.io/pptx
|
|
306
|
+
See [element insertion](https://christophervr.github.io/ooxml/pptx/angular/api#add-element)
|
|
307
307
|
for the `addElement` contract and a core-factory example.
|
|
308
308
|
|
|
309
309
|
### Exported components & helpers
|
|
@@ -333,7 +333,7 @@ import {
|
|
|
333
333
|
} from 'pptx-angular-viewer/internals';
|
|
334
334
|
```
|
|
335
335
|
|
|
336
|
-
See the [services reference](https://christophervr.github.io/pptx
|
|
336
|
+
See the [services reference](https://christophervr.github.io/ooxml/pptx/angular/services-reference)
|
|
337
337
|
for the full list.
|
|
338
338
|
|
|
339
339
|
## Localization (i18n)
|
|
@@ -351,7 +351,7 @@ inject(TranslateService).setTranslation('en', translationsEn);
|
|
|
351
351
|
inject(TranslateService).use('fr');
|
|
352
352
|
```
|
|
353
353
|
|
|
354
|
-
Unlike React/Vue, `translationsEn`, `keyToLabel`, and the `TranslationKey` type (for type-checking a new locale dictionary as `Record<TranslationKey, string>`) are exported from the package **root**, not an `/i18n` subpath. See the [Localization guide](https://christophervr.github.io/pptx
|
|
354
|
+
Unlike React/Vue, `translationsEn`, `keyToLabel`, and the `TranslationKey` type (for type-checking a new locale dictionary as `Record<TranslationKey, string>`) are exported from the package **root**, not an `/i18n` subpath. See the [Localization guide](https://christophervr.github.io/ooxml/pptx/guide/localization) for the full picture across all five viewer bindings and how to contribute a translation upstream; the live demo's language picker is a working reference.
|
|
355
355
|
|
|
356
356
|
## Limitations
|
|
357
357
|
|
|
@@ -384,7 +384,7 @@ import { translationsZhCN } from 'pptx-angular-viewer/i18n/zh-CN';
|
|
|
384
384
|
|
|
385
385
|
The other subpaths are `i18n/fr` (`translationsFr`), `i18n/es`
|
|
386
386
|
(`translationsEs`), and `i18n/de` (`translationsDe`). See the
|
|
387
|
-
[localization guide](https://christophervr.github.io/pptx
|
|
387
|
+
[localization guide](https://christophervr.github.io/ooxml/pptx/guide/localization)
|
|
388
388
|
for registration and runtime switching. Existing English imports are unchanged.
|
|
389
389
|
|
|
390
390
|
## License
|
package/ng-package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
|
3
|
+
"dest": "dist",
|
|
4
|
+
"allowedNonPeerDependencies": [
|
|
5
|
+
"@lucide/angular",
|
|
6
|
+
"html2canvas-pro",
|
|
7
|
+
"jspdf",
|
|
8
|
+
"jszip",
|
|
9
|
+
"fast-xml-parser",
|
|
10
|
+
"dompurify",
|
|
11
|
+
"ooxml-ui",
|
|
12
|
+
"opentype.js",
|
|
13
|
+
"pptx-viewer-core",
|
|
14
|
+
"pptx-viewer-mcp",
|
|
15
|
+
"zod"
|
|
16
|
+
],
|
|
17
|
+
"assets": [
|
|
18
|
+
"NOTICE",
|
|
19
|
+
"README.md",
|
|
20
|
+
{ "glob": "pptx-angular-viewer.css", "input": "src/styles", "output": "." }
|
|
21
|
+
],
|
|
22
|
+
"lib": {
|
|
23
|
+
"entryFile": "src/public-api.ts"
|
|
24
|
+
}
|
|
25
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pptx-angular-viewer",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.26.0",
|
|
4
4
|
"description": "pptx-viewer for Angular: a PowerPoint viewer and editor component to render, edit, and export PPTX slides in the browser.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -18,16 +18,16 @@
|
|
|
18
18
|
"slideshow",
|
|
19
19
|
"viewer"
|
|
20
20
|
],
|
|
21
|
-
"homepage": "https://github.
|
|
21
|
+
"homepage": "https://christophervr.github.io/ooxml/pptx/",
|
|
22
22
|
"bugs": {
|
|
23
|
-
"url": "https://github.com/ChristopherVR/
|
|
23
|
+
"url": "https://github.com/ChristopherVR/ooxml/issues"
|
|
24
24
|
},
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"author": "ChristopherVR",
|
|
27
27
|
"repository": {
|
|
28
28
|
"type": "git",
|
|
29
|
-
"url": "https://github.com/ChristopherVR/
|
|
30
|
-
"directory": "packages/angular"
|
|
29
|
+
"url": "git+https://github.com/ChristopherVR/ooxml.git",
|
|
30
|
+
"directory": "viewers/pptx/packages/angular"
|
|
31
31
|
},
|
|
32
32
|
"exports": {
|
|
33
33
|
"./styles": "./pptx-angular-viewer.css",
|
|
@@ -75,15 +75,19 @@
|
|
|
75
75
|
"types": "./i18n/zh-CN.d.cts",
|
|
76
76
|
"default": "./i18n/zh-CN.cjs"
|
|
77
77
|
}
|
|
78
|
-
},
|
|
79
|
-
"./package.json": {
|
|
80
|
-
"default": "./package.json"
|
|
81
|
-
},
|
|
82
|
-
".": {
|
|
83
|
-
"types": "./types/pptx-angular-viewer.d.ts",
|
|
84
|
-
"default": "./fesm2022/pptx-angular-viewer.mjs"
|
|
85
78
|
}
|
|
86
79
|
},
|
|
80
|
+
"scripts": {
|
|
81
|
+
"inline-shared": "node ./scripts/inline-shared.mjs",
|
|
82
|
+
"finalize-dist": "node ./scripts/finalize-dist.mjs",
|
|
83
|
+
"build": "bun run inline-shared && ng-packagr -p ng-package.json -c tsconfig.lib.json && bun run finalize-dist && bun run build:css && node ../locales/scripts/copy-subpaths.mjs",
|
|
84
|
+
"build:css": "tailwindcss -i src/styles/pptx-angular-viewer.css -o dist/pptx-angular-viewer.css --minify",
|
|
85
|
+
"dev": "bun run inline-shared && ng-packagr -p ng-package.json -c tsconfig.lib.json --watch",
|
|
86
|
+
"typecheck": "bun run inline-shared && tsc --noEmit -p tsconfig.lib.json",
|
|
87
|
+
"test": "bun run inline-shared && vitest run",
|
|
88
|
+
"test:watch": "bun run inline-shared && vitest",
|
|
89
|
+
"pack": "bun run build && cd dist && bun pm pack"
|
|
90
|
+
},
|
|
87
91
|
"dependencies": {
|
|
88
92
|
"@lucide/angular": "^1.52.0",
|
|
89
93
|
"dompurify": "^3.4.16",
|
|
@@ -91,13 +95,38 @@
|
|
|
91
95
|
"html2canvas-pro": "^2.5.1",
|
|
92
96
|
"jspdf": "^4.2.1",
|
|
93
97
|
"jszip": "^3.10.2",
|
|
94
|
-
"ooxml-ui": "^0.
|
|
98
|
+
"ooxml-ui": "^0.30.1",
|
|
95
99
|
"opentype.js": "^2.0.0",
|
|
96
|
-
"pptx-viewer-core": "^4.
|
|
97
|
-
"pptx-viewer-mcp": "^2.7.
|
|
100
|
+
"pptx-viewer-core": "^4.13.0",
|
|
101
|
+
"pptx-viewer-mcp": "^2.7.2",
|
|
98
102
|
"tslib": "^2.8.1",
|
|
99
103
|
"zod": "^4.6.5"
|
|
100
104
|
},
|
|
105
|
+
"devDependencies": {
|
|
106
|
+
"@analogjs/vite-plugin-angular": "^2.8.0",
|
|
107
|
+
"@angular/common": "^22.2.1",
|
|
108
|
+
"@angular/compiler": "^22.2.1",
|
|
109
|
+
"@angular/compiler-cli": "^22.2.1",
|
|
110
|
+
"@angular/core": "^22.2.1",
|
|
111
|
+
"@angular/platform-browser": "^22.2.1",
|
|
112
|
+
"@tailwindcss/cli": "^4.3.3",
|
|
113
|
+
"@types/opentype.js": "^1.3.10",
|
|
114
|
+
"@types/three": "^0.186.0",
|
|
115
|
+
"ai": "^7.0.127",
|
|
116
|
+
"happy-dom": "^20.14.5",
|
|
117
|
+
"jsdom": "^30.1.2",
|
|
118
|
+
"ng-packagr": "^22.2.4",
|
|
119
|
+
"pptx-viewer-core": "^4.13.0",
|
|
120
|
+
"rxjs": "^7.8.2",
|
|
121
|
+
"tailwindcss": "^4.3.3",
|
|
122
|
+
"three": "^0.186.1",
|
|
123
|
+
"typescript": "6.0.3",
|
|
124
|
+
"vitest": "^5.0.3",
|
|
125
|
+
"y-webrtc": "^10.3.0",
|
|
126
|
+
"y-websocket": "^3.1.0",
|
|
127
|
+
"yjs": "^13.6.33",
|
|
128
|
+
"zone.js": "^0.16.3"
|
|
129
|
+
},
|
|
101
130
|
"peerDependencies": {
|
|
102
131
|
"@angular/common": "^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
|
|
103
132
|
"@angular/core": "^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
|
|
@@ -126,9 +155,5 @@
|
|
|
126
155
|
"yjs": {
|
|
127
156
|
"optional": true
|
|
128
157
|
}
|
|
129
|
-
}
|
|
130
|
-
"module": "fesm2022/pptx-angular-viewer.mjs",
|
|
131
|
-
"typings": "types/pptx-angular-viewer.d.ts",
|
|
132
|
-
"sideEffects": false,
|
|
133
|
-
"type": "module"
|
|
158
|
+
}
|
|
134
159
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve `workspace:*` ranges in the built `dist/package.json` to concrete
|
|
3
|
+
* versions, after ng-packagr has generated it.
|
|
4
|
+
*
|
|
5
|
+
* An ng-packagr library is published from `dist/`, which is NOT a workspace
|
|
6
|
+
* member, so nothing downstream can resolve `workspace:*` there. Doing it here
|
|
7
|
+
* means `bun pm pack` from `dist/` (and any local tarball smoke test) already
|
|
8
|
+
* sees real ranges, rather than only the release pipeline.
|
|
9
|
+
*
|
|
10
|
+
* The rewrite itself lives in `scripts/publish-manifest.mjs` at the repo root:
|
|
11
|
+
* `npm publish` ships a manifest verbatim, so EVERY publish path has to run the
|
|
12
|
+
* same resolution or the package becomes uninstallable (issue #129). One
|
|
13
|
+
* implementation, used by both this build step and the release workflow.
|
|
14
|
+
*/
|
|
15
|
+
import { dirname, resolve } from 'node:path';
|
|
16
|
+
import { fileURLToPath } from 'node:url';
|
|
17
|
+
|
|
18
|
+
import { writePublishManifest } from '../../../scripts/publish-manifest.mjs';
|
|
19
|
+
|
|
20
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
21
|
+
const distPkgPath = resolve(here, '../dist/package.json');
|
|
22
|
+
|
|
23
|
+
const resolved = writePublishManifest(distPkgPath);
|
|
24
|
+
console.log(`[finalize-dist] resolved workspace ranges in dist/package.json (${resolved.name})`);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inline the internal, non-published `pptx-viewer-shared` package into this
|
|
3
|
+
* Angular library before compilation.
|
|
4
|
+
*
|
|
5
|
+
* ng-packagr externalizes bare-specifier dependencies and cannot reliably
|
|
6
|
+
* compile source from outside the package directory. So we copy
|
|
7
|
+
* `packages/shared/src` into `packages/angular/src/internal/shared-src` (a
|
|
8
|
+
* generated, git-ignored directory) and import it locally. The result is that
|
|
9
|
+
* the shared code ships **inlined** in the FESM and `pptx-viewer-shared` never
|
|
10
|
+
* appears in the published `package.json`; it stays a private workspace
|
|
11
|
+
* package.
|
|
12
|
+
*
|
|
13
|
+
* Runs before `build`, `typecheck`, and `test`. Test files are excluded.
|
|
14
|
+
*/
|
|
15
|
+
import { cpSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
16
|
+
import { dirname, resolve } from 'node:path';
|
|
17
|
+
import { fileURLToPath } from 'node:url';
|
|
18
|
+
|
|
19
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
20
|
+
const src = resolve(here, '../../shared/src');
|
|
21
|
+
const dest = resolve(here, '../src/internal/shared-src');
|
|
22
|
+
|
|
23
|
+
rmSync(dest, { recursive: true, force: true });
|
|
24
|
+
cpSync(src, dest, {
|
|
25
|
+
recursive: true,
|
|
26
|
+
filter: (path) => !path.endsWith('.test.ts'),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
console.log(`[inline-shared] copied ${src} -> ${dest}`);
|
|
30
|
+
|
|
31
|
+
// Also stamp this package's own `package.json` version into a tiny generated
|
|
32
|
+
// module (`internal/version.ts`), so File > Account's About panel can show a
|
|
33
|
+
// real version without ng-packagr trying to compile source from outside
|
|
34
|
+
// `src/` (importing `../package.json` directly would sit outside `rootDir`).
|
|
35
|
+
const pkgPath = resolve(here, '../package.json');
|
|
36
|
+
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
|
|
37
|
+
const versionFile = resolve(here, '../src/internal/version.ts');
|
|
38
|
+
writeFileSync(
|
|
39
|
+
versionFile,
|
|
40
|
+
`// Generated by scripts/inline-shared.mjs from package.json. Do not edit.\nexport const PPTX_ANGULAR_VIEWER_VERSION = ${JSON.stringify(pkg.version)};\n`,
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
console.log(`[inline-shared] wrote ${versionFile} (v${pkg.version})`);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"declarationMap": true,
|
|
6
|
+
"outDir": "dist"
|
|
7
|
+
},
|
|
8
|
+
"angularCompilerOptions": {
|
|
9
|
+
"compilationMode": "partial"
|
|
10
|
+
},
|
|
11
|
+
"include": ["src/**/*.ts"],
|
|
12
|
+
"exclude": ["**/*.test.ts", "**/*.spec.ts"]
|
|
13
|
+
}
|
package/vitest-setup.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* vitest-setup.ts: loads the Angular JIT compiler before any test module runs.
|
|
3
|
+
*
|
|
4
|
+
* Our `.component.ts` files are transpiled by plain `esbuild`/TypeScript
|
|
5
|
+
* decorators here (no Angular AOT), so their `@Component`/`@Injectable`
|
|
6
|
+
* classes have no `ɵcmp`/`ɵprov` factory baked in and Angular falls back to
|
|
7
|
+
* JIT at runtime. `@ngx-translate/core`'s `DefaultMissingTranslationHandler`
|
|
8
|
+
* hits this exact fallback in its own module-level static initializer, so
|
|
9
|
+
* merely importing a `.component.ts` file (even just for a co-located pure
|
|
10
|
+
* helper export) throws unless `@angular/compiler` has already been loaded.
|
|
11
|
+
*/
|
|
12
|
+
import '@angular/compiler';
|