@extend-ai/react-pptx 0.1.0 → 0.1.1
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 +6 -0
- package/dist/index.js +22 -3
- package/dist/index.js.map +1 -1
- package/dist/pptx_wasm_bg.wasm +0 -0
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @extend-ai/react-pptx
|
|
2
2
|
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Improve PowerPoint import fidelity for word spacing, hyperlink styling, diagonal stripe shapes, and straight connectors, including zero-width vertical timeline stems.
|
|
8
|
+
|
|
3
9
|
## Unreleased
|
|
4
10
|
|
|
5
11
|
- Expose consumer-owned slide thumbnail rails through `usePptxViewerThumbnails`, including stable
|
package/dist/index.js
CHANGED
|
@@ -117,8 +117,6 @@ var UNIVERSAL_SANS_FALLBACKS = [
|
|
|
117
117
|
"Noto Sans Arabic",
|
|
118
118
|
"Noto Sans Hebrew",
|
|
119
119
|
"Segoe UI Symbol",
|
|
120
|
-
"Apple Color Emoji",
|
|
121
|
-
"Segoe UI Emoji",
|
|
122
120
|
"sans-serif"
|
|
123
121
|
];
|
|
124
122
|
function normalizeFamily(value) {
|
|
@@ -9407,6 +9405,8 @@ function createTextRunElement(run, paragraph, fontScale) {
|
|
|
9407
9405
|
span.href = href;
|
|
9408
9406
|
span.target = "_blank";
|
|
9409
9407
|
span.rel = "noreferrer noopener";
|
|
9408
|
+
if (!run.color) span.style.color = "inherit";
|
|
9409
|
+
if (!decorations.length) span.style.textDecoration = "none";
|
|
9410
9410
|
}
|
|
9411
9411
|
return span;
|
|
9412
9412
|
}
|
|
@@ -9553,6 +9553,8 @@ function applyLine(element, line) {
|
|
|
9553
9553
|
}
|
|
9554
9554
|
function normalizedPresetGeometryPath(preset) {
|
|
9555
9555
|
switch (preset) {
|
|
9556
|
+
case "straightConnector1":
|
|
9557
|
+
return "M 0 0 L 1 1";
|
|
9556
9558
|
case "heart":
|
|
9557
9559
|
return "M 0.5 0.25 C 0.7083333333 -0.3333333333 1.5208333333 0.25 0.5 1 C -0.5208333333 0.25 0.2916666667 -0.3333333333 0.5 0.25 Z";
|
|
9558
9560
|
default:
|
|
@@ -9579,6 +9581,9 @@ function applyGeometry(element, preset) {
|
|
|
9579
9581
|
case "parallelogram":
|
|
9580
9582
|
element.style.clipPath = "polygon(20% 0, 100% 0, 80% 100%, 0 100%)";
|
|
9581
9583
|
break;
|
|
9584
|
+
case "diagStripe":
|
|
9585
|
+
element.style.clipPath = "polygon(0 50%, 50% 0, 100% 0, 0 100%)";
|
|
9586
|
+
break;
|
|
9582
9587
|
case "hexagon":
|
|
9583
9588
|
element.style.clipPath = "polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%)";
|
|
9584
9589
|
break;
|
|
@@ -9964,8 +9969,20 @@ var NormalizedPresentationViewer = class {
|
|
|
9964
9969
|
svg.style.height = "100%";
|
|
9965
9970
|
svg.style.overflow = "visible";
|
|
9966
9971
|
svg.style.pointerEvents = "none";
|
|
9972
|
+
let renderedPathData = pathData;
|
|
9973
|
+
if (node.geometry.preset === "straightConnector1") {
|
|
9974
|
+
if (node.transform.width === 0 && node.transform.height !== 0) {
|
|
9975
|
+
svg.style.left = "-0.5px";
|
|
9976
|
+
svg.style.width = "1px";
|
|
9977
|
+
renderedPathData = "M 0.5 0 L 0.5 1";
|
|
9978
|
+
} else if (node.transform.height === 0 && node.transform.width !== 0) {
|
|
9979
|
+
svg.style.top = "-0.5px";
|
|
9980
|
+
svg.style.height = "1px";
|
|
9981
|
+
renderedPathData = "M 0 0.5 L 1 0.5";
|
|
9982
|
+
}
|
|
9983
|
+
}
|
|
9967
9984
|
const path = document.createElementNS(namespace, "path");
|
|
9968
|
-
path.setAttribute("d",
|
|
9985
|
+
path.setAttribute("d", renderedPathData);
|
|
9969
9986
|
path.setAttribute("vector-effect", "non-scaling-stroke");
|
|
9970
9987
|
path.style.fill = "none";
|
|
9971
9988
|
const fillStyle = node.fill;
|
|
@@ -10172,6 +10189,8 @@ var NormalizedPresentationViewer = class {
|
|
|
10172
10189
|
element.href = href;
|
|
10173
10190
|
element.target = "_blank";
|
|
10174
10191
|
element.rel = "noreferrer noopener";
|
|
10192
|
+
element.style.color = "inherit";
|
|
10193
|
+
element.style.textDecoration = "none";
|
|
10175
10194
|
}
|
|
10176
10195
|
if (node.type === "shape") {
|
|
10177
10196
|
const presetPath = normalizedPresetGeometryPath(node.geometry.preset);
|