@twin.org/standards-ld-contexts 0.0.1-next.33

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.
@@ -0,0 +1 @@
1
+ export * from "./ldContexts";
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Map of all the ld contexts by their URL.
3
+ */
4
+ export declare const LD_CONTEXTS: {
5
+ [id: string]: unknown;
6
+ };
7
+ /**
8
+ * Add all the contexts to the document cache.
9
+ */
10
+ export declare function addAllContextsToDocumentCache(): Promise<void>;
11
+ /**
12
+ * Add a context to the document cache.
13
+ * @param url The URL of the context to add to the cache.
14
+ */
15
+ export declare function addContextToDocumentCache(url: string): Promise<void>;
@@ -0,0 +1,5 @@
1
+ # @twin.org/standards-ld-contexts - Changelog
2
+
3
+ ## v0.0.1-next.33
4
+
5
+ - Initial Release
@@ -0,0 +1 @@
1
+ # @twin.org/standards-ld-contexts - Examples
@@ -0,0 +1,9 @@
1
+ # Function: addAllContextsToDocumentCache()
2
+
3
+ > **addAllContextsToDocumentCache**(): `Promise`\<`void`\>
4
+
5
+ Add all the contexts to the document cache.
6
+
7
+ ## Returns
8
+
9
+ `Promise`\<`void`\>
@@ -0,0 +1,17 @@
1
+ # Function: addContextToDocumentCache()
2
+
3
+ > **addContextToDocumentCache**(`url`): `Promise`\<`void`\>
4
+
5
+ Add a context to the document cache.
6
+
7
+ ## Parameters
8
+
9
+ ### url
10
+
11
+ `string`
12
+
13
+ The URL of the context to add to the cache.
14
+
15
+ ## Returns
16
+
17
+ `Promise`\<`void`\>
@@ -0,0 +1,10 @@
1
+ # @twin.org/standards-ld-contexts
2
+
3
+ ## Variables
4
+
5
+ - [LD\_CONTEXTS](variables/LD_CONTEXTS.md)
6
+
7
+ ## Functions
8
+
9
+ - [addAllContextsToDocumentCache](functions/addAllContextsToDocumentCache.md)
10
+ - [addContextToDocumentCache](functions/addContextToDocumentCache.md)
@@ -0,0 +1,9 @@
1
+ # Variable: LD\_CONTEXTS
2
+
3
+ > `const` **LD\_CONTEXTS**: `object`
4
+
5
+ Map of all the ld contexts by their URL.
6
+
7
+ ## Index Signature
8
+
9
+ \[`id`: `string`\]: `unknown`
@@ -0,0 +1,7 @@
1
+ {
2
+ "error": {
3
+ "ldContext": {
4
+ "missing": "JSON-LD with url \"{url}\" not found"
5
+ }
6
+ }
7
+ }
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@twin.org/standards-ld-contexts",
3
+ "version": "0.0.1-next.33",
4
+ "description": "Local copies of standard LD contexts which can be used for offline development",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/twinfoundation/standards.git",
8
+ "directory": "packages/standards-ld-contexts"
9
+ },
10
+ "author": "cornel.filip@iota.org",
11
+ "license": "Apache-2.0",
12
+ "type": "module",
13
+ "engines": {
14
+ "node": ">=20.0.0"
15
+ },
16
+ "dependencies": {
17
+ "@twin.org/core": "next",
18
+ "@twin.org/data-json-ld": "next"
19
+ },
20
+ "main": "./dist/cjs/index.cjs",
21
+ "module": "./dist/esm/index.mjs",
22
+ "types": "./dist/types/index.d.ts",
23
+ "exports": {
24
+ ".": {
25
+ "types": "./dist/types/index.d.ts",
26
+ "require": "./dist/cjs/index.cjs",
27
+ "import": "./dist/esm/index.mjs"
28
+ },
29
+ "./locales/*.json": "./locales/*.json"
30
+ },
31
+ "files": [
32
+ "dist/cjs",
33
+ "dist/esm",
34
+ "dist/types",
35
+ "locales",
36
+ "docs"
37
+ ]
38
+ }