@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,4 +1,4 @@
|
|
|
1
|
-
import { b as STYLE_ISSUE } from "./block-
|
|
1
|
+
import { b as STYLE_ISSUE } from "./block-yl0f_qLO.js";
|
|
2
2
|
class StyleApproximations {
|
|
3
3
|
#seen = /* @__PURE__ */ new Map();
|
|
4
4
|
/**
|
|
@@ -37,4 +37,4 @@ class StyleApproximations {
|
|
|
37
37
|
export {
|
|
38
38
|
StyleApproximations as S
|
|
39
39
|
};
|
|
40
|
-
//# sourceMappingURL=approximations-
|
|
40
|
+
//# sourceMappingURL=approximations-BRXsll0T.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approximations-
|
|
1
|
+
{"version":3,"file":"approximations-BRXsll0T.js","sources":["../../src/styles/io/approximations.ts"],"sourcesContent":["/**\n * Counting the values a style writer writes as the nearest value its format holds, for the W_STYLE_APPROXIMATED\n * notes every writer reports.\n */\n\nimport type { LossNote } from \"../../types.js\";\nimport { STYLE_ISSUE } from \"../codes.js\";\nimport type { StyleTarget } from \"../types.js\";\n\n/** Counts the values written as the nearest value a format holds, per target and property. */\nexport class StyleApproximations {\n readonly #seen = new Map<string, { count: number; samples: Set<string> }>();\n\n /**\n * Records one value written approximately.\n * @param target - nodes or edges\n * @param property - the property\n * @param value - the exact value\n */\n add(target: StyleTarget, property: string, value: unknown): void {\n const key = `${target}.${property}`;\n const a = this.#seen.get(key) ?? { count: 0, samples: new Set<string>() };\n a.count++;\n if (a.samples.size < 8) {\n a.samples.add(String(value));\n }\n this.#seen.set(key, a);\n }\n\n /**\n * The W_STYLE_APPROXIMATED notes, one per target and property.\n * @param holder - what holds the values, for the message (\"Graphviz\", \"the d3 dialect of JSON\")\n * @returns the notes\n */\n notes(holder: string): LossNote[] {\n return Array.from(this.#seen, ([key, a]) => {\n const [target, property] = key.split(\".\") as [StyleTarget, string];\n return Object.freeze({\n code: STYLE_ISSUE.APPROXIMATED,\n message: `${target} ${property} is written as the nearest value ${holder} has for ${String(a.count)} ${target}${a.count === 1 ? \"\" : \"s\"} (${[...a.samples].join(\", \")}); the graphty.styles block keeps the exact value`,\n column: null,\n count: a.count,\n style: Object.freeze({ target, property: property as never }),\n });\n });\n }\n}\n"],"names":[],"mappings":";AAUO,MAAM,oBAAoB;AAAA,EACpB,4BAAY,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQrB,IAAI,QAAqB,UAAkB,OAAsB;AAC7D,UAAM,MAAM,GAAG,MAAM,IAAI,QAAQ;AACjC,UAAM,IAAI,KAAK,MAAM,IAAI,GAAG,KAAK,EAAE,OAAO,GAAG,SAAS,oBAAI,IAAA,EAAY;AACtE,MAAE;AACF,QAAI,EAAE,QAAQ,OAAO,GAAG;AACpB,QAAE,QAAQ,IAAI,OAAO,KAAK,CAAC;AAAA,IAC/B;AACA,SAAK,MAAM,IAAI,KAAK,CAAC;AAAA,EACzB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,QAA4B;AAC9B,WAAO,MAAM,KAAK,KAAK,OAAO,CAAC,CAAC,KAAK,CAAC,MAAM;AACxC,YAAM,CAAC,QAAQ,QAAQ,IAAI,IAAI,MAAM,GAAG;AACxC,aAAO,OAAO,OAAO;AAAA,QACjB,MAAM,YAAY;AAAA,QAClB,SAAS,GAAG,MAAM,IAAI,QAAQ,oCAAoC,MAAM,YAAY,OAAO,EAAE,KAAK,CAAC,IAAI,MAAM,GAAG,EAAE,UAAU,IAAI,KAAK,GAAG,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;AAAA,QACtK,QAAQ;AAAA,QACR,OAAO,EAAE;AAAA,QACT,OAAO,OAAO,OAAO,EAAE,QAAQ,UAA6B;AAAA,MAAA,CAC/D;AAAA,IACL,CAAC;AAAA,EACL;AACJ;"}
|
|
@@ -508,10 +508,14 @@ const CYJS$1 = {
|
|
|
508
508
|
const GRAPHVIZ = {
|
|
509
509
|
arrow: { "other:curve": ["curve"], "other:inv-curve": ["icurve"] }
|
|
510
510
|
};
|
|
511
|
+
const YED = {
|
|
512
|
+
arrow: { vee: ["standard"] }
|
|
513
|
+
};
|
|
511
514
|
const OVERRIDES = /* @__PURE__ */ new Map([
|
|
512
515
|
["vis", VIS$1],
|
|
513
516
|
["graphviz", GRAPHVIZ],
|
|
514
|
-
["cytoscape-js", CYJS$1]
|
|
517
|
+
["cytoscape-js", CYJS$1],
|
|
518
|
+
["yed", YED]
|
|
515
519
|
]);
|
|
516
520
|
const OPEN = /* @__PURE__ */ new Set(["shape", "borderStyle", "lineStyle", "arrow"]);
|
|
517
521
|
function lookup(aliases) {
|
|
@@ -896,6 +900,14 @@ const STYLE_PROPERTIES = Object.freeze({
|
|
|
896
900
|
["chartLineWidth", "number"],
|
|
897
901
|
["chartBorderColor", "color"],
|
|
898
902
|
["chartBorderWidth", "number"],
|
|
903
|
+
["groupPadding", "number"],
|
|
904
|
+
["groupPaddingRatio", "number"],
|
|
905
|
+
["groupPaddingOf", "text"],
|
|
906
|
+
["groupMinWidth", "number"],
|
|
907
|
+
["groupMinHeight", "number"],
|
|
908
|
+
["groupMinWidthBiasLeft", "number"],
|
|
909
|
+
["groupMinHeightBiasTop", "number"],
|
|
910
|
+
["groupIncludeLabels", "boolean"],
|
|
899
911
|
["visible", "boolean"]
|
|
900
912
|
]),
|
|
901
913
|
edge: /* @__PURE__ */ new Map([
|
|
@@ -955,7 +967,14 @@ const STYLE_PROPERTIES = Object.freeze({
|
|
|
955
967
|
["fanned", "boolean"],
|
|
956
968
|
["bendCurve", "text"],
|
|
957
969
|
["arcRadius", "number"],
|
|
970
|
+
["supportModel", "text"],
|
|
971
|
+
["supportSpringLength", "number"],
|
|
972
|
+
["supportSpringConstant", "number"],
|
|
973
|
+
["supportRepulsion", "number"],
|
|
974
|
+
["supportCentralGravity", "number"],
|
|
958
975
|
["nodeGap", "number"],
|
|
976
|
+
["sourceNodeGap", "number"],
|
|
977
|
+
["targetNodeGap", "number"],
|
|
959
978
|
["sourcePort", "text"],
|
|
960
979
|
["targetPort", "text"],
|
|
961
980
|
["label", "text"],
|
|
@@ -998,6 +1017,12 @@ const STYLE_PROPERTIES = Object.freeze({
|
|
|
998
1017
|
["targetLabelOffsetY", "signed"],
|
|
999
1018
|
["sourceLabelRotation", "number"],
|
|
1000
1019
|
["targetLabelRotation", "number"],
|
|
1020
|
+
["sourceLabelSize", "number"],
|
|
1021
|
+
["targetLabelSize", "number"],
|
|
1022
|
+
["sourceLabelColor", "color"],
|
|
1023
|
+
["targetLabelColor", "color"],
|
|
1024
|
+
["sourceLabelFont", "text"],
|
|
1025
|
+
["targetLabelFont", "text"],
|
|
1001
1026
|
["labelMinScreenSize", "number"],
|
|
1002
1027
|
["labelOnTop", "boolean"],
|
|
1003
1028
|
["visible", "boolean"]
|
|
@@ -3593,4 +3618,4 @@ export {
|
|
|
3593
3618
|
toolDefaults as y,
|
|
3594
3619
|
styleTag as z
|
|
3595
3620
|
};
|
|
3596
|
-
//# sourceMappingURL=block-
|
|
3621
|
+
//# sourceMappingURL=block-yl0f_qLO.js.map
|