mdld-parse 0.9.3 → 0.9.5

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/README.md CHANGED
@@ -57,6 +57,7 @@ console.log(result.quads);
57
57
  - **⚡ Polarity system** - Sophisticated diff authoring with `+` and `-` prefixes
58
58
  - **📍 Origin tracking** - Complete provenance with lean quad-to-source mapping
59
59
  - **🎯 Elevated statements** - Automatic rdf:Statement pattern detection for "golden" graph extraction
60
+ - **🏷️ Primary metadata** - Instant access to primarySubject, primaryType, and primaryLabel for document identity
60
61
 
61
62
  ## 🌟 What is MD-LD?
62
63
 
@@ -232,9 +233,7 @@ Parse MD-LD markdown and return RDF quads with lean origin tracking.
232
233
  - `dataFactory` (object, optional) — Custom RDF/JS DataFactory
233
234
  - `graph` (string, optional) — Named graph IRI
234
235
 
235
- **Returns:** `{ quads, remove, statements, origin, context, primarySubject, md }`
236
-
237
- > **Legacy:** `parse(text, options)` still works for backward compatibility
236
+ **Returns:** `{ quads, remove, statements, origin, context, primarySubject, primaryType, primaryLabel, md }`
238
237
 
239
238
  - `quads` — Array of RDF/JS Quads (final resolved graph state)
240
239
  - `remove` — Array of RDF/JS Quads (external retractions targeting prior state)
@@ -242,6 +241,8 @@ Parse MD-LD markdown and return RDF quads with lean origin tracking.
242
241
  - `origin` — Lean origin tracking object with quadIndex for UI navigation
243
242
  - `context` — Final context used (includes prefixes)
244
243
  - `primarySubject` — String IRI or null (first non-fragment subject declaration)
244
+ - `primaryType` — String IRI or null (first rdf:type declaration)
245
+ - `primaryLabel` — String or null (first rdfs:label literal)
245
246
  - `md` — Clean Markdown with all MD-LD annotations stripped (round-trip safe)
246
247
 
247
248
  ### `merge(docs, options)`
package/dist/README.md CHANGED
@@ -57,6 +57,7 @@ console.log(result.quads);
57
57
  - **⚡ Polarity system** - Sophisticated diff authoring with `+` and `-` prefixes
58
58
  - **📍 Origin tracking** - Complete provenance with lean quad-to-source mapping
59
59
  - **🎯 Elevated statements** - Automatic rdf:Statement pattern detection for "golden" graph extraction
60
+ - **🏷️ Primary metadata** - Instant access to primarySubject, primaryType, and primaryLabel for document identity
60
61
 
61
62
  ## 🌟 What is MD-LD?
62
63
 
@@ -232,9 +233,7 @@ Parse MD-LD markdown and return RDF quads with lean origin tracking.
232
233
  - `dataFactory` (object, optional) — Custom RDF/JS DataFactory
233
234
  - `graph` (string, optional) — Named graph IRI
234
235
 
235
- **Returns:** `{ quads, remove, statements, origin, context, primarySubject, md }`
236
-
237
- > **Legacy:** `parse(text, options)` still works for backward compatibility
236
+ **Returns:** `{ quads, remove, statements, origin, context, primarySubject, primaryType, primaryLabel, md }`
238
237
 
239
238
  - `quads` — Array of RDF/JS Quads (final resolved graph state)
240
239
  - `remove` — Array of RDF/JS Quads (external retractions targeting prior state)
@@ -242,6 +241,8 @@ Parse MD-LD markdown and return RDF quads with lean origin tracking.
242
241
  - `origin` — Lean origin tracking object with quadIndex for UI navigation
243
242
  - `context` — Final context used (includes prefixes)
244
243
  - `primarySubject` — String IRI or null (first non-fragment subject declaration)
244
+ - `primaryType` — String IRI or null (first rdf:type declaration)
245
+ - `primaryLabel` — String or null (first rdfs:label literal)
245
246
  - `md` — Clean Markdown with all MD-LD annotations stripped (round-trip safe)
246
247
 
247
248
  ### `merge(docs, options)`
package/dist/docs/API.md CHANGED
@@ -14,13 +14,15 @@ Parse MD-LD markdown and return RDF quads.
14
14
  - `dataFactory` (object, optional) — Custom RDF/JS DataFactory
15
15
  - `graph` (string, optional) — Named graph IRI
16
16
 
17
- **Returns:** `{ quads, context, primarySubject, origin, remove, statements }`
17
+ **Returns:** `{ quads, context, primarySubject, primaryType, primaryLabel, origin, remove, statements }`
18
18
 
19
19
  - `quads` — Array of RDF/JS Quads (final resolved graph state)
20
20
  - `remove` — Array of RDF/JS Quads (external retractions targeting prior state)
21
21
  - `origin` — Lean origin tracking object with quadIndex for UI navigation
22
22
  - `context` — Final context used (includes prefixes)
23
23
  - `primarySubject` — String IRI or null (first non-fragment subject declaration)
24
+ - `primaryType` — String IRI or null (first rdf:type declaration)
25
+ - `primaryLabel` — String or null (first rdfs:label literal)
24
26
 
25
27
  > Legacy: `parse(text, options)` supported for backward compatibility (deprecated)
26
28