@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.
- package/LICENSE +201 -0
- package/README.md +21 -0
- package/dist/cjs/index.cjs +216594 -0
- package/dist/esm/index.mjs +216590 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/ldContexts.d.ts +15 -0
- package/docs/changelog.md +5 -0
- package/docs/examples.md +1 -0
- package/docs/reference/functions/addAllContextsToDocumentCache.md +9 -0
- package/docs/reference/functions/addContextToDocumentCache.md +17 -0
- package/docs/reference/index.md +10 -0
- package/docs/reference/variables/LD_CONTEXTS.md +9 -0
- package/locales/en.json +7 -0
- package/package.json +38 -0
|
@@ -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>;
|
package/docs/examples.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# @twin.org/standards-ld-contexts - Examples
|
|
@@ -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)
|
package/locales/en.json
ADDED
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
|
+
}
|