@kurrawongai/codemirror-lang-turtle12 0.2.0

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 codemirror-lang-rdf contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/NOTICE ADDED
@@ -0,0 +1,25 @@
1
+ codemirror-lang-rdf
2
+ Copyright (c) 2026 codemirror-lang-rdf contributors
3
+
4
+ This product includes work derived from:
5
+
6
+ codemirror-lang-turtle and codemirror-lang-sparql
7
+ Copyright (c) aatauil
8
+ MIT licensed — https://github.com/aatauil
9
+
10
+ The Turtle and SPARQL grammars here are rewrites for the RDF 1.2 and
11
+ SPARQL 1.2 specifications of the approach those packages take.
12
+
13
+ The vendored conformance corpora under packages/*/test/corpus are:
14
+
15
+ Copyright (c) W3C
16
+ Distributed under the W3C Test Suite License and the W3C 3-clause BSD
17
+ License. Each corpus directory carries a SOURCE file naming the upstream
18
+ repository and the pinned commit.
19
+
20
+ https://github.com/w3c/rdf-tests
21
+ https://github.com/w3c/data-shapes
22
+
23
+ The attribution above lived in LICENSE until GitHub reported the repository's
24
+ licence as NOASSERTION: licence detection needs that file to match the MIT text
25
+ closely, and an interpolated paragraph is enough to defeat it.
package/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # @kurrawongai/codemirror-lang-turtle12
2
+
3
+ RDF 1.2 Turtle, TriG, N-Triples, and N-Quads support for CodeMirror 6.
4
+
5
+ ## Get started
6
+
7
+ ```sh
8
+ npm install codemirror @kurrawongai/codemirror-lang-turtle12
9
+ ```
10
+
11
+ In your application's browser entry module:
12
+
13
+ ```js
14
+ import { basicSetup, EditorView } from 'codemirror';
15
+ import { turtle } from '@kurrawongai/codemirror-lang-turtle12';
16
+
17
+ new EditorView({
18
+ parent: document.body,
19
+ doc: '@prefix ex: <http://example.org/> .\nex:s ex:p ex:o .',
20
+ extensions: [basicSetup, turtle()],
21
+ });
22
+ ```
23
+
24
+ Use `trig()`, `ntriples()`, or `nquads()` from the same package for those
25
+ formats. Turtle and TriG include prefix completion; N-Triples and N-Quads do
26
+ not include a completion source.
27
+
28
+ The parser supports editing incomplete documents. Use a separate validator
29
+ to check document validity.
30
+
31
+ ## Documentation
32
+
33
+ - [Usage and completion](https://github.com/kurrawong/codemirror-lang-rdf/blob/main/docs/usage.md)
34
+ - [API reference](https://github.com/kurrawong/codemirror-lang-rdf/blob/main/docs/api.md#turtle-trig-n-triples-and-n-quads)
35
+ - [Highlight tags](https://github.com/kurrawong/codemirror-lang-rdf/blob/main/docs/highlight-tags.md)
36
+ - [Conformance and corpus revision](https://github.com/kurrawong/codemirror-lang-rdf/blob/main/docs/conformance.md)
37
+
38
+ ## Licence
39
+
40
+ MIT. The grammar builds on the approach used by
41
+ [aatauil/codemirror-lang-turtle](https://github.com/aatauil/codemirror-lang-turtle)
42
+ (MIT). Vendored W3C tests use the W3C Test Suite License and W3C 3-clause BSD License.
@@ -0,0 +1,35 @@
1
+ import type { CompletionContext, CompletionResult } from '@codemirror/autocomplete';
2
+ import type { EditorState } from '@codemirror/state';
3
+ /** A prefix label (without the colon) mapped to the IRI it expands to. */
4
+ export type PrefixMap = Record<string, string>;
5
+ /** Where `turtle()` and friends may look for prefixes beyond the document. */
6
+ export type PrefixSource = PrefixMap | ((state: EditorState) => PrefixMap);
7
+ export interface CompletionOptions {
8
+ /**
9
+ * Prefixes the editor should offer even when the document has not declared
10
+ * them — an application's own prefix manager, typically. Document
11
+ * declarations win on conflict, because what the document says is what the
12
+ * document means.
13
+ */
14
+ prefixSource?: PrefixSource;
15
+ }
16
+ /**
17
+ * The prefixes declared by the document itself, read from the syntax tree.
18
+ *
19
+ * Both spellings are read — `@prefix ex: <…>` and `PREFIX ex: <…>` — because a
20
+ * document may mix them, and a reader completing `ex:` does not care which one
21
+ * declared it.
22
+ */
23
+ export declare function documentPrefixes(state: EditorState): PrefixMap;
24
+ /** Every prefix the editor knows about: the external source, overlaid by the document's. */
25
+ export declare function knownPrefixes(state: EditorState, options?: CompletionOptions): PrefixMap;
26
+ /**
27
+ * Completion for Turtle-family documents.
28
+ *
29
+ * Deliberately context-light: it offers directives, the three term keywords and
30
+ * the document's prefixes wherever a word is being typed, rather than trying to
31
+ * work out whether the cursor is in a subject or an object position. In an
32
+ * error-tolerant tree a half-typed statement usually has no reliable position
33
+ * to read, and a wrong context is worse than a slightly long list.
34
+ */
35
+ export declare function turtleCompletionSource(options?: CompletionOptions, dialect?: 'turtle' | 'trig'): (context: CompletionContext) => CompletionResult | null;
@@ -0,0 +1,17 @@
1
+ import type { NodePropSource } from '@lezer/common';
2
+ /**
3
+ * The shared highlight-tag table, Turtle half.
4
+ *
5
+ * `docs/highlight-tags.md` is the canonical table and `test/highlight.test.ts`
6
+ * asserts this against it, so a consumer can keep one `HighlightStyle` for all
7
+ * three languages. Two conventions are worth knowing:
8
+ *
9
+ * - an IRI and a prefixed name are tagged differently (`url` / `namespace`)
10
+ * but denote the same kind of thing, so a style is free to colour them the
11
+ * same — which is what the reference style does;
12
+ * - a datatype IRI is tagged `typeName` rather than `url`, because it
13
+ * qualifies the literal rather than being a term the document is about. The
14
+ * parent-path rules below are more specific than the bare token rules, so
15
+ * they win inside `Datatype`.
16
+ */
17
+ export declare const turtleHighlighting: NodePropSource;
package/dist/index.cjs ADDED
@@ -0,0 +1,235 @@
1
+ 'use strict';
2
+
3
+ var language = require('@codemirror/language');
4
+ var lr = require('@lezer/lr');
5
+ var highlight = require('@lezer/highlight');
6
+
7
+ // This file was generated by lezer-generator. You probably shouldn't edit it.
8
+ const parser$1 = lr.LRParser.deserialize({
9
+ version: 14,
10
+ states: "5fQYQPOOQ!WQPOOQ!bQPOOQ!bQPOOOOQO'#Ce'#CeOOQO'#EX'#EXO!jQPO'#CaO!oQPO'#CgO!zQPO'#CiO!oQPO'#CkO#PQPO'#CmO#UQPO'#CmOOQO'#C_'#C_OOQO'#Cv'#CvO$[QQO'#C{O$cQPO'#DOO$qQPO'#DbO$cQPO'#CqO%VQPO'#CqOOQO'#EW'#EWO%kQPO'#EWOOQO'#D{'#D{QYQPOOOOQO'#Dn'#DnO%pQPO'#DqO%}QPO'#DlO&`QPO'#DsO&qQPO'#DsO'SQPO'#DtO$cQPO'#DtOOQO'#Ea'#EaOOQO'#E`'#E`OOQO'#EQ'#EQQ!WQPOOOOQO'#Ec'#EcOOQO'#ER'#ERQ!bQPOOO!oQPO'#DvOOQO'#ES'#ESQ!bQPOOO!oQPO'#DyO!oQPO,58{O'eQPO,59RO!oQPO,59TOOQO,59V,59VOOQO,59X,59XO'jQPO,59XOOQO'#D|'#D|O'oQQO,59gOOQO,59g,59gO([QQO'#DPOOQO'#DU'#DUOOQO'#DY'#DYOOQO'#EZ'#EZO%}QPO'#D_OOQO'#EY'#EYOOQO'#Cs'#CsO)hQPO,59jO#ZQQO'#CrOOQO'#E^'#E^O$cQPO,59|OOQO,59],59]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h#PUgPiqQzVQ|X`!X^!Q![#b#y$Y$Z$_h!Y_abjklm!^!x#_#e$`Q!]`Q!luQ!nxQ!oyQ!q{Q!w!WQ#[!uQ#g!|Q#q#]V#s#^#i#{S!P^!QS!z![#yS#O$Y$_Q#v#bR$O$ZR!x!WR#r#]R!^`R#h!|TpPqQ#X!lQ#Y!nR$W$PSuQtSxRwR#l#W",
13
+ nodeNames: "⚠ Comment TurtleDoc Directive . PrefixID AtPrefix PNameNS IRIRef PrefixedName PNameLN Base AtBase SparqlPrefix KwPrefix SparqlBase KwBase Version KwVersion VersionSpecifier AtVersion Triples PredicateObjectList Verb KeywordA ObjectList BlankNode BlankNodeLabel Anon ) ( Collection ] [ BlankNodePropertyList RDFLiteral String LangDir Datatype ^^ NumericLiteral Integer Decimal Double BooleanLiteral True False )>> <<( TripleTerm >> << ReifiedTriple Reifier ~ Annotation |} {| AnnotationBlock , ; TrigDoc GraphStatement KwGraph LabelOrSubject } { WrappedGraph TriplesBlock TriplesOrGraph Triples2 NTriplesDoc NTriple NTripleTerm NQuadsDoc NQuad GraphLabel",
14
+ maxTerm: 99,
15
+ nodeProps: [
16
+ ["openedBy", 29,"(",32,"[",47,"<<(",50,"<<",56,"{|",65,"{"],
17
+ ["closedBy", 30,")",33,"]",48,")>>",51,">>",57,"|}",66,"}"]
18
+ ],
19
+ skippedNodes: [0,1],
20
+ repeatNodeCount: 8,
21
+ tokenData: "#-Z~R!]XY$zYZ$z]^$zpq$zrs%]st,]wx,wxy3kyz3p{|4T|}5{}!O4T!O!P6Q!Q![5^![!]6Y!]!^<j!^!_<o!`!aAZ!b!cAf!c!dL|!d!e! s!e!iL|!i!j!(X!j!rL|!r!s!0_!s!xL|!x!y!:]!y!}L|!}#O!E{#P#Q!Fx#Q#R!F}#R#S!GY#T#U!KW#U#V! s#V#YL|#Y#Z!Ln#Z#[!(X#[#dL|#d#e!0_#e#hL|#h#i#&_#i#jL|#j#k!:]#k#oL|#o#p#,g#p#q#,t#q#r#-P#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L|#i#j#)e#j#oL|$}%OL|%W%oL|%p&aL|&b1pL|1p4UL|4U4dL|4e$ISL|$I`$IbL|$Je$JgL|$Kh%#tL|&/x&EtL|&FV;'SL|?&r?AhL|?BY?MnL|~#)hg}!OL|!O!PNb!Q![L|![!]6Y!c!}L|#R#SL|#T#XL|#X#Y#+P#Y#oL|$}%OL|%W%oL|%p&aL|&b1pL|1p4UL|4U4dL|4e$ISL|$I`$IbL|$Je$JgL|$Kh%#tL|&/x&EtL|&FV;'SL|?&r?AhL|?BY?MnL|~#+Ue}~}!OL|!O!PNb!Q![L|![!]6Y!c!}L|#R#SL|#T#oL|$}%OL|%W%oL|%p&aL|&b1pL|1p4UL|4U4dL|4e$ISL|$I`$IbL|$Je$JgL|$Kh%#tL|&/x&EtL|&FV;'SL|?&r?AhL|?BY?MnL|V#,lP!dP#p#q#,oU#,tO!ZU~#,wP#q#r#,z~#-PO!Y~~#-UO!c~~#-ZO!W~",
22
+ tokenizers: [0, 1, 2],
23
+ topRules: {"TurtleDoc":[0,2],"TrigDoc":[1,61],"NTriplesDoc":[2,71],"NQuadsDoc":[3,74]},
24
+ tokenPrec: 931
25
+ });
26
+
27
+ const turtleHighlighting = highlight.styleTags({
28
+ Comment: highlight.tags.comment,
29
+ "AtPrefix AtBase AtVersion KwPrefix KwBase KwGraph KwVersion KeywordA": highlight.tags.keyword,
30
+ IRIRef: highlight.tags.url,
31
+ "PNameNS PNameLN": highlight.tags.namespace,
32
+ "BlankNodeLabel Anon": highlight.tags.propertyName,
33
+ "String VersionSpecifier": highlight.tags.string,
34
+ "Integer Decimal Double": highlight.tags.number,
35
+ "True False": highlight.tags.bool,
36
+ LangDir: highlight.tags.annotation,
37
+ "Datatype/IRIRef Datatype/PrefixedName/PNameNS Datatype/PrefixedName/PNameLN": highlight.tags.typeName,
38
+ 'Datatype/"^^"': highlight.tags.typeName,
39
+ /*
40
+ * The RDF 1.2 term brackets are tagged apart from ordinary grouping, because
41
+ * `<< s p o >>` and `<<( s p o )>>` differ by one character and mean quite
42
+ * different things — a statement you can refer to, versus an object that *is*
43
+ * a triple. A style that cannot separate them cannot help a reader see that.
44
+ *
45
+ * Each is a `special()` of the standard tag its glyphs actually are, so the
46
+ * fallback chain does the work: a theme that knows nothing about RDF 1.2 and
47
+ * styles `bracket` (or `brace`/`paren`/`angleBracket`) still colours all of
48
+ * them, and one that wants the distinction overrides the specific tag.
49
+ */
50
+ /*
51
+ * Every token *inside* an RDF 1.2 nested-triple construct also carries
52
+ * `quote`, so a style can shade the whole thing and not just its brackets —
53
+ * which is what "colour reified triples differently" usually means. The
54
+ * `/...` form applies to descendants and *combines* with each token's own
55
+ * tag, so an IRI inside a reified triple is `quote url`, not one or the
56
+ * other. A style that never mentions `quote` sees no change at all.
57
+ *
58
+ * One tag for all three constructs, rather than three: the brackets above
59
+ * already say which kind it is, and a style wanting per-kind regions can add
60
+ * its own props to the exported parser.
61
+ */
62
+ "ReifiedTriple/... TripleTerm/... NTripleTerm/... AnnotationBlock/...": highlight.tags.quote,
63
+ '"<<" ">>"': highlight.tags.special(highlight.tags.angleBracket),
64
+ '"<<(" ")>>"': highlight.tags.special(highlight.tags.paren),
65
+ '"{|" "|}"': highlight.tags.special(highlight.tags.brace),
66
+ '"{" "}"': highlight.tags.brace,
67
+ '"[" "]"': highlight.tags.squareBracket,
68
+ '"(" ")"': highlight.tags.paren,
69
+ // The reifier marker only ever introduces a reifier, so it is worth telling
70
+ // from arithmetic; it falls back to `operator`.
71
+ '"~"': highlight.tags.special(highlight.tags.operator),
72
+ '";" ","': highlight.tags.separator,
73
+ '"."': highlight.tags.punctuation
74
+ });
75
+
76
+ const DIRECTIVES = ["@prefix", "@base", "PREFIX", "BASE"];
77
+ const TRIG_DIRECTIVES = [...DIRECTIVES, "GRAPH"];
78
+ const TERM_KEYWORDS = ["a", "true", "false"];
79
+ const INERT = /* @__PURE__ */ new Set(["Comment", "String", "VersionSpecifier", "IRIRef"]);
80
+ function documentPrefixes(state) {
81
+ const prefixes = {};
82
+ const tree = language.syntaxTree(state);
83
+ tree.iterate({
84
+ enter: (node) => {
85
+ if (node.name !== "PrefixID" && node.name !== "SparqlPrefix") return;
86
+ let label = null;
87
+ let iri = null;
88
+ for (let child = node.node.firstChild; child; child = child.nextSibling) {
89
+ if (child.name === "PNameNS" && label === null) {
90
+ label = state.sliceDoc(child.from, child.to).slice(0, -1);
91
+ } else if (child.name === "IRIRef" && iri === null) {
92
+ iri = state.sliceDoc(child.from + 1, child.to - 1);
93
+ }
94
+ }
95
+ if (label !== null) prefixes[label] = iri ?? "";
96
+ }
97
+ });
98
+ return prefixes;
99
+ }
100
+ function resolveSource(source, state) {
101
+ if (!source) return {};
102
+ return typeof source === "function" ? source(state) : source;
103
+ }
104
+ function knownPrefixes(state, options = {}) {
105
+ return { ...resolveSource(options.prefixSource, state), ...documentPrefixes(state) };
106
+ }
107
+ function prefixCompletions(state, options) {
108
+ const prefixes = knownPrefixes(state, options);
109
+ return Object.entries(prefixes).map(([label, iri]) => ({
110
+ label: `${label}:`,
111
+ type: "namespace",
112
+ detail: iri || void 0
113
+ }));
114
+ }
115
+ function keywordCompletions(words) {
116
+ return words.map((label) => ({ label, type: "keyword" }));
117
+ }
118
+ function inUnterminatedTerm(state, pos) {
119
+ const line = state.doc.lineAt(pos);
120
+ const text = line.text.slice(0, pos - line.from);
121
+ let quote = null;
122
+ let angle = false;
123
+ for (let i = 0; i < text.length; i++) {
124
+ const ch = text[i];
125
+ if (quote) {
126
+ if (ch === "\\") i++;
127
+ else if (ch === quote) quote = null;
128
+ } else if (angle) {
129
+ if (ch === ">" || ch === " " || ch === " ") angle = false;
130
+ } else if (ch === '"' || ch === "'") {
131
+ quote = ch;
132
+ } else if (ch === "<" && text[i + 1] !== "<") {
133
+ angle = true;
134
+ }
135
+ }
136
+ return quote !== null || angle;
137
+ }
138
+ function turtleCompletionSource(options = {}, dialect = "turtle") {
139
+ return (context) => {
140
+ const word = context.matchBefore(/[@A-Za-z_][\w.-]*:?/);
141
+ if (!word && !context.explicit) return null;
142
+ const from = word ? word.from : context.pos;
143
+ const node = language.syntaxTree(context.state).resolveInner(context.pos, -1);
144
+ if (INERT.has(node.name)) return null;
145
+ if (inUnterminatedTerm(context.state, context.pos)) return null;
146
+ const directives = dialect === "trig" ? TRIG_DIRECTIVES : DIRECTIVES;
147
+ return {
148
+ from,
149
+ options: [
150
+ ...keywordCompletions(directives),
151
+ ...keywordCompletions(TERM_KEYWORDS),
152
+ ...prefixCompletions(context.state, options)
153
+ ],
154
+ validFor: /^[@A-Za-z_][\w.-]*:?$/
155
+ };
156
+ };
157
+ }
158
+
159
+ const parser = parser$1;
160
+ const statementFold = (node, state) => {
161
+ const firstLineEnd = state.doc.lineAt(node.from).to;
162
+ if (node.to <= firstLineEnd) return null;
163
+ for (let n = language.syntaxTree(state).resolveInner(firstLineEnd, -1); n; n = n.parent) {
164
+ if (n.from < node.from) break;
165
+ if (n.type.prop(language.foldNodeProp) && n.from <= firstLineEnd && n.to > firstLineEnd && n.type !== node.type) return null;
166
+ }
167
+ return { from: firstLineEnd, to: node.to };
168
+ };
169
+ const turtleProps = [
170
+ turtleHighlighting,
171
+ language.indentNodeProp.add({
172
+ BlankNodePropertyList: language.delimitedIndent({ closing: "]" }),
173
+ Collection: language.delimitedIndent({ closing: ")" }),
174
+ WrappedGraph: language.delimitedIndent({ closing: "}" }),
175
+ AnnotationBlock: language.delimitedIndent({ closing: "|}" }),
176
+ TripleTerm: language.delimitedIndent({ closing: ")>>" }),
177
+ ReifiedTriple: language.delimitedIndent({ closing: ">>" })
178
+ }),
179
+ language.foldNodeProp.add({
180
+ BlankNodePropertyList: language.foldInside,
181
+ Collection: language.foldInside,
182
+ WrappedGraph: language.foldInside,
183
+ AnnotationBlock: language.foldInside,
184
+ "Triples Triples2 TriplesOrGraph": statementFold
185
+ })
186
+ ];
187
+ const languageData = {
188
+ commentTokens: { line: "#" },
189
+ closeBrackets: { brackets: ["[", "(", "<", '"', "'"] },
190
+ indentOnInput: /^\s*[\]})]$/
191
+ };
192
+ function define(top) {
193
+ return language.LRLanguage.define({
194
+ name: top === "TurtleDoc" ? "turtle" : top === "TrigDoc" ? "trig" : top === "NTriplesDoc" ? "ntriples" : "nquads",
195
+ parser: parser$1.configure({ top, props: turtleProps }),
196
+ languageData
197
+ });
198
+ }
199
+ const turtleLanguage = define("TurtleDoc");
200
+ const trigLanguage = define("TrigDoc");
201
+ const ntriplesLanguage = define("NTriplesDoc");
202
+ const nquadsLanguage = define("NQuadsDoc");
203
+ function support(language$1, options, dialect) {
204
+ return new language.LanguageSupport(language$1, [
205
+ language$1.data.of({ autocomplete: turtleCompletionSource(options, dialect) })
206
+ ]);
207
+ }
208
+ function turtle(options = {}) {
209
+ return support(turtleLanguage, options, "turtle");
210
+ }
211
+ function trig(options = {}) {
212
+ return support(trigLanguage, options, "trig");
213
+ }
214
+ function ntriples() {
215
+ return new language.LanguageSupport(ntriplesLanguage);
216
+ }
217
+ function nquads() {
218
+ return new language.LanguageSupport(nquadsLanguage);
219
+ }
220
+
221
+ exports.documentPrefixes = documentPrefixes;
222
+ exports.knownPrefixes = knownPrefixes;
223
+ exports.nquads = nquads;
224
+ exports.nquadsLanguage = nquadsLanguage;
225
+ exports.ntriples = ntriples;
226
+ exports.ntriplesLanguage = ntriplesLanguage;
227
+ exports.parser = parser;
228
+ exports.trig = trig;
229
+ exports.trigLanguage = trigLanguage;
230
+ exports.turtle = turtle;
231
+ exports.turtleCompletionSource = turtleCompletionSource;
232
+ exports.turtleHighlighting = turtleHighlighting;
233
+ exports.turtleLanguage = turtleLanguage;
234
+ exports.turtleProps = turtleProps;
235
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../src/turtle.grammar","../src/highlight.ts","../src/complete.ts","../src/index.ts"],"sourcesContent":["// This file was generated by lezer-generator. You probably shouldn't edit it.\nimport {LRParser} from \"@lezer/lr\"\nexport const parser = LRParser.deserialize({\n version: 14,\n states: \"5fQYQP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TOPVX^_`abfhijklmquxy{!Q!W![!^!u!x!|#P#]#^#_#b#e#i#y#{$Y$Z$_$`SdOfT!bh#PQ!Z_S!_abS!gjkS!ilmR#t#_S![_#_Q!|!^Q#]!xQ#y#e[$YabjklmR$_$`Q!{![S$U#y$_R$b$YWaOfh#PUgPiq`!X^!Q![#b#y$Y$Z$_Q!]`Q!w!WQ#g!|Q#q#]V#s#^#i#{WaOfh#PSmPqa!X^!Q![#b#y$Y$Z$_WbOfh#PSlPqa!X^!Q![#b#y$Y$Z$_d!V^!Q![!|#]#b#y$Y$Z$_V#V!l!n$PV!v!S!}#Ue!V^!Q![!|#]#b#y$Y$Z$_`!X^!Q![#b#y$Y$Z$_Q#g!|R#q#]WbOfh#PSkPq`!X^!Q![#b#y$Y$Z$_Q!]`R#g!|[#`!z#O#a#j#v$OR#}#hQ#d!zS$T#v$OR$]#O]#`!z#O#a#j#v$OTnPqSjPqR!eiSnPqQ!fjR#R!eQ!dhR#k#PTsQtTvRwR#p#YQfOR!afQ!Q^R!s!QS#a!z#vS#j#O$OT#u#a#jQ#c!zW#w#c#x$[$^Q#x#dQ$[#OR$^$]Q#f!{S#z#f$aR$a$bQqPR!jqQtQR!ktQwRR!mwTeOfWaOfh#PUgPiqQzVQ|X`!X^!Q![#b#y$Y$Z$_h!Y_abjklm!^!x#_#e$`Q!]`Q!luQ!nxQ!oyQ!q{Q!w!WQ#[!uQ#g!|Q#q#]V#s#^#i#{S!P^!QS!z![#yS#O$Y$_Q#v#bR$O$ZR!x!WR#r#]R!^`R#h!|TpPqQ#X!lQ#Y!nR$W$PSuQtSxRwR#l#W\",\n nodeNames: \"⚠ Comment TurtleDoc Directive . PrefixID AtPrefix PNameNS IRIRef PrefixedName PNameLN Base AtBase SparqlPrefix KwPrefix SparqlBase KwBase Version KwVersion VersionSpecifier AtVersion Triples PredicateObjectList Verb KeywordA ObjectList BlankNode BlankNodeLabel Anon ) ( Collection ] [ BlankNodePropertyList RDFLiteral String LangDir Datatype ^^ NumericLiteral Integer Decimal Double BooleanLiteral True False )>> <<( TripleTerm >> << ReifiedTriple Reifier ~ Annotation |} {| AnnotationBlock , ; TrigDoc GraphStatement KwGraph LabelOrSubject } { WrappedGraph TriplesBlock TriplesOrGraph Triples2 NTriplesDoc NTriple NTripleTerm NQuadsDoc NQuad GraphLabel\",\n maxTerm: 99,\n nodeProps: [\n [\"openedBy\", 29,\"(\",32,\"[\",47,\"<<(\",50,\"<<\",56,\"{|\",65,\"{\"],\n [\"closedBy\", 30,\")\",33,\"]\",48,\")>>\",51,\">>\",57,\"|}\",66,\"}\"]\n ],\n skippedNodes: [0,1],\n repeatNodeCount: 8,\n tokenData: \"#-Z~R!]XY$zYZ$z]^$zpq$zrs%]st,]wx,wxy3kyz3p{|4T|}5{}!O4T!O!P6Q!Q![5^![!]6Y!]!^<j!^!_<o!`!aAZ!b!cAf!c!dL|!d!e! s!e!iL|!i!j!(X!j!rL|!r!s!0_!s!xL|!x!y!:]!y!}L|!}#O!E{#P#Q!Fx#Q#R!F}#R#S!GY#T#U!KW#U#V! s#V#YL|#Y#Z!Ln#Z#[!(X#[#dL|#d#e!0_#e#hL|#h#i#&_#i#jL|#j#k!:]#k#oL|#o#p#,g#p#q#,t#q#r#-P#r#s#-U%W%oL|%p&aL|&b1pL|4U4dL|4e$ISL|$I`$IbL|$Kh%#tL|&/x&EtL|&FV;'SL|?&r?AhL|?BY?MnL|~%PS!y~XY$zYZ$z]^$zpq$zR%`XOY%{Z]%{^r%{rs)os#O%{#O#P&r#P;'S%{;'S;=`)i<%lO%{R&OXOY%{Z]%{^r%{rs&ks#O%{#O#P&r#P;'S%{;'S;=`)i<%lO%{R&rOtQcPR&uYrs%{wx%{!w!x'e#O#P%{#U#V%{#Y#Z%{#b#c%{#f#g%{#h#i%{#i#j(gR'hR!Q!['q!c!i'q#T#Z'qR'tR!Q!['}!c!i'}#T#Z'}R(QR!Q![(Z!c!i(Z#T#Z(ZR(^R!Q![(g!c!i(g#T#Z(gR(jR!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kh%#tL|&/x&EtL|&FV;'SL|?&r?AhL|?BY?MnL|V#,lP!dP#p#q#,oU#,tO!ZU~#,wP#q#r#,z~#-PO!Y~~#-UO!c~~#-ZO!W~\",\n tokenizers: [0, 1, 2],\n topRules: {\"TurtleDoc\":[0,2],\"TrigDoc\":[1,61],\"NTriplesDoc\":[2,71],\"NQuadsDoc\":[3,74]},\n tokenPrec: 931\n})\n","import type { NodePropSource } from '@lezer/common';\nimport { styleTags, tags as t } from '@lezer/highlight';\n\n/**\n * The shared highlight-tag table, Turtle half.\n *\n * `docs/highlight-tags.md` is the canonical table and `test/highlight.test.ts`\n * asserts this against it, so a consumer can keep one `HighlightStyle` for all\n * three languages. Two conventions are worth knowing:\n *\n * - an IRI and a prefixed name are tagged differently (`url` / `namespace`)\n * but denote the same kind of thing, so a style is free to colour them the\n * same — which is what the reference style does;\n * - a datatype IRI is tagged `typeName` rather than `url`, because it\n * qualifies the literal rather than being a term the document is about. The\n * parent-path rules below are more specific than the bare token rules, so\n * they win inside `Datatype`.\n */\nexport const turtleHighlighting: NodePropSource = styleTags({\n Comment: t.comment,\n\n 'AtPrefix AtBase AtVersion KwPrefix KwBase KwGraph KwVersion KeywordA': t.keyword,\n\n IRIRef: t.url,\n 'PNameNS PNameLN': t.namespace,\n\n 'BlankNodeLabel Anon': t.propertyName,\n\n 'String VersionSpecifier': t.string,\n 'Integer Decimal Double': t.number,\n 'True False': t.bool,\n\n LangDir: t.annotation,\n 'Datatype/IRIRef Datatype/PrefixedName/PNameNS Datatype/PrefixedName/PNameLN': t.typeName,\n 'Datatype/\"^^\"': t.typeName,\n\n /*\n * The RDF 1.2 term brackets are tagged apart from ordinary grouping, because\n * `<< s p o >>` and `<<( s p o )>>` differ by one character and mean quite\n * different things — a statement you can refer to, versus an object that *is*\n * a triple. A style that cannot separate them cannot help a reader see that.\n *\n * Each is a `special()` of the standard tag its glyphs actually are, so the\n * fallback chain does the work: a theme that knows nothing about RDF 1.2 and\n * styles `bracket` (or `brace`/`paren`/`angleBracket`) still colours all of\n * them, and one that wants the distinction overrides the specific tag.\n */\n\n /*\n * Every token *inside* an RDF 1.2 nested-triple construct also carries\n * `quote`, so a style can shade the whole thing and not just its brackets —\n * which is what \"colour reified triples differently\" usually means. The\n * `/...` form applies to descendants and *combines* with each token's own\n * tag, so an IRI inside a reified triple is `quote url`, not one or the\n * other. A style that never mentions `quote` sees no change at all.\n *\n * One tag for all three constructs, rather than three: the brackets above\n * already say which kind it is, and a style wanting per-kind regions can add\n * its own props to the exported parser.\n */\n 'ReifiedTriple/... TripleTerm/... NTripleTerm/... AnnotationBlock/...': t.quote,\n\n '\"<<\" \">>\"': t.special(t.angleBracket),\n '\"<<(\" \")>>\"': t.special(t.paren),\n '\"{|\" \"|}\"': t.special(t.brace),\n '\"{\" \"}\"': t.brace,\n '\"[\" \"]\"': t.squareBracket,\n '\"(\" \")\"': t.paren,\n\n // The reifier marker only ever introduces a reifier, so it is worth telling\n // from arithmetic; it falls back to `operator`.\n '\"~\"': t.special(t.operator),\n\n '\";\" \",\"': t.separator,\n '\".\"': t.punctuation,\n});\n","import { syntaxTree } from '@codemirror/language';\nimport type { Completion, CompletionContext, CompletionResult } from '@codemirror/autocomplete';\nimport type { EditorState } from '@codemirror/state';\n\n/** A prefix label (without the colon) mapped to the IRI it expands to. */\nexport type PrefixMap = Record<string, string>;\n\n/** Where `turtle()` and friends may look for prefixes beyond the document. */\nexport type PrefixSource = PrefixMap | ((state: EditorState) => PrefixMap);\n\nexport interface CompletionOptions {\n /**\n * Prefixes the editor should offer even when the document has not declared\n * them — an application's own prefix manager, typically. Document\n * declarations win on conflict, because what the document says is what the\n * document means.\n */\n prefixSource?: PrefixSource;\n}\n\nconst DIRECTIVES = ['@prefix', '@base', 'PREFIX', 'BASE'];\nconst TRIG_DIRECTIVES = [...DIRECTIVES, 'GRAPH'];\nconst TERM_KEYWORDS = ['a', 'true', 'false'];\n\n/** Nodes whose interior is text, not syntax: no completion belongs there. */\nconst INERT = new Set(['Comment', 'String', 'VersionSpecifier', 'IRIRef']);\n\n/**\n * The prefixes declared by the document itself, read from the syntax tree.\n *\n * Both spellings are read — `@prefix ex: <…>` and `PREFIX ex: <…>` — because a\n * document may mix them, and a reader completing `ex:` does not care which one\n * declared it.\n */\nexport function documentPrefixes(state: EditorState): PrefixMap {\n const prefixes: PrefixMap = {};\n const tree = syntaxTree(state);\n tree.iterate({\n enter: (node) => {\n if (node.name !== 'PrefixID' && node.name !== 'SparqlPrefix') return;\n let label: string | null = null;\n let iri: string | null = null;\n for (let child = node.node.firstChild; child; child = child.nextSibling) {\n if (child.name === 'PNameNS' && label === null) {\n label = state.sliceDoc(child.from, child.to).slice(0, -1);\n } else if (child.name === 'IRIRef' && iri === null) {\n iri = state.sliceDoc(child.from + 1, child.to - 1);\n }\n }\n if (label !== null) prefixes[label] = iri ?? '';\n },\n });\n return prefixes;\n}\n\nfunction resolveSource(source: PrefixSource | undefined, state: EditorState): PrefixMap {\n if (!source) return {};\n return typeof source === 'function' ? source(state) : source;\n}\n\n/** Every prefix the editor knows about: the external source, overlaid by the document's. */\nexport function knownPrefixes(state: EditorState, options: CompletionOptions = {}): PrefixMap {\n return { ...resolveSource(options.prefixSource, state), ...documentPrefixes(state) };\n}\n\nfunction prefixCompletions(state: EditorState, options: CompletionOptions): Completion[] {\n const prefixes = knownPrefixes(state, options);\n return Object.entries(prefixes).map(([label, iri]) => ({\n label: `${label}:`,\n type: 'namespace',\n detail: iri || undefined,\n }));\n}\n\nfunction keywordCompletions(words: readonly string[]): Completion[] {\n return words.map((label) => ({ label, type: 'keyword' }));\n}\n\n/**\n * Is the cursor inside a literal or IRI that has not been closed yet?\n *\n * A half-typed `\"some tex` or `<http://ex` never reaches a `String` or\n * `IRIRef` node — it is error debris, and the error node covers only the last\n * word — so the node name cannot answer this. Scanning the line up to the\n * cursor can, and it is the state a reader is in while typing one.\n *\n * Two details earn their place. `<<` is not an IRI, so it does not open one,\n * which keeps completion alive inside a half-typed reified triple. And an IRI\n * cannot contain a space, so whitespace closes the scan rather than\n * suppressing completion for the rest of the line.\n *\n * The scan is line-local, so an unterminated *long* string (`\"\"\"…`) spanning\n * lines is not detected past its first line. Terminated ones are, through the\n * `String` node above.\n */\nfunction inUnterminatedTerm(state: EditorState, pos: number): boolean {\n const line = state.doc.lineAt(pos);\n const text = line.text.slice(0, pos - line.from);\n let quote: string | null = null;\n let angle = false;\n for (let i = 0; i < text.length; i++) {\n const ch = text[i];\n if (quote) {\n if (ch === '\\\\') i++;\n else if (ch === quote) quote = null;\n } else if (angle) {\n if (ch === '>' || ch === ' ' || ch === '\\t') angle = false;\n } else if (ch === '\"' || ch === \"'\") {\n quote = ch;\n } else if (ch === '<' && text[i + 1] !== '<') {\n angle = true;\n }\n }\n return quote !== null || angle;\n}\n\n/**\n * Completion for Turtle-family documents.\n *\n * Deliberately context-light: it offers directives, the three term keywords and\n * the document's prefixes wherever a word is being typed, rather than trying to\n * work out whether the cursor is in a subject or an object position. In an\n * error-tolerant tree a half-typed statement usually has no reliable position\n * to read, and a wrong context is worse than a slightly long list.\n */\nexport function turtleCompletionSource(\n options: CompletionOptions = {},\n dialect: 'turtle' | 'trig' = 'turtle'\n) {\n return (context: CompletionContext): CompletionResult | null => {\n const word = context.matchBefore(/[@A-Za-z_][\\w.-]*:?/);\n if (!word && !context.explicit) return null;\n const from = word ? word.from : context.pos;\n\n const node = syntaxTree(context.state).resolveInner(context.pos, -1);\n if (INERT.has(node.name)) return null;\n if (inUnterminatedTerm(context.state, context.pos)) return null;\n\n const directives = dialect === 'trig' ? TRIG_DIRECTIVES : DIRECTIVES;\n return {\n from,\n options: [\n ...keywordCompletions(directives),\n ...keywordCompletions(TERM_KEYWORDS),\n ...prefixCompletions(context.state, options),\n ],\n validFor: /^[@A-Za-z_][\\w.-]*:?$/,\n };\n };\n}\n","import type { SyntaxNode } from '@lezer/common';\nimport type { EditorState } from '@codemirror/state';\nimport {\n LRLanguage,\n LanguageSupport,\n delimitedIndent,\n foldInside,\n foldNodeProp,\n indentNodeProp,\n syntaxTree,\n} from '@codemirror/language';\nimport type { LRParser } from '@lezer/lr';\nimport { parser as rawParser } from './turtle.grammar';\nimport { turtleHighlighting } from './highlight';\nimport { turtleCompletionSource } from './complete';\nimport type { CompletionOptions } from './complete';\n\nexport type { CompletionOptions, PrefixMap, PrefixSource } from './complete';\nexport { documentPrefixes, knownPrefixes, turtleCompletionSource } from './complete';\nexport { turtleHighlighting } from './highlight';\n\n/** The unconfigured grammar, for callers that want their own `top` or props. */\nexport const parser: LRParser = rawParser;\n\n/**\n * Fold a whole statement from the end of its first line.\n *\n * This is the one fold in Turtle with no brackets around it: a subject with a\n * long `;` list is the common shape a reader wants collapsed, and the structure\n * that shape has is a statement, not a delimiter.\n *\n * It stands aside when a bracket opens on the same line. Folding\n * `ex:s ex:p [` at the statement level would hide the `] .` as well, leaving\n * what is left looking unterminated; the bracket's own fold — which CodeMirror\n * would otherwise never reach, since the statement node encloses it — reads\n * correctly.\n */\nconst statementFold = (node: SyntaxNode, state: EditorState) => {\n const firstLineEnd = state.doc.lineAt(node.from).to;\n if (node.to <= firstLineEnd) return null;\n for (let n: SyntaxNode | null = syntaxTree(state).resolveInner(firstLineEnd, -1); n; n = n.parent) {\n if (n.from < node.from) break;\n if (n.type.prop(foldNodeProp) && n.from <= firstLineEnd && n.to > firstLineEnd && n.type !== node.type) return null;\n }\n return { from: firstLineEnd, to: node.to };\n};\n\n/**\n * Highlighting, folding and indentation, shared by all four dialects.\n *\n * Exported so a consumer can re-configure the parser with props of their own —\n * extra `styleTags`, say, to tag the three RDF 1.2 constructs' regions apart\n * rather than all as `quote`. `codemirror-lang-sparql12` exports `sparqlProps`\n * for the same reason.\n */\nexport const turtleProps = [\n turtleHighlighting,\n indentNodeProp.add({\n BlankNodePropertyList: delimitedIndent({ closing: ']' }),\n Collection: delimitedIndent({ closing: ')' }),\n WrappedGraph: delimitedIndent({ closing: '}' }),\n AnnotationBlock: delimitedIndent({ closing: '|}' }),\n TripleTerm: delimitedIndent({ closing: ')>>' }),\n ReifiedTriple: delimitedIndent({ closing: '>>' }),\n }),\n foldNodeProp.add({\n BlankNodePropertyList: foldInside,\n Collection: foldInside,\n WrappedGraph: foldInside,\n AnnotationBlock: foldInside,\n 'Triples Triples2 TriplesOrGraph': statementFold,\n }),\n];\n\nconst languageData = {\n commentTokens: { line: '#' },\n closeBrackets: { brackets: ['[', '(', '<', '\"', \"'\"] },\n indentOnInput: /^\\s*[\\]})]$/,\n};\n\nfunction define(top: string) {\n return LRLanguage.define({\n name: top === 'TurtleDoc' ? 'turtle' : top === 'TrigDoc' ? 'trig' : top === 'NTriplesDoc' ? 'ntriples' : 'nquads',\n parser: rawParser.configure({ top, props: turtleProps }),\n languageData,\n });\n}\n\nexport const turtleLanguage = define('TurtleDoc');\nexport const trigLanguage = define('TrigDoc');\nexport const ntriplesLanguage = define('NTriplesDoc');\nexport const nquadsLanguage = define('NQuadsDoc');\n\nfunction support(language: LRLanguage, options: CompletionOptions, dialect: 'turtle' | 'trig') {\n return new LanguageSupport(language, [\n language.data.of({ autocomplete: turtleCompletionSource(options, dialect) }),\n ]);\n}\n\n/** RDF 1.2 Turtle. */\nexport function turtle(options: CompletionOptions = {}): LanguageSupport {\n return support(turtleLanguage, options, 'turtle');\n}\n\n/** RDF 1.2 TriG. */\nexport function trig(options: CompletionOptions = {}): LanguageSupport {\n return support(trigLanguage, options, 'trig');\n}\n\n/**\n * RDF 1.2 N-Triples.\n *\n * A strict subset with its own entry point rather than Turtle in a lenient\n * mood: a prefixed name or a `;` list in an N-Triples document is an error, and\n * an editor that colours it as valid is lying about the file it will write.\n */\nexport function ntriples(): LanguageSupport {\n return new LanguageSupport(ntriplesLanguage);\n}\n\n/** RDF 1.2 N-Quads. */\nexport function nquads(): LanguageSupport {\n return new LanguageSupport(nquadsLanguage);\n}\n"],"names":["parser","LRParser","styleTags","t","syntaxTree","rawParser","foldNodeProp","indentNodeProp","delimitedIndent","foldInside","LRLanguage","language","LanguageSupport"],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,UAAA,EAAsB,OAAA,EAA4B,OAAA,EAA4B;AAC7F,EAAA,OAAO,IAAIC,yBAAgBD,UAAA,EAAU;AAAA,IACnCA,UAAA,CAAS,KAAK,EAAA,CAAG,EAAE,cAAc,sBAAA,CAAuB,OAAA,EAAS,OAAO,CAAA,EAAG;AAAA,GAC5E,CAAA;AACH;AAGO,SAAS,MAAA,CAAO,OAAA,GAA6B,EAAC,EAAoB;AACvE,EAAA,OAAO,OAAA,CAAQ,cAAA,EAAgB,OAAA,EAAS,QAAQ,CAAA;AAClD;AAGO,SAAS,IAAA,CAAK,OAAA,GAA6B,EAAC,EAAoB;AACrE,EAAA,OAAO,OAAA,CAAQ,YAAA,EAAc,OAAA,EAAS,MAAM,CAAA;AAC9C;AASO,SAAS,QAAA,GAA4B;AAC1C,EAAA,OAAO,IAAIC,yBAAgB,gBAAgB,CAAA;AAC7C;AAGO,SAAS,MAAA,GAA0B;AACxC,EAAA,OAAO,IAAIA,yBAAgB,cAAc,CAAA;AAC3C;;;;;;;;;;;;;;;"}
@@ -0,0 +1,35 @@
1
+ import { LRLanguage, LanguageSupport } from '@codemirror/language';
2
+ import type { LRParser } from '@lezer/lr';
3
+ import type { CompletionOptions } from './complete';
4
+ export type { CompletionOptions, PrefixMap, PrefixSource } from './complete';
5
+ export { documentPrefixes, knownPrefixes, turtleCompletionSource } from './complete';
6
+ export { turtleHighlighting } from './highlight';
7
+ /** The unconfigured grammar, for callers that want their own `top` or props. */
8
+ export declare const parser: LRParser;
9
+ /**
10
+ * Highlighting, folding and indentation, shared by all four dialects.
11
+ *
12
+ * Exported so a consumer can re-configure the parser with props of their own —
13
+ * extra `styleTags`, say, to tag the three RDF 1.2 constructs' regions apart
14
+ * rather than all as `quote`. `codemirror-lang-sparql12` exports `sparqlProps`
15
+ * for the same reason.
16
+ */
17
+ export declare const turtleProps: import("@lezer/common").NodePropSource[];
18
+ export declare const turtleLanguage: LRLanguage;
19
+ export declare const trigLanguage: LRLanguage;
20
+ export declare const ntriplesLanguage: LRLanguage;
21
+ export declare const nquadsLanguage: LRLanguage;
22
+ /** RDF 1.2 Turtle. */
23
+ export declare function turtle(options?: CompletionOptions): LanguageSupport;
24
+ /** RDF 1.2 TriG. */
25
+ export declare function trig(options?: CompletionOptions): LanguageSupport;
26
+ /**
27
+ * RDF 1.2 N-Triples.
28
+ *
29
+ * A strict subset with its own entry point rather than Turtle in a lenient
30
+ * mood: a prefixed name or a `;` list in an N-Triples document is an error, and
31
+ * an editor that colours it as valid is lying about the file it will write.
32
+ */
33
+ export declare function ntriples(): LanguageSupport;
34
+ /** RDF 1.2 N-Quads. */
35
+ export declare function nquads(): LanguageSupport;