@graphty/graph-io 0.3.35 → 0.3.37
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-CkPnJCXU.js → exporter-2UNIxzcu.js} +3 -3
- package/dist/chunks/{exporter-CkPnJCXU.js.map → exporter-2UNIxzcu.js.map} +1 -1
- package/dist/chunks/{exporter-LZTIAzkS.js → exporter-B_YFZ4ix.js} +8 -8
- package/dist/chunks/exporter-B_YFZ4ix.js.map +1 -0
- package/dist/chunks/{exporter-CqnmKk-f.js → exporter-Bn4jdYfd.js} +5 -5
- package/dist/chunks/{exporter-CqnmKk-f.js.map → exporter-Bn4jdYfd.js.map} +1 -1
- package/dist/chunks/{exporter-DMxRy-0l.js → exporter-flsHFoER.js} +4 -4
- package/dist/chunks/{exporter-DMxRy-0l.js.map → exporter-flsHFoER.js.map} +1 -1
- package/dist/chunks/{importer-C1VMuEBQ.js → importer-BD3mi2QH.js} +10 -10
- package/dist/chunks/importer-BD3mi2QH.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-CSmH218L.js → importer-CEuUmyPe.js} +10 -10
- package/dist/chunks/importer-CEuUmyPe.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-BTSvNJUB.js → importer-Dwqepe_B.js} +3 -3
- package/dist/chunks/{importer-BTSvNJUB.js.map → importer-Dwqepe_B.js.map} +1 -1
- 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/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 +8 -8
- 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 +6 -6
- 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/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/importer.js +6 -6
- package/dist/src/formats/cx/importer.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/syntax.js +1 -1
- 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/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.js +3 -3
- package/dist/src/formats/neo4j/exporter.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.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/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/cx/importer.ts +6 -6
- 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 +1 -1
- 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/syntax.ts +1 -1
- 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/exporter.ts +1 -1
- package/src/formats/json/importer.ts +1 -1
- package/src/formats/neo4j/exporter.ts +3 -3
- package/src/formats/pajek/exporter.ts +4 -4
- package/src/formats/xgmml/document.ts +6 -6
- package/src/formats/xgmml/emit.ts +2 -2
- package/src/formats/xgmml/exporter.ts +1 -1
- 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-LZTIAzkS.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
package/dist/gml.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ak as SYNTAX_CODE, b as plural, a as checkCapabilities, L as LOSS, p as pairFolding, $ as agree, c as capabilities, r as resolveExportOptions, ac as DictHeuristic, aG as formatInteger, bv as formatGmlReal, aE as sanitizeIds, bD as countMixedEdges, e as explicitWeights, bU as DICT_SAMPLE_ROWS, R as ROLE_TAKEN_CODE$1, aj as WIDENED_CODE$1, P as PRECISION_CODE$1, n as DUPLICATE_NODE_CODE$1, s as MISSING_ENDPOINT_CODE$1, t as MISSING_ID_CODE$1, l as MULTIPLE_GRAPHS_CODE, N as NO_GRAPH_CODE$1, al as resolveImportOptions, a8 as ImportReportBuilder, an as reportUnusedOptions, bB as readText, am as throwIfAborted, ao as reportSinkOptions, ap as graphChosen, ar as IdCoercer, aq as DirectionResolver, a0 as uniqueColumnName, C as COLUMN_RENAMED_CODE, as as weightFromValue, bV as reportWeightPrecision, aK as parseWeightText, a1 as declareResolved, M as MIXED_DIRECTION_CODE, D as DIRECTION_FORCED_CODE, d as DIRECTION_REFUSED_CODE, S as SINK_OPTION_CODE, O as OPTION_IGNORED_CODE, I as ID_MERGED_CODE, ae as AMBIGUOUS_GRAPH_NAME_CODE, af as GRAPH_NOT_FOUND_CODE, w as UNKNOWN_ENCODING_CODE, x as ENCODING_FALLBACK_CODE, y as INVALID_ENCODING_CODE, z as INVALID_UTF8_CODE, F as ELEMENT_ISSUE, G as INPUT_ISSUE } from "./chunks/export-
|
|
1
|
+
import { ak as SYNTAX_CODE, b as plural, a as checkCapabilities, L as LOSS, p as pairFolding, $ as agree, c as capabilities, r as resolveExportOptions, ac as DictHeuristic, aG as formatInteger, bv as formatGmlReal, aE as sanitizeIds, bD as countMixedEdges, e as explicitWeights, bU as DICT_SAMPLE_ROWS, R as ROLE_TAKEN_CODE$1, aj as WIDENED_CODE$1, P as PRECISION_CODE$1, n as DUPLICATE_NODE_CODE$1, s as MISSING_ENDPOINT_CODE$1, t as MISSING_ID_CODE$1, l as MULTIPLE_GRAPHS_CODE, N as NO_GRAPH_CODE$1, al as resolveImportOptions, a8 as ImportReportBuilder, an as reportUnusedOptions, bB as readText, am as throwIfAborted, ao as reportSinkOptions, ap as graphChosen, ar as IdCoercer, aq as DirectionResolver, a0 as uniqueColumnName, C as COLUMN_RENAMED_CODE, as as weightFromValue, bV as reportWeightPrecision, aK as parseWeightText, a1 as declareResolved, M as MIXED_DIRECTION_CODE, D as DIRECTION_FORCED_CODE, d as DIRECTION_REFUSED_CODE, S as SINK_OPTION_CODE, O as OPTION_IGNORED_CODE, I as ID_MERGED_CODE, ae as AMBIGUOUS_GRAPH_NAME_CODE, af as GRAPH_NOT_FOUND_CODE, w as UNKNOWN_ENCODING_CODE, x as ENCODING_FALLBACK_CODE, y as INVALID_ENCODING_CODE, z as INVALID_UTF8_CODE, F as ELEMENT_ISSUE, G as INPUT_ISSUE } from "./chunks/export-CTUlibzr.js";
|
|
2
2
|
import { GraphFormatError, INVALID_INDEX } from "@graphty/graph-format";
|
|
3
|
-
import { k as decodeGmlString, m as quoteGmlString } from "./chunks/escape-
|
|
3
|
+
import { k as decodeGmlString, m as quoteGmlString } from "./chunks/escape-BRcyzD77.js";
|
|
4
4
|
import { j as joinText, e as encodeChunks } from "./chunks/writer-DxjgHwSe.js";
|
|
5
|
-
import { i as importChosenGraph } from "./chunks/choose-
|
|
5
|
+
import { i as importChosenGraph } from "./chunks/choose-CsO24U-5.js";
|
|
6
6
|
const TOKEN_WORD = 0;
|
|
7
7
|
const TOKEN_INT = 1;
|
|
8
8
|
const TOKEN_REAL = 2;
|
|
@@ -352,7 +352,7 @@ function parseRecord(tokens, open) {
|
|
|
352
352
|
}
|
|
353
353
|
function storeValue(frame, key, value) {
|
|
354
354
|
const { record } = frame;
|
|
355
|
-
if (frame.listKeys
|
|
355
|
+
if (frame.listKeys?.has(key)) {
|
|
356
356
|
record[key].push(value);
|
|
357
357
|
} else if (key in record) {
|
|
358
358
|
record[key] = [record[key], value];
|
|
@@ -1273,7 +1273,7 @@ function* gmlParts(context) {
|
|
|
1273
1273
|
w.line(" ", "id", formatInteger(ids.idAt(i)));
|
|
1274
1274
|
if (ids.isChanged(i)) {
|
|
1275
1275
|
w.line(" ", ORIGINAL_ID_KEY, originalIdText(ids.originalAt(i)));
|
|
1276
|
-
} else if (context.originalIds
|
|
1276
|
+
} else if (context.originalIds?.isSet(i)) {
|
|
1277
1277
|
const original = context.originalIds.value(i);
|
|
1278
1278
|
if (typeof original === "string" || typeof original === "number") {
|
|
1279
1279
|
w.line(" ", ORIGINAL_ID_KEY, originalIdText(original));
|
|
@@ -1298,7 +1298,7 @@ function* gmlParts(context) {
|
|
|
1298
1298
|
w.raw(" edge [");
|
|
1299
1299
|
w.line(" ", "source", formatInteger(ids.idAt(el.src[e])));
|
|
1300
1300
|
w.line(" ", "target", formatInteger(ids.idAt(el.dst[e])));
|
|
1301
|
-
if (context.edgeIds
|
|
1301
|
+
if (context.edgeIds?.isSet(e)) {
|
|
1302
1302
|
w.cell(" ", "id", context.edgeIds, e);
|
|
1303
1303
|
}
|
|
1304
1304
|
if (context.weights.isExplicit(e)) {
|
|
@@ -1319,8 +1319,8 @@ function* gmlParts(context) {
|
|
|
1319
1319
|
}
|
|
1320
1320
|
function writeGraphics(w, context, i) {
|
|
1321
1321
|
const { position, graphics } = context;
|
|
1322
|
-
const hasPosition = position
|
|
1323
|
-
const graphicsValue = graphics
|
|
1322
|
+
const hasPosition = position?.isSet(i) === true;
|
|
1323
|
+
const graphicsValue = graphics?.isSet(i) ? graphics.values[i] : void 0;
|
|
1324
1324
|
if (!hasPosition) {
|
|
1325
1325
|
if (graphics !== null && graphicsValue !== void 0) {
|
|
1326
1326
|
w.cell(" ", "graphics", graphics, i);
|