glossarist 0.4.2 → 0.4.3
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/data/concept-model/README.md +44 -0
- package/data/concept-model/shapes/glossarist.shacl.ttl +704 -0
- package/package.json +23 -3
- package/src/concept-collection.js +57 -0
- package/src/index.js +15 -0
- package/src/models/concept.js +6 -0
- package/src/models/dataset-color.js +79 -0
- package/src/models/designation.js +54 -0
- package/src/models/index.d.ts +121 -4
- package/src/models/index.js +13 -0
- package/src/models/register.js +99 -1
- package/src/models/relation-categories.js +151 -0
- package/src/models/relation-colors.js +78 -0
- package/src/rdf/deterministic-id.js +17 -0
- package/src/rdf/document-writer.js +87 -0
- package/src/rdf/gloss-concept.js +43 -0
- package/src/rdf/gloss-designation.js +72 -0
- package/src/rdf/gloss-detailed-definition.js +69 -0
- package/src/rdf/gloss-localized-concept.js +72 -0
- package/src/rdf/gloss-source.js +51 -0
- package/src/rdf/index.d.ts +107 -0
- package/src/rdf/index.js +27 -0
- package/src/rdf/normalize-enum.js +23 -0
- package/src/rdf/predicates.d.ts +443 -0
- package/src/rdf/predicates.js +245 -0
- package/src/rdf/prefixes.js +31 -0
- package/src/rdf/shacl.js +98 -0
- package/src/rdf/terms.js +15 -0
- package/src/transforms/concept-to-gloss.transform.js +75 -0
- package/src/transforms/index.d.ts +26 -0
- package/src/transforms/index.js +1 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# data/concept-model — vendored data artifacts from concept-model repo
|
|
2
|
+
|
|
3
|
+
This directory holds **data-only** artifacts copied from
|
|
4
|
+
[glossarist/concept-model](https://github.com/glossarist/concept-model).
|
|
5
|
+
|
|
6
|
+
concept-model is a *model* repo (TTL, JSON-LD, YAML schemas). It holds no
|
|
7
|
+
code, no npm package, no Ruby gem. glossarist-js vendors the small set of
|
|
8
|
+
data files it needs at build time and generates its own language-native
|
|
9
|
+
predicate constants from them.
|
|
10
|
+
|
|
11
|
+
## Files
|
|
12
|
+
|
|
13
|
+
| File | Purpose |
|
|
14
|
+
|------|---------|
|
|
15
|
+
| `glossarist.context.jsonld` | JSON-LD term map — input for predicate-constant codegen |
|
|
16
|
+
| `glossarist.ttl` | OWL ontology (reference; not currently read at runtime) |
|
|
17
|
+
| `shapes/glossarist.shacl.ttl` | SHACL shapes — loaded by `src/rdf/shacl.js` at runtime |
|
|
18
|
+
|
|
19
|
+
## Syncing
|
|
20
|
+
|
|
21
|
+
Update these files from the latest concept-model tag:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm run sync:model # fetches latest from glossarist/concept-model
|
|
25
|
+
npm run sync:model -- v3.0.0 # pin to a specific tag
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
After syncing, regenerate predicate constants:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm run gen:predicates
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Both are wired into `npm run build`.
|
|
35
|
+
|
|
36
|
+
## Why vendor instead of `npm install`?
|
|
37
|
+
|
|
38
|
+
Because concept-model is not an npm package. Treating it as one (a prior
|
|
39
|
+
attempt, briefly landed as `@glossarist/concept-model` v3.0.1 on
|
|
40
|
+
2026-06-26) required bolting a codegen + packaging onto a repo that should
|
|
41
|
+
only hold data. The result was a broken release (unquoted `iso-thes:` JS
|
|
42
|
+
key). Vendoring the small data files we need + generating bindings in this
|
|
43
|
+
repo keeps the model repo clean and lets this repo's bindings evolve
|
|
44
|
+
independently.
|