@opengeospatial/jsonld-ui-utils 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/LICENSE +201 -0
- package/README.md +221 -0
- package/dist/augment.d.ts +9 -0
- package/dist/constants.d.ts +9 -0
- package/dist/index.cjs.js +538 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.esm.js +508 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/jsonld-ui-utils.min.js +71 -0
- package/dist/jsonld-ui-utils.min.js.map +1 -0
- package/dist/jsonld.d.ts +8 -0
- package/dist/resource.d.ts +23 -0
- package/package.json +46 -0
package/dist/jsonld.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ContextDefinition } from 'jsonld';
|
|
2
|
+
type OrArray<T> = T | T[];
|
|
3
|
+
type Context = OrArray<null | string | ContextDefinition>;
|
|
4
|
+
type ContextObject = {
|
|
5
|
+
"@context": Context;
|
|
6
|
+
};
|
|
7
|
+
export declare function loadContext(context: Context | ContextObject): Promise<ContextDefinition>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as jsonldLib from 'jsonld';
|
|
2
|
+
export interface FetchResourceOptions {
|
|
3
|
+
labelPredicates: string[];
|
|
4
|
+
descriptionPredicates: string[];
|
|
5
|
+
fallbackRainbowInstance?: string;
|
|
6
|
+
fallbackRainbowInstances?: string | string[];
|
|
7
|
+
fallbackSparqlEndpoint?: string;
|
|
8
|
+
fallbackSparqlEndpoints?: string | string[];
|
|
9
|
+
}
|
|
10
|
+
export declare const defaultFetchResourceOptions: FetchResourceOptions;
|
|
11
|
+
export interface CreatePropertiesTableOptions {
|
|
12
|
+
propertiesField?: string | null;
|
|
13
|
+
}
|
|
14
|
+
export interface ResourceData {
|
|
15
|
+
uri: string;
|
|
16
|
+
label: string | null;
|
|
17
|
+
description?: string | null;
|
|
18
|
+
}
|
|
19
|
+
export declare function fetchResource(uri: string, options?: Partial<FetchResourceOptions>): Promise<ResourceData>;
|
|
20
|
+
export declare function loadFeature(url: string): Promise<{
|
|
21
|
+
feature: any;
|
|
22
|
+
context: jsonldLib.ContextDefinition;
|
|
23
|
+
}>;
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@opengeospatial/jsonld-ui-utils",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "dist/index.cjs.js",
|
|
6
|
+
"module": "dist/index.esm.js",
|
|
7
|
+
"browser": "dist/jsonld-ui-utils.min.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
"import": "./dist/index.esm.js",
|
|
10
|
+
"require": "./dist/index.cjs.js"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"jsonld": "^8.3.2",
|
|
14
|
+
"n3": "^1.23.1",
|
|
15
|
+
"rdfxml-streaming-parser": "^2.4.0"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@babel/core": "^7.28.5",
|
|
19
|
+
"@babel/preset-env": "^7.28.5",
|
|
20
|
+
"@rollup/plugin-babel": "^6.1.0",
|
|
21
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
22
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
23
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
24
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
25
|
+
"@types/jsonld": "^1.5.15",
|
|
26
|
+
"@types/n3": "^1.21.1",
|
|
27
|
+
"baseline-browser-mapping": "^2.10.10",
|
|
28
|
+
"core-js": "^3.46.0",
|
|
29
|
+
"rollup": "^4.53.2",
|
|
30
|
+
"rollup-plugin-polyfill-node": "^0.13.0",
|
|
31
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
32
|
+
"tslib": "^2.8.1",
|
|
33
|
+
"typescript": "^5.9.3",
|
|
34
|
+
"vite": "^7.2.2"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "rollup -c",
|
|
38
|
+
"dev": "vite --open",
|
|
39
|
+
"preview": "vite preview",
|
|
40
|
+
"prepare": "if [ \"$YARN_IGNORE_PREPARE\" != \"true\" ]; then rollup -c; fi"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {},
|
|
43
|
+
"files": [
|
|
44
|
+
"dist/"
|
|
45
|
+
]
|
|
46
|
+
}
|