jats-xml 0.0.1

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 ADDED
@@ -0,0 +1,3 @@
1
+ # jats-xml
2
+
3
+ Types and utilities for working with JATS XML documents.
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./types"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB"}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RefType = void 0;
4
+ /**
5
+ * https://jats.nlm.nih.gov/archiving/tag-library/1.3/attribute/ref-type.html
6
+ */
7
+ var RefType;
8
+ (function (RefType) {
9
+ /** Affiliation */
10
+ RefType["aff"] = "aff";
11
+ /** Appendix */
12
+ RefType["app"] = "app";
13
+ /** Author notes */
14
+ RefType["author-note"] = "author-note";
15
+ /** Points to the description of or identifier for a grant or award (<award-id>), also, possibly to an entire awards group (<award-group>) */
16
+ RefType["award"] = "award";
17
+ /** Bibliographic reference (typically to a <ref> element, but it may point to a <element-citation> or <mixed-citation> if there are multiple citations inside the <ref> element) */
18
+ RefType["bibr"] = "bibr";
19
+ /** Biography (typically of a contributor) */
20
+ RefType["bio"] = "bio";
21
+ /** Textbox or sidebar */
22
+ RefType["boxed-text"] = "boxed-text";
23
+ /** Chemical structure (to a <chem-struct> or <chem-struct-wrap> element) */
24
+ RefType["chem"] = "chem";
25
+ /** Collaboration */
26
+ RefType["collab"] = "collab";
27
+ /** Contributor */
28
+ RefType["contrib"] = "contrib";
29
+ /** Corresponding author */
30
+ RefType["corresp"] = "corresp";
31
+ /** The value “custom” is used in versions of JATS that have a static list of values for the @ref-type attribute. To add a value to such a list, the cross reference is given the type “custom” and a separate @custom-type attribute provides the typing value. There is no need for this mechanism in Archiving, since there are no restrictions on the value of @ref-type, but “custom” and @custom-type have both been included in Archiving so that documents valid to a stricter version of the JATS Tag Set will also be valid to Archiving. */
32
+ RefType["custom"] = "custom";
33
+ /** Display formula */
34
+ RefType["disp-formula"] = "disp-formula";
35
+ /** Figure or group of figures (to a <fig> or <fig-group> element) */
36
+ RefType["fig"] = "fig";
37
+ /** Footnote */
38
+ RefType["fn"] = "fn";
39
+ /** Keyword */
40
+ RefType["kwd"] = "kwd";
41
+ /** List or list item (to a <list> or <list-item> element; also, possibly to a <def-list> or <def-item> element) */
42
+ RefType["list"] = "list";
43
+ /** Plate */
44
+ RefType["plate"] = "plate";
45
+ /** Scheme */
46
+ RefType["scheme"] = "scheme";
47
+ /** Section */
48
+ RefType["sec"] = "sec";
49
+ /** Statement */
50
+ RefType["statement"] = "statement";
51
+ /** Supplementary information */
52
+ RefType["supplementary-material"] = "supplementary-material";
53
+ /** Table or group of tables (to a <table-wrap> or <table-wrap-group> element) */
54
+ RefType["table"] = "table";
55
+ /** Table footnote */
56
+ RefType["table-fn"] = "table-fn";
57
+ })(RefType = exports.RefType || (exports.RefType = {}));
58
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,OAiDX;AAjDD,WAAY,OAAO;IACjB,kBAAkB;IAClB,sBAAa,CAAA;IACb,eAAe;IACf,sBAAa,CAAA;IACb,mBAAmB;IACnB,sCAA6B,CAAA;IAC7B,6IAA6I;IAC7I,0BAAiB,CAAA;IACjB,oLAAoL;IACpL,wBAAe,CAAA;IACf,6CAA6C;IAC7C,sBAAa,CAAA;IACb,yBAAyB;IACzB,oCAA2B,CAAA;IAC3B,4EAA4E;IAC5E,wBAAe,CAAA;IACf,oBAAoB;IACpB,4BAAmB,CAAA;IACnB,kBAAkB;IAClB,8BAAqB,CAAA;IACrB,2BAA2B;IAC3B,8BAAqB,CAAA;IACrB,shBAAshB;IACthB,4BAAmB,CAAA;IACnB,sBAAsB;IACtB,wCAA+B,CAAA;IAC/B,qEAAqE;IACrE,sBAAa,CAAA;IACb,eAAe;IACf,oBAAW,CAAA;IACX,cAAc;IACd,sBAAa,CAAA;IACb,mHAAmH;IACnH,wBAAe,CAAA;IACf,YAAY;IACZ,0BAAiB,CAAA;IACjB,aAAa;IACb,4BAAmB,CAAA;IACnB,cAAc;IACd,sBAAa,CAAA;IACb,gBAAgB;IAChB,kCAAyB,CAAA;IACzB,gCAAgC;IAChC,4DAAmD,CAAA;IACnD,iFAAiF;IACjF,0BAAiB,CAAA;IACjB,qBAAqB;IACrB,gCAAuB,CAAA;AACzB,CAAC,EAjDW,OAAO,GAAP,eAAO,KAAP,eAAO,QAiDlB"}
@@ -0,0 +1,2 @@
1
+ export * from './types';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * https://jats.nlm.nih.gov/archiving/tag-library/1.3/attribute/ref-type.html
3
+ */
4
+ export var RefType;
5
+ (function (RefType) {
6
+ /** Affiliation */
7
+ RefType["aff"] = "aff";
8
+ /** Appendix */
9
+ RefType["app"] = "app";
10
+ /** Author notes */
11
+ RefType["author-note"] = "author-note";
12
+ /** Points to the description of or identifier for a grant or award (<award-id>), also, possibly to an entire awards group (<award-group>) */
13
+ RefType["award"] = "award";
14
+ /** Bibliographic reference (typically to a <ref> element, but it may point to a <element-citation> or <mixed-citation> if there are multiple citations inside the <ref> element) */
15
+ RefType["bibr"] = "bibr";
16
+ /** Biography (typically of a contributor) */
17
+ RefType["bio"] = "bio";
18
+ /** Textbox or sidebar */
19
+ RefType["boxed-text"] = "boxed-text";
20
+ /** Chemical structure (to a <chem-struct> or <chem-struct-wrap> element) */
21
+ RefType["chem"] = "chem";
22
+ /** Collaboration */
23
+ RefType["collab"] = "collab";
24
+ /** Contributor */
25
+ RefType["contrib"] = "contrib";
26
+ /** Corresponding author */
27
+ RefType["corresp"] = "corresp";
28
+ /** The value “custom” is used in versions of JATS that have a static list of values for the @ref-type attribute. To add a value to such a list, the cross reference is given the type “custom” and a separate @custom-type attribute provides the typing value. There is no need for this mechanism in Archiving, since there are no restrictions on the value of @ref-type, but “custom” and @custom-type have both been included in Archiving so that documents valid to a stricter version of the JATS Tag Set will also be valid to Archiving. */
29
+ RefType["custom"] = "custom";
30
+ /** Display formula */
31
+ RefType["disp-formula"] = "disp-formula";
32
+ /** Figure or group of figures (to a <fig> or <fig-group> element) */
33
+ RefType["fig"] = "fig";
34
+ /** Footnote */
35
+ RefType["fn"] = "fn";
36
+ /** Keyword */
37
+ RefType["kwd"] = "kwd";
38
+ /** List or list item (to a <list> or <list-item> element; also, possibly to a <def-list> or <def-item> element) */
39
+ RefType["list"] = "list";
40
+ /** Plate */
41
+ RefType["plate"] = "plate";
42
+ /** Scheme */
43
+ RefType["scheme"] = "scheme";
44
+ /** Section */
45
+ RefType["sec"] = "sec";
46
+ /** Statement */
47
+ RefType["statement"] = "statement";
48
+ /** Supplementary information */
49
+ RefType["supplementary-material"] = "supplementary-material";
50
+ /** Table or group of tables (to a <table-wrap> or <table-wrap-group> element) */
51
+ RefType["table"] = "table";
52
+ /** Table footnote */
53
+ RefType["table-fn"] = "table-fn";
54
+ })(RefType || (RefType = {}));
55
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,OAiDX;AAjDD,WAAY,OAAO;IACjB,kBAAkB;IAClB,sBAAa,CAAA;IACb,eAAe;IACf,sBAAa,CAAA;IACb,mBAAmB;IACnB,sCAA6B,CAAA;IAC7B,6IAA6I;IAC7I,0BAAiB,CAAA;IACjB,oLAAoL;IACpL,wBAAe,CAAA;IACf,6CAA6C;IAC7C,sBAAa,CAAA;IACb,yBAAyB;IACzB,oCAA2B,CAAA;IAC3B,4EAA4E;IAC5E,wBAAe,CAAA;IACf,oBAAoB;IACpB,4BAAmB,CAAA;IACnB,kBAAkB;IAClB,8BAAqB,CAAA;IACrB,2BAA2B;IAC3B,8BAAqB,CAAA;IACrB,shBAAshB;IACthB,4BAAmB,CAAA;IACnB,sBAAsB;IACtB,wCAA+B,CAAA;IAC/B,qEAAqE;IACrE,sBAAa,CAAA;IACb,eAAe;IACf,oBAAW,CAAA;IACX,cAAc;IACd,sBAAa,CAAA;IACb,mHAAmH;IACnH,wBAAe,CAAA;IACf,YAAY;IACZ,0BAAiB,CAAA;IACjB,aAAa;IACb,4BAAmB,CAAA;IACnB,cAAc;IACd,sBAAa,CAAA;IACb,gBAAgB;IAChB,kCAAyB,CAAA;IACzB,gCAAgC;IAChC,4DAAmD,CAAA;IACnD,iFAAiF;IACjF,0BAAiB,CAAA;IACjB,qBAAqB;IACrB,gCAAuB,CAAA;AACzB,CAAC,EAjDW,OAAO,KAAP,OAAO,QAiDlB"}
@@ -0,0 +1 @@
1
+ export * from './types';
@@ -0,0 +1,53 @@
1
+ /**
2
+ * https://jats.nlm.nih.gov/archiving/tag-library/1.3/attribute/ref-type.html
3
+ */
4
+ export declare enum RefType {
5
+ /** Affiliation */
6
+ 'aff' = "aff",
7
+ /** Appendix */
8
+ 'app' = "app",
9
+ /** Author notes */
10
+ 'author-note' = "author-note",
11
+ /** Points to the description of or identifier for a grant or award (<award-id>), also, possibly to an entire awards group (<award-group>) */
12
+ 'award' = "award",
13
+ /** Bibliographic reference (typically to a <ref> element, but it may point to a <element-citation> or <mixed-citation> if there are multiple citations inside the <ref> element) */
14
+ 'bibr' = "bibr",
15
+ /** Biography (typically of a contributor) */
16
+ 'bio' = "bio",
17
+ /** Textbox or sidebar */
18
+ 'boxed-text' = "boxed-text",
19
+ /** Chemical structure (to a <chem-struct> or <chem-struct-wrap> element) */
20
+ 'chem' = "chem",
21
+ /** Collaboration */
22
+ 'collab' = "collab",
23
+ /** Contributor */
24
+ 'contrib' = "contrib",
25
+ /** Corresponding author */
26
+ 'corresp' = "corresp",
27
+ /** The value “custom” is used in versions of JATS that have a static list of values for the @ref-type attribute. To add a value to such a list, the cross reference is given the type “custom” and a separate @custom-type attribute provides the typing value. There is no need for this mechanism in Archiving, since there are no restrictions on the value of @ref-type, but “custom” and @custom-type have both been included in Archiving so that documents valid to a stricter version of the JATS Tag Set will also be valid to Archiving. */
28
+ 'custom' = "custom",
29
+ /** Display formula */
30
+ 'disp-formula' = "disp-formula",
31
+ /** Figure or group of figures (to a <fig> or <fig-group> element) */
32
+ 'fig' = "fig",
33
+ /** Footnote */
34
+ 'fn' = "fn",
35
+ /** Keyword */
36
+ 'kwd' = "kwd",
37
+ /** List or list item (to a <list> or <list-item> element; also, possibly to a <def-list> or <def-item> element) */
38
+ 'list' = "list",
39
+ /** Plate */
40
+ 'plate' = "plate",
41
+ /** Scheme */
42
+ 'scheme' = "scheme",
43
+ /** Section */
44
+ 'sec' = "sec",
45
+ /** Statement */
46
+ 'statement' = "statement",
47
+ /** Supplementary information */
48
+ 'supplementary-material' = "supplementary-material",
49
+ /** Table or group of tables (to a <table-wrap> or <table-wrap-group> element) */
50
+ 'table' = "table",
51
+ /** Table footnote */
52
+ 'table-fn' = "table-fn"
53
+ }
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "jats-xml",
3
+ "version": "0.0.1",
4
+ "description": "Types and utilities for working with JATS in Typescript",
5
+ "author": "Rowan Cockett <rowan@curvenote.com>",
6
+ "homepage": "https://github.com/executablebooks/mystjs/tree/main/packages/jats-xml",
7
+ "license": "MIT",
8
+ "main": "dist/cjs/index.js",
9
+ "module": "dist/esm/index.js",
10
+ "types": "dist/types/index.d.ts",
11
+ "files": [
12
+ "dist"
13
+ ],
14
+ "exports": {
15
+ ".": {
16
+ "require": "./dist/cjs/index.js",
17
+ "import": "./dist/esm/index.js"
18
+ }
19
+ },
20
+ "keywords": [
21
+ "jats",
22
+ "publishing"
23
+ ],
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/executablebooks/mystjs.git"
30
+ },
31
+ "scripts": {
32
+ "clean": "rm -rf dist",
33
+ "prepublishOnly": "npm run build;",
34
+ "test": "jest",
35
+ "test:watch": "jest --watchAll",
36
+ "lint": "eslint \"src/**/*.ts\" -c .eslintrc.js --max-warnings 1",
37
+ "lint:format": "prettier --check src/*.ts src/**/*.ts",
38
+ "watch": "tsc -w -p .",
39
+ "build:esm": "tsc --module es2015 --outDir dist/esm",
40
+ "build:cjs": "tsc --module commonjs --outDir dist/cjs",
41
+ "declarations": "tsc --declaration --emitDeclarationOnly --outDir dist/types",
42
+ "build": "npm-run-all -l clean -p build:cjs build:esm declarations"
43
+ },
44
+ "bugs": {
45
+ "url": "https://github.com/executablebooks/mystjs/issues"
46
+ },
47
+ "dependencies": {},
48
+ "devDependencies": {
49
+ "npm-run-all": "^4.1.5",
50
+ "prettier": "^2.6.1",
51
+ "rimraf": "^3.0.2",
52
+ "ts-jest": "^28.0.7",
53
+ "ts-loader": "^9.2.8",
54
+ "typescript": "^4.6.3"
55
+ }
56
+ }