@faubulous/mentor-rdf 2.2.1 → 2.3.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.
@@ -69,6 +69,9 @@ export declare class Store implements rdfjs.DatasetCore<rdfjs.Quad> {
69
69
  /**
70
70
  * Loads a set of W3C Standard ontologies into the store (RDF, RDFA, RDFS, OWL, SKOS, SHACL, XSD)
71
71
  * and the SPARQL Syntax Vocabulary.
72
+ * @deprecated The ontology sources embedded in this package will be removed in the next major
73
+ * release. Import the published Turtle files instead (e.g. `@faubulous/mentor-rdf/ontologies/rdfs.ttl`)
74
+ * and load them with {@link loadTurtle}.
72
75
  */
73
76
  loadFrameworkOntologies(executeInference?: boolean): Promise<void>;
74
77
  /**
@@ -1,14 +1,19 @@
1
1
  import * as rdfjs from "@rdfjs/types";
2
- import * as rdflib from "rdflib";
2
+ import type * as rdflib from "rdflib";
3
3
  /**
4
4
  * Converts an rdflib term to an RDFJS term.
5
5
  * @param term The rdflib term to convert.
6
6
  * @returns The corresponding RDFJS term.
7
7
  */
8
8
  export declare const toRdfjsTerm: (term: rdflib.Node) => rdfjs.Term;
9
+ /**
10
+ * The rdflib module. It is loaded on demand, so its functions are passed in.
11
+ */
12
+ export type Rdflib = typeof rdflib;
9
13
  /**
10
14
  * Converts an RDFJS term to an rdflib term adding compareTerm methods required by rdflib serializers.
11
15
  * @param term The RDFJS term to convert.
16
+ * @param rdflib The rdflib module.
12
17
  * @returns The corresponding rdflib term.
13
18
  */
14
- export declare const toRdflibTerm: (term: rdfjs.Term) => rdflib.Literal | rdflib.NamedNode | rdflib.BlankNode;
19
+ export declare const toRdflibTerm: (term: rdfjs.Term, rdflib: Rdflib) => rdflib.Literal | rdflib.NamedNode | rdflib.BlankNode;
package/package.json CHANGED
@@ -10,18 +10,23 @@
10
10
  "ontology",
11
11
  "vocabulary"
12
12
  ],
13
- "version": "2.2.1",
13
+ "version": "2.3.0",
14
14
  "private": false,
15
15
  "author": {
16
16
  "name": "Sebastian Faubel"
17
17
  },
18
18
  "main": "dist/index.js",
19
19
  "types": "dist/index.d.ts",
20
- "exports": [
21
- "./dist/index.js"
22
- ],
20
+ "exports": {
21
+ ".": {
22
+ "types": "./dist/index.d.ts",
23
+ "default": "./dist/index.js"
24
+ },
25
+ "./ontologies/*.ttl": "./src/ontologies/*.ttl"
26
+ },
23
27
  "files": [
24
- "./dist"
28
+ "./dist",
29
+ "./src/ontologies/*.ttl"
25
30
  ],
26
31
  "engines": {
27
32
  "node": ">=22"