@graphrs/io 0.1.0 → 0.2.0
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/chunk-6CTKVPMU.js +30 -0
- package/dist/chunk-6CTKVPMU.js.map +1 -0
- package/dist/chunk-LZ52KWLA.js +24 -0
- package/dist/chunk-LZ52KWLA.js.map +1 -0
- package/dist/chunk-QA2OLMV4.js +24 -0
- package/dist/chunk-QA2OLMV4.js.map +1 -0
- package/dist/chunk-VOEG3536.js +24 -0
- package/dist/chunk-VOEG3536.js.map +1 -0
- package/dist/chunk-VZ75LGCN.js +24 -0
- package/dist/chunk-VZ75LGCN.js.map +1 -0
- package/dist/chunk-YAMLPAUQ.js +24 -0
- package/dist/chunk-YAMLPAUQ.js.map +1 -0
- package/dist/dot.js +2 -1
- package/dist/edgelist.d.ts +2 -2
- package/dist/edgelist.js +2 -1
- package/dist/gml.js +2 -1
- package/dist/graphml.js +2 -1
- package/dist/index.js +6 -5
- package/dist/pajek.js +2 -1
- package/package.json +14 -48
- package/LICENSE +0 -21
- package/dist/chunk-DJ3UOKTC.js +0 -15
- package/dist/chunk-DJ3UOKTC.js.map +0 -1
- package/dist/chunk-HUFPU5AC.js +0 -15
- package/dist/chunk-HUFPU5AC.js.map +0 -1
- package/dist/chunk-KCRLLFXZ.js +0 -15
- package/dist/chunk-KCRLLFXZ.js.map +0 -1
- package/dist/chunk-ORTBVLDP.js +0 -15
- package/dist/chunk-ORTBVLDP.js.map +0 -1
- package/dist/chunk-SQNO7VKV.js +0 -15
- package/dist/chunk-SQNO7VKV.js.map +0 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { getWasm, Graph } from '@graphrs/core';
|
|
2
|
+
|
|
3
|
+
// src/utils.ts
|
|
4
|
+
async function toWasmGraph(graph) {
|
|
5
|
+
const { WasmGraph } = await getWasm();
|
|
6
|
+
const edges = graph._getEdgePairs();
|
|
7
|
+
const flat = new Uint32Array(edges.length * 2);
|
|
8
|
+
for (let i = 0; i < edges.length; i++) {
|
|
9
|
+
flat[i * 2] = edges[i][0];
|
|
10
|
+
flat[i * 2 + 1] = edges[i][1];
|
|
11
|
+
}
|
|
12
|
+
return WasmGraph.fromEdges(flat, graph.directed);
|
|
13
|
+
}
|
|
14
|
+
function wasmGraphToGraph(wg) {
|
|
15
|
+
const edgesFlat = wg.getEdges();
|
|
16
|
+
const pairs = [];
|
|
17
|
+
for (let i = 0; i < edgesFlat.length; i += 2) {
|
|
18
|
+
pairs.push([edgesFlat[i], edgesFlat[i + 1]]);
|
|
19
|
+
}
|
|
20
|
+
const g = Graph.fromEdges(pairs, { directed: wg.isDirected() });
|
|
21
|
+
const vcount = wg.vcount();
|
|
22
|
+
for (let i = 0; i < vcount; i++) {
|
|
23
|
+
if (!g.hasNode(i)) g.addNode(i);
|
|
24
|
+
}
|
|
25
|
+
return g;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { toWasmGraph, wasmGraphToGraph };
|
|
29
|
+
//# sourceMappingURL=chunk-6CTKVPMU.js.map
|
|
30
|
+
//# sourceMappingURL=chunk-6CTKVPMU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils.ts"],"names":[],"mappings":";;;AAGA,eAAsB,YAAY,KAAA,EAA8C;AAC9E,EAAA,MAAM,EAAE,SAAA,EAAU,GAAI,MAAM,OAAA,EAAQ;AACpC,EAAA,MAAM,KAAA,GAAQ,MAAM,aAAA,EAAc;AAClC,EAAA,MAAM,IAAA,GAAO,IAAI,WAAA,CAAY,KAAA,CAAM,SAAS,CAAC,CAAA;AAC7C,EAAA,KAAA,IAAS,CAAA,GAAI,CAAA,EAAG,CAAA,GAAI,KAAA,CAAM,QAAQ,CAAA,EAAA,EAAK;AACrC,IAAA,IAAA,CAAK,IAAI,CAAC,CAAA,GAAI,KAAA,CAAM,CAAC,EAAG,CAAC,CAAA;AACzB,IAAA,IAAA,CAAK,IAAI,CAAA,GAAI,CAAC,IAAI,KAAA,CAAM,CAAC,EAAG,CAAC,CAAA;AAAA,EAC/B;AACA,EAAA,OAAO,SAAA,CAAU,SAAA,CAAU,IAAA,EAAM,KAAA,CAAM,QAAQ,CAAA;AACjD;AAEO,SAAS,iBAAiB,EAAA,EAAkC;AACjE,EAAA,MAAM,SAAA,GAAY,GAAG,QAAA,EAAS;AAC9B,EAAA,MAAM,QAA4B,EAAC;AACnC,EAAA,KAAA,IAAS,IAAI,CAAA,EAAG,CAAA,GAAI,SAAA,CAAU,MAAA,EAAQ,KAAK,CAAA,EAAG;AAC5C,IAAA,KAAA,CAAM,IAAA,CAAK,CAAC,SAAA,CAAU,CAAC,GAAI,SAAA,CAAU,CAAA,GAAI,CAAC,CAAE,CAAC,CAAA;AAAA,EAC/C;AACA,EAAA,MAAM,CAAA,GAAI,MAAM,SAAA,CAAU,KAAA,EAAO,EAAE,QAAA,EAAU,EAAA,CAAG,UAAA,EAAW,EAAG,CAAA;AAC9D,EAAA,MAAM,MAAA,GAAS,GAAG,MAAA,EAAO;AACzB,EAAA,KAAA,IAAS,CAAA,GAAI,CAAA,EAAG,CAAA,GAAI,MAAA,EAAQ,CAAA,EAAA,EAAK;AAC/B,IAAA,IAAI,CAAC,CAAA,CAAE,OAAA,CAAQ,CAAC,CAAA,EAAG,CAAA,CAAE,QAAQ,CAAC,CAAA;AAAA,EAChC;AACA,EAAA,OAAO,CAAA;AACT","file":"chunk-6CTKVPMU.js","sourcesContent":["import type { Graph as GraphType, WasmGraphInstance } from '@graphrs/core';\nimport { getWasm, Graph } from '@graphrs/core';\n\nexport async function toWasmGraph(graph: GraphType): Promise<WasmGraphInstance> {\n const { WasmGraph } = await getWasm();\n const edges = graph._getEdgePairs();\n const flat = new Uint32Array(edges.length * 2);\n for (let i = 0; i < edges.length; i++) {\n flat[i * 2] = edges[i]![0];\n flat[i * 2 + 1] = edges[i]![1];\n }\n return WasmGraph.fromEdges(flat, graph.directed);\n}\n\nexport function wasmGraphToGraph(wg: WasmGraphInstance): GraphType {\n const edgesFlat = wg.getEdges();\n const pairs: [number, number][] = [];\n for (let i = 0; i < edgesFlat.length; i += 2) {\n pairs.push([edgesFlat[i]!, edgesFlat[i + 1]!]);\n }\n const g = Graph.fromEdges(pairs, { directed: wg.isDirected() });\n const vcount = wg.vcount();\n for (let i = 0; i < vcount; i++) {\n if (!g.hasNode(i)) g.addNode(i);\n }\n return g;\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { wasmGraphToGraph, toWasmGraph } from './chunk-6CTKVPMU.js';
|
|
2
|
+
import { getWasm } from '@graphrs/core';
|
|
3
|
+
|
|
4
|
+
async function readDOT(text) {
|
|
5
|
+
const { WasmGraph } = await getWasm();
|
|
6
|
+
const wg = WasmGraph.readDot(text);
|
|
7
|
+
try {
|
|
8
|
+
return wasmGraphToGraph(wg);
|
|
9
|
+
} finally {
|
|
10
|
+
wg.free();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
async function writeDOT(graph) {
|
|
14
|
+
const wg = await toWasmGraph(graph);
|
|
15
|
+
try {
|
|
16
|
+
return wg.writeDot();
|
|
17
|
+
} finally {
|
|
18
|
+
wg.free();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { readDOT, writeDOT };
|
|
23
|
+
//# sourceMappingURL=chunk-LZ52KWLA.js.map
|
|
24
|
+
//# sourceMappingURL=chunk-LZ52KWLA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/dot.ts"],"names":[],"mappings":";;;AAGA,eAAsB,QAAQ,IAAA,EAA8B;AAC1D,EAAA,MAAM,EAAE,SAAA,EAAU,GAAI,MAAM,OAAA,EAAQ;AACpC,EAAA,MAAM,EAAA,GAAK,SAAA,CAAU,OAAA,CAAQ,IAAI,CAAA;AACjC,EAAA,IAAI;AACF,IAAA,OAAO,iBAAiB,EAAE,CAAA;AAAA,EAC5B,CAAA,SAAE;AACA,IAAA,EAAA,CAAG,IAAA,EAAK;AAAA,EACV;AACF;AAEA,eAAsB,SAAS,KAAA,EAA+B;AAC5D,EAAA,MAAM,EAAA,GAAK,MAAM,WAAA,CAAY,KAAK,CAAA;AAClC,EAAA,IAAI;AACF,IAAA,OAAO,GAAG,QAAA,EAAS;AAAA,EACrB,CAAA,SAAE;AACA,IAAA,EAAA,CAAG,IAAA,EAAK;AAAA,EACV;AACF","file":"chunk-LZ52KWLA.js","sourcesContent":["import { getWasm, Graph } from '@graphrs/core';\nimport { toWasmGraph, wasmGraphToGraph } from './utils.js';\n\nexport async function readDOT(text: string): Promise<Graph> {\n const { WasmGraph } = await getWasm();\n const wg = WasmGraph.readDot(text);\n try {\n return wasmGraphToGraph(wg);\n } finally {\n wg.free();\n }\n}\n\nexport async function writeDOT(graph: Graph): Promise<string> {\n const wg = await toWasmGraph(graph);\n try {\n return wg.writeDot();\n } finally {\n wg.free();\n }\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { wasmGraphToGraph, toWasmGraph } from './chunk-6CTKVPMU.js';
|
|
2
|
+
import { getWasm } from '@graphrs/core';
|
|
3
|
+
|
|
4
|
+
async function readGraphML(xml) {
|
|
5
|
+
const { WasmGraph } = await getWasm();
|
|
6
|
+
const wg = WasmGraph.readGraphml(xml);
|
|
7
|
+
try {
|
|
8
|
+
return wasmGraphToGraph(wg);
|
|
9
|
+
} finally {
|
|
10
|
+
wg.free();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
async function writeGraphML(graph) {
|
|
14
|
+
const wg = await toWasmGraph(graph);
|
|
15
|
+
try {
|
|
16
|
+
return wg.writeGraphml();
|
|
17
|
+
} finally {
|
|
18
|
+
wg.free();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { readGraphML, writeGraphML };
|
|
23
|
+
//# sourceMappingURL=chunk-QA2OLMV4.js.map
|
|
24
|
+
//# sourceMappingURL=chunk-QA2OLMV4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/graphml.ts"],"names":[],"mappings":";;;AAGA,eAAsB,YAAY,GAAA,EAA6B;AAC7D,EAAA,MAAM,EAAE,SAAA,EAAU,GAAI,MAAM,OAAA,EAAQ;AACpC,EAAA,MAAM,EAAA,GAAK,SAAA,CAAU,WAAA,CAAY,GAAG,CAAA;AACpC,EAAA,IAAI;AACF,IAAA,OAAO,iBAAiB,EAAE,CAAA;AAAA,EAC5B,CAAA,SAAE;AACA,IAAA,EAAA,CAAG,IAAA,EAAK;AAAA,EACV;AACF;AAEA,eAAsB,aAAa,KAAA,EAA+B;AAChE,EAAA,MAAM,EAAA,GAAK,MAAM,WAAA,CAAY,KAAK,CAAA;AAClC,EAAA,IAAI;AACF,IAAA,OAAO,GAAG,YAAA,EAAa;AAAA,EACzB,CAAA,SAAE;AACA,IAAA,EAAA,CAAG,IAAA,EAAK;AAAA,EACV;AACF","file":"chunk-QA2OLMV4.js","sourcesContent":["import { getWasm, Graph } from '@graphrs/core';\nimport { toWasmGraph, wasmGraphToGraph } from './utils.js';\n\nexport async function readGraphML(xml: string): Promise<Graph> {\n const { WasmGraph } = await getWasm();\n const wg = WasmGraph.readGraphml(xml);\n try {\n return wasmGraphToGraph(wg);\n } finally {\n wg.free();\n }\n}\n\nexport async function writeGraphML(graph: Graph): Promise<string> {\n const wg = await toWasmGraph(graph);\n try {\n return wg.writeGraphml();\n } finally {\n wg.free();\n }\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { wasmGraphToGraph, toWasmGraph } from './chunk-6CTKVPMU.js';
|
|
2
|
+
import { getWasm } from '@graphrs/core';
|
|
3
|
+
|
|
4
|
+
async function readPajek(text) {
|
|
5
|
+
const { WasmGraph } = await getWasm();
|
|
6
|
+
const wg = WasmGraph.readPajek(text);
|
|
7
|
+
try {
|
|
8
|
+
return wasmGraphToGraph(wg);
|
|
9
|
+
} finally {
|
|
10
|
+
wg.free();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
async function writePajek(graph) {
|
|
14
|
+
const wg = await toWasmGraph(graph);
|
|
15
|
+
try {
|
|
16
|
+
return wg.writePajek();
|
|
17
|
+
} finally {
|
|
18
|
+
wg.free();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { readPajek, writePajek };
|
|
23
|
+
//# sourceMappingURL=chunk-VOEG3536.js.map
|
|
24
|
+
//# sourceMappingURL=chunk-VOEG3536.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/pajek.ts"],"names":[],"mappings":";;;AAGA,eAAsB,UAAU,IAAA,EAA8B;AAC5D,EAAA,MAAM,EAAE,SAAA,EAAU,GAAI,MAAM,OAAA,EAAQ;AACpC,EAAA,MAAM,EAAA,GAAK,SAAA,CAAU,SAAA,CAAU,IAAI,CAAA;AACnC,EAAA,IAAI;AACF,IAAA,OAAO,iBAAiB,EAAE,CAAA;AAAA,EAC5B,CAAA,SAAE;AACA,IAAA,EAAA,CAAG,IAAA,EAAK;AAAA,EACV;AACF;AAEA,eAAsB,WAAW,KAAA,EAA+B;AAC9D,EAAA,MAAM,EAAA,GAAK,MAAM,WAAA,CAAY,KAAK,CAAA;AAClC,EAAA,IAAI;AACF,IAAA,OAAO,GAAG,UAAA,EAAW;AAAA,EACvB,CAAA,SAAE;AACA,IAAA,EAAA,CAAG,IAAA,EAAK;AAAA,EACV;AACF","file":"chunk-VOEG3536.js","sourcesContent":["import { getWasm, Graph } from '@graphrs/core';\nimport { toWasmGraph, wasmGraphToGraph } from './utils.js';\n\nexport async function readPajek(text: string): Promise<Graph> {\n const { WasmGraph } = await getWasm();\n const wg = WasmGraph.readPajek(text);\n try {\n return wasmGraphToGraph(wg);\n } finally {\n wg.free();\n }\n}\n\nexport async function writePajek(graph: Graph): Promise<string> {\n const wg = await toWasmGraph(graph);\n try {\n return wg.writePajek();\n } finally {\n wg.free();\n }\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { wasmGraphToGraph, toWasmGraph } from './chunk-6CTKVPMU.js';
|
|
2
|
+
import { getWasm } from '@graphrs/core';
|
|
3
|
+
|
|
4
|
+
async function readEdgeList(text, _separator) {
|
|
5
|
+
const { WasmGraph } = await getWasm();
|
|
6
|
+
const wg = WasmGraph.readEdgelist(text);
|
|
7
|
+
try {
|
|
8
|
+
return wasmGraphToGraph(wg);
|
|
9
|
+
} finally {
|
|
10
|
+
wg.free();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
async function writeEdgeList(graph, _separator) {
|
|
14
|
+
const wg = await toWasmGraph(graph);
|
|
15
|
+
try {
|
|
16
|
+
return wg.writeEdgelist();
|
|
17
|
+
} finally {
|
|
18
|
+
wg.free();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { readEdgeList, writeEdgeList };
|
|
23
|
+
//# sourceMappingURL=chunk-VZ75LGCN.js.map
|
|
24
|
+
//# sourceMappingURL=chunk-VZ75LGCN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/edgelist.ts"],"names":[],"mappings":";;;AAGA,eAAsB,YAAA,CAAa,MAAc,UAAA,EAAqC;AACpF,EAAA,MAAM,EAAE,SAAA,EAAU,GAAI,MAAM,OAAA,EAAQ;AACpC,EAAA,MAAM,EAAA,GAAK,SAAA,CAAU,YAAA,CAAa,IAAI,CAAA;AACtC,EAAA,IAAI;AACF,IAAA,OAAO,iBAAiB,EAAE,CAAA;AAAA,EAC5B,CAAA,SAAE;AACA,IAAA,EAAA,CAAG,IAAA,EAAK;AAAA,EACV;AACF;AAEA,eAAsB,aAAA,CAAc,OAAc,UAAA,EAAsC;AACtF,EAAA,MAAM,EAAA,GAAK,MAAM,WAAA,CAAY,KAAK,CAAA;AAClC,EAAA,IAAI;AACF,IAAA,OAAO,GAAG,aAAA,EAAc;AAAA,EAC1B,CAAA,SAAE;AACA,IAAA,EAAA,CAAG,IAAA,EAAK;AAAA,EACV;AACF","file":"chunk-VZ75LGCN.js","sourcesContent":["import { getWasm, Graph } from '@graphrs/core';\nimport { toWasmGraph, wasmGraphToGraph } from './utils.js';\n\nexport async function readEdgeList(text: string, _separator?: string): Promise<Graph> {\n const { WasmGraph } = await getWasm();\n const wg = WasmGraph.readEdgelist(text);\n try {\n return wasmGraphToGraph(wg);\n } finally {\n wg.free();\n }\n}\n\nexport async function writeEdgeList(graph: Graph, _separator?: string): Promise<string> {\n const wg = await toWasmGraph(graph);\n try {\n return wg.writeEdgelist();\n } finally {\n wg.free();\n }\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { wasmGraphToGraph, toWasmGraph } from './chunk-6CTKVPMU.js';
|
|
2
|
+
import { getWasm } from '@graphrs/core';
|
|
3
|
+
|
|
4
|
+
async function readGML(text) {
|
|
5
|
+
const { WasmGraph } = await getWasm();
|
|
6
|
+
const wg = WasmGraph.readGml(text);
|
|
7
|
+
try {
|
|
8
|
+
return wasmGraphToGraph(wg);
|
|
9
|
+
} finally {
|
|
10
|
+
wg.free();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
async function writeGML(graph) {
|
|
14
|
+
const wg = await toWasmGraph(graph);
|
|
15
|
+
try {
|
|
16
|
+
return wg.writeGml();
|
|
17
|
+
} finally {
|
|
18
|
+
wg.free();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { readGML, writeGML };
|
|
23
|
+
//# sourceMappingURL=chunk-YAMLPAUQ.js.map
|
|
24
|
+
//# sourceMappingURL=chunk-YAMLPAUQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/gml.ts"],"names":[],"mappings":";;;AAGA,eAAsB,QAAQ,IAAA,EAA8B;AAC1D,EAAA,MAAM,EAAE,SAAA,EAAU,GAAI,MAAM,OAAA,EAAQ;AACpC,EAAA,MAAM,EAAA,GAAK,SAAA,CAAU,OAAA,CAAQ,IAAI,CAAA;AACjC,EAAA,IAAI;AACF,IAAA,OAAO,iBAAiB,EAAE,CAAA;AAAA,EAC5B,CAAA,SAAE;AACA,IAAA,EAAA,CAAG,IAAA,EAAK;AAAA,EACV;AACF;AAEA,eAAsB,SAAS,KAAA,EAA+B;AAC5D,EAAA,MAAM,EAAA,GAAK,MAAM,WAAA,CAAY,KAAK,CAAA;AAClC,EAAA,IAAI;AACF,IAAA,OAAO,GAAG,QAAA,EAAS;AAAA,EACrB,CAAA,SAAE;AACA,IAAA,EAAA,CAAG,IAAA,EAAK;AAAA,EACV;AACF","file":"chunk-YAMLPAUQ.js","sourcesContent":["import { getWasm, Graph } from '@graphrs/core';\nimport { toWasmGraph, wasmGraphToGraph } from './utils.js';\n\nexport async function readGML(text: string): Promise<Graph> {\n const { WasmGraph } = await getWasm();\n const wg = WasmGraph.readGml(text);\n try {\n return wasmGraphToGraph(wg);\n } finally {\n wg.free();\n }\n}\n\nexport async function writeGML(graph: Graph): Promise<string> {\n const wg = await toWasmGraph(graph);\n try {\n return wg.writeGml();\n } finally {\n wg.free();\n }\n}\n"]}
|
package/dist/dot.js
CHANGED
package/dist/edgelist.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Graph } from '@graphrs/core';
|
|
2
2
|
|
|
3
|
-
declare function readEdgeList(text: string,
|
|
4
|
-
declare function writeEdgeList(graph: Graph,
|
|
3
|
+
declare function readEdgeList(text: string, _separator?: string): Promise<Graph>;
|
|
4
|
+
declare function writeEdgeList(graph: Graph, _separator?: string): Promise<string>;
|
|
5
5
|
|
|
6
6
|
export { readEdgeList, writeEdgeList };
|
package/dist/edgelist.js
CHANGED
package/dist/gml.js
CHANGED
package/dist/graphml.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { readDOT, writeDOT } from './chunk-
|
|
2
|
-
export { readEdgeList, writeEdgeList } from './chunk-
|
|
3
|
-
export { readGML, writeGML } from './chunk-
|
|
4
|
-
export { readGraphML, writeGraphML } from './chunk-
|
|
5
|
-
export { readPajek, writePajek } from './chunk-
|
|
1
|
+
export { readDOT, writeDOT } from './chunk-LZ52KWLA.js';
|
|
2
|
+
export { readEdgeList, writeEdgeList } from './chunk-VZ75LGCN.js';
|
|
3
|
+
export { readGML, writeGML } from './chunk-YAMLPAUQ.js';
|
|
4
|
+
export { readGraphML, writeGraphML } from './chunk-QA2OLMV4.js';
|
|
5
|
+
export { readPajek, writePajek } from './chunk-VOEG3536.js';
|
|
6
|
+
import './chunk-6CTKVPMU.js';
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
package/dist/pajek.js
CHANGED
package/package.json
CHANGED
|
@@ -1,61 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphrs/io",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Graph I/O formats (GraphML, GML, DOT, edgelist, Pajek) for @graphrs",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"graph",
|
|
9
|
-
"graphml",
|
|
10
|
-
"gml",
|
|
11
|
-
"dot",
|
|
12
|
-
"import-export"
|
|
13
|
-
],
|
|
7
|
+
"keywords": ["graph", "graphml", "gml", "dot", "import-export"],
|
|
14
8
|
"author": "Totoro-jam <moqiuchen66@gmail.com>",
|
|
15
9
|
"homepage": "https://github.com/Totoro-jam/graphrs#readme",
|
|
16
|
-
"bugs": {
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
"repository": {
|
|
20
|
-
"type": "git",
|
|
21
|
-
"url": "https://github.com/Totoro-jam/graphrs",
|
|
22
|
-
"directory": "packages/io"
|
|
23
|
-
},
|
|
10
|
+
"bugs": { "url": "https://github.com/Totoro-jam/graphrs/issues" },
|
|
11
|
+
"repository": { "type": "git", "url": "https://github.com/Totoro-jam/graphrs", "directory": "packages/io" },
|
|
24
12
|
"sideEffects": false,
|
|
25
13
|
"exports": {
|
|
26
|
-
".": {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
"./
|
|
31
|
-
|
|
32
|
-
"import": "./dist/graphml.js"
|
|
33
|
-
},
|
|
34
|
-
"./gml": {
|
|
35
|
-
"types": "./dist/gml.d.ts",
|
|
36
|
-
"import": "./dist/gml.js"
|
|
37
|
-
},
|
|
38
|
-
"./dot": {
|
|
39
|
-
"types": "./dist/dot.d.ts",
|
|
40
|
-
"import": "./dist/dot.js"
|
|
41
|
-
},
|
|
42
|
-
"./edgelist": {
|
|
43
|
-
"types": "./dist/edgelist.d.ts",
|
|
44
|
-
"import": "./dist/edgelist.js"
|
|
45
|
-
},
|
|
46
|
-
"./pajek": {
|
|
47
|
-
"types": "./dist/pajek.d.ts",
|
|
48
|
-
"import": "./dist/pajek.js"
|
|
49
|
-
}
|
|
14
|
+
".": { "types": "./dist/index.d.ts", "import": "./dist/index.js" },
|
|
15
|
+
"./graphml": { "types": "./dist/graphml.d.ts", "import": "./dist/graphml.js" },
|
|
16
|
+
"./gml": { "types": "./dist/gml.d.ts", "import": "./dist/gml.js" },
|
|
17
|
+
"./dot": { "types": "./dist/dot.d.ts", "import": "./dist/dot.js" },
|
|
18
|
+
"./edgelist": { "types": "./dist/edgelist.d.ts", "import": "./dist/edgelist.js" },
|
|
19
|
+
"./pajek": { "types": "./dist/pajek.d.ts", "import": "./dist/pajek.js" }
|
|
50
20
|
},
|
|
51
21
|
"main": "./dist/index.js",
|
|
52
22
|
"types": "./dist/index.d.ts",
|
|
53
|
-
"files": [
|
|
54
|
-
"dist"
|
|
55
|
-
],
|
|
56
|
-
"peerDependencies": {
|
|
57
|
-
"@graphrs/core": "^0.1.0"
|
|
58
|
-
},
|
|
23
|
+
"files": ["dist"],
|
|
59
24
|
"scripts": {
|
|
60
25
|
"build": "tsup",
|
|
61
26
|
"test": "vitest run --passWithNoTests",
|
|
@@ -63,5 +28,6 @@
|
|
|
63
28
|
"lint": "tsc --noEmit",
|
|
64
29
|
"typecheck": "tsc --noEmit",
|
|
65
30
|
"clean": "rm -rf dist"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
31
|
+
},
|
|
32
|
+
"peerDependencies": { "@graphrs/core": "workspace:^" }
|
|
33
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024-present Totoro-jam
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/dist/chunk-DJ3UOKTC.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { getWasm } from '@graphrs/core';
|
|
2
|
-
|
|
3
|
-
// src/gml.ts
|
|
4
|
-
async function readGML(text) {
|
|
5
|
-
await getWasm();
|
|
6
|
-
throw new Error("Not yet implemented \u2014 WASM bindings pending");
|
|
7
|
-
}
|
|
8
|
-
async function writeGML(graph) {
|
|
9
|
-
await getWasm();
|
|
10
|
-
throw new Error("Not yet implemented \u2014 WASM bindings pending");
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { readGML, writeGML };
|
|
14
|
-
//# sourceMappingURL=chunk-DJ3UOKTC.js.map
|
|
15
|
-
//# sourceMappingURL=chunk-DJ3UOKTC.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/gml.ts"],"names":[],"mappings":";;;AAEA,eAAsB,QAAQ,IAAA,EAA8B;AAC1D,EAAc,MAAM,OAAA;AAGpB,EAAA,MAAM,IAAI,MAAM,kDAA6C,CAAA;AAC/D;AACA,eAAsB,SAAS,KAAA,EAA+B;AAC5D,EAAc,MAAM,OAAA;AAGpB,EAAA,MAAM,IAAI,MAAM,kDAA6C,CAAA;AAC/D","file":"chunk-DJ3UOKTC.js","sourcesContent":["import { getWasm, Graph } from '@graphrs/core';\n\nexport async function readGML(text: string): Promise<Graph> {\n const _wasm = await getWasm();\n void _wasm;\n void text;\n throw new Error('Not yet implemented — WASM bindings pending');\n}\nexport async function writeGML(graph: Graph): Promise<string> {\n const _wasm = await getWasm();\n void _wasm;\n void graph;\n throw new Error('Not yet implemented — WASM bindings pending');\n}\n"]}
|
package/dist/chunk-HUFPU5AC.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { getWasm } from '@graphrs/core';
|
|
2
|
-
|
|
3
|
-
// src/dot.ts
|
|
4
|
-
async function readDOT(text) {
|
|
5
|
-
await getWasm();
|
|
6
|
-
throw new Error("Not yet implemented \u2014 WASM bindings pending");
|
|
7
|
-
}
|
|
8
|
-
async function writeDOT(graph) {
|
|
9
|
-
await getWasm();
|
|
10
|
-
throw new Error("Not yet implemented \u2014 WASM bindings pending");
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { readDOT, writeDOT };
|
|
14
|
-
//# sourceMappingURL=chunk-HUFPU5AC.js.map
|
|
15
|
-
//# sourceMappingURL=chunk-HUFPU5AC.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/dot.ts"],"names":[],"mappings":";;;AAEA,eAAsB,QAAQ,IAAA,EAA8B;AAC1D,EAAc,MAAM,OAAA;AAGpB,EAAA,MAAM,IAAI,MAAM,kDAA6C,CAAA;AAC/D;AACA,eAAsB,SAAS,KAAA,EAA+B;AAC5D,EAAc,MAAM,OAAA;AAGpB,EAAA,MAAM,IAAI,MAAM,kDAA6C,CAAA;AAC/D","file":"chunk-HUFPU5AC.js","sourcesContent":["import { getWasm, Graph } from '@graphrs/core';\n\nexport async function readDOT(text: string): Promise<Graph> {\n const _wasm = await getWasm();\n void _wasm;\n void text;\n throw new Error('Not yet implemented — WASM bindings pending');\n}\nexport async function writeDOT(graph: Graph): Promise<string> {\n const _wasm = await getWasm();\n void _wasm;\n void graph;\n throw new Error('Not yet implemented — WASM bindings pending');\n}\n"]}
|
package/dist/chunk-KCRLLFXZ.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { getWasm } from '@graphrs/core';
|
|
2
|
-
|
|
3
|
-
// src/pajek.ts
|
|
4
|
-
async function readPajek(text) {
|
|
5
|
-
await getWasm();
|
|
6
|
-
throw new Error("Not yet implemented \u2014 WASM bindings pending");
|
|
7
|
-
}
|
|
8
|
-
async function writePajek(graph) {
|
|
9
|
-
await getWasm();
|
|
10
|
-
throw new Error("Not yet implemented \u2014 WASM bindings pending");
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { readPajek, writePajek };
|
|
14
|
-
//# sourceMappingURL=chunk-KCRLLFXZ.js.map
|
|
15
|
-
//# sourceMappingURL=chunk-KCRLLFXZ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/pajek.ts"],"names":[],"mappings":";;;AAEA,eAAsB,UAAU,IAAA,EAA8B;AAC5D,EAAc,MAAM,OAAA;AAGpB,EAAA,MAAM,IAAI,MAAM,kDAA6C,CAAA;AAC/D;AACA,eAAsB,WAAW,KAAA,EAA+B;AAC9D,EAAc,MAAM,OAAA;AAGpB,EAAA,MAAM,IAAI,MAAM,kDAA6C,CAAA;AAC/D","file":"chunk-KCRLLFXZ.js","sourcesContent":["import { getWasm, Graph } from '@graphrs/core';\n\nexport async function readPajek(text: string): Promise<Graph> {\n const _wasm = await getWasm();\n void _wasm;\n void text;\n throw new Error('Not yet implemented — WASM bindings pending');\n}\nexport async function writePajek(graph: Graph): Promise<string> {\n const _wasm = await getWasm();\n void _wasm;\n void graph;\n throw new Error('Not yet implemented — WASM bindings pending');\n}\n"]}
|
package/dist/chunk-ORTBVLDP.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { getWasm } from '@graphrs/core';
|
|
2
|
-
|
|
3
|
-
// src/graphml.ts
|
|
4
|
-
async function readGraphML(xml) {
|
|
5
|
-
await getWasm();
|
|
6
|
-
throw new Error("Not yet implemented \u2014 WASM bindings pending");
|
|
7
|
-
}
|
|
8
|
-
async function writeGraphML(graph) {
|
|
9
|
-
await getWasm();
|
|
10
|
-
throw new Error("Not yet implemented \u2014 WASM bindings pending");
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { readGraphML, writeGraphML };
|
|
14
|
-
//# sourceMappingURL=chunk-ORTBVLDP.js.map
|
|
15
|
-
//# sourceMappingURL=chunk-ORTBVLDP.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/graphml.ts"],"names":[],"mappings":";;;AAEA,eAAsB,YAAY,GAAA,EAA6B;AAC7D,EAAc,MAAM,OAAA;AAGpB,EAAA,MAAM,IAAI,MAAM,kDAA6C,CAAA;AAC/D;AACA,eAAsB,aAAa,KAAA,EAA+B;AAChE,EAAc,MAAM,OAAA;AAGpB,EAAA,MAAM,IAAI,MAAM,kDAA6C,CAAA;AAC/D","file":"chunk-ORTBVLDP.js","sourcesContent":["import { getWasm, Graph } from '@graphrs/core';\n\nexport async function readGraphML(xml: string): Promise<Graph> {\n const _wasm = await getWasm();\n void _wasm;\n void xml;\n throw new Error('Not yet implemented — WASM bindings pending');\n}\nexport async function writeGraphML(graph: Graph): Promise<string> {\n const _wasm = await getWasm();\n void _wasm;\n void graph;\n throw new Error('Not yet implemented — WASM bindings pending');\n}\n"]}
|
package/dist/chunk-SQNO7VKV.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { getWasm } from '@graphrs/core';
|
|
2
|
-
|
|
3
|
-
// src/edgelist.ts
|
|
4
|
-
async function readEdgeList(text, separator) {
|
|
5
|
-
await getWasm();
|
|
6
|
-
throw new Error("Not yet implemented \u2014 WASM bindings pending");
|
|
7
|
-
}
|
|
8
|
-
async function writeEdgeList(graph, separator) {
|
|
9
|
-
await getWasm();
|
|
10
|
-
throw new Error("Not yet implemented \u2014 WASM bindings pending");
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { readEdgeList, writeEdgeList };
|
|
14
|
-
//# sourceMappingURL=chunk-SQNO7VKV.js.map
|
|
15
|
-
//# sourceMappingURL=chunk-SQNO7VKV.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/edgelist.ts"],"names":[],"mappings":";;;AAEA,eAAsB,YAAA,CAAa,MAAc,SAAA,EAAoC;AACnF,EAAc,MAAM,OAAA;AAIpB,EAAA,MAAM,IAAI,MAAM,kDAA6C,CAAA;AAC/D;AACA,eAAsB,aAAA,CAAc,OAAc,SAAA,EAAqC;AACrF,EAAc,MAAM,OAAA;AAIpB,EAAA,MAAM,IAAI,MAAM,kDAA6C,CAAA;AAC/D","file":"chunk-SQNO7VKV.js","sourcesContent":["import { getWasm, Graph } from '@graphrs/core';\n\nexport async function readEdgeList(text: string, separator?: string): Promise<Graph> {\n const _wasm = await getWasm();\n void _wasm;\n void text;\n void separator;\n throw new Error('Not yet implemented — WASM bindings pending');\n}\nexport async function writeEdgeList(graph: Graph, separator?: string): Promise<string> {\n const _wasm = await getWasm();\n void _wasm;\n void graph;\n void separator;\n throw new Error('Not yet implemented — WASM bindings pending');\n}\n"]}
|