ldkit 0.0.3 → 0.0.4
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/package.json +10 -5
- package/types/_dnt.shims.d.ts +13 -0
- package/types/library/comunica/bundle.d.ts +2 -0
- package/types/library/comunica/mod.d.ts +3 -0
- package/types/library/context.d.ts +9 -0
- package/types/library/decoder.d.ts +6 -0
- package/types/library/encoder.d.ts +6 -0
- package/types/library/engine.d.ts +6 -0
- package/types/library/namespaces/dcterms.d.ts +104 -0
- package/types/library/namespaces/ldkit.d.ts +7 -0
- package/types/library/namespaces/mod.d.ts +7 -0
- package/types/library/namespaces/namespace.d.ts +15 -0
- package/types/library/namespaces/rdf.d.ts +28 -0
- package/types/library/namespaces/schema.d.ts +2697 -0
- package/types/library/namespaces/skos.d.ts +38 -0
- package/types/library/namespaces/xsd.d.ts +56 -0
- package/types/library/rdf.d.ts +14 -0
- package/types/library/resource/mod.d.ts +1 -0
- package/types/library/resource/query_builder.d.ts +22 -0
- package/types/library/resource/query_helper.d.ts +20 -0
- package/types/library/resource/resource.d.ts +24 -0
- package/types/library/resource/types.d.ts +5 -0
- package/types/library/rxjs.d.ts +2 -0
- package/types/library/schema/data_types.d.ts +39 -0
- package/types/library/schema/interface.d.ts +32 -0
- package/types/library/schema/mod.d.ts +3 -0
- package/types/library/schema/schema.d.ts +30 -0
- package/types/library/schema/utils.d.ts +3 -0
- package/types/library/sparql.d.ts +2 -0
- package/types/mod.d.ts +4 -0
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"module": "./esm/mod.js",
|
|
3
3
|
"main": "./script/mod.js",
|
|
4
|
+
"types": "./types/mod.d.ts",
|
|
4
5
|
"name": "ldkit",
|
|
5
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.4",
|
|
6
7
|
"description": "LDKit",
|
|
7
8
|
"license": "MIT",
|
|
8
9
|
"repository": {
|
|
@@ -15,19 +16,23 @@
|
|
|
15
16
|
"exports": {
|
|
16
17
|
".": {
|
|
17
18
|
"import": "./esm/mod.js",
|
|
18
|
-
"require": "./script/mod.js"
|
|
19
|
+
"require": "./script/mod.js",
|
|
20
|
+
"types": "./types/mod.d.ts"
|
|
19
21
|
},
|
|
20
22
|
"./namespaces": {
|
|
21
23
|
"import": "./esm/library/namespaces/mod.js",
|
|
22
|
-
"require": "./script/library/namespaces/mod.js"
|
|
24
|
+
"require": "./script/library/namespaces/mod.js",
|
|
25
|
+
"types": "./types/library/namespaces/mod.d.ts"
|
|
23
26
|
},
|
|
24
27
|
"./rdf": {
|
|
25
28
|
"import": "./esm/library/rdf.js",
|
|
26
|
-
"require": "./script/library/rdf.js"
|
|
29
|
+
"require": "./script/library/rdf.js",
|
|
30
|
+
"types": "./types/library/rdf.d.ts"
|
|
27
31
|
},
|
|
28
32
|
"./sparql": {
|
|
29
33
|
"import": "./esm/library/sparql.js",
|
|
30
|
-
"require": "./script/library/sparql.js"
|
|
34
|
+
"require": "./script/library/sparql.js",
|
|
35
|
+
"types": "./types/library/sparql.d.ts"
|
|
31
36
|
}
|
|
32
37
|
},
|
|
33
38
|
"dependencies": {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Deno } from "@deno/shim-deno";
|
|
2
|
+
export { Deno } from "@deno/shim-deno";
|
|
3
|
+
import { fetch, File, FormData, Headers, Request, Response } from "undici";
|
|
4
|
+
export { fetch, File, FormData, Headers, Request, Response, type BodyInit, type HeadersInit, type RequestInit, type ResponseInit } from "undici";
|
|
5
|
+
export declare const dntGlobalThis: Omit<typeof globalThis, "Deno" | "fetch" | "File" | "FormData" | "Headers" | "Request" | "Response"> & {
|
|
6
|
+
Deno: typeof Deno;
|
|
7
|
+
fetch: typeof fetch;
|
|
8
|
+
File: typeof File;
|
|
9
|
+
FormData: typeof FormData;
|
|
10
|
+
Headers: typeof Headers;
|
|
11
|
+
Request: typeof Request;
|
|
12
|
+
Response: typeof Response;
|
|
13
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { QueryStringContext } from "@comunica/types";
|
|
2
|
+
export declare type LibraryContext = Partial<{
|
|
3
|
+
graph: string;
|
|
4
|
+
language: string;
|
|
5
|
+
}>;
|
|
6
|
+
export declare type Context = LibraryContext & QueryStringContext;
|
|
7
|
+
export declare const createContext: (context: Context) => Context;
|
|
8
|
+
export declare const createDefaultContext: (context: Context) => void;
|
|
9
|
+
export declare const resolveContext: (context?: Context) => Context;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { LibraryContext } from "./context.js";
|
|
2
|
+
import { Graph } from "./rdf.js";
|
|
3
|
+
import type { Schema } from "./schema/mod.js";
|
|
4
|
+
declare type DecodedNode = Record<string, unknown>;
|
|
5
|
+
export declare const decode: (graph: Graph, schema: Schema, context: LibraryContext) => DecodedNode[];
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { LibraryContext } from "./context.js";
|
|
2
|
+
import { Quad } from "./rdf.js";
|
|
3
|
+
import type { Schema } from "./schema/mod.js";
|
|
4
|
+
declare type DecodedNode = Record<string, unknown>;
|
|
5
|
+
export declare const encode: (node: DecodedNode, schema: Schema, context: LibraryContext, variableInitCounter?: number) => Quad[];
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Context } from "./context.js";
|
|
2
|
+
import { type Bindings } from "./rdf.js";
|
|
3
|
+
export declare const booleanQuery: (query: string, context?: Context) => import("rxjs/internal/Observable").Observable<boolean>;
|
|
4
|
+
export declare const bindingsQuery: (query: string, context?: Context) => import("rxjs/internal/Observable").Observable<Bindings[]>;
|
|
5
|
+
export declare const quadsQuery: (query: string, context?: Context) => import("rxjs/internal/Observable").Observable<import("./rdf.js").Graph>;
|
|
6
|
+
export declare const updateQuery: (query: string, context?: Context) => import("rxjs/internal/Observable").Observable<void>;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
language: "dcterms:language";
|
|
3
|
+
subject: "dcterms:subject";
|
|
4
|
+
type: "dcterms:type";
|
|
5
|
+
Agent: "dcterms:Agent";
|
|
6
|
+
AgentClass: "dcterms:AgentClass";
|
|
7
|
+
BibliographicResource: "dcterms:BibliographicResource";
|
|
8
|
+
Box: "dcterms:Box";
|
|
9
|
+
DCMIType: "dcterms:DCMIType";
|
|
10
|
+
DDC: "dcterms:DDC";
|
|
11
|
+
FileFormat: "dcterms:FileFormat";
|
|
12
|
+
Frequency: "dcterms:Frequency";
|
|
13
|
+
IMT: "dcterms:IMT";
|
|
14
|
+
ISO3166: "dcterms:ISO3166";
|
|
15
|
+
"ISO639-2": "dcterms:ISO639-2";
|
|
16
|
+
"ISO639-3": "dcterms:ISO639-3";
|
|
17
|
+
Jurisdiction: "dcterms:Jurisdiction";
|
|
18
|
+
LCC: "dcterms:LCC";
|
|
19
|
+
LCSH: "dcterms:LCSH";
|
|
20
|
+
LicenseDocument: "dcterms:LicenseDocument";
|
|
21
|
+
LinguisticSystem: "dcterms:LinguisticSystem";
|
|
22
|
+
Location: "dcterms:Location";
|
|
23
|
+
LocationPeriodOrJurisdiction: "dcterms:LocationPeriodOrJurisdiction";
|
|
24
|
+
MESH: "dcterms:MESH";
|
|
25
|
+
MediaType: "dcterms:MediaType";
|
|
26
|
+
MediaTypeOrExtent: "dcterms:MediaTypeOrExtent";
|
|
27
|
+
MethodOfAccrual: "dcterms:MethodOfAccrual";
|
|
28
|
+
MethodOfInstruction: "dcterms:MethodOfInstruction";
|
|
29
|
+
NLM: "dcterms:NLM";
|
|
30
|
+
Period: "dcterms:Period";
|
|
31
|
+
PeriodOfTime: "dcterms:PeriodOfTime";
|
|
32
|
+
PhysicalMedium: "dcterms:PhysicalMedium";
|
|
33
|
+
PhysicalResource: "dcterms:PhysicalResource";
|
|
34
|
+
Point: "dcterms:Point";
|
|
35
|
+
Policy: "dcterms:Policy";
|
|
36
|
+
ProvenanceStatement: "dcterms:ProvenanceStatement";
|
|
37
|
+
RFC1766: "dcterms:RFC1766";
|
|
38
|
+
RFC3066: "dcterms:RFC3066";
|
|
39
|
+
RFC4646: "dcterms:RFC4646";
|
|
40
|
+
RFC5646: "dcterms:RFC5646";
|
|
41
|
+
RightsStatement: "dcterms:RightsStatement";
|
|
42
|
+
SizeOrDuration: "dcterms:SizeOrDuration";
|
|
43
|
+
Standard: "dcterms:Standard";
|
|
44
|
+
TGN: "dcterms:TGN";
|
|
45
|
+
UDC: "dcterms:UDC";
|
|
46
|
+
URI: "dcterms:URI";
|
|
47
|
+
W3CDTF: "dcterms:W3CDTF";
|
|
48
|
+
abstract: "dcterms:abstract";
|
|
49
|
+
accessRights: "dcterms:accessRights";
|
|
50
|
+
accrualMethod: "dcterms:accrualMethod";
|
|
51
|
+
accrualPeriodicity: "dcterms:accrualPeriodicity";
|
|
52
|
+
accrualPolicy: "dcterms:accrualPolicy";
|
|
53
|
+
alternative: "dcterms:alternative";
|
|
54
|
+
audience: "dcterms:audience";
|
|
55
|
+
available: "dcterms:available";
|
|
56
|
+
bibliographicCitation: "dcterms:bibliographicCitation";
|
|
57
|
+
conformsTo: "dcterms:conformsTo";
|
|
58
|
+
contributor: "dcterms:contributor";
|
|
59
|
+
coverage: "dcterms:coverage";
|
|
60
|
+
created: "dcterms:created";
|
|
61
|
+
creator: "dcterms:creator";
|
|
62
|
+
date: "dcterms:date";
|
|
63
|
+
dateAccepted: "dcterms:dateAccepted";
|
|
64
|
+
dateCopyrighted: "dcterms:dateCopyrighted";
|
|
65
|
+
dateSubmitted: "dcterms:dateSubmitted";
|
|
66
|
+
description: "dcterms:description";
|
|
67
|
+
educationLevel: "dcterms:educationLevel";
|
|
68
|
+
extent: "dcterms:extent";
|
|
69
|
+
format: "dcterms:format";
|
|
70
|
+
hasFormat: "dcterms:hasFormat";
|
|
71
|
+
hasPart: "dcterms:hasPart";
|
|
72
|
+
hasVersion: "dcterms:hasVersion";
|
|
73
|
+
identifier: "dcterms:identifier";
|
|
74
|
+
instructionalMethod: "dcterms:instructionalMethod";
|
|
75
|
+
isFormatOf: "dcterms:isFormatOf";
|
|
76
|
+
isPartOf: "dcterms:isPartOf";
|
|
77
|
+
isReferencedBy: "dcterms:isReferencedBy";
|
|
78
|
+
isReplacedBy: "dcterms:isReplacedBy";
|
|
79
|
+
isRequiredBy: "dcterms:isRequiredBy";
|
|
80
|
+
isVersionOf: "dcterms:isVersionOf";
|
|
81
|
+
issued: "dcterms:issued";
|
|
82
|
+
license: "dcterms:license";
|
|
83
|
+
mediator: "dcterms:mediator";
|
|
84
|
+
medium: "dcterms:medium";
|
|
85
|
+
modified: "dcterms:modified";
|
|
86
|
+
provenance: "dcterms:provenance";
|
|
87
|
+
publisher: "dcterms:publisher";
|
|
88
|
+
references: "dcterms:references";
|
|
89
|
+
relation: "dcterms:relation";
|
|
90
|
+
replaces: "dcterms:replaces";
|
|
91
|
+
requires: "dcterms:requires";
|
|
92
|
+
rights: "dcterms:rights";
|
|
93
|
+
rightsHolder: "dcterms:rightsHolder";
|
|
94
|
+
source: "dcterms:source";
|
|
95
|
+
spatial: "dcterms:spatial";
|
|
96
|
+
tableOfContents: "dcterms:tableOfContents";
|
|
97
|
+
temporal: "dcterms:temporal";
|
|
98
|
+
title: "dcterms:title";
|
|
99
|
+
valid: "dcterms:valid";
|
|
100
|
+
} & {
|
|
101
|
+
$prefix: "dcterms:";
|
|
102
|
+
$iri: "http://purl.org/dc/terms/";
|
|
103
|
+
};
|
|
104
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as rdf } from "./rdf.js";
|
|
2
|
+
export { default as dcterms } from "./dcterms.js";
|
|
3
|
+
export { default as ldkit } from "./ldkit.js";
|
|
4
|
+
export { default as schema } from "./schema.js";
|
|
5
|
+
export { default as skos } from "./skos.js";
|
|
6
|
+
export { default as xsd } from "./xsd.js";
|
|
7
|
+
export { createNamespace } from "./namespace.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare type NamespacePrototype = {
|
|
2
|
+
iri: string;
|
|
3
|
+
prefix: string;
|
|
4
|
+
terms: readonly string[];
|
|
5
|
+
};
|
|
6
|
+
declare type NamespacePrefix<Namespace extends NamespacePrototype> = Namespace["prefix"];
|
|
7
|
+
declare type NamespaceIri<Namespace extends NamespacePrototype> = Namespace["iri"];
|
|
8
|
+
declare type NamespaceObject<Namespace extends NamespacePrototype> = {
|
|
9
|
+
[Term in Namespace["terms"][number]]: `${NamespacePrefix<Namespace>}${Term}`;
|
|
10
|
+
};
|
|
11
|
+
export declare const createNamespace: <N extends NamespacePrototype, I = NamespaceIri<N>, P = NamespacePrefix<N>, O = NamespaceObject<N>>(namespaceSpec: N) => O & {
|
|
12
|
+
$prefix: P;
|
|
13
|
+
$iri: I;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
object: "rdf:object";
|
|
3
|
+
Alt: "rdf:Alt";
|
|
4
|
+
Bag: "rdf:Bag";
|
|
5
|
+
CompoundLiteral: "rdf:CompoundLiteral";
|
|
6
|
+
HTML: "rdf:HTML";
|
|
7
|
+
JSON: "rdf:JSON";
|
|
8
|
+
List: "rdf:List";
|
|
9
|
+
PlainLiteral: "rdf:PlainLiteral";
|
|
10
|
+
Property: "rdf:Property";
|
|
11
|
+
Seq: "rdf:Seq";
|
|
12
|
+
Statement: "rdf:Statement";
|
|
13
|
+
XMLLiteral: "rdf:XMLLiteral";
|
|
14
|
+
direction: "rdf:direction";
|
|
15
|
+
first: "rdf:first";
|
|
16
|
+
langString: "rdf:langString";
|
|
17
|
+
language: "rdf:language";
|
|
18
|
+
nil: "rdf:nil";
|
|
19
|
+
predicate: "rdf:predicate";
|
|
20
|
+
rest: "rdf:rest";
|
|
21
|
+
subject: "rdf:subject";
|
|
22
|
+
type: "rdf:type";
|
|
23
|
+
value: "rdf:value";
|
|
24
|
+
} & {
|
|
25
|
+
$prefix: "rdf:";
|
|
26
|
+
$iri: "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
|
|
27
|
+
};
|
|
28
|
+
export default _default;
|