@teipublisher/oddity-language-server 0.0.0-stage → 0.1.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 +21 -0
- package/README.md +48 -2
- package/dist/edit.js +313 -0
- package/dist/edit.js.map +7 -0
- package/dist/index.js +803 -0
- package/dist/index.js.map +7 -0
- package/dist/node.cjs +44962 -0
- package/dist/node.cjs.map +7 -0
- package/package.json +74 -4
- package/schema/README.md +41 -0
- package/schema/docbook/docbook.rng +18457 -0
- package/schema/jats/BITS-embedded-index2.ent.rng +340 -0
- package/schema/jats/BITS-question-answer2.ent.rng +795 -0
- package/schema/jats/JATS-XHTMLtablesetup1-3.ent.rng +614 -0
- package/schema/jats/JATS-ali-namespace1-3.ent.rng +284 -0
- package/schema/jats/JATS-archivearticle1-3-mathml3.rng +1277 -0
- package/schema/jats/JATS-archivecustom-classes1-3.ent.rng +427 -0
- package/schema/jats/JATS-archivecustom-mixes1-3.ent.rng +630 -0
- package/schema/jats/JATS-archivecustom-models1-3.ent.rng +2205 -0
- package/schema/jats/JATS-articlemeta1-3.ent.rng +3138 -0
- package/schema/jats/JATS-backmatter1-3.ent.rng +601 -0
- package/schema/jats/JATS-chars1-3.ent.rng +715 -0
- package/schema/jats/JATS-common-atts1-3.ent.rng +367 -0
- package/schema/jats/JATS-common1-3.ent.rng +6007 -0
- package/schema/jats/JATS-default-classes1-3.ent.rng +1953 -0
- package/schema/jats/JATS-default-mixes1-3.ent.rng +583 -0
- package/schema/jats/JATS-display1-3.ent.rng +1669 -0
- package/schema/jats/JATS-format1-3.ent.rng +1256 -0
- package/schema/jats/JATS-funding1-3.ent.rng +1389 -0
- package/schema/jats/JATS-journalmeta1-3.ent.rng +691 -0
- package/schema/jats/JATS-link1-3.ent.rng +664 -0
- package/schema/jats/JATS-list1-3.ent.rng +747 -0
- package/schema/jats/JATS-math1-3.ent.rng +620 -0
- package/schema/jats/JATS-mathml3-mathmlsetup1-3.ent.rng +459 -0
- package/schema/jats/JATS-nlmcitation1-3.ent.rng +522 -0
- package/schema/jats/JATS-para1-3.ent.rng +780 -0
- package/schema/jats/JATS-phrase1-3.ent.rng +725 -0
- package/schema/jats/JATS-references1-3.ent.rng +1713 -0
- package/schema/jats/JATS-related-object1-3.ent.rng +453 -0
- package/schema/jats/JATS-section1-3.ent.rng +482 -0
- package/schema/jats/mathml3-qname1.mod.rng +61 -0
- package/schema/jats/mathml3.rng +4094 -0
- package/schema/jats/xhtml-inlstyle-1.mod.rng +37 -0
- package/schema/jats/xhtml-table-1.mod.rng +426 -0
- package/schema/odd/teipublisher_odds.rng +12769 -0
- package/schema/tei/tei_all.rng +23212 -0
- package/src/core/association.ts +155 -0
- package/src/core/complete.ts +147 -0
- package/src/core/elements.ts +86 -0
- package/src/core/outline.ts +156 -0
- package/src/core/schema.ts +55 -0
- package/src/core/tags.ts +104 -0
- package/src/core/toml.ts +64 -0
- package/src/core/validate.ts +128 -0
- package/src/core/wellformed.ts +16 -0
- package/src/edit.ts +11 -0
- package/src/index.ts +16 -0
- package/src/node.ts +39 -0
- package/src/server/server.ts +248 -0
package/package.json
CHANGED
|
@@ -1,6 +1,76 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teipublisher/oddity-language-server",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "RELAX NG validation, completion and outline for TEI and ODD documents, as a language server",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"author": "e-editiones",
|
|
8
|
+
"homepage": "https://github.com/eeditiones/oddity-language-server#readme",
|
|
9
|
+
"bugs": {
|
|
10
|
+
"url": "https://github.com/eeditiones/oddity-language-server/issues"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"tei",
|
|
14
|
+
"odd",
|
|
15
|
+
"relax-ng",
|
|
16
|
+
"xml",
|
|
17
|
+
"docbook",
|
|
18
|
+
"jats",
|
|
19
|
+
"language-server",
|
|
20
|
+
"lsp",
|
|
21
|
+
"tei-publisher"
|
|
22
|
+
],
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/eeditiones/oddity-language-server.git"
|
|
26
|
+
},
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=20"
|
|
32
|
+
},
|
|
33
|
+
"bin": {
|
|
34
|
+
"oddity-language-server": "./dist/node.cjs"
|
|
35
|
+
},
|
|
36
|
+
"exports": {
|
|
37
|
+
".": {
|
|
38
|
+
"types": "./src/index.ts",
|
|
39
|
+
"default": "./dist/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./edit": {
|
|
42
|
+
"types": "./src/edit.ts",
|
|
43
|
+
"default": "./dist/edit.js"
|
|
44
|
+
},
|
|
45
|
+
"./node": "./dist/node.cjs",
|
|
46
|
+
"./schema/*": "./schema/*",
|
|
47
|
+
"./package.json": "./package.json"
|
|
48
|
+
},
|
|
49
|
+
"files": [
|
|
50
|
+
"dist",
|
|
51
|
+
"schema",
|
|
52
|
+
"src"
|
|
53
|
+
],
|
|
54
|
+
"scripts": {
|
|
55
|
+
"build": "esbuild src/node.ts --bundle --platform=node --format=cjs --target=node20 --outfile=dist/node.cjs --sourcemap && esbuild src/index.ts src/edit.ts --bundle --platform=neutral --format=esm --target=es2022 --packages=external --outdir=dist --sourcemap",
|
|
56
|
+
"check": "tsc --noEmit",
|
|
57
|
+
"test": "node --test 'test/*.test.ts'",
|
|
58
|
+
"schemas": "node scripts/schemas.mjs",
|
|
59
|
+
"prepare": "npm run build"
|
|
60
|
+
},
|
|
61
|
+
"dependencies": {
|
|
62
|
+
"@xml-tools/ast": "^5.0.5",
|
|
63
|
+
"@xml-tools/parser": "^1.0.11",
|
|
64
|
+
"salve-annos": "^1.2.5",
|
|
65
|
+
"saxes": "^6.0.0",
|
|
66
|
+
"smol-toml": "^1.9.1",
|
|
67
|
+
"vscode-languageserver": "^11.0.0",
|
|
68
|
+
"vscode-languageserver-textdocument": "^1.0.16"
|
|
69
|
+
},
|
|
70
|
+
"devDependencies": {
|
|
71
|
+
"@types/node": "^22.0.0",
|
|
72
|
+
"esbuild": "^0.28.2",
|
|
73
|
+
"typescript": "^7.0.2",
|
|
74
|
+
"vscode-jsonrpc": "^10.0.0"
|
|
75
|
+
}
|
|
76
|
+
}
|
package/schema/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Default schemas
|
|
2
|
+
|
|
3
|
+
The RELAX NG schemas the language server checks and completes documents against when they name no schema of their own: TEI, DocBook and JATS as their publishers distribute them, each with the files it includes, and a schema for ODDs compiled from TEI Publisher's customization. `npm run schemas` (`scripts/schemas.mjs`) writes them again. They remain under their own terms, not this package's MIT licence.
|
|
4
|
+
|
|
5
|
+
## tei/
|
|
6
|
+
|
|
7
|
+
`tei_all.rng` of the current TEI P5 release, <https://tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng>, © the TEI Consortium. TEI material is available under both [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/) and the [BSD 2-Clause licence](https://opensource.org/license/bsd-2-clause).
|
|
8
|
+
|
|
9
|
+
## docbook/
|
|
10
|
+
|
|
11
|
+
The DocBook 5.2 RELAX NG schema, <https://cdn.docbook.org/schema/5.2/rng/docbook.rng>, under its permission notice:
|
|
12
|
+
|
|
13
|
+
> Copyright 1992-2015 HaL Computer Systems, Inc.,
|
|
14
|
+
> O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software
|
|
15
|
+
> Corporation, Norman Walsh, Sun Microsystems, Inc., and the
|
|
16
|
+
> Organization for the Advancement of Structured Information
|
|
17
|
+
> Standards (OASIS).
|
|
18
|
+
>
|
|
19
|
+
> Permission to use, copy, modify and distribute the DocBook schema
|
|
20
|
+
> and its accompanying documentation for any purpose and without fee
|
|
21
|
+
> is hereby granted in perpetuity, provided that the above copyright
|
|
22
|
+
> notice and this paragraph appear in all copies. The copyright
|
|
23
|
+
> holders make no representation about the suitability of the schema
|
|
24
|
+
> for any purpose. It is provided "as is" without expressed or implied
|
|
25
|
+
> warranty.
|
|
26
|
+
>
|
|
27
|
+
> If you modify the DocBook schema in any way, label your schema as a
|
|
28
|
+
> variant of DocBook. See the reference documentation
|
|
29
|
+
> (http://docbook.org/tdg5/en/html/ch05.html#s-notdocbook)
|
|
30
|
+
> for more information.
|
|
31
|
+
|
|
32
|
+
## jats/
|
|
33
|
+
|
|
34
|
+
The JATS 1.3 Archiving RELAX NG with MathML 3, <https://jats.nlm.nih.gov/archiving/1.3/>, from the National Library of Medicine (NLM). The JATS (ANSI/NISO Z39.96) suite is in the public domain, as each of its modules states:
|
|
35
|
+
|
|
36
|
+
> This DTD is in the public domain. An organization that wishes to create its
|
|
37
|
+
> own DTD from the suite may do so without permission from NLM.
|
|
38
|
+
|
|
39
|
+
## odd/
|
|
40
|
+
|
|
41
|
+
`teipublisher_odds.rng`, compiled with `opm odd compile --format rng` from `teipublisher_odds.odd` in [jinks](https://github.com/eeditiones/jinks/blob/main/profiles/base10/resources/odd/teipublisher_odds.odd), "TEI Publisher Customization for ODD Authoring" by Wolfgang Meier, distributed under the [Creative Commons Attribution-ShareAlike 3.0 Unported License](http://creativecommons.org/licenses/by-sa/3.0/). It builds on TEI P5, © the TEI Consortium, under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/) and the [BSD 2-Clause licence](https://opensource.org/license/bsd-2-clause).
|