@graphty/graph-io 0.3.36 → 0.3.38
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/{choose-494CpuXQ.js → choose-CsO24U-5.js} +2 -2
- package/dist/chunks/{choose-494CpuXQ.js.map → choose-CsO24U-5.js.map} +1 -1
- package/dist/chunks/{constants-BBK4rsQZ.js → constants-BPRiVyBu.js} +2 -2
- package/dist/chunks/{constants-BBK4rsQZ.js.map → constants-BPRiVyBu.js.map} +1 -1
- package/dist/chunks/{escape-wVIEtLv6.js → escape-BRcyzD77.js} +4 -4
- package/dist/chunks/{escape-wVIEtLv6.js.map → escape-BRcyzD77.js.map} +1 -1
- package/dist/chunks/{export-Cbt4h_0n.js → export-CTUlibzr.js} +4 -4
- package/dist/chunks/export-CTUlibzr.js.map +1 -0
- package/dist/chunks/{exporter-DMxRy-0l.js → exporter-Bf5tZA0X.js} +5 -5
- package/dist/chunks/exporter-Bf5tZA0X.js.map +1 -0
- package/dist/chunks/{exporter-CqnmKk-f.js → exporter-Bn4jdYfd.js} +5 -5
- package/dist/chunks/exporter-Bn4jdYfd.js.map +1 -0
- package/dist/chunks/{exporter-LZTIAzkS.js → exporter-D-qQuRcG.js} +9 -9
- package/dist/chunks/exporter-D-qQuRcG.js.map +1 -0
- package/dist/chunks/{exporter-CkPnJCXU.js → exporter-F0vT919P.js} +4 -4
- package/dist/chunks/exporter-F0vT919P.js.map +1 -0
- package/dist/chunks/{importer-DvPvd4Yy.js → importer-Bgb9sgZZ.js} +9 -9
- package/dist/chunks/importer-Bgb9sgZZ.js.map +1 -0
- package/dist/chunks/{importer-BTSvNJUB.js → importer-BuzbaFFY.js} +10 -4
- package/dist/chunks/importer-BuzbaFFY.js.map +1 -0
- package/dist/chunks/{importer-CSmH218L.js → importer-CEuUmyPe.js} +10 -10
- package/dist/chunks/importer-CEuUmyPe.js.map +1 -0
- package/dist/chunks/{importer-C1VMuEBQ.js → importer-CNMQnHDd.js} +11 -11
- package/dist/chunks/importer-CNMQnHDd.js.map +1 -0
- package/dist/chunks/{importer-DMgcD1wI.js → importer-DqMtyYLX.js} +11 -11
- package/dist/chunks/importer-DqMtyYLX.js.map +1 -0
- package/dist/chunks/{importer-BTbjwN10.js → importer-oIUx9u_g.js} +9 -9
- package/dist/chunks/importer-oIUx9u_g.js.map +1 -0
- package/dist/chunks/{importer-DtKPzhVp.js → importer-yWUPR_nU.js} +13 -13
- package/dist/chunks/importer-yWUPR_nU.js.map +1 -0
- package/dist/chunks/{json-elements-CxJF-Szz.js → json-elements-AkglPS3m.js} +4 -4
- package/dist/chunks/json-elements-AkglPS3m.js.map +1 -0
- package/dist/chunks/{ontology-export-p1PsPenq.js → ontology-export-DDoG3egY.js} +2 -2
- package/dist/chunks/{ontology-export-p1PsPenq.js.map → ontology-export-DDoG3egY.js.map} +1 -1
- package/dist/chunks/{records-BrfHycmg.js → records-ChmWZGuz.js} +2 -2
- package/dist/chunks/{records-BrfHycmg.js.map → records-ChmWZGuz.js.map} +1 -1
- package/dist/chunks/{text-BD-TzLNm.js → text-Btw3sBe_.js} +2 -2
- package/dist/chunks/{text-BD-TzLNm.js.map → text-Btw3sBe_.js.map} +1 -1
- package/dist/csv.js +4 -4
- package/dist/csv.js.map +1 -1
- package/dist/cx.js +1 -1
- package/dist/cx2.js +2 -2
- package/dist/cys.js +1 -1
- package/dist/dot.js +1 -1
- package/dist/gexf.js +30 -30
- package/dist/gexf.js.map +1 -1
- package/dist/gml.js +9 -9
- package/dist/gml.js.map +1 -1
- package/dist/graph-io.js +28 -28
- package/dist/graph-io.js.map +1 -1
- package/dist/graphml.js +2 -2
- package/dist/json.js +1 -1
- package/dist/neo4j.js +8 -8
- package/dist/neo4j.js.map +1 -1
- package/dist/obo.js +1 -1
- package/dist/pajek.js +1 -1
- package/dist/src/common/attributes.d.ts +1 -2
- package/dist/src/common/attributes.d.ts.map +1 -1
- package/dist/src/common/attributes.js +2 -2
- package/dist/src/common/attributes.js.map +1 -1
- package/dist/src/common/cx-export.d.ts +5 -2
- package/dist/src/common/cx-export.d.ts.map +1 -1
- package/dist/src/common/cx-export.js +11 -2
- package/dist/src/common/cx-export.js.map +1 -1
- package/dist/src/common/direction.d.ts +1 -2
- package/dist/src/common/direction.d.ts.map +1 -1
- package/dist/src/common/direction.js +2 -2
- package/dist/src/common/direction.js.map +1 -1
- package/dist/src/common/escape.js +1 -1
- package/dist/src/common/escape.js.map +1 -1
- package/dist/src/common/export.js +1 -1
- package/dist/src/common/export.js.map +1 -1
- package/dist/src/common/ids.d.ts +1 -2
- package/dist/src/common/ids.d.ts.map +1 -1
- package/dist/src/common/ids.js +1 -2
- package/dist/src/common/ids.js.map +1 -1
- package/dist/src/common/input.d.ts +1 -2
- package/dist/src/common/input.d.ts.map +1 -1
- package/dist/src/common/input.js +2 -2
- package/dist/src/common/input.js.map +1 -1
- package/dist/src/common/json-elements.js +1 -1
- package/dist/src/common/json-elements.js.map +1 -1
- package/dist/src/common/options.d.ts +1 -2
- package/dist/src/common/options.d.ts.map +1 -1
- package/dist/src/common/options.js +1 -1
- package/dist/src/common/options.js.map +1 -1
- package/dist/src/common/xml.js +1 -1
- package/dist/src/common/xml.js.map +1 -1
- package/dist/src/formats/cx/exporter.js +1 -1
- package/dist/src/formats/cx/exporter.js.map +1 -1
- package/dist/src/formats/cx/importer.js +6 -6
- package/dist/src/formats/cx/importer.js.map +1 -1
- package/dist/src/formats/cx2/exporter.js +1 -1
- package/dist/src/formats/cx2/exporter.js.map +1 -1
- package/dist/src/formats/cys/importer.js +3 -3
- package/dist/src/formats/cys/importer.js.map +1 -1
- package/dist/src/formats/cys/tables.js +1 -1
- package/dist/src/formats/cys/tables.js.map +1 -1
- package/dist/src/formats/dot/exporter.js +3 -3
- package/dist/src/formats/dot/exporter.js.map +1 -1
- package/dist/src/formats/dot/importer.js +1 -1
- package/dist/src/formats/dot/importer.js.map +1 -1
- package/dist/src/formats/gexf/exporter.d.ts.map +1 -1
- package/dist/src/formats/gexf/exporter.js +24 -27
- package/dist/src/formats/gexf/exporter.js.map +1 -1
- package/dist/src/formats/gexf/importer.d.ts +1 -2
- package/dist/src/formats/gexf/importer.d.ts.map +1 -1
- package/dist/src/formats/gexf/importer.js +5 -5
- package/dist/src/formats/gexf/importer.js.map +1 -1
- package/dist/src/formats/gml/exporter.js +4 -4
- package/dist/src/formats/gml/exporter.js.map +1 -1
- package/dist/src/formats/gml/importer.js.map +1 -1
- package/dist/src/formats/gml/syntax.js +2 -2
- package/dist/src/formats/gml/syntax.js.map +1 -1
- package/dist/src/formats/graphml/exporter.js +3 -3
- package/dist/src/formats/graphml/exporter.js.map +1 -1
- package/dist/src/formats/graphml/importer.js +2 -2
- package/dist/src/formats/graphml/importer.js.map +1 -1
- package/dist/src/formats/graphml/tree.js +2 -2
- package/dist/src/formats/graphml/tree.js.map +1 -1
- package/dist/src/formats/json/dialect.js +1 -1
- package/dist/src/formats/json/dialect.js.map +1 -1
- package/dist/src/formats/json/exporter.js +1 -1
- package/dist/src/formats/json/exporter.js.map +1 -1
- package/dist/src/formats/json/importer.js +1 -1
- package/dist/src/formats/json/importer.js.map +1 -1
- package/dist/src/formats/neo4j/exporter.d.ts.map +1 -1
- package/dist/src/formats/neo4j/exporter.js +4 -7
- package/dist/src/formats/neo4j/exporter.js.map +1 -1
- package/dist/src/formats/neo4j/header.js +2 -2
- package/dist/src/formats/neo4j/header.js.map +1 -1
- package/dist/src/formats/obo/syntax.js +1 -1
- package/dist/src/formats/obo/syntax.js.map +1 -1
- package/dist/src/formats/pajek/exporter.js +4 -4
- package/dist/src/formats/pajek/exporter.js.map +1 -1
- package/dist/src/formats/xgmml/document.js +6 -6
- package/dist/src/formats/xgmml/document.js.map +1 -1
- package/dist/src/formats/xgmml/emit.js +2 -2
- package/dist/src/formats/xgmml/emit.js.map +1 -1
- package/dist/src/formats/xgmml/exporter.d.ts.map +1 -1
- package/dist/src/formats/xgmml/exporter.js +1 -1
- package/dist/src/formats/xgmml/exporter.js.map +1 -1
- package/dist/src/formats/xgmml/importer.js +1 -1
- package/dist/src/formats/xgmml/importer.js.map +1 -1
- package/dist/src/registry.js +2 -2
- package/dist/src/registry.js.map +1 -1
- package/dist/src/sniff.js +1 -1
- package/dist/src/sniff.js.map +1 -1
- package/dist/xgmml.js +2 -2
- package/package.json +2 -2
- package/src/common/attributes.ts +1 -2
- package/src/common/cx-export.ts +11 -2
- package/src/common/direction.ts +2 -2
- package/src/common/escape.ts +1 -1
- package/src/common/export.ts +1 -1
- package/src/common/ids.ts +1 -3
- package/src/common/input.ts +2 -2
- package/src/common/json-elements.ts +1 -1
- package/src/common/options.ts +1 -1
- package/src/common/xml.ts +1 -1
- package/src/formats/csv/importer.ts +1 -1
- package/src/formats/cx/exporter.ts +1 -1
- package/src/formats/cx/importer.ts +6 -6
- package/src/formats/cx2/exporter.ts +1 -1
- package/src/formats/cys/importer.ts +3 -3
- package/src/formats/cys/tables.ts +1 -1
- package/src/formats/dot/exporter.ts +3 -3
- package/src/formats/dot/importer.ts +2 -2
- package/src/formats/gexf/exporter.ts +24 -28
- package/src/formats/gexf/importer.ts +5 -5
- package/src/formats/gml/exporter.ts +4 -4
- package/src/formats/gml/importer.ts +1 -1
- package/src/formats/gml/syntax.ts +2 -2
- package/src/formats/graphml/exporter.ts +3 -3
- package/src/formats/graphml/importer.ts +2 -2
- package/src/formats/graphml/tree.ts +2 -2
- package/src/formats/json/dialect.ts +1 -1
- package/src/formats/json/exporter.ts +1 -1
- package/src/formats/json/importer.ts +1 -1
- package/src/formats/neo4j/exporter.ts +4 -7
- package/src/formats/neo4j/header.ts +2 -2
- package/src/formats/obo/syntax.ts +1 -1
- package/src/formats/pajek/exporter.ts +4 -4
- package/src/formats/pajek/importer.ts +1 -1
- package/src/formats/xgmml/document.ts +6 -6
- package/src/formats/xgmml/emit.ts +2 -2
- package/src/formats/xgmml/exporter.ts +5 -2
- package/src/formats/xgmml/importer.ts +1 -1
- package/src/registry.ts +2 -2
- package/src/sniff.ts +1 -1
- package/dist/chunks/export-Cbt4h_0n.js.map +0 -1
- package/dist/chunks/exporter-CkPnJCXU.js.map +0 -1
- package/dist/chunks/exporter-CqnmKk-f.js.map +0 -1
- package/dist/chunks/exporter-DMxRy-0l.js.map +0 -1
- package/dist/chunks/exporter-LZTIAzkS.js.map +0 -1
- package/dist/chunks/importer-BTSvNJUB.js.map +0 -1
- package/dist/chunks/importer-BTbjwN10.js.map +0 -1
- package/dist/chunks/importer-C1VMuEBQ.js.map +0 -1
- package/dist/chunks/importer-CSmH218L.js.map +0 -1
- package/dist/chunks/importer-DMgcD1wI.js.map +0 -1
- package/dist/chunks/importer-DtKPzhVp.js.map +0 -1
- package/dist/chunks/importer-DvPvd4Yy.js.map +0 -1
- package/dist/chunks/json-elements-CxJF-Szz.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { GraphFormatError, INVALID_INDEX } from "@graphty/graph-format";
|
|
2
2
|
import { c as childrenCsr } from "./children-CL3Cy0ez.js";
|
|
3
|
-
import { s as stringify, f as aspectBlock, d as directionNotes, p as planNodeIds, b as planEdgeIds, O as ORIGINAL_ID_ATTRIBUTE, h as nextNodeId, i as noteList, g as declaredType, z as zAsOption } from "./importer-
|
|
4
|
-
import { c as capabilities, L as LOSS, r as resolveExportOptions, p as pairFolding, a as checkCapabilities, e as explicitWeights, b as plural, ad as TOO_LARGE_CODE, S as SINK_OPTION_CODE, O as OPTION_IGNORED_CODE, D as DIRECTION_FORCED_CODE, d as DIRECTION_REFUSED_CODE, R as ROLE_TAKEN_CODE, C as COLUMN_RENAMED_CODE, N as NO_GRAPH_CODE, ae as AMBIGUOUS_GRAPH_NAME_CODE, af as GRAPH_NOT_FOUND_CODE, l as MULTIPLE_GRAPHS_CODE, I as ID_MERGED_CODE, P as PRECISION_CODE, J as ID_TEXT_TYPE_CODE, a2 as JSON_NONSTANDARD_NUMBER_CODE, ag as SINGLE_OBJECT_ASPECT_CODE, W as MULTI_ASPECT_FRAGMENT_CODE, g as UNKNOWN_ELEMENT_CODE, m as DUPLICATE_EDGE_ID_CODE, n as DUPLICATE_NODE_CODE, s as MISSING_ENDPOINT_CODE, t as MISSING_ID_CODE, ah as STYLES_NOT_IMPORTED_CODE, ai as PARENT_CYCLE_CODE, q as UNKNOWN_PARENT_CODE, o as DUPLICATE_ATTRIBUTE_CODE, i as DANGLING_REFERENCE_CODE, U as UNKNOWN_ATTR_TYPE_CODE, aj as WIDENED_CODE, a3 as BAD_VALUE_CODE, j as COUNT_MISMATCH_CODE, Y as ASPECT_ORDER_CODE, V as BAD_ASPECT_BLOCK_CODE, _ as STATUS_WARNING_CODE, Z as STATUS_FAILED_CODE, w as UNKNOWN_ENCODING_CODE, x as ENCODING_FALLBACK_CODE, y as INVALID_ENCODING_CODE, z as INVALID_UTF8_CODE, ak as SYNTAX_CODE, E as EMPTY_INPUT_CODE, F as ELEMENT_ISSUE, G as INPUT_ISSUE, al as resolveImportOptions, a8 as ImportReportBuilder, a4 as textChunks, am as throwIfAborted, an as reportUnusedOptions, ao as reportSinkOptions, a7 as chooseGraph, ap as graphChosen, aq as DirectionResolver, ar as IdCoercer, $ as agree, a1 as declareResolved, a0 as uniqueColumnName, as as weightFromValue } from "./export-
|
|
5
|
-
import { i as isRecord, P as POSITION_COLUMN, h as headText, s as scanAspects, r as reportTooDeep, a as reportSharedBlock, C as CxStructure, J as JsonScanError, E as ExactInteger, c as cxId, p as plainJson, f as flipY, z as zDecl, b as positionDecl, d as declareFresh, e as inexactLiteral, k as keptPrecision } from "./json-elements-
|
|
3
|
+
import { s as stringify, f as aspectBlock, d as directionNotes, p as planNodeIds, b as planEdgeIds, O as ORIGINAL_ID_ATTRIBUTE, h as nextNodeId, i as noteList, g as declaredType, z as zAsOption } from "./importer-BuzbaFFY.js";
|
|
4
|
+
import { c as capabilities, L as LOSS, r as resolveExportOptions, p as pairFolding, a as checkCapabilities, e as explicitWeights, b as plural, ad as TOO_LARGE_CODE, S as SINK_OPTION_CODE, O as OPTION_IGNORED_CODE, D as DIRECTION_FORCED_CODE, d as DIRECTION_REFUSED_CODE, R as ROLE_TAKEN_CODE, C as COLUMN_RENAMED_CODE, N as NO_GRAPH_CODE, ae as AMBIGUOUS_GRAPH_NAME_CODE, af as GRAPH_NOT_FOUND_CODE, l as MULTIPLE_GRAPHS_CODE, I as ID_MERGED_CODE, P as PRECISION_CODE, J as ID_TEXT_TYPE_CODE, a2 as JSON_NONSTANDARD_NUMBER_CODE, ag as SINGLE_OBJECT_ASPECT_CODE, W as MULTI_ASPECT_FRAGMENT_CODE, g as UNKNOWN_ELEMENT_CODE, m as DUPLICATE_EDGE_ID_CODE, n as DUPLICATE_NODE_CODE, s as MISSING_ENDPOINT_CODE, t as MISSING_ID_CODE, ah as STYLES_NOT_IMPORTED_CODE, ai as PARENT_CYCLE_CODE, q as UNKNOWN_PARENT_CODE, o as DUPLICATE_ATTRIBUTE_CODE, i as DANGLING_REFERENCE_CODE, U as UNKNOWN_ATTR_TYPE_CODE, aj as WIDENED_CODE, a3 as BAD_VALUE_CODE, j as COUNT_MISMATCH_CODE, Y as ASPECT_ORDER_CODE, V as BAD_ASPECT_BLOCK_CODE, _ as STATUS_WARNING_CODE, Z as STATUS_FAILED_CODE, w as UNKNOWN_ENCODING_CODE, x as ENCODING_FALLBACK_CODE, y as INVALID_ENCODING_CODE, z as INVALID_UTF8_CODE, ak as SYNTAX_CODE, E as EMPTY_INPUT_CODE, F as ELEMENT_ISSUE, G as INPUT_ISSUE, al as resolveImportOptions, a8 as ImportReportBuilder, a4 as textChunks, am as throwIfAborted, an as reportUnusedOptions, ao as reportSinkOptions, a7 as chooseGraph, ap as graphChosen, aq as DirectionResolver, ar as IdCoercer, $ as agree, a1 as declareResolved, a0 as uniqueColumnName, as as weightFromValue } from "./export-CTUlibzr.js";
|
|
5
|
+
import { i as isRecord, P as POSITION_COLUMN, h as headText, s as scanAspects, r as reportTooDeep, a as reportSharedBlock, C as CxStructure, J as JsonScanError, E as ExactInteger, c as cxId, p as plainJson, f as flipY, z as zDecl, b as positionDecl, d as declareFresh, e as inexactLiteral, k as keptPrecision } from "./json-elements-AkglPS3m.js";
|
|
6
6
|
import { j as joinText, e as encodeChunks } from "./writer-DxjgHwSe.js";
|
|
7
7
|
const CX_FORMAT$1 = "cx";
|
|
8
8
|
const CX_LOSS = Object.freeze({
|
|
@@ -266,7 +266,7 @@ function plan(snapshot, common) {
|
|
|
266
266
|
if (planned instanceof GraphFormatError) {
|
|
267
267
|
fatal ??= planned;
|
|
268
268
|
}
|
|
269
|
-
const edgeIds = planEdgeIds(snapshot, note);
|
|
269
|
+
const edgeIds = planEdgeIds(snapshot, note, ids);
|
|
270
270
|
if (snapshot.nodes.has(ORIGINAL_ID_ATTRIBUTE)) {
|
|
271
271
|
note(
|
|
272
272
|
LOSS.ROLE_ASSUMED,
|
|
@@ -1156,8 +1156,8 @@ const ALSO_KEPT = /* @__PURE__ */ new Set([
|
|
|
1156
1156
|
]);
|
|
1157
1157
|
const TABLE_STYLE_ASPECTS = ["tableVisualProperties", "cyTableVisualProperties"];
|
|
1158
1158
|
const OWN_EXTRA_KEYS = ["groups", "subnetwork"];
|
|
1159
|
-
const CX_FIRST_KEYS = ["numberVerification", "metaData"];
|
|
1160
|
-
const CX_ASPECT_KEYS = [
|
|
1159
|
+
const CX_FIRST_KEYS = /* @__PURE__ */ new Set(["numberVerification", "metaData"]);
|
|
1160
|
+
const CX_ASPECT_KEYS = /* @__PURE__ */ new Set([
|
|
1161
1161
|
"nodes",
|
|
1162
1162
|
"edges",
|
|
1163
1163
|
"nodeAttributes",
|
|
@@ -1181,7 +1181,7 @@ const CX_ASPECT_KEYS = [
|
|
|
1181
1181
|
"citations",
|
|
1182
1182
|
"supports",
|
|
1183
1183
|
"functionTerms"
|
|
1184
|
-
];
|
|
1184
|
+
]);
|
|
1185
1185
|
const SCALARS = /* @__PURE__ */ new Map([
|
|
1186
1186
|
["string", "string"],
|
|
1187
1187
|
["boolean", "boolean"],
|
|
@@ -1410,7 +1410,7 @@ function checkNumberVerification(value, count, report, line) {
|
|
|
1410
1410
|
}
|
|
1411
1411
|
}
|
|
1412
1412
|
function isCxAspect(name) {
|
|
1413
|
-
return READ_ASPECTS.has(name) || OLD_ASPECT_NAMES.has(name) || CX_ASPECT_KEYS.
|
|
1413
|
+
return READ_ASPECTS.has(name) || OLD_ASPECT_NAMES.has(name) || CX_ASPECT_KEYS.has(name) || TABLE_STYLE_ASPECTS.includes(name);
|
|
1414
1414
|
}
|
|
1415
1415
|
const ID_KEYS = /* @__PURE__ */ new Map([
|
|
1416
1416
|
["nodes", ["@id"]],
|
|
@@ -3502,10 +3502,10 @@ const cxImporter = Object.freeze({
|
|
|
3502
3502
|
if (match === null) {
|
|
3503
3503
|
return 0;
|
|
3504
3504
|
}
|
|
3505
|
-
if (CX_FIRST_KEYS.
|
|
3505
|
+
if (CX_FIRST_KEYS.has(match[1])) {
|
|
3506
3506
|
return 0.95;
|
|
3507
3507
|
}
|
|
3508
|
-
return CX_ASPECT_KEYS.
|
|
3508
|
+
return CX_ASPECT_KEYS.has(match[1]) ? 0.7 : 0;
|
|
3509
3509
|
},
|
|
3510
3510
|
/**
|
|
3511
3511
|
* Read one graph of a CX document into the sink: the root network, or the subnetwork
|
|
@@ -3578,4 +3578,4 @@ export {
|
|
|
3578
3578
|
cxExporter as c,
|
|
3579
3579
|
cxImporter as d
|
|
3580
3580
|
};
|
|
3581
|
-
//# sourceMappingURL=importer-
|
|
3581
|
+
//# sourceMappingURL=importer-CNMQnHDd.js.map
|