@glossarist/concept-browser 0.7.56 → 0.7.57

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glossarist/concept-browser",
3
- "version": "0.7.56",
3
+ "version": "0.7.57",
4
4
  "description": "Vue SPA for browsing Glossarist terminology datasets with cross-reference resolution, graph visualization, and multi-language support",
5
5
  "type": "module",
6
6
  "bin": {
@@ -12,6 +12,7 @@ import { buildVocabularyTurtle } from './lib/vocab-turtle.mjs';
12
12
  import { buildAgentsTurtle } from './lib/agents-turtle.mjs';
13
13
  import { buildVersionHistoryTurtle } from './lib/version-turtle.mjs';
14
14
  import { buildBibliographyTurtle } from './lib/bibliography-turtle.mjs';
15
+ import { ttlLit } from './lib/turtle-escape.mjs';
15
16
  const __dirname = path.dirname(new URL(import.meta.url).pathname);
16
17
  const ROOT = process.cwd();
17
18
  const PUBLIC = path.join(ROOT, 'public');
@@ -672,7 +673,7 @@ function getPrimaryDesignation(conceptYaml) {
672
673
  }
673
674
 
674
675
  function escapeTurtle(s) {
675
- return s.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n');
676
+ return ttlLit(s).slice(1, -1);
676
677
  }
677
678
 
678
679
  function conceptJsonToTurtle(concept) {
@@ -66,6 +66,7 @@ function fetchAny(ref, candidates) {
66
66
  const targets = {
67
67
  'glossarist.context.jsonld': ['ontologies/glossarist.context.jsonld', 'glossarist.context.jsonld'],
68
68
  'glossarist.ttl': ['ontologies/glossarist.ttl', 'glossarist.ttl'],
69
+ 'prefixes.ttl': ['ontologies/prefixes.ttl'],
69
70
  'shapes/glossarist.shacl.ttl': ['ontologies/shapes/glossarist.shacl.ttl', 'shapes/glossarist.shacl.ttl'],
70
71
  };
71
72
 
@@ -1,3 +1,10 @@
1
+ // Prefix bindings for concept-browser's RDF emission.
2
+ //
3
+ // The canonical SSOT for prefix bindings is `data/concept-model/prefixes.ttl`
4
+ // (vendored from glossarist/concept-model). This list is the runtime subset
5
+ // actually emitted by concept-browser. Keep it aligned with prefixes.ttl
6
+ // whenever the upstream file changes.
7
+
1
8
  export interface PrefixEntry {
2
9
  prefix: string;
3
10
  iri: string;
@@ -5,17 +12,20 @@ export interface PrefixEntry {
5
12
  }
6
13
 
7
14
  export const RDF_PREFIXES: readonly PrefixEntry[] = [
8
- { prefix: 'gloss', iri: 'https://www.glossarist.org/ontologies/', description: 'Glossarist ontology' },
9
- { prefix: 'skos', iri: 'http://www.w3.org/2004/02/skos/core#', description: 'Simple Knowledge Organization System' },
10
- { prefix: 'skosxl', iri: 'http://www.w3.org/2008/05/skos-xl#', description: 'SKOS eXtension for Labels' },
11
- { prefix: 'rdf', iri: 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', description: 'RDF core vocabulary' },
12
- { prefix: 'rdfs', iri: 'http://www.w3.org/2000/01/rdf-schema#', description: 'RDF Schema' },
13
- { prefix: 'owl', iri: 'http://www.w3.org/2002/07/owl#', description: 'Web Ontology Language' },
14
- { prefix: 'dcterms', iri: 'http://purl.org/dc/terms/', description: 'Dublin Core terms' },
15
- { prefix: 'prov', iri: 'http://www.w3.org/ns/prov#', description: 'PROV-O provenance' },
16
- { prefix: 'dcat', iri: 'http://www.w3.org/ns/dcat#', description: 'Data Catalog vocabulary' },
17
- { prefix: 'foaf', iri: 'http://xmlns.com/foaf/0.1/', description: 'Friend-of-a-Friend agents' },
18
- { prefix: 'xsd', iri: 'http://www.w3.org/2001/XMLSchema#', description: 'XML Schema datatypes' },
15
+ { prefix: 'gloss', iri: 'https://www.glossarist.org/ontologies/', description: 'Glossarist ontology' },
16
+ { prefix: 'skos', iri: 'http://www.w3.org/2004/02/skos/core#', description: 'Simple Knowledge Organization System' },
17
+ { prefix: 'skosxl', iri: 'http://www.w3.org/2008/05/skos-xl#', description: 'SKOS eXtension for Labels' },
18
+ { prefix: 'iso-thes', iri: 'http://purl.org/iso25964/skos-thes#', description: 'ISO 25964 SKOS thesaurus extensions' },
19
+ { prefix: 'rdf', iri: 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', description: 'RDF core vocabulary' },
20
+ { prefix: 'rdfs', iri: 'http://www.w3.org/2000/01/rdf-schema#', description: 'RDF Schema' },
21
+ { prefix: 'owl', iri: 'http://www.w3.org/2002/07/owl#', description: 'Web Ontology Language' },
22
+ { prefix: 'dcterms', iri: 'http://purl.org/dc/terms/', description: 'Dublin Core terms' },
23
+ { prefix: 'prov', iri: 'http://www.w3.org/ns/prov#', description: 'PROV-O provenance' },
24
+ { prefix: 'dcat', iri: 'http://www.w3.org/ns/dcat#', description: 'Data Catalog vocabulary' },
25
+ { prefix: 'foaf', iri: 'http://xmlns.com/foaf/0.1/', description: 'Friend-of-a-Friend agents' },
26
+ { prefix: 'vann', iri: 'http://purl.org/vocab/vann/', description: 'Vocabulary annotations' },
27
+ { prefix: 'xsd', iri: 'http://www.w3.org/2001/XMLSchema#', description: 'XML Schema datatypes' },
28
+ { prefix: 'sh', iri: 'http://www.w3.org/ns/shacl#', description: 'SHACL shapes vocabulary' },
19
29
  ] as const;
20
30
 
21
31
  export function findPrefix(prefix: string): PrefixEntry | undefined {