pptx-vanilla-viewer 3.64.0 → 3.65.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,34 @@ 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.65.0](https://github.com/ChristopherVR/ooxml/releases/tag/pptx-vanilla-viewer@3.65.0) - 2026-11-06
11
+
12
+ ### Features
13
+
14
+ - **ui:** PowerPoint-style media control bar on the editor canvas ([7c71c7f](https://github.com/ChristopherVR/ooxml/commit/7c71c7fb6f8ea8346afc9281a86bba00eac64a74))
15
+ - **ui:** Draw the table style effectRef shadow on the table frame ([30b9df8](https://github.com/ChristopherVR/ooxml/commit/30b9df883501814c38d715a3795876bc4b7c97e3))
16
+ - **ui:** Dissolve a morphing silhouette shadow between both ends ([18a792a](https://github.com/ChristopherVR/ooxml/commit/18a792aaa4cd5f631d83fc8701e1e37461e0636f))
17
+
18
+ ### Bug Fixes
19
+
20
+ - **ui:** Lay missing legacy East Asian fonts out on their named metrics ([adec110](https://github.com/ChristopherVR/ooxml/commit/adec11017ea2b59b0bb78248752c7ee2dac74e38))
21
+ - **geometry:** Follow ecma-376 for curvedConnector3, 4 and 5 ([fb6b33f](https://github.com/ChristopherVR/ooxml/commit/fb6b33f867882e8ffd8617694977a45fd120d375))
22
+ - **pptx:** Resolve an absolute layout-to-master relationship target ([03ed692](https://github.com/ChristopherVR/ooxml/commit/03ed692a1367546d7a92bccbf03fce01bdf16f86))
23
+ - **ui:** Match PowerPoint's dash lengths and cap handling ([6ff7e23](https://github.com/ChristopherVR/ooxml/commit/6ff7e23e91513260a7f2c52358d9261ce04667ad))
24
+ - **ui:** Match PowerPoint table style fills, double lines and tblBg span ([a30f8ca](https://github.com/ChristopherVR/ooxml/commit/a30f8ca02ef08ed6e056afec123d89add435c444))
25
+ - **ui:** Snap group child strokes by their absolute position ([061ae7e](https://github.com/ChristopherVR/ooxml/commit/061ae7e5a6d6edbc1c431761e54732c25191d554))
26
+ - **geometry:** Match PowerPoint for about 55 preset shapes ([97f99e1](https://github.com/ChristopherVR/ooxml/commit/97f99e1ea2dc603684870a41905203bf341cf420))
27
+ - **text:** Lay missing Office fonts out on their own metrics ([83c4f02](https://github.com/ChristopherVR/ooxml/commit/83c4f029a0c2975e62ca1ae7a50f5f58f13ad732))
28
+ - **ui:** Stroke split-layout presets along their stroked paths only ([68ad9aa](https://github.com/ChristopherVR/ooxml/commit/68ad9aa2f908a43fe9a0cfd0b24250b704bb1159))
29
+ - **ui:** Stop flowing a:linkedTxbx text, as PowerPoint ignores it ([2eeabbb](https://github.com/ChristopherVR/ooxml/commit/2eeabbbebfdd5e9f9a4d11848f3e655efe906ea8))
30
+ - **geometry:** Rebuild the three circular arrows on the ECMA guide chain ([d3b7a1e](https://github.com/ChristopherVR/ooxml/commit/d3b7a1e9e196ef50b87dbe37289d35181a49e1f6))
31
+ - **geometry:** Rebuild ribbon, ribbon2, ellipse ribbons, left-right ribbon ([5a75fe1](https://github.com/ChristopherVR/ooxml/commit/5a75fe1a5bfef83e63105ce0a52e808e5212cf0c))
32
+ - **geometry:** Rebuild verticalScroll, horizontalScroll and funnel ([b14f7f2](https://github.com/ChristopherVR/ooxml/commit/b14f7f2b1ab9d030c09ba7e36d91172140635c34))
33
+ - **geometry:** Correct irregularSeal2, magnetic disk and multidocument ([60783a8](https://github.com/ChristopherVR/ooxml/commit/60783a8fdd0c99a54c9538d654def571d368bf97))
34
+ - **geometry:** Draw action button glyphs and fix cube and bevel shading ([6b7801f](https://github.com/ChristopherVR/ooxml/commit/6b7801fe2c4777dbf928300991d5dda5fd232562))
35
+ - **ui:** Paint gradients the way PowerPoint does and fix blank rect path ([0f1e8d8](https://github.com/ChristopherVR/ooxml/commit/0f1e8d877e87edeae94bbb59890a078ca581cbc6))
36
+ - **ui:** Give every painted copy of a slide its own svg def ids ([a58124a](https://github.com/ChristopherVR/ooxml/commit/a58124a1b0bbb8a8d0c45d92fdebc0d7001e5188))
37
+
10
38
  ## [3.64.0](https://github.com/ChristopherVR/ooxml/releases/tag/pptx-vanilla-viewer@3.64.0) - 2026-11-06
11
39
 
12
40
  ### Features
@@ -0,0 +1,4 @@
1
+ 'use strict';var chunkXCLRGHGD_cjs=require('./chunk-XCLRGHGD.cjs'),pptx=require('ooxml-ui/pptx'),dom=require('ooxml-ui/pptx/dom');var H="data-pptx-text-style-override";function B(n,o,r){dom.applyThreeViewTextStyle(n,r?.textStyle);let i=pptx.buildTextStyleOverrideCss(o,r?.textStyle),e=n.querySelector(`:scope > style[${H}]`);if(!i){e?.remove();return}e||(e=n.ownerDocument.createElement("style"),e.setAttribute(H,""),n.prepend(e)),e.textContent=i;}var C="pptx-vanilla-presentation-keyframes",b="pptx-vanilla-slide-keyframes";function O(n){if(n.getElementById(C))return;let o=n.createElement("style");o.id=C,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 ce(n,o){let r=n.getElementById(b);if(!o){r?.remove();return}r||(r=n.createElement("style"),r.id=b,(n.head??n.documentElement).appendChild(r)),r.textContent=o;}function ue(n,o,r,i){n.querySelectorAll("[data-element-id]").forEach(e=>{let t=e.dataset.elementId;if(!t)return;let s=o.get(t);pptx.applyAnimationOpacity(e,s),e.style.animation=s?.cssAnimation??"",e.style.visibility=s?.visible===false?"hidden":"";let l=r.has(t)||i.has(t);e.style.cursor=l?"pointer":"",e.toggleAttribute(pptx.PRESENTATION_ANIM_TRIGGER_ATTRIBUTE,l),B(e,t,s);}),n.querySelectorAll("[data-anim-id]").forEach(e=>{let t=e.dataset.animId;if(!t)return;let s=o.get(t);pptx.applyAnimationOpacity(e,s),e.style.animation=s?.cssAnimation??"",e.style.visibility=s?.visible===false?"hidden":"";});}function M(n,o,r,i,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(i);for(let s of r.fragments)t.appendChild(G(n,o,r,s));return t}function G(n,o,r,i){let e=n.createElement("div");e.dataset.pptxTransitionFragment=i.id,e.style.position="absolute",e.style.inset="0",e.style.clipPath=i.clipPath,e.style.transformOrigin=i.transformOrigin,e.style.animationName=r.keyframesName,e.style.animationDuration=`${r.durationMs}ms`,e.style.animationTimingFunction=r.easing,e.style.animationDelay=`${i.delayMs}ms`,e.style.animationFillMode="forwards",e.style.willChange="transform, opacity";for(let[t,s]of Object.entries(i.vars))e.style.setProperty(t,s);return e.appendChild(o.cloneNode(true)),e}function y(n,o,r,i,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",i!=="none"&&(t.style.animation=i),t.appendChild(o),t}function I(n,o){n.style.background="none",n.style.backgroundColor="transparent";let r=new Set(o),i=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 s=e;s&&s!==n;)i.add(s),s=s.parentElement;for(let s of e.querySelectorAll("[data-element-id]"))i.add(s);}}for(let e of [...n.querySelectorAll("[data-element-id]")])i.has(e)||e.remove();return n}function Y(n,o){return o.forEach((r,i)=>{let e=n.querySelector(`[data-element-id="${CSS.escape(r)}"]`);e&&(e.style.zIndex=String(i+1));}),n}function j(n,o,r,i){let e=o.id,t=r?.get(e);if(t===void 0)return n;let s=n.querySelector(`[data-element-id="${CSS.escape(t)}"]`);if(s){let l=s.cloneNode(true);l.dataset.elementId=e,l.style.height=`${o.height}px`,Z(l,i?.get(e)),i?.get(e)==="text"&&"type"in o&&W(l,o),s.after(l);}return n}function W(n,o){let r=(0, chunkXCLRGHGD_cjs.a.getTextBlockStyle)(o);for(let i of n.querySelectorAll(".pptxv-text"))i.style.transform=String(r.transform??""),i.style.transformOrigin=String(r.transformOrigin??"");}function Z(n,o){if(o==="body")for(let r of [...n.querySelectorAll(":scope > .pptxv-text")])r.remove();else if(o==="text"){for(let r of [...n.children])r.classList.contains("pptxv-text")||r.remove();n.style.background="none",n.style.border="none",n.style.outline="none",n.style.boxShadow="none";}}function U(n,o,r){for(let[i,e]of r??[]){let t=n.querySelector(`[data-element-id="${CSS.escape(i)}"]`),s=o.querySelector(`[data-element-id="${CSS.escape(e)}"]`);if(!t||!s)continue;let l=s.cloneNode(true);l.dataset.elementId=i,l.style.left=t.style.left,l.style.top=t.style.top,t.replaceWith(l);}}var _=2;function R(n,o,r,i){let e=i?pptx.morphOverlayStackSlots(i):void 0;return (i?.overlayLayers??[]).map((t,s)=>{let l=t.side==="outgoing"?o:r,p=t.elements.map(m=>m.id),a=l.cloneNode(true);t.side==="outgoing"&&U(a,r,i?.outgoingTextReplacements);let d=y(n,Y(I(a,p),p),_+(e?.layers[s]??s),"none",t.side==="outgoing"?"outgoing":"lifted");return t.side==="outgoing"?d.dataset.pptxMorphOutgoing="true":d.dataset.pptxMorphLifted="true",d})}function D(n,o,r,i){if(!i)return [];let e=pptx.morphOverlayStackSlots(i);return i.crossfadeGroups.map((t,s)=>{let l=n.createElement("div");l.dataset.pptxMorphCrossfade=t.incoming.id,l.style.cssText=pptx.MORPH_CROSSFADE_GROUP_CSS_TEXT,l.style.zIndex=String(_+(e.groups[s]??i.overlayLayers.length+s));let p=(a,d,m,f,g)=>{let c=y(n,I(j(a,d,i.textPieceSources,i.morphCopyParts),[d.id]),f,g??"none",m);return m==="outgoing"?c.dataset.pptxMorphOutgoing="true":c.dataset.pptxMorphLifted="true",c.style.mixBlendMode=pptx.MORPH_CROSSFADE_HALF_BLEND_MODE,c};return l.append(p(o.cloneNode(true),t.outgoing,"outgoing",0,t.outgoingAnimation),p(r.cloneNode(true),t.incoming,"lifted",1,t.incomingAnimation)),l})}function be(n){let{doc:o,stageWrap:r,outgoing:i,incoming:e,transition:t}=n;O(o);let s=pptx.resolveSlideTransition(t),l=pptx.resolveTransitionDurationMs(t),p=pptx.getFragmentedTransitionDescriptor(t.type,l,t.direction,t.spokes,t.pattern),a=o.createElement("div");a.className="pptxv-transition-overlay",a.dataset.pptxTransitionOverlay="",a.dataset.pptxTransitionOverlay="",a.style.position="absolute",a.style.inset="0",a.style.overflow="hidden",a.style.pointerEvents="none",a.style.zIndex="30";let d=t.type==="morph"?pptx.buildMorphTransitionPlan(n.outgoingSlide,n.incomingSlide,l,pptx.morphOptionToMode(t.morphOption),n.slideSize?{slideSize:n.slideSize}:{}):void 0;d&&(dom.stripAbuttingEdgeBleeds(i),dom.stripAbuttingEdgeBleeds(e));let m=s.outgoingOnTop?2:1,f=d||s.outgoingOnTop?1:2,g=R(o,i,e,d),c=!d&&p?.outgoing?M(o,i,p.outgoing,m,"outgoing"):y(o,i,m,s.outgoing,"outgoing"),E=!d&&p?.incoming?M(o,e,p.incoming,f,"incoming"):y(o,e,f,d?"none":s.incoming,"incoming"),N=D(o,i,e,d);if(d){E.dataset.pptxMorphIncoming="true";let u=o.createElement("style");u.textContent=[pptx.buildMorphScopedCss(d,"data-pptx-morph-incoming","incoming"),pptx.buildMorphScopedCss(d,"data-pptx-morph-outgoing","outgoing"),pptx.buildMorphScopedCss(d,"data-pptx-morph-lifted","lifted")].join(`
4
+ `),a.appendChild(u);}d?a.appendChild(E):a.append(c,E);for(let u of g)a.appendChild(u);for(let u of N)a.appendChild(u);r.appendChild(a),d&&pptx.refreshSilhouetteMorphFilters(o);let S=false,h=()=>{S||(S=true,clearTimeout(F),a.remove(),n.onDone());},F=setTimeout(h,Math.max(0,l)+50);return h}exports.a=O;exports.b=ce;exports.c=ue;exports.d=be;
@@ -0,0 +1,4 @@
1
+ import {a}from'./chunk-PWXGY3J7.js';import {ANIMATION_KEYFRAMES_CSS,SLIDE_TRANSITION_KEYFRAMES_CSS,PRESENTATION_HIT_TEST_CSS,applyAnimationOpacity,PRESENTATION_ANIM_TRIGGER_ATTRIBUTE,resolveSlideTransition,resolveTransitionDurationMs,getFragmentedTransitionDescriptor,buildMorphTransitionPlan,morphOptionToMode,buildMorphScopedCss,refreshSilhouetteMorphFilters,buildTextStyleOverrideCss,morphOverlayStackSlots,MORPH_CROSSFADE_GROUP_CSS_TEXT,MORPH_CROSSFADE_HALF_BLEND_MODE}from'ooxml-ui/pptx';import {stripAbuttingEdgeBleeds,applyThreeViewTextStyle}from'ooxml-ui/pptx/dom';var H="data-pptx-text-style-override";function B(n,o,r){applyThreeViewTextStyle(n,r?.textStyle);let i=buildTextStyleOverrideCss(o,r?.textStyle),e=n.querySelector(`:scope > style[${H}]`);if(!i){e?.remove();return}e||(e=n.ownerDocument.createElement("style"),e.setAttribute(H,""),n.prepend(e)),e.textContent=i;}var C="pptx-vanilla-presentation-keyframes",b="pptx-vanilla-slide-keyframes";function O(n){if(n.getElementById(C))return;let o=n.createElement("style");o.id=C,o.textContent=`${ANIMATION_KEYFRAMES_CSS}
2
+ ${SLIDE_TRANSITION_KEYFRAMES_CSS}
3
+ ${PRESENTATION_HIT_TEST_CSS}`,(n.head??n.documentElement).appendChild(o);}function ce(n,o){let r=n.getElementById(b);if(!o){r?.remove();return}r||(r=n.createElement("style"),r.id=b,(n.head??n.documentElement).appendChild(r)),r.textContent=o;}function ue(n,o,r,i){n.querySelectorAll("[data-element-id]").forEach(e=>{let t=e.dataset.elementId;if(!t)return;let s=o.get(t);applyAnimationOpacity(e,s),e.style.animation=s?.cssAnimation??"",e.style.visibility=s?.visible===false?"hidden":"";let l=r.has(t)||i.has(t);e.style.cursor=l?"pointer":"",e.toggleAttribute(PRESENTATION_ANIM_TRIGGER_ATTRIBUTE,l),B(e,t,s);}),n.querySelectorAll("[data-anim-id]").forEach(e=>{let t=e.dataset.animId;if(!t)return;let s=o.get(t);applyAnimationOpacity(e,s),e.style.animation=s?.cssAnimation??"",e.style.visibility=s?.visible===false?"hidden":"";});}function M(n,o,r,i,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(i);for(let s of r.fragments)t.appendChild(G(n,o,r,s));return t}function G(n,o,r,i){let e=n.createElement("div");e.dataset.pptxTransitionFragment=i.id,e.style.position="absolute",e.style.inset="0",e.style.clipPath=i.clipPath,e.style.transformOrigin=i.transformOrigin,e.style.animationName=r.keyframesName,e.style.animationDuration=`${r.durationMs}ms`,e.style.animationTimingFunction=r.easing,e.style.animationDelay=`${i.delayMs}ms`,e.style.animationFillMode="forwards",e.style.willChange="transform, opacity";for(let[t,s]of Object.entries(i.vars))e.style.setProperty(t,s);return e.appendChild(o.cloneNode(true)),e}function y(n,o,r,i,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",i!=="none"&&(t.style.animation=i),t.appendChild(o),t}function I(n,o){n.style.background="none",n.style.backgroundColor="transparent";let r=new Set(o),i=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 s=e;s&&s!==n;)i.add(s),s=s.parentElement;for(let s of e.querySelectorAll("[data-element-id]"))i.add(s);}}for(let e of [...n.querySelectorAll("[data-element-id]")])i.has(e)||e.remove();return n}function Y(n,o){return o.forEach((r,i)=>{let e=n.querySelector(`[data-element-id="${CSS.escape(r)}"]`);e&&(e.style.zIndex=String(i+1));}),n}function j(n,o,r,i){let e=o.id,t=r?.get(e);if(t===void 0)return n;let s=n.querySelector(`[data-element-id="${CSS.escape(t)}"]`);if(s){let l=s.cloneNode(true);l.dataset.elementId=e,l.style.height=`${o.height}px`,Z(l,i?.get(e)),i?.get(e)==="text"&&"type"in o&&W(l,o),s.after(l);}return n}function W(n,o){let r=(0, a.getTextBlockStyle)(o);for(let i of n.querySelectorAll(".pptxv-text"))i.style.transform=String(r.transform??""),i.style.transformOrigin=String(r.transformOrigin??"");}function Z(n,o){if(o==="body")for(let r of [...n.querySelectorAll(":scope > .pptxv-text")])r.remove();else if(o==="text"){for(let r of [...n.children])r.classList.contains("pptxv-text")||r.remove();n.style.background="none",n.style.border="none",n.style.outline="none",n.style.boxShadow="none";}}function U(n,o,r){for(let[i,e]of r??[]){let t=n.querySelector(`[data-element-id="${CSS.escape(i)}"]`),s=o.querySelector(`[data-element-id="${CSS.escape(e)}"]`);if(!t||!s)continue;let l=s.cloneNode(true);l.dataset.elementId=i,l.style.left=t.style.left,l.style.top=t.style.top,t.replaceWith(l);}}var _=2;function R(n,o,r,i){let e=i?morphOverlayStackSlots(i):void 0;return (i?.overlayLayers??[]).map((t,s)=>{let l=t.side==="outgoing"?o:r,p=t.elements.map(m=>m.id),a=l.cloneNode(true);t.side==="outgoing"&&U(a,r,i?.outgoingTextReplacements);let d=y(n,Y(I(a,p),p),_+(e?.layers[s]??s),"none",t.side==="outgoing"?"outgoing":"lifted");return t.side==="outgoing"?d.dataset.pptxMorphOutgoing="true":d.dataset.pptxMorphLifted="true",d})}function D(n,o,r,i){if(!i)return [];let e=morphOverlayStackSlots(i);return i.crossfadeGroups.map((t,s)=>{let l=n.createElement("div");l.dataset.pptxMorphCrossfade=t.incoming.id,l.style.cssText=MORPH_CROSSFADE_GROUP_CSS_TEXT,l.style.zIndex=String(_+(e.groups[s]??i.overlayLayers.length+s));let p=(a,d,m,f,g)=>{let c=y(n,I(j(a,d,i.textPieceSources,i.morphCopyParts),[d.id]),f,g??"none",m);return m==="outgoing"?c.dataset.pptxMorphOutgoing="true":c.dataset.pptxMorphLifted="true",c.style.mixBlendMode=MORPH_CROSSFADE_HALF_BLEND_MODE,c};return l.append(p(o.cloneNode(true),t.outgoing,"outgoing",0,t.outgoingAnimation),p(r.cloneNode(true),t.incoming,"lifted",1,t.incomingAnimation)),l})}function be(n){let{doc:o,stageWrap:r,outgoing:i,incoming:e,transition:t}=n;O(o);let s=resolveSlideTransition(t),l=resolveTransitionDurationMs(t),p=getFragmentedTransitionDescriptor(t.type,l,t.direction,t.spokes,t.pattern),a=o.createElement("div");a.className="pptxv-transition-overlay",a.dataset.pptxTransitionOverlay="",a.dataset.pptxTransitionOverlay="",a.style.position="absolute",a.style.inset="0",a.style.overflow="hidden",a.style.pointerEvents="none",a.style.zIndex="30";let d=t.type==="morph"?buildMorphTransitionPlan(n.outgoingSlide,n.incomingSlide,l,morphOptionToMode(t.morphOption),n.slideSize?{slideSize:n.slideSize}:{}):void 0;d&&(stripAbuttingEdgeBleeds(i),stripAbuttingEdgeBleeds(e));let m=s.outgoingOnTop?2:1,f=d||s.outgoingOnTop?1:2,g=R(o,i,e,d),c=!d&&p?.outgoing?M(o,i,p.outgoing,m,"outgoing"):y(o,i,m,s.outgoing,"outgoing"),E=!d&&p?.incoming?M(o,e,p.incoming,f,"incoming"):y(o,e,f,d?"none":s.incoming,"incoming"),N=D(o,i,e,d);if(d){E.dataset.pptxMorphIncoming="true";let u=o.createElement("style");u.textContent=[buildMorphScopedCss(d,"data-pptx-morph-incoming","incoming"),buildMorphScopedCss(d,"data-pptx-morph-outgoing","outgoing"),buildMorphScopedCss(d,"data-pptx-morph-lifted","lifted")].join(`
4
+ `),a.appendChild(u);}d?a.appendChild(E):a.append(c,E);for(let u of g)a.appendChild(u);for(let u of N)a.appendChild(u);r.appendChild(a),d&&refreshSilhouetteMorphFilters(o);let S=false,h=()=>{S||(S=true,clearTimeout(F),a.remove(),n.onDone());},F=setTimeout(h,Math.max(0,l)+50);return h}export{O as a,ce as b,ue as c,be as d};