pptx-vanilla-viewer 3.47.1 → 3.49.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 CHANGED
@@ -7,6 +7,38 @@ A release listed with no entries carried no Conventional Commit in this package'
7
7
  scope: scripts/release-plan.mjs releases whenever any published file changes, not only on
8
8
  conventional commits.
9
9
 
10
+ ## [3.49.0](https://github.com/ChristopherVR/ooxml/releases/tag/pptx-vanilla-viewer@3.49.0) - 2026-10-23
11
+
12
+ ### Features
13
+
14
+ - **ui:** Add a shared progress dialog for the pptx export modal ([#175](https://github.com/ChristopherVR/ooxml/issues/175)) ([05ca9c0](https://github.com/ChristopherVR/ooxml/commit/05ca9c0a9c3fd4726fed6ae9cacd9736512d30a3))
15
+ - **ui:** Share the pptx read-only banner session ([#176](https://github.com/ChristopherVR/ooxml/issues/176)) ([43effb0](https://github.com/ChristopherVR/ooxml/commit/43effb07fa8a71977557b345da1913de3646a59a))
16
+
17
+ ### Bug Fixes
18
+
19
+ - **pptx:** Add a recent colour once a pick settles, not while dragging ([#172](https://github.com/ChristopherVR/ooxml/issues/172)) ([919a8ee](https://github.com/ChristopherVR/ooxml/commit/919a8ee72039a9f86011d74204f093074bef394a))
20
+ - **core:** Copy Node Buffer views by value before parsing them ([#178](https://github.com/ChristopherVR/ooxml/issues/178)) ([16b3a66](https://github.com/ChristopherVR/ooxml/commit/16b3a66f5a83cf9ba198d151745c208214961021))
21
+
22
+ ### Performance
23
+
24
+ - **vanilla:** Build ribbon gallery tiles only while they are shown ([#170](https://github.com/ChristopherVR/ooxml/issues/170)) ([a59dcb5](https://github.com/ChristopherVR/ooxml/commit/a59dcb5228b5293c1daa3d6d68f392730775ad46))
25
+ - **ui:** Let html2canvas clone only the captured element's branch ([#171](https://github.com/ChristopherVR/ooxml/issues/171)) ([ee0cd6e](https://github.com/ChristopherVR/ooxml/commit/ee0cd6e8045c2f0271c511909981dbe7d10677be))
26
+
27
+ ### Refactor
28
+
29
+ - **pptx:** Remove the ribbon controls no binding renders anymore ([#173](https://github.com/ChristopherVR/ooxml/issues/173)) ([6c1d764](https://github.com/ChristopherVR/ooxml/commit/6c1d7640af70910f61d91a020e347d15099da534))
30
+
31
+ ## [3.48.0](https://github.com/ChristopherVR/ooxml/releases/tag/pptx-vanilla-viewer@3.48.0) - 2026-10-22
32
+
33
+ ### Features
34
+
35
+ - **ui:** Move the pptx inspector Quick Styles onto the shared gallery ([#168](https://github.com/ChristopherVR/ooxml/issues/168)) ([978fdbd](https://github.com/ChristopherVR/ooxml/commit/978fdbdb82335f24a0496ba1bf1152a7018cee63))
36
+ - **ui:** Build the pptx status bar state in one place ([#169](https://github.com/ChristopherVR/ooxml/issues/169)) ([0af0608](https://github.com/ChristopherVR/ooxml/commit/0af06085a54134ef3679d66f3319c50d8527a960))
37
+
38
+ ### Bug Fixes
39
+
40
+ - **ui:** Paint the morph overlay in one stacking order ([9f5a11f](https://github.com/ChristopherVR/ooxml/commit/9f5a11fa15c3c31eb06551decda93b96b7841b94))
41
+
10
42
  ## [3.47.1](https://github.com/ChristopherVR/ooxml/releases/tag/pptx-vanilla-viewer@3.47.1) - 2026-10-22
11
43
 
12
44
  ### Bug Fixes
@@ -0,0 +1,4 @@
1
+ import {ANIMATION_KEYFRAMES_CSS,SLIDE_TRANSITION_KEYFRAMES_CSS,PRESENTATION_HIT_TEST_CSS,applyAnimationOpacity,PRESENTATION_ANIM_TRIGGER_ATTRIBUTE,resolveSlideTransition,resolveTransitionDurationMs,getFragmentedTransitionDescriptor,buildMorphTransitionPlan,morphOptionToMode,buildMorphScopedCss,buildTextStyleOverrideCss,MORPH_CROSSFADE_GROUP_CSS_TEXT,MORPH_CROSSFADE_HALF_BLEND_MODE}from'ooxml-ui/pptx';import {applyThreeViewTextStyle}from'ooxml-ui/pptx/dom';var L="data-pptx-text-style-override";function G(n,o,a){applyThreeViewTextStyle(n,a?.textStyle);let r=buildTextStyleOverrideCss(o,a?.textStyle),e=n.querySelector(`:scope > style[${L}]`);if(!r){e?.remove();return}e||(e=n.ownerDocument.createElement("style"),e.setAttribute(L,""),n.prepend(e)),e.textContent=r;}var v="pptx-vanilla-presentation-keyframes",H="pptx-vanilla-slide-keyframes";function O(n){if(n.getElementById(v))return;let o=n.createElement("style");o.id=v,o.textContent=`${ANIMATION_KEYFRAMES_CSS}
2
+ ${SLIDE_TRANSITION_KEYFRAMES_CSS}
3
+ ${PRESENTATION_HIT_TEST_CSS}`,(n.head??n.documentElement).appendChild(o);}function oe(n,o){let a=n.getElementById(H);if(!o){a?.remove();return}a||(a=n.createElement("style"),a.id=H,(n.head??n.documentElement).appendChild(a)),a.textContent=o;}function ie(n,o,a,r){n.querySelectorAll("[data-element-id]").forEach(e=>{let t=e.dataset.elementId;if(!t)return;let i=o.get(t);applyAnimationOpacity(e,i),e.style.animation=i?.cssAnimation??"",e.style.visibility=i?.visible===false?"hidden":"";let d=a.has(t)||r.has(t);e.style.cursor=d?"pointer":"",e.toggleAttribute(PRESENTATION_ANIM_TRIGGER_ATTRIBUTE,d),G(e,t,i);}),n.querySelectorAll("[data-anim-id]").forEach(e=>{let t=e.dataset.animId;if(!t)return;let i=o.get(t);applyAnimationOpacity(e,i),e.style.animation=i?.cssAnimation??"",e.style.visibility=i?.visible===false?"hidden":"";});}function E(n,o,a,r,e){let t=n.createElement("div");t.className="pptxv-transition-layer",t.dataset.pptxTransitionLayer=e,t.dataset.pptxTransitionFragments=a.keyframesName,t.style.position="absolute",t.style.inset="0",t.style.overflow="hidden",t.style.pointerEvents="none",t.style.zIndex=String(r);for(let i of a.fragments)t.appendChild(K(n,o,a,i));return t}function K(n,o,a,r){let e=n.createElement("div");e.dataset.pptxTransitionFragment=r.id,e.style.position="absolute",e.style.inset="0",e.style.clipPath=r.clipPath,e.style.transformOrigin=r.transformOrigin,e.style.animationName=a.keyframesName,e.style.animationDuration=`${a.durationMs}ms`,e.style.animationTimingFunction=a.easing,e.style.animationDelay=`${r.delayMs}ms`,e.style.animationFillMode="forwards",e.style.willChange="transform, opacity";for(let[t,i]of Object.entries(r.vars))e.style.setProperty(t,i);return e.appendChild(o.cloneNode(true)),e}function c(n,o,a,r,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(a),t.style.willChange="transform, opacity, clip-path, filter",r!=="none"&&(t.style.animation=r),t.appendChild(o),t}function A(n,o){n.style.background="none",n.style.backgroundColor="transparent";let a=new Set(o),r=new Set;for(let e of n.querySelectorAll("[data-element-id]")){let t=e.dataset.elementId;if(!(t===void 0||!a.has(t))){for(let i=e;i&&i!==n;)r.add(i),i=i.parentElement;for(let i of e.querySelectorAll("[data-element-id]"))r.add(i);}}for(let e of [...n.querySelectorAll("[data-element-id]")])r.has(e)||e.remove();return n}var C=2;function b(n,o,a,r){return (r?.overlayLayers??[]).map((e,t)=>{let i=e.side==="outgoing"?o:a,d=c(n,A(i.cloneNode(true),e.elements.map(m=>m.id)),C+t,"none",e.side==="outgoing"?"outgoing":"lifted");return e.side==="outgoing"?d.dataset.pptxMorphOutgoing="true":d.dataset.pptxMorphLifted="true",d})}function _(n,o,a,r){return r?r.crossfadeGroups.map((e,t)=>{let i=n.createElement("div");i.dataset.pptxMorphCrossfade=e.incoming.id,i.style.cssText=MORPH_CROSSFADE_GROUP_CSS_TEXT,i.style.zIndex=String(C+r.overlayLayers.length+t);let d=(m,s,l,y,g)=>{let p=c(n,A(m,[s]),y,g??"none",l);return l==="outgoing"?p.dataset.pptxMorphOutgoing="true":p.dataset.pptxMorphLifted="true",p.style.mixBlendMode=MORPH_CROSSFADE_HALF_BLEND_MODE,p};return i.append(d(o.cloneNode(true),e.outgoing.id,"outgoing",0,e.outgoingAnimation),d(a.cloneNode(true),e.incoming.id,"lifted",1,e.incomingAnimation)),i}):[]}function fe(n){let{doc:o,stageWrap:a,outgoing:r,incoming:e,transition:t}=n;O(o);let i=resolveSlideTransition(t),d=resolveTransitionDurationMs(t),m=getFragmentedTransitionDescriptor(t.type,d,t.direction,t.spokes,t.pattern),s=o.createElement("div");s.className="pptxv-transition-overlay",s.dataset.pptxTransitionOverlay="",s.dataset.pptxTransitionOverlay="",s.style.position="absolute",s.style.inset="0",s.style.overflow="hidden",s.style.pointerEvents="none",s.style.zIndex="30";let l=t.type==="morph"?buildMorphTransitionPlan(n.outgoingSlide,n.incomingSlide,d,morphOptionToMode(t.morphOption)):void 0,y=i.outgoingOnTop?2:1,g=l||i.outgoingOnTop?1:2,p=b(o,r,e,l),I=!l&&m?.outgoing?E(o,r,m.outgoing,y,"outgoing"):c(o,r,y,i.outgoing,"outgoing"),f=!l&&m?.incoming?E(o,e,m.incoming,g,"incoming"):c(o,e,g,l?"none":i.incoming,"incoming"),D=_(o,r,e,l);if(l){f.dataset.pptxMorphIncoming="true";let u=o.createElement("style");u.textContent=[buildMorphScopedCss(l,"data-pptx-morph-incoming","incoming"),buildMorphScopedCss(l,"data-pptx-morph-outgoing","outgoing"),buildMorphScopedCss(l,"data-pptx-morph-lifted","lifted")].join(`
4
+ `),s.appendChild(u);}l?s.appendChild(f):s.append(I,f);for(let u of p)s.appendChild(u);for(let u of D)s.appendChild(u);a.appendChild(s);let M=false,x=()=>{M||(M=true,clearTimeout(R),s.remove(),n.onDone());},R=setTimeout(x,Math.max(0,d)+50);return x}export{O as a,oe as b,ie as c,fe as d};
@@ -0,0 +1,4 @@
1
+ 'use strict';var pptx=require('ooxml-ui/pptx'),dom=require('ooxml-ui/pptx/dom');var L="data-pptx-text-style-override";function G(n,o,a){dom.applyThreeViewTextStyle(n,a?.textStyle);let r=pptx.buildTextStyleOverrideCss(o,a?.textStyle),e=n.querySelector(`:scope > style[${L}]`);if(!r){e?.remove();return}e||(e=n.ownerDocument.createElement("style"),e.setAttribute(L,""),n.prepend(e)),e.textContent=r;}var v="pptx-vanilla-presentation-keyframes",H="pptx-vanilla-slide-keyframes";function O(n){if(n.getElementById(v))return;let o=n.createElement("style");o.id=v,o.textContent=`${pptx.ANIMATION_KEYFRAMES_CSS}
2
+ ${pptx.SLIDE_TRANSITION_KEYFRAMES_CSS}
3
+ ${pptx.PRESENTATION_HIT_TEST_CSS}`,(n.head??n.documentElement).appendChild(o);}function oe(n,o){let a=n.getElementById(H);if(!o){a?.remove();return}a||(a=n.createElement("style"),a.id=H,(n.head??n.documentElement).appendChild(a)),a.textContent=o;}function ie(n,o,a,r){n.querySelectorAll("[data-element-id]").forEach(e=>{let t=e.dataset.elementId;if(!t)return;let i=o.get(t);pptx.applyAnimationOpacity(e,i),e.style.animation=i?.cssAnimation??"",e.style.visibility=i?.visible===false?"hidden":"";let d=a.has(t)||r.has(t);e.style.cursor=d?"pointer":"",e.toggleAttribute(pptx.PRESENTATION_ANIM_TRIGGER_ATTRIBUTE,d),G(e,t,i);}),n.querySelectorAll("[data-anim-id]").forEach(e=>{let t=e.dataset.animId;if(!t)return;let i=o.get(t);pptx.applyAnimationOpacity(e,i),e.style.animation=i?.cssAnimation??"",e.style.visibility=i?.visible===false?"hidden":"";});}function E(n,o,a,r,e){let t=n.createElement("div");t.className="pptxv-transition-layer",t.dataset.pptxTransitionLayer=e,t.dataset.pptxTransitionFragments=a.keyframesName,t.style.position="absolute",t.style.inset="0",t.style.overflow="hidden",t.style.pointerEvents="none",t.style.zIndex=String(r);for(let i of a.fragments)t.appendChild(K(n,o,a,i));return t}function K(n,o,a,r){let e=n.createElement("div");e.dataset.pptxTransitionFragment=r.id,e.style.position="absolute",e.style.inset="0",e.style.clipPath=r.clipPath,e.style.transformOrigin=r.transformOrigin,e.style.animationName=a.keyframesName,e.style.animationDuration=`${a.durationMs}ms`,e.style.animationTimingFunction=a.easing,e.style.animationDelay=`${r.delayMs}ms`,e.style.animationFillMode="forwards",e.style.willChange="transform, opacity";for(let[t,i]of Object.entries(r.vars))e.style.setProperty(t,i);return e.appendChild(o.cloneNode(true)),e}function c(n,o,a,r,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(a),t.style.willChange="transform, opacity, clip-path, filter",r!=="none"&&(t.style.animation=r),t.appendChild(o),t}function A(n,o){n.style.background="none",n.style.backgroundColor="transparent";let a=new Set(o),r=new Set;for(let e of n.querySelectorAll("[data-element-id]")){let t=e.dataset.elementId;if(!(t===void 0||!a.has(t))){for(let i=e;i&&i!==n;)r.add(i),i=i.parentElement;for(let i of e.querySelectorAll("[data-element-id]"))r.add(i);}}for(let e of [...n.querySelectorAll("[data-element-id]")])r.has(e)||e.remove();return n}var C=2;function b(n,o,a,r){return (r?.overlayLayers??[]).map((e,t)=>{let i=e.side==="outgoing"?o:a,d=c(n,A(i.cloneNode(true),e.elements.map(m=>m.id)),C+t,"none",e.side==="outgoing"?"outgoing":"lifted");return e.side==="outgoing"?d.dataset.pptxMorphOutgoing="true":d.dataset.pptxMorphLifted="true",d})}function _(n,o,a,r){return r?r.crossfadeGroups.map((e,t)=>{let i=n.createElement("div");i.dataset.pptxMorphCrossfade=e.incoming.id,i.style.cssText=pptx.MORPH_CROSSFADE_GROUP_CSS_TEXT,i.style.zIndex=String(C+r.overlayLayers.length+t);let d=(m,s,l,y,g)=>{let p=c(n,A(m,[s]),y,g??"none",l);return l==="outgoing"?p.dataset.pptxMorphOutgoing="true":p.dataset.pptxMorphLifted="true",p.style.mixBlendMode=pptx.MORPH_CROSSFADE_HALF_BLEND_MODE,p};return i.append(d(o.cloneNode(true),e.outgoing.id,"outgoing",0,e.outgoingAnimation),d(a.cloneNode(true),e.incoming.id,"lifted",1,e.incomingAnimation)),i}):[]}function fe(n){let{doc:o,stageWrap:a,outgoing:r,incoming:e,transition:t}=n;O(o);let i=pptx.resolveSlideTransition(t),d=pptx.resolveTransitionDurationMs(t),m=pptx.getFragmentedTransitionDescriptor(t.type,d,t.direction,t.spokes,t.pattern),s=o.createElement("div");s.className="pptxv-transition-overlay",s.dataset.pptxTransitionOverlay="",s.dataset.pptxTransitionOverlay="",s.style.position="absolute",s.style.inset="0",s.style.overflow="hidden",s.style.pointerEvents="none",s.style.zIndex="30";let l=t.type==="morph"?pptx.buildMorphTransitionPlan(n.outgoingSlide,n.incomingSlide,d,pptx.morphOptionToMode(t.morphOption)):void 0,y=i.outgoingOnTop?2:1,g=l||i.outgoingOnTop?1:2,p=b(o,r,e,l),I=!l&&m?.outgoing?E(o,r,m.outgoing,y,"outgoing"):c(o,r,y,i.outgoing,"outgoing"),f=!l&&m?.incoming?E(o,e,m.incoming,g,"incoming"):c(o,e,g,l?"none":i.incoming,"incoming"),D=_(o,r,e,l);if(l){f.dataset.pptxMorphIncoming="true";let u=o.createElement("style");u.textContent=[pptx.buildMorphScopedCss(l,"data-pptx-morph-incoming","incoming"),pptx.buildMorphScopedCss(l,"data-pptx-morph-outgoing","outgoing"),pptx.buildMorphScopedCss(l,"data-pptx-morph-lifted","lifted")].join(`
4
+ `),s.appendChild(u);}l?s.appendChild(f):s.append(I,f);for(let u of p)s.appendChild(u);for(let u of D)s.appendChild(u);a.appendChild(s);let M=false,x=()=>{M||(M=true,clearTimeout(R),s.remove(),n.onDone());},R=setTimeout(x,Math.max(0,d)+50);return x}exports.a=O;exports.b=oe;exports.c=ie;exports.d=fe;