rete-graph 0.2.0 → 0.3.1
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/README.md +21 -1
- package/dist/index.js +1027 -23
- package/dist/rete-graph.js +1028 -24
- package/dist/rete-graph.min.js +61 -10
- package/dist/rete_wasm_bg.wasm +0 -0
- package/index.d.ts +17 -3
- package/package.json +2 -2
package/dist/rete_wasm_bg.wasm
CHANGED
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -40,6 +40,15 @@ export class Graph {
|
|
|
40
40
|
relations: [s: string, p: string, o: string, count: number][];
|
|
41
41
|
};
|
|
42
42
|
info(): { quads: number; terms: number; pyramidLevels: number; namedGraphs: number };
|
|
43
|
+
/** The embedded Dataset Card, or null when the file carries none. */
|
|
44
|
+
card(): Record<string, unknown> | null;
|
|
45
|
+
/** Example SPARQL queries from the card; `sparql` plus optional rich fields. */
|
|
46
|
+
examples(): { sparql: string; title?: string; question?: string }[];
|
|
47
|
+
/** Validate SHACL Core shapes (Turtle); lazy over remote graphs. */
|
|
48
|
+
shacl(
|
|
49
|
+
shapesTurtle: string,
|
|
50
|
+
opts?: { graph?: string | null; format?: "json" | "text" },
|
|
51
|
+
): unknown;
|
|
43
52
|
readonly quads: number;
|
|
44
53
|
graphNames(): string[];
|
|
45
54
|
/** Remote graphs only: cumulative fetch counters; null for bytes graphs. */
|
|
@@ -49,15 +58,20 @@ export class Graph {
|
|
|
49
58
|
}
|
|
50
59
|
|
|
51
60
|
/**
|
|
52
|
-
* Open a `.rete` graph: bytes,
|
|
53
|
-
*
|
|
54
|
-
*
|
|
61
|
+
* Open a `.rete` graph: bytes, an http(s) URL read lazily over HTTP Range, or
|
|
62
|
+
* (Node only) a `file://` URL read lazily off disk — same byte-range path, so
|
|
63
|
+
* a huge local file is queryable without loading it. Lazy opens use
|
|
64
|
+
* synchronous XHR: Node and browser web workers only (browser main threads
|
|
65
|
+
* forbid sync binary XHR — open bytes there).
|
|
55
66
|
*/
|
|
56
67
|
export function open(
|
|
57
68
|
source: Uint8Array | ArrayBuffer | string,
|
|
58
69
|
opts?: { headers?: Record<string, string> },
|
|
59
70
|
): Promise<Graph>;
|
|
60
71
|
|
|
72
|
+
/** The raw wasm engine — escape hatch for exports this wrapper doesn't wrap. */
|
|
73
|
+
export const wasm: Record<string, (...args: never[]) => unknown>;
|
|
74
|
+
|
|
61
75
|
/** Build a complete `.rete` file image from RDF text ("nt", "nq", "ttl"). */
|
|
62
76
|
export function build(text: string, format?: "nt" | "nq" | "ttl"): Promise<Uint8Array>;
|
|
63
77
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rete-graph",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Query local and remote .rete graph files with SPARQL — WebAssembly client for browsers and Node.",
|
|
3
|
+
"version": "0.3.1",
|
|
4
|
+
"description": "Query local and remote .rete graph files with SPARQL — WebAssembly client for browsers and Node, with lazy byte-range reads over HTTP and local files.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|