@graphty/graph-io 0.3.49 → 0.3.50
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/dist/chunks/{approximations-Bzn3L-je.js → approximations-BRXsll0T.js} +2 -2
- package/dist/chunks/{approximations-Bzn3L-je.js.map → approximations-BRXsll0T.js.map} +1 -1
- package/dist/chunks/{block-iptrlMBb.js → block-yl0f_qLO.js} +27 -2
- package/dist/chunks/block-yl0f_qLO.js.map +1 -0
- package/dist/chunks/{context-C3p0RQxR.js → context-DizmppHy.js} +2 -2
- package/dist/chunks/{context-C3p0RQxR.js.map → context-DizmppHy.js.map} +1 -1
- package/dist/chunks/{credentials-DXHx7nwR.js → credentials-CmvJXYeH.js} +58 -9
- package/dist/chunks/credentials-CmvJXYeH.js.map +1 -0
- package/dist/chunks/{descriptor-DLA5kINx.js → descriptor-Dhez_Cew.js} +5 -1
- package/dist/chunks/{descriptor-DLA5kINx.js.map → descriptor-Dhez_Cew.js.map} +1 -1
- package/dist/chunks/{emit-BwHQkZle.js → emit-7Jkpg0yd.js} +132 -4
- package/dist/chunks/emit-7Jkpg0yd.js.map +1 -0
- package/dist/chunks/{exporter-nDfxIK5D.js → exporter-1Ajud15J.js} +4 -4
- package/dist/chunks/{exporter-nDfxIK5D.js.map → exporter-1Ajud15J.js.map} +1 -1
- package/dist/chunks/{exporter-D9yMtocA.js → exporter-B6yvL3wy.js} +3 -3
- package/dist/chunks/{exporter-D9yMtocA.js.map → exporter-B6yvL3wy.js.map} +1 -1
- package/dist/chunks/{exporter-_jrBTnos.js → exporter-CA5q8ROP.js} +4 -4
- package/dist/chunks/{exporter-_jrBTnos.js.map → exporter-CA5q8ROP.js.map} +1 -1
- package/dist/chunks/{exporter-D2CETOMK.js → exporter-CQQZFJ2v.js} +72 -10
- package/dist/chunks/exporter-CQQZFJ2v.js.map +1 -0
- package/dist/chunks/{generic-ymWCETAJ.js → generic-Dc21MAdg.js} +3 -3
- package/dist/chunks/{generic-ymWCETAJ.js.map → generic-Dc21MAdg.js.map} +1 -1
- package/dist/chunks/{importer-CT9mJ1nn.js → importer-C6NVpCXp.js} +7 -6
- package/dist/chunks/importer-C6NVpCXp.js.map +1 -0
- package/dist/chunks/{importer-GREKMdIf.js → importer-CKFe4q54.js} +4 -4
- package/dist/chunks/{importer-GREKMdIf.js.map → importer-CKFe4q54.js.map} +1 -1
- package/dist/chunks/{importer-PqaaKKnY.js → importer-CKbUbsJA.js} +4 -4
- package/dist/chunks/{importer-PqaaKKnY.js.map → importer-CKbUbsJA.js.map} +1 -1
- package/dist/chunks/{importer-DaLTjbds.js → importer-ClCsdgTJ.js} +97 -7
- package/dist/chunks/importer-ClCsdgTJ.js.map +1 -0
- package/dist/chunks/{importer-B92x1xY5.js → importer-CyVZTrf0.js} +3 -3
- package/dist/chunks/{importer-B92x1xY5.js.map → importer-CyVZTrf0.js.map} +1 -1
- package/dist/chunks/{importer-vRq4h3j5.js → importer-DgG4v1Ms.js} +89 -20
- package/dist/chunks/importer-DgG4v1Ms.js.map +1 -0
- package/dist/chunks/{importer-Vn5QvmmJ.js → importer-asFUrIsj.js} +2 -2
- package/dist/chunks/{importer-Vn5QvmmJ.js.map → importer-asFUrIsj.js.map} +1 -1
- package/dist/chunks/{lexicon-Clf4QIyl.js → lexicon-IVRq2Uoo.js} +2 -2
- package/dist/chunks/{lexicon-Clf4QIyl.js.map → lexicon-IVRq2Uoo.js.map} +1 -1
- package/dist/chunks/{round-trip-Zm3_ivgq.js → round-trip-Cy3_SHRZ.js} +2 -2
- package/dist/chunks/{round-trip-Zm3_ivgq.js.map → round-trip-Cy3_SHRZ.js.map} +1 -1
- package/dist/chunks/{sigv4-EokFic1V.js → sigv4-BXwVbza3.js} +3 -3
- package/dist/chunks/{sigv4-EokFic1V.js.map → sigv4-BXwVbza3.js.map} +1 -1
- package/dist/chunks/{styles-CCs214_3.js → styles-CAVmBLgp.js} +4 -4
- package/dist/chunks/{styles-CCs214_3.js.map → styles-CAVmBLgp.js.map} +1 -1
- package/dist/chunks/{styles-DPQQIig4.js → styles-CPczw1Jz.js} +4 -4
- package/dist/chunks/{styles-DPQQIig4.js.map → styles-CPczw1Jz.js.map} +1 -1
- package/dist/chunks/{styles-Cm62yyQX.js → styles-boK6Ln54.js} +65 -30
- package/dist/chunks/styles-boK6Ln54.js.map +1 -0
- package/dist/chunks/{styles-yed-UMFdNqze.js → styles-yed-XeFBQ6VS.js} +8 -8
- package/dist/chunks/{styles-yed-UMFdNqze.js.map → styles-yed-XeFBQ6VS.js.map} +1 -1
- package/dist/cx.js +2 -2
- package/dist/cx2.js +2 -2
- package/dist/cys.js +1 -1
- package/dist/dot.js +7 -4
- package/dist/gexf.js +2 -2
- package/dist/gml.js +8 -8
- package/dist/gml.js.map +1 -1
- package/dist/graph-io.js +129 -104
- package/dist/graph-io.js.map +1 -1
- package/dist/graphml.js +2 -2
- package/dist/json.js +1 -1
- package/dist/pajek.js +1 -1
- package/dist/sources-cypher.js +25 -22
- package/dist/sources-cypher.js.map +1 -1
- package/dist/sources-ndex.js +2 -2
- package/dist/sources-rest.js +20 -4
- package/dist/sources-rest.js.map +1 -1
- package/dist/sources-sparql.js +40 -6
- package/dist/sources-sparql.js.map +1 -1
- package/dist/src/formats/dot/exporter.d.ts.map +1 -1
- package/dist/src/formats/dot/exporter.js +34 -2
- package/dist/src/formats/dot/exporter.js.map +1 -1
- package/dist/src/formats/dot/importer.d.ts +6 -1
- package/dist/src/formats/dot/importer.d.ts.map +1 -1
- package/dist/src/formats/dot/importer.js +65 -5
- package/dist/src/formats/dot/importer.js.map +1 -1
- package/dist/src/formats/dot/index.d.ts +3 -1
- package/dist/src/formats/dot/index.d.ts.map +1 -1
- package/dist/src/formats/dot/index.js +2 -1
- package/dist/src/formats/dot/index.js.map +1 -1
- package/dist/src/formats/dot/label-places.d.ts +7 -0
- package/dist/src/formats/dot/label-places.d.ts.map +1 -1
- package/dist/src/formats/dot/label-places.js +9 -3
- package/dist/src/formats/dot/label-places.js.map +1 -1
- package/dist/src/formats/dot/names.d.ts +13 -0
- package/dist/src/formats/dot/names.d.ts.map +1 -1
- package/dist/src/formats/dot/names.js +13 -0
- package/dist/src/formats/dot/names.js.map +1 -1
- package/dist/src/formats/dot/styles.d.ts +10 -0
- package/dist/src/formats/dot/styles.d.ts.map +1 -1
- package/dist/src/formats/dot/styles.js +49 -3
- package/dist/src/formats/dot/styles.js.map +1 -1
- package/dist/src/formats/gml/styles.js +1 -1
- package/dist/src/formats/gml/styles.js.map +1 -1
- package/dist/src/formats/graphml/styles-yed.js +3 -3
- package/dist/src/formats/graphml/styles-yed.js.map +1 -1
- package/dist/src/formats/graphml/styles-yfiles3.d.ts.map +1 -1
- package/dist/src/formats/graphml/styles-yfiles3.js +6 -4
- package/dist/src/formats/graphml/styles-yfiles3.js.map +1 -1
- package/dist/src/formats/json/styles.d.ts.map +1 -1
- package/dist/src/formats/json/styles.js +94 -6
- package/dist/src/formats/json/styles.js.map +1 -1
- package/dist/src/formats/pajek/draw.d.ts +8 -0
- package/dist/src/formats/pajek/draw.d.ts.map +1 -1
- package/dist/src/formats/pajek/draw.js +10 -0
- package/dist/src/formats/pajek/draw.js.map +1 -1
- package/dist/src/formats/pajek/styles.d.ts.map +1 -1
- package/dist/src/formats/pajek/styles.js +142 -25
- package/dist/src/formats/pajek/styles.js.map +1 -1
- package/dist/src/index.d.ts +3 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/sources/credentials.d.ts +50 -1
- package/dist/src/sources/credentials.d.ts.map +1 -1
- package/dist/src/sources/credentials.js +69 -0
- package/dist/src/sources/credentials.js.map +1 -1
- package/dist/src/sources/cypher/index.d.ts.map +1 -1
- package/dist/src/sources/cypher/index.js +12 -11
- package/dist/src/sources/cypher/index.js.map +1 -1
- package/dist/src/sources/cypher/query-builder.d.ts +6 -6
- package/dist/src/sources/cypher/query-builder.d.ts.map +1 -1
- package/dist/src/sources/cypher/query-builder.js +15 -15
- package/dist/src/sources/cypher/query-builder.js.map +1 -1
- package/dist/src/sources/rest/descriptor.d.ts.map +1 -1
- package/dist/src/sources/rest/descriptor.js +4 -0
- package/dist/src/sources/rest/descriptor.js.map +1 -1
- package/dist/src/sources/rest/openalex.d.ts +4 -2
- package/dist/src/sources/rest/openalex.d.ts.map +1 -1
- package/dist/src/sources/rest/openalex.js +4 -2
- package/dist/src/sources/rest/openalex.js.map +1 -1
- package/dist/src/sources/rest/source.d.ts.map +1 -1
- package/dist/src/sources/rest/source.js +23 -0
- package/dist/src/sources/rest/source.js.map +1 -1
- package/dist/src/sources/run.d.ts +2 -0
- package/dist/src/sources/run.d.ts.map +1 -1
- package/dist/src/sources/run.js +30 -3
- package/dist/src/sources/run.js.map +1 -1
- package/dist/src/sources/sparql/index.d.ts.map +1 -1
- package/dist/src/sources/sparql/index.js +14 -1
- package/dist/src/sources/sparql/index.js.map +1 -1
- package/dist/src/sources/sparql/query.d.ts +2 -1
- package/dist/src/sources/sparql/query.d.ts.map +1 -1
- package/dist/src/sources/sparql/query.js +55 -4
- package/dist/src/sources/sparql/query.js.map +1 -1
- package/dist/src/sources/types.d.ts +29 -0
- package/dist/src/sources/types.d.ts.map +1 -1
- package/dist/src/styles/canon/enums.d.ts.map +1 -1
- package/dist/src/styles/canon/enums.js +8 -0
- package/dist/src/styles/canon/enums.js.map +1 -1
- package/dist/src/styles/cyjs/cascade.d.ts.map +1 -1
- package/dist/src/styles/cyjs/cascade.js +124 -0
- package/dist/src/styles/cyjs/cascade.js.map +1 -1
- package/dist/src/styles/cyjs/defaults-table.d.ts.map +1 -1
- package/dist/src/styles/cyjs/defaults-table.js +1 -0
- package/dist/src/styles/cyjs/defaults-table.js.map +1 -1
- package/dist/src/styles/cyjs/emit.d.ts.map +1 -1
- package/dist/src/styles/cyjs/emit.js +30 -1
- package/dist/src/styles/cyjs/emit.js.map +1 -1
- package/dist/src/styles/cyjs/mappers.d.ts.map +1 -1
- package/dist/src/styles/cyjs/mappers.js +14 -0
- package/dist/src/styles/cyjs/mappers.js.map +1 -1
- package/dist/src/styles/types.d.ts +65 -0
- package/dist/src/styles/types.d.ts.map +1 -1
- package/dist/src/styles/vocabulary.d.ts.map +1 -1
- package/dist/src/styles/vocabulary.js +21 -0
- package/dist/src/styles/vocabulary.js.map +1 -1
- package/dist/styles.js +6 -6
- package/dist/xgmml.js +3 -3
- package/package.json +2 -2
- package/src/formats/dot/exporter.ts +37 -1
- package/src/formats/dot/importer.ts +75 -4
- package/src/formats/dot/index.ts +3 -1
- package/src/formats/dot/label-places.ts +16 -3
- package/src/formats/dot/names.ts +15 -0
- package/src/formats/dot/styles.ts +55 -3
- package/src/formats/gml/styles.ts +1 -1
- package/src/formats/graphml/styles-yed.ts +3 -3
- package/src/formats/graphml/styles-yfiles3.ts +6 -4
- package/src/formats/json/styles.ts +102 -6
- package/src/formats/pajek/draw.ts +11 -0
- package/src/formats/pajek/styles.ts +151 -26
- package/src/index.ts +7 -0
- package/src/sources/credentials.ts +90 -1
- package/src/sources/cypher/index.ts +12 -11
- package/src/sources/cypher/query-builder.ts +15 -15
- package/src/sources/rest/descriptor.ts +4 -0
- package/src/sources/rest/openalex.ts +4 -2
- package/src/sources/rest/source.ts +25 -0
- package/src/sources/run.ts +35 -3
- package/src/sources/sparql/index.ts +16 -1
- package/src/sources/sparql/query.ts +58 -4
- package/src/sources/types.ts +33 -0
- package/src/styles/canon/enums.ts +9 -0
- package/src/styles/cyjs/cascade.ts +143 -0
- package/src/styles/cyjs/defaults-table.ts +1 -0
- package/src/styles/cyjs/emit.ts +35 -1
- package/src/styles/cyjs/mappers.ts +14 -0
- package/src/styles/types.ts +65 -0
- package/src/styles/vocabulary.ts +21 -0
- package/dist/chunks/block-iptrlMBb.js.map +0 -1
- package/dist/chunks/credentials-DXHx7nwR.js.map +0 -1
- package/dist/chunks/emit-BwHQkZle.js.map +0 -1
- package/dist/chunks/exporter-D2CETOMK.js.map +0 -1
- package/dist/chunks/importer-CT9mJ1nn.js.map +0 -1
- package/dist/chunks/importer-DaLTjbds.js.map +0 -1
- package/dist/chunks/importer-vRq4h3j5.js.map +0 -1
- package/dist/chunks/styles-Cm62yyQX.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { f as isWritableDotText } from "./escape-CuCIzNMB.js";
|
|
2
2
|
import { i as inferTextDtype } from "./text-ystE2bYi.js";
|
|
3
|
-
import { f as flattenCubic,
|
|
4
|
-
import { o as styleFingerprint, b as STYLE_ISSUE, z as styleTag, A as writeStyleBlock, B as styleBlockLosses, r as resolveStyles, S as STYLE_BLOCK_NAME, C as canonicalFor, D as degreeValues, E as dataCell, y as toolDefaults, p as plainCell, i as num6, h as StyleNotes, n as noteAt, F as htmlLabelText, G as dotLabelText, H as DOT_POINTS_PER_INCH, M as MAX_STYLE_VALUE_LENGTH, c as canonNumber, a as canonEnum, d as canonColor, e as colorOpacity, I as recordLabelText, J as dotLabelAlign, K as htmlLabelSpans } from "./block-
|
|
5
|
-
import { S as StyleApproximations } from "./approximations-
|
|
6
|
-
import { t as takeFromBlock, e as elementValues } from "./round-trip-
|
|
3
|
+
import { f as flattenCubic, d as canonBends, c as canonNodeOffsets } from "./bends-BGXjv_U4.js";
|
|
4
|
+
import { o as styleFingerprint, b as STYLE_ISSUE, z as styleTag, A as writeStyleBlock, B as styleBlockLosses, r as resolveStyles, S as STYLE_BLOCK_NAME, C as canonicalFor, D as degreeValues, E as dataCell, y as toolDefaults, p as plainCell, i as num6, h as StyleNotes, n as noteAt, F as htmlLabelText, G as dotLabelText, H as DOT_POINTS_PER_INCH, M as MAX_STYLE_VALUE_LENGTH, c as canonNumber, a as canonEnum, d as canonColor, e as colorOpacity, I as recordLabelText, J as dotLabelAlign, K as htmlLabelSpans } from "./block-yl0f_qLO.js";
|
|
5
|
+
import { S as StyleApproximations } from "./approximations-BRXsll0T.js";
|
|
6
|
+
import { t as takeFromBlock, e as elementValues } from "./round-trip-Cy3_SHRZ.js";
|
|
7
7
|
import { p as plural, a as agree } from "./report-CwMfYa9J.js";
|
|
8
|
-
import { v as valueColumns } from "./styles-yed-
|
|
8
|
+
import { v as valueColumns } from "./styles-yed-XeFBQ6VS.js";
|
|
9
9
|
import { g as graphvizFont, G as GRAPHVIZ_GLYPH_SHAPES, a as GRAPHVIZ_POLYGON_SHAPES, b as isGraphvizBox, c as graphvizPolygonCorners, d as graphvizGlyph, e as GRAPHVIZ_DECORATED_BOXES, f as graphvizFontName } from "./choose-CczZJaX_.js";
|
|
10
10
|
const DOT_FORMAT = "dot";
|
|
11
11
|
const DOT_ORIGIN = Object.freeze({ format: DOT_FORMAT });
|
|
@@ -19,6 +19,8 @@ const POSITION_COLUMN = "graphty.position";
|
|
|
19
19
|
const KEY_ATTRIBUTE = "key";
|
|
20
20
|
const PIN_ATTRIBUTE = "pin";
|
|
21
21
|
const DOT_META_KEY = "dot";
|
|
22
|
+
const RANK_COLUMN = "graphty.rank";
|
|
23
|
+
const RANK_SET_COLUMN = "graphty.rankSet";
|
|
22
24
|
const STYLE_ROLES = /* @__PURE__ */ new Set(["color", "size", "shape", "thickness", "hidden"]);
|
|
23
25
|
const TARGETS = ["node", "edge"];
|
|
24
26
|
function prepareStyleExport(snapshot, exporter, given, plain) {
|
|
@@ -469,11 +471,16 @@ function readLabelPlaces(snapshot, cx, e, get, put) {
|
|
|
469
471
|
const s = snapshot.edgeSource(e);
|
|
470
472
|
const t = snapshot.edgeTarget(e);
|
|
471
473
|
const [source, target] = [cx.center(s), cx.center(t)];
|
|
472
|
-
|
|
474
|
+
const route = source === null || target === null ? null : edgeRoute(source, target, get("pos"));
|
|
475
|
+
const lp = (route?.start ?? null) === null ? null : point(get("lp"));
|
|
476
|
+
if (lp === null && cx.external && s !== t && (get("label") ?? get("xlabel")) !== null) {
|
|
477
|
+
put("labelPosition", "center");
|
|
478
|
+
put("labelShiftX", -0.5);
|
|
479
|
+
put("labelShiftY", -0.5);
|
|
480
|
+
}
|
|
481
|
+
if (route === null || source === null || target === null || s === t) {
|
|
473
482
|
return;
|
|
474
483
|
}
|
|
475
|
-
const route = edgeRoute(source, target, get("pos"));
|
|
476
|
-
const lp = route.start === null ? null : point(get("lp"));
|
|
477
484
|
if (lp !== null && get("label") !== null) {
|
|
478
485
|
const mid = routeMiddle(route.points);
|
|
479
486
|
put("labelOffsetX", num6(lp[0] - mid[0]));
|
|
@@ -927,6 +934,9 @@ const EDGE_ATTRIBUTES = [
|
|
|
927
934
|
"fillcolor",
|
|
928
935
|
"headlabel",
|
|
929
936
|
"taillabel",
|
|
937
|
+
"labelfontsize",
|
|
938
|
+
"labelfontcolor",
|
|
939
|
+
"labelfontname",
|
|
930
940
|
"xlabel"
|
|
931
941
|
];
|
|
932
942
|
const NOTED_ATTRIBUTES = ["peripheries", "xlabel"];
|
|
@@ -1789,6 +1799,23 @@ function readEdge(get, cx, put, at) {
|
|
|
1789
1799
|
if (get(LABEL_ATTRIBUTE) !== null && nonEmpty(get("xlabel")) !== null) {
|
|
1790
1800
|
noteAt(at("label"), STYLE_ISSUE.NOT_CARRIED, "xlabel");
|
|
1791
1801
|
}
|
|
1802
|
+
readEndLabelFace(get, scheme, put, at);
|
|
1803
|
+
}
|
|
1804
|
+
function readEndLabelFace(get, scheme, put, at) {
|
|
1805
|
+
const ends = ["target", "source"].filter(
|
|
1806
|
+
(end) => get(end === "target" ? "headlabel" : "taillabel") !== null
|
|
1807
|
+
);
|
|
1808
|
+
const size = get("labelfontsize");
|
|
1809
|
+
const font = get("labelfontname");
|
|
1810
|
+
for (const end of ends) {
|
|
1811
|
+
readColor(nonEmpty(get("labelfontcolor")), scheme, "text", `${end}LabelColor`, null, put, at);
|
|
1812
|
+
if (size !== null) {
|
|
1813
|
+
put(`${end}LabelSize`, canonNumber(size, at(`${end}LabelSize`)));
|
|
1814
|
+
}
|
|
1815
|
+
if (font !== null && font.length <= MAX_STYLE_VALUE_LENGTH) {
|
|
1816
|
+
put(`${end}LabelFont`, graphvizFont(font).family);
|
|
1817
|
+
}
|
|
1818
|
+
}
|
|
1792
1819
|
}
|
|
1793
1820
|
function readEdgeSegments(list, scheme, put, at) {
|
|
1794
1821
|
if (list === null || !list.includes(":") || !list.includes(";")) {
|
|
@@ -1817,7 +1844,8 @@ function labelPlaceContext(snapshot) {
|
|
|
1817
1844
|
const v = column?.isSet(i) === true ? column.value(i) : null;
|
|
1818
1845
|
return v === null ? null : [v[0], v[1]];
|
|
1819
1846
|
},
|
|
1820
|
-
node: (i, name) => nonEmpty(cellText(snapshot.nodes, name, i))
|
|
1847
|
+
node: (i, name) => nonEmpty(cellText(snapshot.nodes, name, i)),
|
|
1848
|
+
external: (cellText(snapshot.graph, "layout", 0)?.trim().toLowerCase() ?? "dot") !== "dot"
|
|
1821
1849
|
};
|
|
1822
1850
|
}
|
|
1823
1851
|
function splineBends(snapshot, e, pos) {
|
|
@@ -1833,6 +1861,9 @@ function splineBends(snapshot, e, pos) {
|
|
|
1833
1861
|
if (source === null || target === null) {
|
|
1834
1862
|
return null;
|
|
1835
1863
|
}
|
|
1864
|
+
return graphvizPosBends(source, target, pos);
|
|
1865
|
+
}
|
|
1866
|
+
function graphvizPosBends(source, target, pos) {
|
|
1836
1867
|
const tip = (spline, flag) => {
|
|
1837
1868
|
const token = (spline ?? "").trim().split(/\s+/).find((t) => t.startsWith(`${flag},`));
|
|
1838
1869
|
const [x, y] = (token ?? "").slice(2).split(",").map(Number);
|
|
@@ -1848,6 +1879,7 @@ function splineBends(snapshot, e, pos) {
|
|
|
1848
1879
|
);
|
|
1849
1880
|
return graphvizRouteBends(source, target, splines, tips);
|
|
1850
1881
|
}
|
|
1882
|
+
const GRAPHVIZ_STRAIGHT_POINTS = 1;
|
|
1851
1883
|
const GRAPHVIZ_LOOP_STEP = { x: 18, y: 9 };
|
|
1852
1884
|
function graphvizLoops(snapshot) {
|
|
1853
1885
|
const portless = (get) => nonEmpty(get("tailport")) === null && nonEmpty(get("headport")) === null && nonEmpty(get(POS_ATTRIBUTE)) === null;
|
|
@@ -1908,8 +1940,8 @@ function graphvizRouteBends(source, target, splines, tips) {
|
|
|
1908
1940
|
}
|
|
1909
1941
|
const [dx, dy] = [target[0] - source[0], target[1] - source[1]];
|
|
1910
1942
|
const length = Math.hypot(dx, dy);
|
|
1911
|
-
const off = Math.max(...points.map(([x, y]) => Math.abs((x - source[0]) * dy - (y - source[1]) * dx)));
|
|
1912
|
-
return
|
|
1943
|
+
const off = length > 0 ? Math.max(...points.map(([x, y]) => Math.abs((x - source[0]) * dy - (y - source[1]) * dx))) / length : 0;
|
|
1944
|
+
return off > Math.max(1e-3 * length, GRAPHVIZ_STRAIGHT_POINTS) ? canonBends(source, target, points, false) : null;
|
|
1913
1945
|
}
|
|
1914
1946
|
function readEdgeLine(get, tokens, put, at) {
|
|
1915
1947
|
const width = nonEmpty(get("penwidth")) ?? setLineWidth(tokens);
|
|
@@ -2786,27 +2818,30 @@ export {
|
|
|
2786
2818
|
KEY_ATTRIBUTE as K,
|
|
2787
2819
|
LABEL_ATTRIBUTE as L,
|
|
2788
2820
|
POS_ATTRIBUTE as P,
|
|
2821
|
+
RANK_COLUMN as R,
|
|
2789
2822
|
SOURCE_PORT_COLUMN as S,
|
|
2790
2823
|
TARGET_PORT_COLUMN as T,
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2824
|
+
RANK_SET_COLUMN as a,
|
|
2825
|
+
DOT_ATTRIBUTE_CLASH_CODE as b,
|
|
2826
|
+
DOT_FORMAT as c,
|
|
2794
2827
|
dotStyledExport as d,
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2828
|
+
DOT_META_KEY as e,
|
|
2829
|
+
PARENT_COLUMN as f,
|
|
2830
|
+
graphvizPosBends as g,
|
|
2831
|
+
dotStyles as h,
|
|
2799
2832
|
isHtmlString as i,
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2833
|
+
DOT_ORIGIN as j,
|
|
2834
|
+
PIN_ATTRIBUTE as k,
|
|
2835
|
+
POSITION_COLUMN as l,
|
|
2836
|
+
dataRead$1 as m,
|
|
2837
|
+
graphvizRouteBends as n,
|
|
2838
|
+
graphvizHasNoOutline as o,
|
|
2839
|
+
PERIPHERY_GAP as p,
|
|
2840
|
+
SHAPE_PERIPHERIES as q,
|
|
2841
|
+
graphvizOutline as r,
|
|
2842
|
+
putGlyph as s,
|
|
2843
|
+
graphvizArrowValue as t,
|
|
2844
|
+
prepareStyleExport as u,
|
|
2845
|
+
isKeptGraphtyProperty as v
|
|
2811
2846
|
};
|
|
2812
|
-
//# sourceMappingURL=styles-
|
|
2847
|
+
//# sourceMappingURL=styles-boK6Ln54.js.map
|