@wordinweb/agent 0.2.0 → 0.2.2
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.
|
@@ -7052,22 +7052,18 @@ var _DocxDocument = class _DocxDocument {
|
|
|
7052
7052
|
}
|
|
7053
7053
|
findParentOf(target) {
|
|
7054
7054
|
const roots = this.contentRoots();
|
|
7055
|
+
if (roots.includes(target)) return void 0;
|
|
7055
7056
|
const memo = this._parentMemo.get(target);
|
|
7056
7057
|
if (memo && memo.children.includes(target) && this.memoIsLive(memo, roots)) return memo;
|
|
7057
7058
|
const walk2 = (el26) => {
|
|
7058
7059
|
for (const c of el26.children) {
|
|
7059
7060
|
this._parentMemo.set(c, el26);
|
|
7060
|
-
|
|
7061
|
-
const hit = walk2(c);
|
|
7062
|
-
if (hit) return hit;
|
|
7061
|
+
walk2(c);
|
|
7063
7062
|
}
|
|
7064
|
-
return void 0;
|
|
7065
7063
|
};
|
|
7066
|
-
for (const root of roots)
|
|
7067
|
-
|
|
7068
|
-
|
|
7069
|
-
}
|
|
7070
|
-
return void 0;
|
|
7064
|
+
for (const root of roots) walk2(root);
|
|
7065
|
+
const found = this._parentMemo.get(target);
|
|
7066
|
+
return found && found.children.includes(target) && this.memoIsLive(found, roots) ? found : void 0;
|
|
7071
7067
|
}
|
|
7072
7068
|
/** Record a parent link the caller just created (a splice), so the next
|
|
7073
7069
|
* lookup skips the full-document walk. Advisory only — findParentOf
|
|
@@ -14939,7 +14935,7 @@ var Engine = class {
|
|
|
14939
14935
|
"hRel" in s && s.hRel === "char" ? charX : this.colX,
|
|
14940
14936
|
"vRel" in s && s.vRel === "line" ? lineY : paraTop
|
|
14941
14937
|
);
|
|
14942
|
-
if ("wrap" in s && s.wrap && s.wrap !== "none"
|
|
14938
|
+
if ("wrap" in s && s.wrap && s.wrap !== "none") reBreak = true;
|
|
14943
14939
|
}
|
|
14944
14940
|
if (reBreak) broken = breakNow(paraTop);
|
|
14945
14941
|
};
|
|
@@ -16639,7 +16635,7 @@ var Engine = class {
|
|
|
16639
16635
|
autofit: shape.autofitHeight ? "resizeShape" : shape.shrinkText ? "shrinkText" : "none"
|
|
16640
16636
|
};
|
|
16641
16637
|
}
|
|
16642
|
-
if (shape.wrap && shape.wrap !== "none"
|
|
16638
|
+
if (shape.wrap && shape.wrap !== "none") {
|
|
16643
16639
|
const d = shape.dist ?? { t: 0, b: 0, l: 0, r: 0 };
|
|
16644
16640
|
const list = this.floats.get(page) ?? [];
|
|
16645
16641
|
list.push({
|
|
@@ -18669,7 +18665,8 @@ function distributePctColumns(grid, tableWidth, margins) {
|
|
|
18669
18665
|
}
|
|
18670
18666
|
function resolveGrid(tbl, available, overflowAllowed = false, cellMargins = 0, pctBoxAddsMargins = false) {
|
|
18671
18667
|
const fixedOverflow = overflowAllowed && tbl.props.layout === "fixed";
|
|
18672
|
-
const
|
|
18668
|
+
const pctOverflow = overflowAllowed && (tbl.props.widthPct ?? 0) > 1;
|
|
18669
|
+
const cap = fixedOverflow || pctOverflow ? Number.POSITIVE_INFINITY : available;
|
|
18673
18670
|
const pctBase = fixedOverflow && pctBoxAddsMargins ? available + cellMargins : available;
|
|
18674
18671
|
const target = Math.min(
|
|
18675
18672
|
cap,
|
|
@@ -45398,4 +45395,4 @@ export {
|
|
|
45398
45395
|
AgentDocument,
|
|
45399
45396
|
collaborativeAgentTarget
|
|
45400
45397
|
};
|
|
45401
|
-
//# sourceMappingURL=chunk-
|
|
45398
|
+
//# sourceMappingURL=chunk-ATE5QKBU.js.map
|