pptx-vanilla-viewer 3.3.0 → 3.5.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 +142 -0
- package/dist/{ai-panel-KZQ7I7FK.js → ai-panel-J4PT7Q22.js} +1 -1
- package/dist/{ai-panel-7BPXCFVA.cjs → ai-panel-MCOB6Z3S.cjs} +1 -1
- package/dist/{chunk-CAET6H3O.cjs → chunk-C47IL4M2.cjs} +3 -3
- package/dist/{chunk-5B5TD4MJ.js → chunk-JL5SFCWE.js} +3 -3
- package/dist/chunk-KW6OQCG6.js +2872 -0
- package/dist/{chunk-PUYLG2ZA.cjs → chunk-RK65LSTP.cjs} +24 -24
- package/dist/{chunk-T7XMEZIX.js → chunk-YNFB4NQQ.js} +24 -24
- package/dist/chunk-ZNRAPWFG.cjs +2872 -0
- package/dist/i18n/de.cjs +33 -0
- package/dist/i18n/de.mjs +33 -0
- package/dist/i18n/es.cjs +33 -0
- package/dist/i18n/es.mjs +33 -0
- package/dist/i18n/fr.cjs +33 -0
- package/dist/i18n/fr.mjs +33 -0
- package/dist/i18n/zh-CN.cjs +33 -0
- package/dist/i18n/zh-CN.mjs +33 -0
- package/dist/index.cjs +80 -66
- package/dist/index.d.ts +162 -117
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +80 -66
- package/dist/internals.cjs +1 -1
- package/dist/internals.d.ts +1 -1
- package/dist/internals.js +1 -1
- package/dist/styles.css +14 -0
- package/dist/{transition-overlay-DJrdo73M.d.ts → transition-overlay-55c8XGkf.d.ts} +122 -12
- package/dist/transition-overlay-55c8XGkf.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-F2YFEJ55.cjs +0 -2797
- package/dist/chunk-MEU3DTE5.js +0 -2797
- package/dist/transition-overlay-DJrdo73M.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,148 @@ A release listed with no entries carried no Conventional Commit in this package'
|
|
|
7
7
|
scope: scripts/release-plan.mjs re-releases a package whenever any of its files
|
|
8
8
|
change, not only on conventional ones.
|
|
9
9
|
|
|
10
|
+
## [3.4.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-vanilla-viewer@3.4.0) - 2026-09-24
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- **shared,react,vue,angular,svelte,vanilla:** Element context menu format commands + Paste Special (by @ChristopherVR) ([ae48518](https://github.com/ChristopherVR/pptx-viewer/commit/ae485188df20eb0c309a6a4f2ee8b4302d7e7024))
|
|
15
|
+
- **shared,react,vue,angular,svelte,vanilla:** Render online video links as an iframe embed (by @ChristopherVR) ([6ba33e2](https://github.com/ChristopherVR/pptx-viewer/commit/6ba33e26119e20393984625c0e7a7958da5ec466))
|
|
16
|
+
- **shared,react,vue,angular,svelte,vanilla:** Apply Zoom returnToParent/transitionDur during slide-show playback (by @ChristopherVR) ([673afa5](https://github.com/ChristopherVR/pptx-viewer/commit/673afa5c7b62ff61378588b87ddbc1c7b433067e))
|
|
17
|
+
- **core,shared,react,vue,angular,svelte,vanilla:** P15/p14 transition direction, pattern and Through Black options (by @ChristopherVR) ([8b5ec7e](https://github.com/ChristopherVR/pptx-viewer/commit/8b5ec7ec976ad2779bec48d92a7177ad6fe92d38))
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
- **core:** Preserve blipFill and exact EMU on shape-with-image-fill save (by @ChristopherVR) ([8cd7a59](https://github.com/ChristopherVR/pptx-viewer/commit/8cd7a59e992e9ca6d4d6eb75756ff50294f346d8))
|
|
22
|
+
- **core:** Parse and re-emit ppaction://media hlinkClick on media pics (by @ChristopherVR) ([ea64525](https://github.com/ChristopherVR/pptx-viewer/commit/ea64525bfbac444c92337159082ccffe06181ce4))
|
|
23
|
+
- **core:** Stop merging authored runs and losing rPr/hlinkClick data (by @ChristopherVR) ([aad7ac3](https://github.com/ChristopherVR/pptx-viewer/commit/aad7ac3d5a31bd0ffbf8718bb5f7db02d09895b9))
|
|
24
|
+
- **core:** Pass untouched chart parts through unchanged on save (by @ChristopherVR) ([3094513](https://github.com/ChristopherVR/pptx-viewer/commit/3094513eec2ab008fcce78c6ac041fcd815169c1))
|
|
25
|
+
- **core:** Stop inventing a bare shape's p:txBody; keep bullet buFont hints (by @ChristopherVR) ([1773570](https://github.com/ChristopherVR/pptx-viewer/commit/1773570a5081cb478c4e38c7f735a1566934b4bf))
|
|
26
|
+
- **core:** Stop fabricating docProps identity, keep comment authors (by @ChristopherVR) ([47a60d8](https://github.com/ChristopherVR/pptx-viewer/commit/47a60d80ea0e3f14854b609abfaf466abb05e159))
|
|
27
|
+
- **shared,react:** Correct Box/Circle/Diamond/Plus entrance "In" mask reveal (by @ChristopherVR) ([cf6ddcf](https://github.com/ChristopherVR/pptx-viewer/commit/cf6ddcf8876cfed3743b6de5a3fb12695aeb5f10))
|
|
28
|
+
- **react,vue,angular,svelte,vanilla,shared:** Stop OLE actions nesting a <button> inside slide thumbnails (by @ChristopherVR) ([82da5a7](https://github.com/ChristopherVR/pptx-viewer/commit/82da5a73896a8498318882051078d65d38e5cb41))
|
|
29
|
+
|
|
30
|
+
### Reverts
|
|
31
|
+
|
|
32
|
+
- **core:** Keep commentAuthors.xml deletion; it was correct behavior (by @ChristopherVR) ([93e4f73](https://github.com/ChristopherVR/pptx-viewer/commit/93e4f73d74ab6247acbc2df9aa2cef6ca9a4ce4d))
|
|
33
|
+
|
|
34
|
+
### Refactor
|
|
35
|
+
|
|
36
|
+
- **shared,react,angular,svelte,vue:** Consolidate trigger options into shared, add afterDelay parity (by @ChristopherVR) ([819582f](https://github.com/ChristopherVR/pptx-viewer/commit/819582f5713c050c7e646385f17c40f9d8a41027))
|
|
37
|
+
|
|
38
|
+
### Documentation
|
|
39
|
+
|
|
40
|
+
- **shared:** Record an inconclusive bounceEnd COM ground-truth attempt (by @ChristopherVR) ([6381b47](https://github.com/ChristopherVR/pptx-viewer/commit/6381b47521f45027cee9eb5c7de48036167bc90b))
|
|
41
|
+
|
|
42
|
+
### Testing
|
|
43
|
+
|
|
44
|
+
- **core,shared:** Lock the COM-verified SVG srcRect stretch rule (by @ChristopherVR) ([f9029d4](https://github.com/ChristopherVR/pptx-viewer/commit/f9029d4dee1b89febc468e2ab3f568ff99f4f603))
|
|
45
|
+
|
|
46
|
+
## [3.3.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-vanilla-viewer@3.3.0) - 2026-09-24
|
|
47
|
+
|
|
48
|
+
### Features
|
|
49
|
+
|
|
50
|
+
- **shared:** Trace glyph outlines for exact wordart envelope warps (work in progress) (by @ChristopherVR) ([c91f1cf](https://github.com/ChristopherVR/pptx-viewer/commit/c91f1cf2e7c089acf79f706ba49f887179a97499))
|
|
51
|
+
- **core:** Embed round-trip ooxml blobs for rich objects in .ppt export (work in progress) (by @ChristopherVR) ([2f9aea3](https://github.com/ChristopherVR/pptx-viewer/commit/2f9aea35b3887dfb5d3593ecad67a1605889ef00))
|
|
52
|
+
- **core:** Start a per-point diagramml layout engine for smartart (work in progress) (by @ChristopherVR) ([11c956f](https://github.com/ChristopherVR/pptx-viewer/commit/11c956f2c125c1572003129b0d9cd8d2b5ce5f28))
|
|
53
|
+
- **shared:** Add media fullScrn full-slide overlay decision function (by @ChristopherVR) ([8ae8ee1](https://github.com/ChristopherVR/pptx-viewer/commit/8ae8ee150518d89cb5328d98b775eb49983214a2))
|
|
54
|
+
- **core:** Route un-cached SmartArt through the per-point layout engine (by @ChristopherVR) ([e020656](https://github.com/ChristopherVR/pptx-viewer/commit/e020656b042dc9c86efb6588bfe22770870c4280))
|
|
55
|
+
- **core:** Parse InkML per-point T (time) channel into pointTimestamps (by @ChristopherVR) ([af3b954](https://github.com/ChristopherVR/pptx-viewer/commit/af3b9546cec6fc319ab579d035f22fc203de4059))
|
|
56
|
+
- **vanilla:** Wire the fullScrn full-slide media overlay (by @ChristopherVR) ([7f5e392](https://github.com/ChristopherVR/pptx-viewer/commit/7f5e39203d2a2c7ea97b922dc5f0186810d8053a))
|
|
57
|
+
- **core:** Parse zoom return-to-parent and transition duration (work in progress) (by @ChristopherVR) ([5b0c9fb](https://github.com/ChristopherVR/pptx-viewer/commit/5b0c9fbf5bab3b599101b63f7782ebe88411cf79))
|
|
58
|
+
- **core:** Route measurably-better SmartArt layouts through the engine first (by @ChristopherVR) ([59e78c9](https://github.com/ChristopherVR/pptx-viewer/commit/59e78c99c7b9130ca00bb956654cadde2547b575))
|
|
59
|
+
- **core:** Implement the snake algorithm in the SmartArt layout engine (by @ChristopherVR) ([4b27704](https://github.com/ChristopherVR/pptx-viewer/commit/4b27704163ac689f5720de9d0ae1c481eea78fd6))
|
|
60
|
+
- **core:** Implement the cycle algorithm in the SmartArt layout engine (by @ChristopherVR) ([ad971a3](https://github.com/ChristopherVR/pptx-viewer/commit/ad971a3534392a595cb973c0b90609dd3a548921))
|
|
61
|
+
- **shared:** Add PowerPoint editor shortcuts to the shared keymap (by @ChristopherVR) ([9afcb56](https://github.com/ChristopherVR/pptx-viewer/commit/9afcb56d9d71d820d19dfbb78b4c4e7d00cd991e))
|
|
62
|
+
- **shared:** Add a shared PowerPoint font-size ladder stepper (by @ChristopherVR) ([8c86424](https://github.com/ChristopherVR/pptx-viewer/commit/8c864248a3a832996d8b0c0807c47a802d89a776))
|
|
63
|
+
- **vanilla:** Wire PowerPoint editor shortcuts via the shared keymap (by @ChristopherVR) ([a352f98](https://github.com/ChristopherVR/pptx-viewer/commit/a352f98d3ff8b7f3df157f2c3ef4b2eeae5a6ac5))
|
|
64
|
+
- **core:** Parse p14:bounceEnd and play a Fly In bounce settle curve (by @ChristopherVR) ([2c44f37](https://github.com/ChristopherVR/pptx-viewer/commit/2c44f372b5a44ca8a9c87d2d86f84c0d1c49720a))
|
|
65
|
+
- **core:** Model onMediaBookmark triggers and fire them on playback (by @ChristopherVR) ([b153932](https://github.com/ChristopherVR/pptx-viewer/commit/b1539323ae4c063abe869f97c310506161973b10))
|
|
66
|
+
- **core:** Implement the pyra algorithm in the SmartArt layout engine (by @ChristopherVR) ([8dfb1d0](https://github.com/ChristopherVR/pptx-viewer/commit/8dfb1d0a58f75c98d6e24b5470dd82db54d0df76))
|
|
67
|
+
- **shared:** Add the 12 p15 preset transitions to the picker catalogue (by @ChristopherVR) ([9d4cd08](https://github.com/ChristopherVR/pptx-viewer/commit/9d4cd083326627015f290f110035594b547b839d))
|
|
68
|
+
|
|
69
|
+
### Bug Fixes
|
|
70
|
+
|
|
71
|
+
- **core:** Declare every namespace prefix a saved part uses (by @ChristopherVR) ([bd0a7fc](https://github.com/ChristopherVR/pptx-viewer/commit/bd0a7fca02bbbc4ea8d71f5c2b2970411ab6e971))
|
|
72
|
+
- **core:** Keep run-level slide jumps as slide relationships on save (by @ChristopherVR) ([d2f6924](https://github.com/ChristopherVR/pptx-viewer/commit/d2f6924aeee390a40d11579e9ee6a1d8033ecf1a))
|
|
73
|
+
- **core:** Stop showing chart data labels PowerPoint hides (work in progress) (by @ChristopherVR) ([a8de727](https://github.com/ChristopherVR/pptx-viewer/commit/a8de727868334f822a032b5c11370199dafd6020))
|
|
74
|
+
- **core:** Write valid build lists and effect behaviours for animations (work in progress) (by @ChristopherVR) ([09af92c](https://github.com/ChristopherVR/pptx-viewer/commit/09af92c1085764a49b18b7dfca3d71207c46ec91))
|
|
75
|
+
- **shared:** Halve-width bug in clustered bar/column gap sizing (by @ChristopherVR) ([bfd1953](https://github.com/ChristopherVR/pptx-viewer/commit/bfd19533effd6393d802cd8cbd598cd45d420e19))
|
|
76
|
+
- **core:** Prune custom-show/section refs on slide delete without opts (by @ChristopherVR) ([4046345](https://github.com/ChristopherVR/pptx-viewer/commit/40463456981eae2128d5a18dd0d1b34993d50af4))
|
|
77
|
+
- **shared:** Recover per-paragraph rtl lost to the shape-level default (by @ChristopherVR) ([cc046bf](https://github.com/ChristopherVR/pptx-viewer/commit/cc046bffe37c8445bb99de188636eaacbe4b2c9e))
|
|
78
|
+
- **core:** Stop a bulleted paragraph's marker from shadowing its own algn (by @ChristopherVR) ([3a4307b](https://github.com/ChristopherVR/pptx-viewer/commit/3a4307b1c058b38d21c2518726417c6a72f881f2))
|
|
79
|
+
- **shared:** Combo per-series chart types and stray "-0" axis labels (by @ChristopherVR) ([06f2b41](https://github.com/ChristopherVR/pptx-viewer/commit/06f2b4173c1feb849284f67a3711e28ec9288f3e))
|
|
80
|
+
- **core:** Stop dropping empty self-closing image effect elements (by @ChristopherVR) ([2ee225e](https://github.com/ChristopherVR/pptx-viewer/commit/2ee225e43c93c69f7633f214b1c4e175227ebf8a))
|
|
81
|
+
- **core:** Stop untouched SmartArt colours corrupting on save (by @ChristopherVR) ([fc06842](https://github.com/ChristopherVR/pptx-viewer/commit/fc068425b770c251db1701b604e5ff7b81598b03))
|
|
82
|
+
- **shared:** Use sample (not population) variance for stdDev/stdErr error bars (by @ChristopherVR) ([982c16c](https://github.com/ChristopherVR/pptx-viewer/commit/982c16cb583354001e0455c1247a1bfd15154240))
|
|
83
|
+
- **core:** Fix TS18048 possibly-undefined scope in namespace declarations (by @ChristopherVR) ([a55c718](https://github.com/ChristopherVR/pptx-viewer/commit/a55c718d1738feb360caaf4594018b37faedcfe7))
|
|
84
|
+
- **core:** Resolve spcPct paragraph spacing against 1.2x font size (by @ChristopherVR) ([bca61b4](https://github.com/ChristopherVR/pptx-viewer/commit/bca61b44a1fd2d23505e457de53edb30cadb1e6c))
|
|
85
|
+
- **shared:** Render area-typed combo series as filled areas (by @ChristopherVR) ([54aa4be](https://github.com/ChristopherVR/pptx-viewer/commit/54aa4be9d599cf8413780aee7a0b4cf8672076fe))
|
|
86
|
+
- **core:** Reconcile animation write tests with valid build-list output (by @ChristopherVR) ([ef4e294](https://github.com/ChristopherVR/pptx-viewer/commit/ef4e294c64c58a64e00bdf40c6e582ab79977f9c))
|
|
87
|
+
- **core:** Read back .ppt gradient fills and stop dropping pattern fills (by @ChristopherVR) ([42ded86](https://github.com/ChristopherVR/pptx-viewer/commit/42ded865efef2e040771749f528386e485d0bb99))
|
|
88
|
+
- **shared:** Correct washout/lum brightness-contrast formula (by @ChristopherVR) ([dd28449](https://github.com/ChristopherVR/pptx-viewer/commit/dd2844911ea0c620e749683740580cd33fc10620))
|
|
89
|
+
- **shared:** Decouple metal bevel specular elevation from diffuse (by @ChristopherVR) ([981ef88](https://github.com/ChristopherVR/pptx-viewer/commit/981ef880aa529e759220c828ed7bf7fcd1a8e6de))
|
|
90
|
+
- **shared:** Drive ink replay timing from real InkML timestamps (by @ChristopherVR) ([ab67076](https://github.com/ChristopherVR/pptx-viewer/commit/ab67076f8e794aa4a5fbdece16f5d41a809660da))
|
|
91
|
+
- **shared:** Derive the WordArt can-preset glyph-spacing law from COM (by @ChristopherVR) ([440356d](https://github.com/ChristopherVR/pptx-viewer/commit/440356d62d17fae40ccf0394110161589b6d5e1e))
|
|
92
|
+
- **core:** Resolve a:tblBg fillRef against the theme format scheme (by @ChristopherVR) ([0174572](https://github.com/ChristopherVR/pptx-viewer/commit/01745725a8506b79b5dd812bd0ed46e2ecfd39ce))
|
|
93
|
+
- **core:** Resolve legacy VML-only OLE preview images (by @ChristopherVR) ([98ae67c](https://github.com/ChristopherVR/pptx-viewer/commit/98ae67cbbd3383e529894bd6ea0e93461488f5f4))
|
|
94
|
+
- **vanilla:** Apply highlighter mix-blend-mode per stroke, not per element (by @ChristopherVR) ([e910b68](https://github.com/ChristopherVR/pptx-viewer/commit/e910b68df08c16b8ba69d547447081b4a7033abc))
|
|
95
|
+
- **shared:** Render the table style tblBg background beneath noFill layers (by @ChristopherVR) ([9e4f1e7](https://github.com/ChristopherVR/pptx-viewer/commit/9e4f1e7aea07a487b3052dad1d5628357bdfef46))
|
|
96
|
+
- **shared:** Scale tiled picture fills from the image's native size (work in progress) (by @ChristopherVR) ([92375c4](https://github.com/ChristopherVR/pptx-viewer/commit/92375c470c9c3995f48afc2f22871ffa9609c76c))
|
|
97
|
+
- **core:** Size table cell text from the master other-text style (work in progress) (by @ChristopherVR) ([481c564](https://github.com/ChristopherVR/pptx-viewer/commit/481c5645a5a0e3f930899217308177bea36a5bfa))
|
|
98
|
+
- **core:** Update the OLE in-place-editing compatibility warning (by @ChristopherVR) ([9dd216e](https://github.com/ChristopherVR/pptx-viewer/commit/9dd216edc58e29358e187f62c8ad742d523e578a))
|
|
99
|
+
- **core:** Stop the SmartArt engine dropping hideGeom item-role shapes (by @ChristopherVR) ([9c8c2dc](https://github.com/ChristopherVR/pptx-viewer/commit/9c8c2dce96e7fc1f6faf7ef813deb9095a15ba6b))
|
|
100
|
+
- **core:** Preserve untouched equation XML on save (by @ChristopherVR) ([640bd17](https://github.com/ChristopherVR/pptx-viewer/commit/640bd176246ef43dc510d301017da71d7b5b44ae))
|
|
101
|
+
- **core:** Keep a soft line break from becoming a paragraph break (by @ChristopherVR) ([fbdb209](https://github.com/ChristopherVR/pptx-viewer/commit/fbdb2094f61eadd60fd50656a61d13081d923c07))
|
|
102
|
+
- **core:** Stop reformatting and mutating untouched comment timestamps (by @ChristopherVR) ([bfc92de](https://github.com/ChristopherVR/pptx-viewer/commit/bfc92de9fff54052b9f71f1a72e1a5c4eb83d536))
|
|
103
|
+
- **core:** Write PowerPoint's real behaviour tree for entrance/exit presets (by @ChristopherVR) ([d510300](https://github.com/ChristopherVR/pptx-viewer/commit/d510300729453c1344232efa1cb786790aeeeeae))
|
|
104
|
+
- **core:** Write PowerPoint's real behaviour tree for emphasis presets (by @ChristopherVR) ([0662453](https://github.com/ChristopherVR/pptx-viewer/commit/0662453b747fb4d6099ccdf75531c296b39c055a))
|
|
105
|
+
- **shared:** Render real dates for datetime fields, not the field type (by @ChristopherVR) ([f3653c2](https://github.com/ChristopherVR/pptx-viewer/commit/f3653c2665b0675ad4a50bfee5dc2e8eae7ba3af))
|
|
106
|
+
- **shared:** Apply theme per-script fonts over a run's cascaded font (by @ChristopherVR) ([0a00208](https://github.com/ChristopherVR/pptx-viewer/commit/0a00208cc553eb91b2f96292b1690fdb252f743d))
|
|
107
|
+
- **shared:** Keep gradient/pattern text fills continuous, not per-word (by @ChristopherVR) ([cf05400](https://github.com/ChristopherVR/pptx-viewer/commit/cf054000044540c233e49e6aaae590ff059f15f9))
|
|
108
|
+
- **core:** Resolve buBlip picture-bullet images after slide parsing (by @ChristopherVR) ([beb20b5](https://github.com/ChristopherVR/pptx-viewer/commit/beb20b59eaa3ec93d7f8c164d5fea58bd32aaceb))
|
|
109
|
+
- **shared:** Apply brightness scaled by contrast in a:lum luminance (by @ChristopherVR) ([e55b28a](https://github.com/ChristopherVR/pptx-viewer/commit/e55b28a2042b506562f8edb9759210f2f15a8097))
|
|
110
|
+
- **core:** Parse and render table-style band fill alpha (by @ChristopherVR) ([69f124a](https://github.com/ChristopherVR/pptx-viewer/commit/69f124a84fb962b346718c75dac99f7708a30c06))
|
|
111
|
+
- **shared:** Stop clipping a table whose rows auto-grow past its frame (by @ChristopherVR) ([ad4ebb2](https://github.com/ChristopherVR/pptx-viewer/commit/ad4ebb2e91bd9c4c4adfe5c2bcc6fc9aa1aa3d9c))
|
|
112
|
+
- **core,shared:** Settle table-style fill alpha on one unit (by @ChristopherVR) ([afa50de](https://github.com/ChristopherVR/pptx-viewer/commit/afa50de2a7e5f314fed908a196244c886e67641a))
|
|
113
|
+
- **shared:** Stop a "repeat until next click" loop on the next click (by @ChristopherVR) ([c92d667](https://github.com/ChristopherVR/pptx-viewer/commit/c92d66751c94388a0aac9d0dd172fe880db89d54))
|
|
114
|
+
- **shared:** Honour presetSubtype for Blinds, Checkerboard, Wheel, Random Bars (by @ChristopherVR) ([000efbe](https://github.com/ChristopherVR/pptx-viewer/commit/000efbea966863276d6275ac3ca68ccae3b5e6f9))
|
|
115
|
+
- **shared:** Draw stock HLC/OHLC candles per PowerPoint semantics (by @ChristopherVR) ([7ecb42b](https://github.com/ChristopherVR/pptx-viewer/commit/7ecb42b628b32622f98780f6e18b9e9881bbf68a))
|
|
116
|
+
- **shared:** Correct trendline math, formatting and legend (by @ChristopherVR) ([91cc3c8](https://github.com/ChristopherVR/pptx-viewer/commit/91cc3c8a4c2008726f03f598984133882736f643))
|
|
117
|
+
- **shared:** Scale a scatter/bubble chart's X axis like Excel (by @ChristopherVR) ([16a3e4d](https://github.com/ChristopherVR/pptx-viewer/commit/16a3e4df35b97e2983e4ee394257a280a50b4bf9))
|
|
118
|
+
- **shared,core:** Map animation preset 30 to Float, not Spinner (by @ChristopherVR) ([e98152e](https://github.com/ChristopherVR/pptx-viewer/commit/e98152eee7a756ec205ee370525baec146f1dedb))
|
|
119
|
+
- **core:** Read the pyramid composite ctrX/w fill idiom as a fraction (by @ChristopherVR) ([9cf9fd9](https://github.com/ChristopherVR/pptx-viewer/commit/9cf9fd9aad6f856862fa431236d3697f42f87886))
|
|
120
|
+
- **core:** Stop pinning inherited bodyPr onto untouched shapes on save (by @ChristopherVR) ([7f35589](https://github.com/ChristopherVR/pptx-viewer/commit/7f35589094588355579da4b21c2e2ff654eaf847))
|
|
121
|
+
- **core:** Stop pinning master bullets and dropping bullet inherit markers (by @ChristopherVR) ([c406fa9](https://github.com/ChristopherVR/pptx-viewer/commit/c406fa986723ba69b5c29006fa509c90ee7cbbdd))
|
|
122
|
+
- **core:** Stop flattening master text-style aliases on every save (by @ChristopherVR) ([1cdd778](https://github.com/ChristopherVR/pptx-viewer/commit/1cdd778ec42288d548b442a89e5b3bcd4cfcec0b))
|
|
123
|
+
- **core:** Mirror the master/layout p:bgRef guard onto slide rewrite (by @ChristopherVR) ([670d106](https://github.com/ChristopherVR/pptx-viewer/commit/670d10694a18089a383084dbc00127f5c03d78d4))
|
|
124
|
+
- **shared:** Correct CSS mapping for vert/vert270/wordArt vertical text (by @ChristopherVR) ([fce308c](https://github.com/ChristopherVR/pptx-viewer/commit/fce308c093640f49adb05efb4e9aa6bb9f2cb1cd))
|
|
125
|
+
- **shared:** Honour numCol column-fill, @anchor and @rtlCol (by @ChristopherVR) ([f380f53](https://github.com/ChristopherVR/pptx-viewer/commit/f380f531f976c3769db27d45181c9aff1173e6e3))
|
|
126
|
+
- **shared:** Distribute the last line and single lines for algn="dist" (by @ChristopherVR) ([730ced1](https://github.com/ChristopherVR/pptx-viewer/commit/730ced1fff583a222f89d8ee28f775aa5eb2ff6e))
|
|
127
|
+
- **shared:** Size a paragraph's line-height strut on its smallest run (by @ChristopherVR) ([940137d](https://github.com/ChristopherVR/pptx-viewer/commit/940137d6cc16d468c8fcaeb154c97eb69384e6ca))
|
|
128
|
+
- **shared:** Centre anchorCtr as one shared box, not per-paragraph (by @ChristopherVR) ([5982d91](https://github.com/ChristopherVR/pptx-viewer/commit/5982d917abb062676596ac6976b7df9b70b26222))
|
|
129
|
+
- **core,shared:** Stop empty auto-numbered paragraphs consuming a number and marR being dropped (by @ChristopherVR) ([b163cad](https://github.com/ChristopherVR/pptx-viewer/commit/b163cad85630772903e01954d05987c9e6dbaa5d))
|
|
130
|
+
- **core:** Stretch SVG picture fills instead of squashing srcRect crops (by @ChristopherVR) ([096794f](https://github.com/ChristopherVR/pptx-viewer/commit/096794fbca013f1a1cc5432c8dec82ccc0f9a419))
|
|
131
|
+
- **shared:** Play exit preset 30 (Float Out) with the existing fade-out approximation (by @ChristopherVR) ([c128d23](https://github.com/ChristopherVR/pptx-viewer/commit/c128d230d2ab28bb63f3d7f15e688199721291f9))
|
|
132
|
+
- **angular,core,shared:** Finish View > Normal and zoom field wiring after rebase (by @ChristopherVR) ([df6bddf](https://github.com/ChristopherVR/pptx-viewer/commit/df6bddf25bcde10b0153ffb3f0bd33491b065291))
|
|
133
|
+
|
|
134
|
+
### Documentation
|
|
135
|
+
|
|
136
|
+
- **core:** Restate the SmartArt interpreter gate with measured numbers (by @ChristopherVR) ([8d706b9](https://github.com/ChristopherVR/pptx-viewer/commit/8d706b99802292414adc9a9da663d9320b08bf81))
|
|
137
|
+
|
|
138
|
+
### Testing
|
|
139
|
+
|
|
140
|
+
- **core:** Re-anchor coverage evidence to the renamed build-list tests (by @ChristopherVR) ([a1b26e5](https://github.com/ChristopherVR/pptx-viewer/commit/a1b26e592d7059e2bcf9384f97ec37b031338778))
|
|
141
|
+
- **core:** Cover attribute-less grayscl parsing in image colour effects (by @ChristopherVR) ([5588bec](https://github.com/ChristopherVR/pptx-viewer/commit/5588bec9a354bc54360c6f352ddb4fe8a5cb2ee1))
|
|
142
|
+
- **core:** Register the new table-row-autogrow.pptx fixture (by @ChristopherVR) ([e1cebe9](https://github.com/ChristopherVR/pptx-viewer/commit/e1cebe93462cf4e6e351824c931a80fdda3480f4))
|
|
143
|
+
- **core:** Cover the notes master save path for text-less anchor loss (by @ChristopherVR) ([8bed413](https://github.com/ChristopherVR/pptx-viewer/commit/8bed413605f9408ab28864659ca5e81da035c0e0))
|
|
144
|
+
- **core:** Add extractOwnBackgroundRefNode to mocked loader params (by @ChristopherVR) ([8056d5a](https://github.com/ChristopherVR/pptx-viewer/commit/8056d5a7a19e4aa198e1726cfce01719bfe67473))
|
|
145
|
+
|
|
146
|
+
### Dependencies
|
|
147
|
+
|
|
148
|
+
- **deps:** Update emf-converter to 3.1.0 (by @ChristopherVR) ([5eac42f](https://github.com/ChristopherVR/pptx-viewer/commit/5eac42f20a2d783574ab5f40640238c0e42bf744))
|
|
149
|
+
- **deps:** Update emf-converter to 3.2.0 (by @ChristopherVR) ([bc37b25](https://github.com/ChristopherVR/pptx-viewer/commit/bc37b256dd8c0b93e03c451144562c6e466c25c9))
|
|
150
|
+
- **deps:** Update emf-converter to 3.3.0 (by @ChristopherVR) ([9c83a17](https://github.com/ChristopherVR/pptx-viewer/commit/9c83a17478fbc634e2da9c8cdcbadc956a8dd2eb))
|
|
151
|
+
|
|
10
152
|
## [3.2.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-vanilla-viewer@3.2.0) - 2026-09-24
|
|
11
153
|
|
|
12
154
|
### Features
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {w,K as K$1,o,m,n,f,t,j,k,l,s,r,q as q$1,c}from'./chunk-T7XMEZIX.js';import'./chunk-MEU3DTE5.js';import'./chunk-62D2TNHX.js';function K(o){let{doc:t,t:n,controller:i}=o,a=w(t,"div","pptxv-ai-focus"),h=(p,m,l)=>{let s=w(t,"button","pptxv-ai-focus-btn");return s.type="button",s.title=m,s.setAttribute("aria-label",m),s.appendChild(K$1(t,p)),s.addEventListener("click",l),s},x=()=>{a.replaceChildren();let p=i.getEffectiveTargets(),m=i.hasPicks(),l$1=i.isPinned(),s=i.isPicking(),g=w(t,"div","pptxv-ai-focus-row"),f=w(t,"span","pptxv-ai-focus-label");f.textContent=n("pptx.ai.focusScope"),g.appendChild(f);for(let r of j(p,o.getSlides())){let b=w(t,"span","pptxv-ai-focus-chip");(m||l$1)&&b.classList.add("is-strong"),b.title=r.title,b.textContent=r.label,g.appendChild(b);}if(l$1){let r=w(t,"span","pptxv-ai-focus-pinned");r.textContent=n("pptx.ai.pinnedFocus"),g.appendChild(r);}let C=w(t,"div","pptxv-ai-focus-actions"),d=k(p,o.getSlides());if(d){let r=w(t,"button","pptxv-ai-focus-merge");r.type="button",r.append(K$1(t,"git-merge"),t.createTextNode(n("pptx.ai.mergeSelectedTables"))),r.addEventListener("click",()=>o.onSendDirective(l(d.slideIndex,d.elementIdA,d.elementIdB))),C.appendChild(r);}let y=h("crosshair",n("pptx.ai.pickElement"),()=>s?i.stopPicking():i.startPicking());if(y.setAttribute("aria-pressed",String(s)),y.classList.toggle("is-active",s),C.appendChild(y),m?C.appendChild(h("close",n("pptx.ai.pickClear"),()=>i.clearPicks())):l$1?C.appendChild(h("pin-off",n("pptx.ai.clearFocus"),()=>i.clearPinnedFocus())):C.appendChild(h("pin",n("pptx.ai.pinFocus"),()=>i.pinFocus())),g.appendChild(C),a.appendChild(g),s){let r=w(t,"div","pptxv-ai-focus-pick"),b=K$1(t,"crosshair");b.classList.add("pptxv-ai-focus-pick-icon");let k=w(t,"span","pptxv-ai-focus-pick-hint");k.textContent=n("pptx.ai.pickElementHint");let T=w(t,"button","pptxv-ai-focus-pick-done");T.type="button",T.textContent=n("pptx.ai.pickDone"),T.addEventListener("click",()=>i.stopPicking()),r.append(b,k,T),a.appendChild(r);}},c=i.subscribe(x);return x(),{el:a,destroy(){c(),a.remove();}}}function O(o){let{doc:t,t:n$1}=o,i=w(t,"button","pptxv-ai-chats");i.type="button",i.append(K$1(t,"history"),t.createTextNode(n$1("pptx.ai.chats")));let a=w(t,"div","pptxv-ai-history");a.hidden=true;let h=w(t,"div","pptxv-ai-history-head"),x=w(t,"span","pptxv-ai-history-title");x.textContent=n$1("pptx.ai.historyTitle");let c=w(t,"button","pptxv-ai-history-new");c.type="button",c.append(K$1(t,"plus"),t.createTextNode(n$1("pptx.ai.newChat"))),h.append(x,c);let p=w(t,"div","pptxv-ai-history-body"),m=w(t,"p","pptxv-ai-history-hint");m.textContent=n$1("pptx.ai.historyHint"),a.append(h,p,m);let l=n({deckId:o.deckId,store:o.store,getMessages:o.getMessages,setMessages:o.setMessages,untitledLabel:n$1("pptx.ai.untitledChat"),onChatsChanged:()=>s()});function s(){p.replaceChildren();let f=l.chats();if(f.length===0){let d=w(t,"p","pptxv-ai-history-empty");d.textContent=n$1("pptx.ai.historyEmpty"),p.appendChild(d);return}let C=w(t,"ul","pptxv-ai-history-list");for(let d of f){let y=w(t,"li","pptxv-ai-history-row"),r=w(t,"button","pptxv-ai-history-resume");r.type="button",r.classList.toggle("is-active",d.id===l.activeChatId());let b=w(t,"span","pptxv-ai-history-text"),k=w(t,"span","pptxv-ai-history-name");k.textContent=d.title||n$1("pptx.ai.untitledChat");let T=w(t,"span","pptxv-ai-history-meta");T.textContent=n$1("pptx.ai.messageCount",{count:d.messageCount}),b.append(k,T),r.append(K$1(t,"comment"),b),r.addEventListener("click",()=>{l.resumeChat(d.id),a.hidden=true;});let P=w(t,"button","pptxv-ai-history-delete");P.type="button",P.title=n$1("pptx.ai.deleteChat"),P.setAttribute("aria-label",n$1("pptx.ai.deleteChat")),P.appendChild(K$1(t,"trash")),P.addEventListener("click",()=>{l.deleteChat(d.id);}),y.append(r,P),C.appendChild(y);}p.appendChild(C);}s(),i.addEventListener("click",()=>{a.hidden=!a.hidden;}),c.addEventListener("click",()=>{l.newChat(),a.hidden=true;});let g=f=>{a.hidden||!(f.target instanceof Node)||!a.contains(f.target)&&!i.contains(f.target)&&(a.hidden=true);};return t.addEventListener("mousedown",g),{button:i,el:a,notifyMessagesChanged:()=>l.notifyMessagesChanged(),destroy(){t.removeEventListener("mousedown",g),l.dispose(),i.remove(),a.remove();}}}var _={view:"eye",text:"text-box",shape:"shapes",theme:"font-color",table:"table",slide:"layout",chart:"chart",move:"move-right",delete:"trash",search:"search",nav:"move-right",animation:"play",notes:"sticky-note",tool:"wrench"};function W(o,t,n){let i=t.state==="output-error",a=t.state==="output-available",h=!i&&!a,x=s(t.toolName,t.input,h?"present":"past"),c=w(o,"div","pptxv-ai-tool"),p=w(o,"div","pptxv-ai-tool-head"),m=K$1(o,_[x.icon]??"wrench");m.classList.add("pptxv-ai-tool-icon");let l=w(o,"span","pptxv-ai-tool-name");l.textContent=x.label;let s$1=w(o,"span","pptxv-ai-tool-state");if(i?(s$1.classList.add("is-error"),s$1.append(K$1(o,"alert"),o.createTextNode(n("pptx.ai.toolFailed")))):a?(s$1.classList.add("is-done"),s$1.append(K$1(o,"check"),o.createTextNode(n("pptx.ai.toolDone")))):(s$1.classList.add("is-running"),s$1.textContent=n("pptx.ai.toolRunning")),p.append(m,l,s$1),c.appendChild(p),i&&t.errorText){let f=w(o,"div","pptxv-ai-tool-error");f.textContent=t.errorText,c.appendChild(f);}let g=r(t.input);if(g){let f=w(o,"details","pptxv-ai-tool-details"),C=w(o,"summary");C.textContent=n("pptx.ai.toolDetails");let d=w(o,"div","pptxv-ai-tool-raw");d.textContent=`${q$1(t.toolName)}: ${g}`,f.append(C,d),c.appendChild(f);}return c}function q(o,t,n,i){t.replaceChildren();for(let a of n){if(a.role==="system")continue;let h=a.role==="user",x=f(a);if(x.length===0&&!h)continue;let c=w(o,"div",`pptxv-ai-msg pptxv-ai-msg-${a.role}`),p=w(o,"div","pptxv-ai-msg-avatar");p.setAttribute("aria-label",i(h?"pptx.ai.you":"pptx.ai.assistant")),p.appendChild(K$1(o,h?"comment":"sparkles"));let m=w(o,"div","pptxv-ai-msg-body");for(let l of x)if(l.kind==="text"){let s=w(o,"div","pptxv-ai-msg-text");s.textContent=l.text,m.appendChild(s);}else m.appendChild(W(o,l,i));c.append(p,m),t.appendChild(c);}}function G(o,t,n,i,a){if(t.replaceChildren(),t.hidden=n.length===0,n.length===0)return;let h=w(o,"div","pptxv-ai-proposals-header"),x=w(o,"span","pptxv-ai-proposals-title");if(x.textContent=i("pptx.ai.pendingChanges",{count:n.length}),h.appendChild(x),n.length>1){let c=w(o,"button","pptxv-ai-proposal-btn is-accept-all");c.type="button",c.textContent=i("pptx.ai.acceptAll"),c.addEventListener("click",()=>a.acceptAll()),h.appendChild(c);}t.appendChild(h);for(let c of n)t.appendChild(tt(o,c,i,a));}function tt(o,t,n,i){let a=w(o,"div","pptxv-ai-proposal");a.dataset.proposalId=t.id;let h=w(o,"div","pptxv-ai-proposal-eyebrow");h.textContent=n("pptx.ai.proposedChange"),a.appendChild(h);let x=w(o,"div","pptxv-ai-proposal-label");if(x.textContent=t.label,a.appendChild(x),t.summary.length>0){let l=w(o,"ul","pptxv-ai-proposal-summary");for(let s of t.summary){let g=w(o,"li");g.textContent=c(s),l.appendChild(g);}a.appendChild(l);}let c$1=w(o,"div","pptxv-ai-proposal-actions"),p=w(o,"button","pptxv-ai-proposal-btn is-accept");p.type="button",p.append(K$1(o,"check"),o.createTextNode(n("pptx.ai.accept"))),p.addEventListener("click",()=>i.accept(t.id));let m=w(o,"button","pptxv-ai-proposal-btn is-reject");return m.type="button",m.append(K$1(o,"close"),o.createTextNode(n("pptx.ai.reject"))),m.addEventListener("click",()=>i.reject(t.id)),c$1.append(p,m),a.appendChild(c$1),a}async function wt(o$1){let{doc:t$1,host:n,t:i}=o$1;n.replaceChildren();let a=w(t$1,"div","pptxv-ai-header"),h=w(t$1,"span","pptxv-ai-title");h.textContent=i("pptx.ai.title");let x=w(t$1,"button","pptxv-ai-close");x.type="button",x.title=i("pptx.ai.close"),x.setAttribute("aria-label",i("pptx.ai.close")),x.appendChild(K$1(t$1,"close")),x.addEventListener("click",()=>o$1.onClose?.()),a.append(K$1(t$1,"sparkles"),h,x);let c,p=o$1.controller,m$1=p?K({doc:t$1,t:i,controller:p,getSlides:()=>o$1.bridge.getSlides(),onSendDirective:u=>{c?.sendMessage(u);}}):null,l=w(t$1,"div","pptxv-ai-messages");l.setAttribute("role","log"),l.setAttribute("aria-live","polite");let s=w(t$1,"div","pptxv-ai-empty");s.textContent=i("pptx.ai.emptyHint"),l.appendChild(s);let g=w(t$1,"div","pptxv-ai-proposals");g.hidden=true;let f$1=w(t$1,"div","pptxv-ai-error");f$1.setAttribute("role","alert"),f$1.hidden=true;let C=w(t$1,"form","pptxv-ai-composer"),d=w(t$1,"textarea","pptxv-ai-input");d.rows=2,d.placeholder=i("pptx.ai.placeholder"),d.setAttribute("aria-label",i("pptx.ai.placeholder"));let y=w(t$1,"button","pptxv-ai-send");y.type="submit",y.setAttribute("aria-label",i("pptx.ai.send")),y.appendChild(K$1(t$1,"send")),C.append(d,y),n.append(a,...m$1?[m$1.el]:[],l,g,f$1,C);try{c=await(o$1.createChat??o)({bridge:o$1.bridge,config:o$1.config});}catch{return s.textContent=i("pptx.ai.unavailableTitle"),d.disabled=true,y.disabled=true,m$1?.destroy(),{destroy:()=>n.replaceChildren()}}let r=c,b=O({doc:t$1,t:i,deckId:m(o$1.bridge),store:o$1.historyStore,getMessages:()=>r.getSnapshot().messages,setMessages:u=>r.setMessages(u)});a.insertBefore(b.button,x),n.appendChild(b.el);let k=r.subscribe(()=>b.notifyMessagesChanged()),T=new Set,P=u=>{if(!p)return;let A=u.messages.flatMap(Y=>f(Y).filter(Z=>Z.kind==="tool")).at(-1);if(!A||A.kind!=="tool"||A.state==="input-streaming"||T.has(A.toolCallId))return;T.add(A.toolCallId);let L=t(A.toolName,A.input);L&&L.slideIndex!==void 0&&o$1.goToSlide?.(L.slideIndex),p.flashToolTarget(L);},M=u=>{q(t$1,l,u.messages,i),s.hidden=u.messages.length>0,u.messages.length===0&&l.appendChild(s),G(t$1,g,r.proposals.list(),i,{accept:A=>{p?.flashToolTarget(null),r.proposals.apply(A),M(r.getSnapshot());},reject:A=>{r.proposals.revert(A),M(r.getSnapshot());},acceptAll:()=>{p?.flashToolTarget(null),r.proposals.acceptAll(),M(r.getSnapshot());}});let w=u.status==="submitted"||u.status==="streaming";n.classList.toggle("is-busy",w),y.setAttribute("aria-label",i(w?"pptx.ai.stop":"pptx.ai.send")),f$1.hidden=!u.error,f$1.textContent=u.error?i("pptx.ai.errorPrefix"):"",l.scrollTop=l.scrollHeight,P(u);},S=()=>{if(n.classList.contains("is-busy")){r.stop();return}let u=d.value.trim();u&&(d.value="",r.sendMessage(u));};C.addEventListener("submit",u=>{u.preventDefault(),S();}),d.addEventListener("keydown",u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),S());});let I=p?.getPrefill().nonce??0,J=()=>{if(!p)return;let u=p.getPrefill();u.nonce!==I&&(I=u.nonce,d.value=u.text,d.focus());},Q=p?.subscribe(J),X=r.subscribe(M);return M(r.getSnapshot()),{changeAnimator:r.changeAnimator,destroy(){X(),k(),b.destroy(),Q?.(),m$1?.destroy(),n.replaceChildren();}}}export{wt as createAiPanel};
|
|
1
|
+
import {w,K as K$1,o,m,n,f,t,j,k,l,s,r,q as q$1,c}from'./chunk-YNFB4NQQ.js';import'./chunk-KW6OQCG6.js';import'./chunk-62D2TNHX.js';function K(o){let{doc:t,t:n,controller:i}=o,a=w(t,"div","pptxv-ai-focus"),h=(p,m,l)=>{let s=w(t,"button","pptxv-ai-focus-btn");return s.type="button",s.title=m,s.setAttribute("aria-label",m),s.appendChild(K$1(t,p)),s.addEventListener("click",l),s},x=()=>{a.replaceChildren();let p=i.getEffectiveTargets(),m=i.hasPicks(),l$1=i.isPinned(),s=i.isPicking(),g=w(t,"div","pptxv-ai-focus-row"),f=w(t,"span","pptxv-ai-focus-label");f.textContent=n("pptx.ai.focusScope"),g.appendChild(f);for(let r of j(p,o.getSlides())){let b=w(t,"span","pptxv-ai-focus-chip");(m||l$1)&&b.classList.add("is-strong"),b.title=r.title,b.textContent=r.label,g.appendChild(b);}if(l$1){let r=w(t,"span","pptxv-ai-focus-pinned");r.textContent=n("pptx.ai.pinnedFocus"),g.appendChild(r);}let C=w(t,"div","pptxv-ai-focus-actions"),d=k(p,o.getSlides());if(d){let r=w(t,"button","pptxv-ai-focus-merge");r.type="button",r.append(K$1(t,"git-merge"),t.createTextNode(n("pptx.ai.mergeSelectedTables"))),r.addEventListener("click",()=>o.onSendDirective(l(d.slideIndex,d.elementIdA,d.elementIdB))),C.appendChild(r);}let y=h("crosshair",n("pptx.ai.pickElement"),()=>s?i.stopPicking():i.startPicking());if(y.setAttribute("aria-pressed",String(s)),y.classList.toggle("is-active",s),C.appendChild(y),m?C.appendChild(h("close",n("pptx.ai.pickClear"),()=>i.clearPicks())):l$1?C.appendChild(h("pin-off",n("pptx.ai.clearFocus"),()=>i.clearPinnedFocus())):C.appendChild(h("pin",n("pptx.ai.pinFocus"),()=>i.pinFocus())),g.appendChild(C),a.appendChild(g),s){let r=w(t,"div","pptxv-ai-focus-pick"),b=K$1(t,"crosshair");b.classList.add("pptxv-ai-focus-pick-icon");let k=w(t,"span","pptxv-ai-focus-pick-hint");k.textContent=n("pptx.ai.pickElementHint");let T=w(t,"button","pptxv-ai-focus-pick-done");T.type="button",T.textContent=n("pptx.ai.pickDone"),T.addEventListener("click",()=>i.stopPicking()),r.append(b,k,T),a.appendChild(r);}},c=i.subscribe(x);return x(),{el:a,destroy(){c(),a.remove();}}}function O(o){let{doc:t,t:n$1}=o,i=w(t,"button","pptxv-ai-chats");i.type="button",i.append(K$1(t,"history"),t.createTextNode(n$1("pptx.ai.chats")));let a=w(t,"div","pptxv-ai-history");a.hidden=true;let h=w(t,"div","pptxv-ai-history-head"),x=w(t,"span","pptxv-ai-history-title");x.textContent=n$1("pptx.ai.historyTitle");let c=w(t,"button","pptxv-ai-history-new");c.type="button",c.append(K$1(t,"plus"),t.createTextNode(n$1("pptx.ai.newChat"))),h.append(x,c);let p=w(t,"div","pptxv-ai-history-body"),m=w(t,"p","pptxv-ai-history-hint");m.textContent=n$1("pptx.ai.historyHint"),a.append(h,p,m);let l=n({deckId:o.deckId,store:o.store,getMessages:o.getMessages,setMessages:o.setMessages,untitledLabel:n$1("pptx.ai.untitledChat"),onChatsChanged:()=>s()});function s(){p.replaceChildren();let f=l.chats();if(f.length===0){let d=w(t,"p","pptxv-ai-history-empty");d.textContent=n$1("pptx.ai.historyEmpty"),p.appendChild(d);return}let C=w(t,"ul","pptxv-ai-history-list");for(let d of f){let y=w(t,"li","pptxv-ai-history-row"),r=w(t,"button","pptxv-ai-history-resume");r.type="button",r.classList.toggle("is-active",d.id===l.activeChatId());let b=w(t,"span","pptxv-ai-history-text"),k=w(t,"span","pptxv-ai-history-name");k.textContent=d.title||n$1("pptx.ai.untitledChat");let T=w(t,"span","pptxv-ai-history-meta");T.textContent=n$1("pptx.ai.messageCount",{count:d.messageCount}),b.append(k,T),r.append(K$1(t,"comment"),b),r.addEventListener("click",()=>{l.resumeChat(d.id),a.hidden=true;});let P=w(t,"button","pptxv-ai-history-delete");P.type="button",P.title=n$1("pptx.ai.deleteChat"),P.setAttribute("aria-label",n$1("pptx.ai.deleteChat")),P.appendChild(K$1(t,"trash")),P.addEventListener("click",()=>{l.deleteChat(d.id);}),y.append(r,P),C.appendChild(y);}p.appendChild(C);}s(),i.addEventListener("click",()=>{a.hidden=!a.hidden;}),c.addEventListener("click",()=>{l.newChat(),a.hidden=true;});let g=f=>{a.hidden||!(f.target instanceof Node)||!a.contains(f.target)&&!i.contains(f.target)&&(a.hidden=true);};return t.addEventListener("mousedown",g),{button:i,el:a,notifyMessagesChanged:()=>l.notifyMessagesChanged(),destroy(){t.removeEventListener("mousedown",g),l.dispose(),i.remove(),a.remove();}}}var _={view:"eye",text:"text-box",shape:"shapes",theme:"font-color",table:"table",slide:"layout",chart:"chart",move:"move-right",delete:"trash",search:"search",nav:"move-right",animation:"play",notes:"sticky-note",tool:"wrench"};function W(o,t,n){let i=t.state==="output-error",a=t.state==="output-available",h=!i&&!a,x=s(t.toolName,t.input,h?"present":"past"),c=w(o,"div","pptxv-ai-tool"),p=w(o,"div","pptxv-ai-tool-head"),m=K$1(o,_[x.icon]??"wrench");m.classList.add("pptxv-ai-tool-icon");let l=w(o,"span","pptxv-ai-tool-name");l.textContent=x.label;let s$1=w(o,"span","pptxv-ai-tool-state");if(i?(s$1.classList.add("is-error"),s$1.append(K$1(o,"alert"),o.createTextNode(n("pptx.ai.toolFailed")))):a?(s$1.classList.add("is-done"),s$1.append(K$1(o,"check"),o.createTextNode(n("pptx.ai.toolDone")))):(s$1.classList.add("is-running"),s$1.textContent=n("pptx.ai.toolRunning")),p.append(m,l,s$1),c.appendChild(p),i&&t.errorText){let f=w(o,"div","pptxv-ai-tool-error");f.textContent=t.errorText,c.appendChild(f);}let g=r(t.input);if(g){let f=w(o,"details","pptxv-ai-tool-details"),C=w(o,"summary");C.textContent=n("pptx.ai.toolDetails");let d=w(o,"div","pptxv-ai-tool-raw");d.textContent=`${q$1(t.toolName)}: ${g}`,f.append(C,d),c.appendChild(f);}return c}function q(o,t,n,i){t.replaceChildren();for(let a of n){if(a.role==="system")continue;let h=a.role==="user",x=f(a);if(x.length===0&&!h)continue;let c=w(o,"div",`pptxv-ai-msg pptxv-ai-msg-${a.role}`),p=w(o,"div","pptxv-ai-msg-avatar");p.setAttribute("aria-label",i(h?"pptx.ai.you":"pptx.ai.assistant")),p.appendChild(K$1(o,h?"comment":"sparkles"));let m=w(o,"div","pptxv-ai-msg-body");for(let l of x)if(l.kind==="text"){let s=w(o,"div","pptxv-ai-msg-text");s.textContent=l.text,m.appendChild(s);}else m.appendChild(W(o,l,i));c.append(p,m),t.appendChild(c);}}function G(o,t,n,i,a){if(t.replaceChildren(),t.hidden=n.length===0,n.length===0)return;let h=w(o,"div","pptxv-ai-proposals-header"),x=w(o,"span","pptxv-ai-proposals-title");if(x.textContent=i("pptx.ai.pendingChanges",{count:n.length}),h.appendChild(x),n.length>1){let c=w(o,"button","pptxv-ai-proposal-btn is-accept-all");c.type="button",c.textContent=i("pptx.ai.acceptAll"),c.addEventListener("click",()=>a.acceptAll()),h.appendChild(c);}t.appendChild(h);for(let c of n)t.appendChild(tt(o,c,i,a));}function tt(o,t,n,i){let a=w(o,"div","pptxv-ai-proposal");a.dataset.proposalId=t.id;let h=w(o,"div","pptxv-ai-proposal-eyebrow");h.textContent=n("pptx.ai.proposedChange"),a.appendChild(h);let x=w(o,"div","pptxv-ai-proposal-label");if(x.textContent=t.label,a.appendChild(x),t.summary.length>0){let l=w(o,"ul","pptxv-ai-proposal-summary");for(let s of t.summary){let g=w(o,"li");g.textContent=c(s),l.appendChild(g);}a.appendChild(l);}let c$1=w(o,"div","pptxv-ai-proposal-actions"),p=w(o,"button","pptxv-ai-proposal-btn is-accept");p.type="button",p.append(K$1(o,"check"),o.createTextNode(n("pptx.ai.accept"))),p.addEventListener("click",()=>i.accept(t.id));let m=w(o,"button","pptxv-ai-proposal-btn is-reject");return m.type="button",m.append(K$1(o,"close"),o.createTextNode(n("pptx.ai.reject"))),m.addEventListener("click",()=>i.reject(t.id)),c$1.append(p,m),a.appendChild(c$1),a}async function wt(o$1){let{doc:t$1,host:n,t:i}=o$1;n.replaceChildren();let a=w(t$1,"div","pptxv-ai-header"),h=w(t$1,"span","pptxv-ai-title");h.textContent=i("pptx.ai.title");let x=w(t$1,"button","pptxv-ai-close");x.type="button",x.title=i("pptx.ai.close"),x.setAttribute("aria-label",i("pptx.ai.close")),x.appendChild(K$1(t$1,"close")),x.addEventListener("click",()=>o$1.onClose?.()),a.append(K$1(t$1,"sparkles"),h,x);let c,p=o$1.controller,m$1=p?K({doc:t$1,t:i,controller:p,getSlides:()=>o$1.bridge.getSlides(),onSendDirective:u=>{c?.sendMessage(u);}}):null,l=w(t$1,"div","pptxv-ai-messages");l.setAttribute("role","log"),l.setAttribute("aria-live","polite");let s=w(t$1,"div","pptxv-ai-empty");s.textContent=i("pptx.ai.emptyHint"),l.appendChild(s);let g=w(t$1,"div","pptxv-ai-proposals");g.hidden=true;let f$1=w(t$1,"div","pptxv-ai-error");f$1.setAttribute("role","alert"),f$1.hidden=true;let C=w(t$1,"form","pptxv-ai-composer"),d=w(t$1,"textarea","pptxv-ai-input");d.rows=2,d.placeholder=i("pptx.ai.placeholder"),d.setAttribute("aria-label",i("pptx.ai.placeholder"));let y=w(t$1,"button","pptxv-ai-send");y.type="submit",y.setAttribute("aria-label",i("pptx.ai.send")),y.appendChild(K$1(t$1,"send")),C.append(d,y),n.append(a,...m$1?[m$1.el]:[],l,g,f$1,C);try{c=await(o$1.createChat??o)({bridge:o$1.bridge,config:o$1.config});}catch{return s.textContent=i("pptx.ai.unavailableTitle"),d.disabled=true,y.disabled=true,m$1?.destroy(),{destroy:()=>n.replaceChildren()}}let r=c,b=O({doc:t$1,t:i,deckId:m(o$1.bridge),store:o$1.historyStore,getMessages:()=>r.getSnapshot().messages,setMessages:u=>r.setMessages(u)});a.insertBefore(b.button,x),n.appendChild(b.el);let k=r.subscribe(()=>b.notifyMessagesChanged()),T=new Set,P=u=>{if(!p)return;let A=u.messages.flatMap(Y=>f(Y).filter(Z=>Z.kind==="tool")).at(-1);if(!A||A.kind!=="tool"||A.state==="input-streaming"||T.has(A.toolCallId))return;T.add(A.toolCallId);let L=t(A.toolName,A.input);L&&L.slideIndex!==void 0&&o$1.goToSlide?.(L.slideIndex),p.flashToolTarget(L);},M=u=>{q(t$1,l,u.messages,i),s.hidden=u.messages.length>0,u.messages.length===0&&l.appendChild(s),G(t$1,g,r.proposals.list(),i,{accept:A=>{p?.flashToolTarget(null),r.proposals.apply(A),M(r.getSnapshot());},reject:A=>{r.proposals.revert(A),M(r.getSnapshot());},acceptAll:()=>{p?.flashToolTarget(null),r.proposals.acceptAll(),M(r.getSnapshot());}});let w=u.status==="submitted"||u.status==="streaming";n.classList.toggle("is-busy",w),y.setAttribute("aria-label",i(w?"pptx.ai.stop":"pptx.ai.send")),f$1.hidden=!u.error,f$1.textContent=u.error?i("pptx.ai.errorPrefix"):"",l.scrollTop=l.scrollHeight,P(u);},S=()=>{if(n.classList.contains("is-busy")){r.stop();return}let u=d.value.trim();u&&(d.value="",r.sendMessage(u));};C.addEventListener("submit",u=>{u.preventDefault(),S();}),d.addEventListener("keydown",u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),S());});let I=p?.getPrefill().nonce??0,J=()=>{if(!p)return;let u=p.getPrefill();u.nonce!==I&&(I=u.nonce,d.value=u.text,d.focus());},Q=p?.subscribe(J),X=r.subscribe(M);return M(r.getSnapshot()),{changeAnimator:r.changeAnimator,destroy(){X(),k(),b.destroy(),Q?.(),m$1?.destroy(),n.replaceChildren();}}}export{wt as createAiPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var chunkPUYLG2ZA_cjs=require('./chunk-PUYLG2ZA.cjs');require('./chunk-F2YFEJ55.cjs'),require('./chunk-B5PFHICE.cjs');function K(o){let{doc:t,t:n,controller:i}=o,a=chunkPUYLG2ZA_cjs.w(t,"div","pptxv-ai-focus"),h=(p,m,l)=>{let s=chunkPUYLG2ZA_cjs.w(t,"button","pptxv-ai-focus-btn");return s.type="button",s.title=m,s.setAttribute("aria-label",m),s.appendChild(chunkPUYLG2ZA_cjs.K(t,p)),s.addEventListener("click",l),s},x=()=>{a.replaceChildren();let p=i.getEffectiveTargets(),m=i.hasPicks(),l=i.isPinned(),s=i.isPicking(),g=chunkPUYLG2ZA_cjs.w(t,"div","pptxv-ai-focus-row"),f=chunkPUYLG2ZA_cjs.w(t,"span","pptxv-ai-focus-label");f.textContent=n("pptx.ai.focusScope"),g.appendChild(f);for(let r of chunkPUYLG2ZA_cjs.j(p,o.getSlides())){let b=chunkPUYLG2ZA_cjs.w(t,"span","pptxv-ai-focus-chip");(m||l)&&b.classList.add("is-strong"),b.title=r.title,b.textContent=r.label,g.appendChild(b);}if(l){let r=chunkPUYLG2ZA_cjs.w(t,"span","pptxv-ai-focus-pinned");r.textContent=n("pptx.ai.pinnedFocus"),g.appendChild(r);}let C=chunkPUYLG2ZA_cjs.w(t,"div","pptxv-ai-focus-actions"),d=chunkPUYLG2ZA_cjs.k(p,o.getSlides());if(d){let r=chunkPUYLG2ZA_cjs.w(t,"button","pptxv-ai-focus-merge");r.type="button",r.append(chunkPUYLG2ZA_cjs.K(t,"git-merge"),t.createTextNode(n("pptx.ai.mergeSelectedTables"))),r.addEventListener("click",()=>o.onSendDirective(chunkPUYLG2ZA_cjs.l(d.slideIndex,d.elementIdA,d.elementIdB))),C.appendChild(r);}let y=h("crosshair",n("pptx.ai.pickElement"),()=>s?i.stopPicking():i.startPicking());if(y.setAttribute("aria-pressed",String(s)),y.classList.toggle("is-active",s),C.appendChild(y),m?C.appendChild(h("close",n("pptx.ai.pickClear"),()=>i.clearPicks())):l?C.appendChild(h("pin-off",n("pptx.ai.clearFocus"),()=>i.clearPinnedFocus())):C.appendChild(h("pin",n("pptx.ai.pinFocus"),()=>i.pinFocus())),g.appendChild(C),a.appendChild(g),s){let r=chunkPUYLG2ZA_cjs.w(t,"div","pptxv-ai-focus-pick"),b=chunkPUYLG2ZA_cjs.K(t,"crosshair");b.classList.add("pptxv-ai-focus-pick-icon");let k=chunkPUYLG2ZA_cjs.w(t,"span","pptxv-ai-focus-pick-hint");k.textContent=n("pptx.ai.pickElementHint");let T=chunkPUYLG2ZA_cjs.w(t,"button","pptxv-ai-focus-pick-done");T.type="button",T.textContent=n("pptx.ai.pickDone"),T.addEventListener("click",()=>i.stopPicking()),r.append(b,k,T),a.appendChild(r);}},c=i.subscribe(x);return x(),{el:a,destroy(){c(),a.remove();}}}function O(o){let{doc:t,t:n}=o,i=chunkPUYLG2ZA_cjs.w(t,"button","pptxv-ai-chats");i.type="button",i.append(chunkPUYLG2ZA_cjs.K(t,"history"),t.createTextNode(n("pptx.ai.chats")));let a=chunkPUYLG2ZA_cjs.w(t,"div","pptxv-ai-history");a.hidden=true;let h=chunkPUYLG2ZA_cjs.w(t,"div","pptxv-ai-history-head"),x=chunkPUYLG2ZA_cjs.w(t,"span","pptxv-ai-history-title");x.textContent=n("pptx.ai.historyTitle");let c=chunkPUYLG2ZA_cjs.w(t,"button","pptxv-ai-history-new");c.type="button",c.append(chunkPUYLG2ZA_cjs.K(t,"plus"),t.createTextNode(n("pptx.ai.newChat"))),h.append(x,c);let p=chunkPUYLG2ZA_cjs.w(t,"div","pptxv-ai-history-body"),m=chunkPUYLG2ZA_cjs.w(t,"p","pptxv-ai-history-hint");m.textContent=n("pptx.ai.historyHint"),a.append(h,p,m);let l=chunkPUYLG2ZA_cjs.n({deckId:o.deckId,store:o.store,getMessages:o.getMessages,setMessages:o.setMessages,untitledLabel:n("pptx.ai.untitledChat"),onChatsChanged:()=>s()});function s(){p.replaceChildren();let f=l.chats();if(f.length===0){let d=chunkPUYLG2ZA_cjs.w(t,"p","pptxv-ai-history-empty");d.textContent=n("pptx.ai.historyEmpty"),p.appendChild(d);return}let C=chunkPUYLG2ZA_cjs.w(t,"ul","pptxv-ai-history-list");for(let d of f){let y=chunkPUYLG2ZA_cjs.w(t,"li","pptxv-ai-history-row"),r=chunkPUYLG2ZA_cjs.w(t,"button","pptxv-ai-history-resume");r.type="button",r.classList.toggle("is-active",d.id===l.activeChatId());let b=chunkPUYLG2ZA_cjs.w(t,"span","pptxv-ai-history-text"),k=chunkPUYLG2ZA_cjs.w(t,"span","pptxv-ai-history-name");k.textContent=d.title||n("pptx.ai.untitledChat");let T=chunkPUYLG2ZA_cjs.w(t,"span","pptxv-ai-history-meta");T.textContent=n("pptx.ai.messageCount",{count:d.messageCount}),b.append(k,T),r.append(chunkPUYLG2ZA_cjs.K(t,"comment"),b),r.addEventListener("click",()=>{l.resumeChat(d.id),a.hidden=true;});let P=chunkPUYLG2ZA_cjs.w(t,"button","pptxv-ai-history-delete");P.type="button",P.title=n("pptx.ai.deleteChat"),P.setAttribute("aria-label",n("pptx.ai.deleteChat")),P.appendChild(chunkPUYLG2ZA_cjs.K(t,"trash")),P.addEventListener("click",()=>{l.deleteChat(d.id);}),y.append(r,P),C.appendChild(y);}p.appendChild(C);}s(),i.addEventListener("click",()=>{a.hidden=!a.hidden;}),c.addEventListener("click",()=>{l.newChat(),a.hidden=true;});let g=f=>{a.hidden||!(f.target instanceof Node)||!a.contains(f.target)&&!i.contains(f.target)&&(a.hidden=true);};return t.addEventListener("mousedown",g),{button:i,el:a,notifyMessagesChanged:()=>l.notifyMessagesChanged(),destroy(){t.removeEventListener("mousedown",g),l.dispose(),i.remove(),a.remove();}}}var _={view:"eye",text:"text-box",shape:"shapes",theme:"font-color",table:"table",slide:"layout",chart:"chart",move:"move-right",delete:"trash",search:"search",nav:"move-right",animation:"play",notes:"sticky-note",tool:"wrench"};function W(o,t,n){let i=t.state==="output-error",a=t.state==="output-available",h=!i&&!a,x=chunkPUYLG2ZA_cjs.s(t.toolName,t.input,h?"present":"past"),c=chunkPUYLG2ZA_cjs.w(o,"div","pptxv-ai-tool"),p=chunkPUYLG2ZA_cjs.w(o,"div","pptxv-ai-tool-head"),m=chunkPUYLG2ZA_cjs.K(o,_[x.icon]??"wrench");m.classList.add("pptxv-ai-tool-icon");let l=chunkPUYLG2ZA_cjs.w(o,"span","pptxv-ai-tool-name");l.textContent=x.label;let s=chunkPUYLG2ZA_cjs.w(o,"span","pptxv-ai-tool-state");if(i?(s.classList.add("is-error"),s.append(chunkPUYLG2ZA_cjs.K(o,"alert"),o.createTextNode(n("pptx.ai.toolFailed")))):a?(s.classList.add("is-done"),s.append(chunkPUYLG2ZA_cjs.K(o,"check"),o.createTextNode(n("pptx.ai.toolDone")))):(s.classList.add("is-running"),s.textContent=n("pptx.ai.toolRunning")),p.append(m,l,s),c.appendChild(p),i&&t.errorText){let f=chunkPUYLG2ZA_cjs.w(o,"div","pptxv-ai-tool-error");f.textContent=t.errorText,c.appendChild(f);}let g=chunkPUYLG2ZA_cjs.r(t.input);if(g){let f=chunkPUYLG2ZA_cjs.w(o,"details","pptxv-ai-tool-details"),C=chunkPUYLG2ZA_cjs.w(o,"summary");C.textContent=n("pptx.ai.toolDetails");let d=chunkPUYLG2ZA_cjs.w(o,"div","pptxv-ai-tool-raw");d.textContent=`${chunkPUYLG2ZA_cjs.q(t.toolName)}: ${g}`,f.append(C,d),c.appendChild(f);}return c}function q(o,t,n,i){t.replaceChildren();for(let a of n){if(a.role==="system")continue;let h=a.role==="user",x=chunkPUYLG2ZA_cjs.f(a);if(x.length===0&&!h)continue;let c=chunkPUYLG2ZA_cjs.w(o,"div",`pptxv-ai-msg pptxv-ai-msg-${a.role}`),p=chunkPUYLG2ZA_cjs.w(o,"div","pptxv-ai-msg-avatar");p.setAttribute("aria-label",i(h?"pptx.ai.you":"pptx.ai.assistant")),p.appendChild(chunkPUYLG2ZA_cjs.K(o,h?"comment":"sparkles"));let m=chunkPUYLG2ZA_cjs.w(o,"div","pptxv-ai-msg-body");for(let l of x)if(l.kind==="text"){let s=chunkPUYLG2ZA_cjs.w(o,"div","pptxv-ai-msg-text");s.textContent=l.text,m.appendChild(s);}else m.appendChild(W(o,l,i));c.append(p,m),t.appendChild(c);}}function G(o,t,n,i,a){if(t.replaceChildren(),t.hidden=n.length===0,n.length===0)return;let h=chunkPUYLG2ZA_cjs.w(o,"div","pptxv-ai-proposals-header"),x=chunkPUYLG2ZA_cjs.w(o,"span","pptxv-ai-proposals-title");if(x.textContent=i("pptx.ai.pendingChanges",{count:n.length}),h.appendChild(x),n.length>1){let c=chunkPUYLG2ZA_cjs.w(o,"button","pptxv-ai-proposal-btn is-accept-all");c.type="button",c.textContent=i("pptx.ai.acceptAll"),c.addEventListener("click",()=>a.acceptAll()),h.appendChild(c);}t.appendChild(h);for(let c of n)t.appendChild(tt(o,c,i,a));}function tt(o,t,n,i){let a=chunkPUYLG2ZA_cjs.w(o,"div","pptxv-ai-proposal");a.dataset.proposalId=t.id;let h=chunkPUYLG2ZA_cjs.w(o,"div","pptxv-ai-proposal-eyebrow");h.textContent=n("pptx.ai.proposedChange"),a.appendChild(h);let x=chunkPUYLG2ZA_cjs.w(o,"div","pptxv-ai-proposal-label");if(x.textContent=t.label,a.appendChild(x),t.summary.length>0){let l=chunkPUYLG2ZA_cjs.w(o,"ul","pptxv-ai-proposal-summary");for(let s of t.summary){let g=chunkPUYLG2ZA_cjs.w(o,"li");g.textContent=chunkPUYLG2ZA_cjs.c(s),l.appendChild(g);}a.appendChild(l);}let c=chunkPUYLG2ZA_cjs.w(o,"div","pptxv-ai-proposal-actions"),p=chunkPUYLG2ZA_cjs.w(o,"button","pptxv-ai-proposal-btn is-accept");p.type="button",p.append(chunkPUYLG2ZA_cjs.K(o,"check"),o.createTextNode(n("pptx.ai.accept"))),p.addEventListener("click",()=>i.accept(t.id));let m=chunkPUYLG2ZA_cjs.w(o,"button","pptxv-ai-proposal-btn is-reject");return m.type="button",m.append(chunkPUYLG2ZA_cjs.K(o,"close"),o.createTextNode(n("pptx.ai.reject"))),m.addEventListener("click",()=>i.reject(t.id)),c.append(p,m),a.appendChild(c),a}async function wt(o){let{doc:t,host:n,t:i}=o;n.replaceChildren();let a=chunkPUYLG2ZA_cjs.w(t,"div","pptxv-ai-header"),h=chunkPUYLG2ZA_cjs.w(t,"span","pptxv-ai-title");h.textContent=i("pptx.ai.title");let x=chunkPUYLG2ZA_cjs.w(t,"button","pptxv-ai-close");x.type="button",x.title=i("pptx.ai.close"),x.setAttribute("aria-label",i("pptx.ai.close")),x.appendChild(chunkPUYLG2ZA_cjs.K(t,"close")),x.addEventListener("click",()=>o.onClose?.()),a.append(chunkPUYLG2ZA_cjs.K(t,"sparkles"),h,x);let c,p=o.controller,m=p?K({doc:t,t:i,controller:p,getSlides:()=>o.bridge.getSlides(),onSendDirective:u=>{c?.sendMessage(u);}}):null,l=chunkPUYLG2ZA_cjs.w(t,"div","pptxv-ai-messages");l.setAttribute("role","log"),l.setAttribute("aria-live","polite");let s=chunkPUYLG2ZA_cjs.w(t,"div","pptxv-ai-empty");s.textContent=i("pptx.ai.emptyHint"),l.appendChild(s);let g=chunkPUYLG2ZA_cjs.w(t,"div","pptxv-ai-proposals");g.hidden=true;let f=chunkPUYLG2ZA_cjs.w(t,"div","pptxv-ai-error");f.setAttribute("role","alert"),f.hidden=true;let C=chunkPUYLG2ZA_cjs.w(t,"form","pptxv-ai-composer"),d=chunkPUYLG2ZA_cjs.w(t,"textarea","pptxv-ai-input");d.rows=2,d.placeholder=i("pptx.ai.placeholder"),d.setAttribute("aria-label",i("pptx.ai.placeholder"));let y=chunkPUYLG2ZA_cjs.w(t,"button","pptxv-ai-send");y.type="submit",y.setAttribute("aria-label",i("pptx.ai.send")),y.appendChild(chunkPUYLG2ZA_cjs.K(t,"send")),C.append(d,y),n.append(a,...m?[m.el]:[],l,g,f,C);try{c=await(o.createChat??chunkPUYLG2ZA_cjs.o)({bridge:o.bridge,config:o.config});}catch{return s.textContent=i("pptx.ai.unavailableTitle"),d.disabled=true,y.disabled=true,m?.destroy(),{destroy:()=>n.replaceChildren()}}let r=c,b=O({doc:t,t:i,deckId:chunkPUYLG2ZA_cjs.m(o.bridge),store:o.historyStore,getMessages:()=>r.getSnapshot().messages,setMessages:u=>r.setMessages(u)});a.insertBefore(b.button,x),n.appendChild(b.el);let k=r.subscribe(()=>b.notifyMessagesChanged()),T=new Set,P=u=>{if(!p)return;let A=u.messages.flatMap(Y=>chunkPUYLG2ZA_cjs.f(Y).filter(Z=>Z.kind==="tool")).at(-1);if(!A||A.kind!=="tool"||A.state==="input-streaming"||T.has(A.toolCallId))return;T.add(A.toolCallId);let L=chunkPUYLG2ZA_cjs.t(A.toolName,A.input);L&&L.slideIndex!==void 0&&o.goToSlide?.(L.slideIndex),p.flashToolTarget(L);},M=u=>{q(t,l,u.messages,i),s.hidden=u.messages.length>0,u.messages.length===0&&l.appendChild(s),G(t,g,r.proposals.list(),i,{accept:A=>{p?.flashToolTarget(null),r.proposals.apply(A),M(r.getSnapshot());},reject:A=>{r.proposals.revert(A),M(r.getSnapshot());},acceptAll:()=>{p?.flashToolTarget(null),r.proposals.acceptAll(),M(r.getSnapshot());}});let w=u.status==="submitted"||u.status==="streaming";n.classList.toggle("is-busy",w),y.setAttribute("aria-label",i(w?"pptx.ai.stop":"pptx.ai.send")),f.hidden=!u.error,f.textContent=u.error?i("pptx.ai.errorPrefix"):"",l.scrollTop=l.scrollHeight,P(u);},S=()=>{if(n.classList.contains("is-busy")){r.stop();return}let u=d.value.trim();u&&(d.value="",r.sendMessage(u));};C.addEventListener("submit",u=>{u.preventDefault(),S();}),d.addEventListener("keydown",u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),S());});let I=p?.getPrefill().nonce??0,J=()=>{if(!p)return;let u=p.getPrefill();u.nonce!==I&&(I=u.nonce,d.value=u.text,d.focus());},Q=p?.subscribe(J),X=r.subscribe(M);return M(r.getSnapshot()),{changeAnimator:r.changeAnimator,destroy(){X(),k(),b.destroy(),Q?.(),m?.destroy(),n.replaceChildren();}}}exports.createAiPanel=wt;
|
|
1
|
+
'use strict';var chunkRK65LSTP_cjs=require('./chunk-RK65LSTP.cjs');require('./chunk-ZNRAPWFG.cjs'),require('./chunk-B5PFHICE.cjs');function K(o){let{doc:t,t:n,controller:i}=o,a=chunkRK65LSTP_cjs.w(t,"div","pptxv-ai-focus"),h=(p,m,l)=>{let s=chunkRK65LSTP_cjs.w(t,"button","pptxv-ai-focus-btn");return s.type="button",s.title=m,s.setAttribute("aria-label",m),s.appendChild(chunkRK65LSTP_cjs.K(t,p)),s.addEventListener("click",l),s},x=()=>{a.replaceChildren();let p=i.getEffectiveTargets(),m=i.hasPicks(),l=i.isPinned(),s=i.isPicking(),g=chunkRK65LSTP_cjs.w(t,"div","pptxv-ai-focus-row"),f=chunkRK65LSTP_cjs.w(t,"span","pptxv-ai-focus-label");f.textContent=n("pptx.ai.focusScope"),g.appendChild(f);for(let r of chunkRK65LSTP_cjs.j(p,o.getSlides())){let b=chunkRK65LSTP_cjs.w(t,"span","pptxv-ai-focus-chip");(m||l)&&b.classList.add("is-strong"),b.title=r.title,b.textContent=r.label,g.appendChild(b);}if(l){let r=chunkRK65LSTP_cjs.w(t,"span","pptxv-ai-focus-pinned");r.textContent=n("pptx.ai.pinnedFocus"),g.appendChild(r);}let C=chunkRK65LSTP_cjs.w(t,"div","pptxv-ai-focus-actions"),d=chunkRK65LSTP_cjs.k(p,o.getSlides());if(d){let r=chunkRK65LSTP_cjs.w(t,"button","pptxv-ai-focus-merge");r.type="button",r.append(chunkRK65LSTP_cjs.K(t,"git-merge"),t.createTextNode(n("pptx.ai.mergeSelectedTables"))),r.addEventListener("click",()=>o.onSendDirective(chunkRK65LSTP_cjs.l(d.slideIndex,d.elementIdA,d.elementIdB))),C.appendChild(r);}let y=h("crosshair",n("pptx.ai.pickElement"),()=>s?i.stopPicking():i.startPicking());if(y.setAttribute("aria-pressed",String(s)),y.classList.toggle("is-active",s),C.appendChild(y),m?C.appendChild(h("close",n("pptx.ai.pickClear"),()=>i.clearPicks())):l?C.appendChild(h("pin-off",n("pptx.ai.clearFocus"),()=>i.clearPinnedFocus())):C.appendChild(h("pin",n("pptx.ai.pinFocus"),()=>i.pinFocus())),g.appendChild(C),a.appendChild(g),s){let r=chunkRK65LSTP_cjs.w(t,"div","pptxv-ai-focus-pick"),b=chunkRK65LSTP_cjs.K(t,"crosshair");b.classList.add("pptxv-ai-focus-pick-icon");let k=chunkRK65LSTP_cjs.w(t,"span","pptxv-ai-focus-pick-hint");k.textContent=n("pptx.ai.pickElementHint");let T=chunkRK65LSTP_cjs.w(t,"button","pptxv-ai-focus-pick-done");T.type="button",T.textContent=n("pptx.ai.pickDone"),T.addEventListener("click",()=>i.stopPicking()),r.append(b,k,T),a.appendChild(r);}},c=i.subscribe(x);return x(),{el:a,destroy(){c(),a.remove();}}}function O(o){let{doc:t,t:n}=o,i=chunkRK65LSTP_cjs.w(t,"button","pptxv-ai-chats");i.type="button",i.append(chunkRK65LSTP_cjs.K(t,"history"),t.createTextNode(n("pptx.ai.chats")));let a=chunkRK65LSTP_cjs.w(t,"div","pptxv-ai-history");a.hidden=true;let h=chunkRK65LSTP_cjs.w(t,"div","pptxv-ai-history-head"),x=chunkRK65LSTP_cjs.w(t,"span","pptxv-ai-history-title");x.textContent=n("pptx.ai.historyTitle");let c=chunkRK65LSTP_cjs.w(t,"button","pptxv-ai-history-new");c.type="button",c.append(chunkRK65LSTP_cjs.K(t,"plus"),t.createTextNode(n("pptx.ai.newChat"))),h.append(x,c);let p=chunkRK65LSTP_cjs.w(t,"div","pptxv-ai-history-body"),m=chunkRK65LSTP_cjs.w(t,"p","pptxv-ai-history-hint");m.textContent=n("pptx.ai.historyHint"),a.append(h,p,m);let l=chunkRK65LSTP_cjs.n({deckId:o.deckId,store:o.store,getMessages:o.getMessages,setMessages:o.setMessages,untitledLabel:n("pptx.ai.untitledChat"),onChatsChanged:()=>s()});function s(){p.replaceChildren();let f=l.chats();if(f.length===0){let d=chunkRK65LSTP_cjs.w(t,"p","pptxv-ai-history-empty");d.textContent=n("pptx.ai.historyEmpty"),p.appendChild(d);return}let C=chunkRK65LSTP_cjs.w(t,"ul","pptxv-ai-history-list");for(let d of f){let y=chunkRK65LSTP_cjs.w(t,"li","pptxv-ai-history-row"),r=chunkRK65LSTP_cjs.w(t,"button","pptxv-ai-history-resume");r.type="button",r.classList.toggle("is-active",d.id===l.activeChatId());let b=chunkRK65LSTP_cjs.w(t,"span","pptxv-ai-history-text"),k=chunkRK65LSTP_cjs.w(t,"span","pptxv-ai-history-name");k.textContent=d.title||n("pptx.ai.untitledChat");let T=chunkRK65LSTP_cjs.w(t,"span","pptxv-ai-history-meta");T.textContent=n("pptx.ai.messageCount",{count:d.messageCount}),b.append(k,T),r.append(chunkRK65LSTP_cjs.K(t,"comment"),b),r.addEventListener("click",()=>{l.resumeChat(d.id),a.hidden=true;});let P=chunkRK65LSTP_cjs.w(t,"button","pptxv-ai-history-delete");P.type="button",P.title=n("pptx.ai.deleteChat"),P.setAttribute("aria-label",n("pptx.ai.deleteChat")),P.appendChild(chunkRK65LSTP_cjs.K(t,"trash")),P.addEventListener("click",()=>{l.deleteChat(d.id);}),y.append(r,P),C.appendChild(y);}p.appendChild(C);}s(),i.addEventListener("click",()=>{a.hidden=!a.hidden;}),c.addEventListener("click",()=>{l.newChat(),a.hidden=true;});let g=f=>{a.hidden||!(f.target instanceof Node)||!a.contains(f.target)&&!i.contains(f.target)&&(a.hidden=true);};return t.addEventListener("mousedown",g),{button:i,el:a,notifyMessagesChanged:()=>l.notifyMessagesChanged(),destroy(){t.removeEventListener("mousedown",g),l.dispose(),i.remove(),a.remove();}}}var _={view:"eye",text:"text-box",shape:"shapes",theme:"font-color",table:"table",slide:"layout",chart:"chart",move:"move-right",delete:"trash",search:"search",nav:"move-right",animation:"play",notes:"sticky-note",tool:"wrench"};function W(o,t,n){let i=t.state==="output-error",a=t.state==="output-available",h=!i&&!a,x=chunkRK65LSTP_cjs.s(t.toolName,t.input,h?"present":"past"),c=chunkRK65LSTP_cjs.w(o,"div","pptxv-ai-tool"),p=chunkRK65LSTP_cjs.w(o,"div","pptxv-ai-tool-head"),m=chunkRK65LSTP_cjs.K(o,_[x.icon]??"wrench");m.classList.add("pptxv-ai-tool-icon");let l=chunkRK65LSTP_cjs.w(o,"span","pptxv-ai-tool-name");l.textContent=x.label;let s=chunkRK65LSTP_cjs.w(o,"span","pptxv-ai-tool-state");if(i?(s.classList.add("is-error"),s.append(chunkRK65LSTP_cjs.K(o,"alert"),o.createTextNode(n("pptx.ai.toolFailed")))):a?(s.classList.add("is-done"),s.append(chunkRK65LSTP_cjs.K(o,"check"),o.createTextNode(n("pptx.ai.toolDone")))):(s.classList.add("is-running"),s.textContent=n("pptx.ai.toolRunning")),p.append(m,l,s),c.appendChild(p),i&&t.errorText){let f=chunkRK65LSTP_cjs.w(o,"div","pptxv-ai-tool-error");f.textContent=t.errorText,c.appendChild(f);}let g=chunkRK65LSTP_cjs.r(t.input);if(g){let f=chunkRK65LSTP_cjs.w(o,"details","pptxv-ai-tool-details"),C=chunkRK65LSTP_cjs.w(o,"summary");C.textContent=n("pptx.ai.toolDetails");let d=chunkRK65LSTP_cjs.w(o,"div","pptxv-ai-tool-raw");d.textContent=`${chunkRK65LSTP_cjs.q(t.toolName)}: ${g}`,f.append(C,d),c.appendChild(f);}return c}function q(o,t,n,i){t.replaceChildren();for(let a of n){if(a.role==="system")continue;let h=a.role==="user",x=chunkRK65LSTP_cjs.f(a);if(x.length===0&&!h)continue;let c=chunkRK65LSTP_cjs.w(o,"div",`pptxv-ai-msg pptxv-ai-msg-${a.role}`),p=chunkRK65LSTP_cjs.w(o,"div","pptxv-ai-msg-avatar");p.setAttribute("aria-label",i(h?"pptx.ai.you":"pptx.ai.assistant")),p.appendChild(chunkRK65LSTP_cjs.K(o,h?"comment":"sparkles"));let m=chunkRK65LSTP_cjs.w(o,"div","pptxv-ai-msg-body");for(let l of x)if(l.kind==="text"){let s=chunkRK65LSTP_cjs.w(o,"div","pptxv-ai-msg-text");s.textContent=l.text,m.appendChild(s);}else m.appendChild(W(o,l,i));c.append(p,m),t.appendChild(c);}}function G(o,t,n,i,a){if(t.replaceChildren(),t.hidden=n.length===0,n.length===0)return;let h=chunkRK65LSTP_cjs.w(o,"div","pptxv-ai-proposals-header"),x=chunkRK65LSTP_cjs.w(o,"span","pptxv-ai-proposals-title");if(x.textContent=i("pptx.ai.pendingChanges",{count:n.length}),h.appendChild(x),n.length>1){let c=chunkRK65LSTP_cjs.w(o,"button","pptxv-ai-proposal-btn is-accept-all");c.type="button",c.textContent=i("pptx.ai.acceptAll"),c.addEventListener("click",()=>a.acceptAll()),h.appendChild(c);}t.appendChild(h);for(let c of n)t.appendChild(tt(o,c,i,a));}function tt(o,t,n,i){let a=chunkRK65LSTP_cjs.w(o,"div","pptxv-ai-proposal");a.dataset.proposalId=t.id;let h=chunkRK65LSTP_cjs.w(o,"div","pptxv-ai-proposal-eyebrow");h.textContent=n("pptx.ai.proposedChange"),a.appendChild(h);let x=chunkRK65LSTP_cjs.w(o,"div","pptxv-ai-proposal-label");if(x.textContent=t.label,a.appendChild(x),t.summary.length>0){let l=chunkRK65LSTP_cjs.w(o,"ul","pptxv-ai-proposal-summary");for(let s of t.summary){let g=chunkRK65LSTP_cjs.w(o,"li");g.textContent=chunkRK65LSTP_cjs.c(s),l.appendChild(g);}a.appendChild(l);}let c=chunkRK65LSTP_cjs.w(o,"div","pptxv-ai-proposal-actions"),p=chunkRK65LSTP_cjs.w(o,"button","pptxv-ai-proposal-btn is-accept");p.type="button",p.append(chunkRK65LSTP_cjs.K(o,"check"),o.createTextNode(n("pptx.ai.accept"))),p.addEventListener("click",()=>i.accept(t.id));let m=chunkRK65LSTP_cjs.w(o,"button","pptxv-ai-proposal-btn is-reject");return m.type="button",m.append(chunkRK65LSTP_cjs.K(o,"close"),o.createTextNode(n("pptx.ai.reject"))),m.addEventListener("click",()=>i.reject(t.id)),c.append(p,m),a.appendChild(c),a}async function wt(o){let{doc:t,host:n,t:i}=o;n.replaceChildren();let a=chunkRK65LSTP_cjs.w(t,"div","pptxv-ai-header"),h=chunkRK65LSTP_cjs.w(t,"span","pptxv-ai-title");h.textContent=i("pptx.ai.title");let x=chunkRK65LSTP_cjs.w(t,"button","pptxv-ai-close");x.type="button",x.title=i("pptx.ai.close"),x.setAttribute("aria-label",i("pptx.ai.close")),x.appendChild(chunkRK65LSTP_cjs.K(t,"close")),x.addEventListener("click",()=>o.onClose?.()),a.append(chunkRK65LSTP_cjs.K(t,"sparkles"),h,x);let c,p=o.controller,m=p?K({doc:t,t:i,controller:p,getSlides:()=>o.bridge.getSlides(),onSendDirective:u=>{c?.sendMessage(u);}}):null,l=chunkRK65LSTP_cjs.w(t,"div","pptxv-ai-messages");l.setAttribute("role","log"),l.setAttribute("aria-live","polite");let s=chunkRK65LSTP_cjs.w(t,"div","pptxv-ai-empty");s.textContent=i("pptx.ai.emptyHint"),l.appendChild(s);let g=chunkRK65LSTP_cjs.w(t,"div","pptxv-ai-proposals");g.hidden=true;let f=chunkRK65LSTP_cjs.w(t,"div","pptxv-ai-error");f.setAttribute("role","alert"),f.hidden=true;let C=chunkRK65LSTP_cjs.w(t,"form","pptxv-ai-composer"),d=chunkRK65LSTP_cjs.w(t,"textarea","pptxv-ai-input");d.rows=2,d.placeholder=i("pptx.ai.placeholder"),d.setAttribute("aria-label",i("pptx.ai.placeholder"));let y=chunkRK65LSTP_cjs.w(t,"button","pptxv-ai-send");y.type="submit",y.setAttribute("aria-label",i("pptx.ai.send")),y.appendChild(chunkRK65LSTP_cjs.K(t,"send")),C.append(d,y),n.append(a,...m?[m.el]:[],l,g,f,C);try{c=await(o.createChat??chunkRK65LSTP_cjs.o)({bridge:o.bridge,config:o.config});}catch{return s.textContent=i("pptx.ai.unavailableTitle"),d.disabled=true,y.disabled=true,m?.destroy(),{destroy:()=>n.replaceChildren()}}let r=c,b=O({doc:t,t:i,deckId:chunkRK65LSTP_cjs.m(o.bridge),store:o.historyStore,getMessages:()=>r.getSnapshot().messages,setMessages:u=>r.setMessages(u)});a.insertBefore(b.button,x),n.appendChild(b.el);let k=r.subscribe(()=>b.notifyMessagesChanged()),T=new Set,P=u=>{if(!p)return;let A=u.messages.flatMap(Y=>chunkRK65LSTP_cjs.f(Y).filter(Z=>Z.kind==="tool")).at(-1);if(!A||A.kind!=="tool"||A.state==="input-streaming"||T.has(A.toolCallId))return;T.add(A.toolCallId);let L=chunkRK65LSTP_cjs.t(A.toolName,A.input);L&&L.slideIndex!==void 0&&o.goToSlide?.(L.slideIndex),p.flashToolTarget(L);},M=u=>{q(t,l,u.messages,i),s.hidden=u.messages.length>0,u.messages.length===0&&l.appendChild(s),G(t,g,r.proposals.list(),i,{accept:A=>{p?.flashToolTarget(null),r.proposals.apply(A),M(r.getSnapshot());},reject:A=>{r.proposals.revert(A),M(r.getSnapshot());},acceptAll:()=>{p?.flashToolTarget(null),r.proposals.acceptAll(),M(r.getSnapshot());}});let w=u.status==="submitted"||u.status==="streaming";n.classList.toggle("is-busy",w),y.setAttribute("aria-label",i(w?"pptx.ai.stop":"pptx.ai.send")),f.hidden=!u.error,f.textContent=u.error?i("pptx.ai.errorPrefix"):"",l.scrollTop=l.scrollHeight,P(u);},S=()=>{if(n.classList.contains("is-busy")){r.stop();return}let u=d.value.trim();u&&(d.value="",r.sendMessage(u));};C.addEventListener("submit",u=>{u.preventDefault(),S();}),d.addEventListener("keydown",u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),S());});let I=p?.getPrefill().nonce??0,J=()=>{if(!p)return;let u=p.getPrefill();u.nonce!==I&&(I=u.nonce,d.value=u.text,d.focus());},Q=p?.subscribe(J),X=r.subscribe(M);return M(r.getSnapshot()),{changeAnimator:r.changeAnimator,destroy(){X(),k(),b.destroy(),Q?.(),m?.destroy(),n.replaceChildren();}}}exports.createAiPanel=wt;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var
|
|
2
|
-
${
|
|
3
|
-
${
|
|
1
|
+
'use strict';var chunkZNRAPWFG_cjs=require('./chunk-ZNRAPWFG.cjs');var R="data-pptx-text-style-override";function z(n,i,r){chunkZNRAPWFG_cjs.ks(n,r?.textStyle);let a=chunkZNRAPWFG_cjs.ud(i,r?.textStyle),e=n.querySelector(`:scope > style[${R}]`);if(!a){e?.remove();return}e||(e=n.ownerDocument.createElement("style"),e.setAttribute(R,""),n.prepend(e)),e.textContent=a;}var w="pptx-vanilla-presentation-keyframes",k="pptx-vanilla-slide-keyframes";function K(n){if(n.getElementById(w))return;let i=n.createElement("style");i.id=w,i.textContent=`${chunkZNRAPWFG_cjs.Cc}
|
|
2
|
+
${chunkZNRAPWFG_cjs.Xh}
|
|
3
|
+
${chunkZNRAPWFG_cjs.mm}`,(n.head??n.documentElement).appendChild(i);}function W(n,i){let r=n.getElementById(k);if(!i){r?.remove();return}r||(r=n.createElement("style"),r.id=k,(n.head??n.documentElement).appendChild(r)),r.textContent=i;}function X(n,i,r,a){n.querySelectorAll("[data-element-id]").forEach(e=>{let t=e.dataset.elementId;if(!t)return;let o=i.get(t);e.style.animation=o?.cssAnimation??"",e.style.visibility=o?.visible===false?"hidden":"",e.style.cursor=r.has(t)||a.has(t)?"pointer":"",z(e,t,o);}),n.querySelectorAll("[data-anim-id]").forEach(e=>{let t=e.dataset.animId;if(!t)return;let o=i.get(t);e.style.animation=o?.cssAnimation??"",e.style.visibility=o?.visible===false?"hidden":"";});}function M(n,i,r,a,e){let t=n.createElement("div");t.className="pptxv-transition-layer",t.dataset.pptxTransitionLayer=e,t.dataset.pptxTransitionFragments=r.keyframesName,t.style.position="absolute",t.style.inset="0",t.style.overflow="hidden",t.style.pointerEvents="none",t.style.zIndex=String(a);for(let o of r.fragments)t.appendChild(B(n,i,r,o));return t}function B(n,i,r,a){let e=n.createElement("div");e.dataset.pptxTransitionFragment=a.id,e.style.position="absolute",e.style.inset="0",e.style.clipPath=a.clipPath,e.style.transformOrigin=a.transformOrigin,e.style.animationName=r.keyframesName,e.style.animationDuration=`${r.durationMs}ms`,e.style.animationTimingFunction=r.easing,e.style.animationDelay=`${a.delayMs}ms`,e.style.animationFillMode="forwards",e.style.willChange="transform, opacity";for(let[t,o]of Object.entries(a.vars))e.style.setProperty(t,o);return e.appendChild(i.cloneNode(true)),e}function u(n,i,r,a,e){let t=n.createElement("div");return t.className="pptxv-transition-layer",t.dataset.pptxTransitionLayer=e,t.style.position="absolute",t.style.inset="0",t.style.overflow="hidden",t.style.zIndex=String(r),t.style.willChange="transform, opacity, clip-path, filter",a!=="none"&&(t.style.animation=a),t.appendChild(i),t}function T(n,i){n.style.background="none",n.style.backgroundColor="transparent";let r=new Set(i),a=new Set;for(let e of n.querySelectorAll("[data-element-id]")){let t=e.dataset.elementId;if(!(t===void 0||!r.has(t))){for(let o=e;o&&o!==n;)a.add(o),o=o.parentElement;for(let o of e.querySelectorAll("[data-element-id]"))a.add(o);}}for(let e of [...n.querySelectorAll("[data-element-id]")])a.has(e)||e.remove();return n}function q(n,i,r,a){return (a?.crossfadeGroups??[]).map((e,t)=>{let o=n.createElement("div");o.dataset.pptxMorphCrossfade=e.incoming.id,o.style.cssText=chunkZNRAPWFG_cjs.yg,o.style.zIndex=String(4+t);let m=(p,l,s,y,g)=>{let d=u(n,T(p,[l]),y,g??"none",s);return s==="outgoing"?d.dataset.pptxMorphOutgoing="true":d.dataset.pptxMorphLifted="true",d.style.mixBlendMode=chunkZNRAPWFG_cjs.zg,d};return o.append(m(i.cloneNode(true),e.outgoing.id,"outgoing",0,e.outgoingAnimation),m(r.cloneNode(true),e.incoming.id,"lifted",1,e.incomingAnimation)),o})}function se(n){let{doc:i,stageWrap:r,outgoing:a,incoming:e,transition:t}=n;K(i);let o=chunkZNRAPWFG_cjs._h(t),m=chunkZNRAPWFG_cjs.$h(t),p=chunkZNRAPWFG_cjs.Vh(t.type,m,t.direction,t.spokes,t.pattern),l=i.createElement("div");l.className="pptxv-transition-overlay",l.dataset.pptxTransitionOverlay="",l.dataset.pptxTransitionOverlay="",l.style.position="absolute",l.style.inset="0",l.style.overflow="hidden",l.style.pointerEvents="none",l.style.zIndex="30";let s=t.type==="morph"?chunkZNRAPWFG_cjs.Bg(n.outgoingSlide,n.incomingSlide,m,chunkZNRAPWFG_cjs.Ag(t.morphOption)):void 0,y=s||o.outgoingOnTop?2:1,g=s||o.outgoingOnTop?1:2,d=!s&&p?.outgoing?M(i,a,p.outgoing,y,"outgoing"):u(i,a,y,s?"none":o.outgoing,"outgoing"),x=!s&&p?.incoming?M(i,e,p.incoming,g,"incoming"):u(i,e,g,s?"none":o.incoming,"incoming"),S=s&&s.overlayIncomingElements.length>0?T(e.cloneNode(true),s.overlayIncomingElements.map(c=>c.id)):void 0,f=S?u(i,S,3,"none","lifted"):void 0,$=q(i,a,e,s);if(s){x.dataset.pptxMorphIncoming="true",d.dataset.pptxMorphOutgoing="true",T(a,s.outgoingElements.map(Y=>Y.id)),f&&(f.dataset.pptxMorphLifted="true");let c=i.createElement("style");c.textContent=[chunkZNRAPWFG_cjs.Cg(s,"data-pptx-morph-incoming","incoming"),chunkZNRAPWFG_cjs.Cg(s,"data-pptx-morph-outgoing","outgoing"),chunkZNRAPWFG_cjs.Cg(s,"data-pptx-morph-lifted","lifted")].join(`
|
|
4
4
|
`),l.appendChild(c);}l.append(d,x),f&&l.appendChild(f);for(let c of $)l.appendChild(c);r.appendChild(l);let h=false,v=()=>{h||(h=true,clearTimeout(G),l.remove(),n.onDone());},G=setTimeout(v,Math.max(0,m)+50);return v}exports.a=K;exports.b=W;exports.c=X;exports.d=se;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
${
|
|
3
|
-
${
|
|
1
|
+
import {Cc,Xh,mm,_h,$h,Vh,Bg,Ag,Cg,ks,ud,yg,zg}from'./chunk-KW6OQCG6.js';var R="data-pptx-text-style-override";function z(n,i,r){ks(n,r?.textStyle);let a=ud(i,r?.textStyle),e=n.querySelector(`:scope > style[${R}]`);if(!a){e?.remove();return}e||(e=n.ownerDocument.createElement("style"),e.setAttribute(R,""),n.prepend(e)),e.textContent=a;}var w="pptx-vanilla-presentation-keyframes",k="pptx-vanilla-slide-keyframes";function K(n){if(n.getElementById(w))return;let i=n.createElement("style");i.id=w,i.textContent=`${Cc}
|
|
2
|
+
${Xh}
|
|
3
|
+
${mm}`,(n.head??n.documentElement).appendChild(i);}function W(n,i){let r=n.getElementById(k);if(!i){r?.remove();return}r||(r=n.createElement("style"),r.id=k,(n.head??n.documentElement).appendChild(r)),r.textContent=i;}function X(n,i,r,a){n.querySelectorAll("[data-element-id]").forEach(e=>{let t=e.dataset.elementId;if(!t)return;let o=i.get(t);e.style.animation=o?.cssAnimation??"",e.style.visibility=o?.visible===false?"hidden":"",e.style.cursor=r.has(t)||a.has(t)?"pointer":"",z(e,t,o);}),n.querySelectorAll("[data-anim-id]").forEach(e=>{let t=e.dataset.animId;if(!t)return;let o=i.get(t);e.style.animation=o?.cssAnimation??"",e.style.visibility=o?.visible===false?"hidden":"";});}function M(n,i,r,a,e){let t=n.createElement("div");t.className="pptxv-transition-layer",t.dataset.pptxTransitionLayer=e,t.dataset.pptxTransitionFragments=r.keyframesName,t.style.position="absolute",t.style.inset="0",t.style.overflow="hidden",t.style.pointerEvents="none",t.style.zIndex=String(a);for(let o of r.fragments)t.appendChild(B(n,i,r,o));return t}function B(n,i,r,a){let e=n.createElement("div");e.dataset.pptxTransitionFragment=a.id,e.style.position="absolute",e.style.inset="0",e.style.clipPath=a.clipPath,e.style.transformOrigin=a.transformOrigin,e.style.animationName=r.keyframesName,e.style.animationDuration=`${r.durationMs}ms`,e.style.animationTimingFunction=r.easing,e.style.animationDelay=`${a.delayMs}ms`,e.style.animationFillMode="forwards",e.style.willChange="transform, opacity";for(let[t,o]of Object.entries(a.vars))e.style.setProperty(t,o);return e.appendChild(i.cloneNode(true)),e}function u(n,i,r,a,e){let t=n.createElement("div");return t.className="pptxv-transition-layer",t.dataset.pptxTransitionLayer=e,t.style.position="absolute",t.style.inset="0",t.style.overflow="hidden",t.style.zIndex=String(r),t.style.willChange="transform, opacity, clip-path, filter",a!=="none"&&(t.style.animation=a),t.appendChild(i),t}function T(n,i){n.style.background="none",n.style.backgroundColor="transparent";let r=new Set(i),a=new Set;for(let e of n.querySelectorAll("[data-element-id]")){let t=e.dataset.elementId;if(!(t===void 0||!r.has(t))){for(let o=e;o&&o!==n;)a.add(o),o=o.parentElement;for(let o of e.querySelectorAll("[data-element-id]"))a.add(o);}}for(let e of [...n.querySelectorAll("[data-element-id]")])a.has(e)||e.remove();return n}function q(n,i,r,a){return (a?.crossfadeGroups??[]).map((e,t)=>{let o=n.createElement("div");o.dataset.pptxMorphCrossfade=e.incoming.id,o.style.cssText=yg,o.style.zIndex=String(4+t);let m=(p,l,s,y,g)=>{let d=u(n,T(p,[l]),y,g??"none",s);return s==="outgoing"?d.dataset.pptxMorphOutgoing="true":d.dataset.pptxMorphLifted="true",d.style.mixBlendMode=zg,d};return o.append(m(i.cloneNode(true),e.outgoing.id,"outgoing",0,e.outgoingAnimation),m(r.cloneNode(true),e.incoming.id,"lifted",1,e.incomingAnimation)),o})}function se(n){let{doc:i,stageWrap:r,outgoing:a,incoming:e,transition:t}=n;K(i);let o=_h(t),m=$h(t),p=Vh(t.type,m,t.direction,t.spokes,t.pattern),l=i.createElement("div");l.className="pptxv-transition-overlay",l.dataset.pptxTransitionOverlay="",l.dataset.pptxTransitionOverlay="",l.style.position="absolute",l.style.inset="0",l.style.overflow="hidden",l.style.pointerEvents="none",l.style.zIndex="30";let s=t.type==="morph"?Bg(n.outgoingSlide,n.incomingSlide,m,Ag(t.morphOption)):void 0,y=s||o.outgoingOnTop?2:1,g=s||o.outgoingOnTop?1:2,d=!s&&p?.outgoing?M(i,a,p.outgoing,y,"outgoing"):u(i,a,y,s?"none":o.outgoing,"outgoing"),x=!s&&p?.incoming?M(i,e,p.incoming,g,"incoming"):u(i,e,g,s?"none":o.incoming,"incoming"),S=s&&s.overlayIncomingElements.length>0?T(e.cloneNode(true),s.overlayIncomingElements.map(c=>c.id)):void 0,f=S?u(i,S,3,"none","lifted"):void 0,$=q(i,a,e,s);if(s){x.dataset.pptxMorphIncoming="true",d.dataset.pptxMorphOutgoing="true",T(a,s.outgoingElements.map(Y=>Y.id)),f&&(f.dataset.pptxMorphLifted="true");let c=i.createElement("style");c.textContent=[Cg(s,"data-pptx-morph-incoming","incoming"),Cg(s,"data-pptx-morph-outgoing","outgoing"),Cg(s,"data-pptx-morph-lifted","lifted")].join(`
|
|
4
4
|
`),l.appendChild(c);}l.append(d,x),f&&l.appendChild(f);for(let c of $)l.appendChild(c);r.appendChild(l);let h=false,v=()=>{h||(h=true,clearTimeout(G),l.remove(),n.onDone());},G=setTimeout(v,Math.max(0,m)+50);return v}export{K as a,W as b,X as c,se as d};
|