@fiduswriter/bibliography-manager 0.1.19 → 0.1.20
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/dist/form/fields/literal.d.ts.map +1 -1
- package/dist/form/fields/literal.js +3 -1
- package/dist/form/fields/literal.js.map +1 -1
- package/dist/form/fields/literal_long.d.ts.map +1 -1
- package/dist/form/fields/literal_long.js +3 -1
- package/dist/form/fields/literal_long.js.map +1 -1
- package/dist/form/fields/title.d.ts.map +1 -1
- package/dist/form/fields/title.js +3 -1
- package/dist/form/fields/title.js.map +1 -1
- package/package.json +2 -7
- package/src/form/fields/literal.ts +3 -1
- package/src/form/fields/literal_long.ts +3 -1
- package/src/form/fields/title.ts +3 -1
- package/src/schema/common.ts +0 -95
- package/src/schema/csl_bib.ts +0 -140
- package/src/schema/literal.ts +0 -34
- package/src/schema/literal_long.ts +0 -45
- package/src/schema/title.ts +0 -42
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"literal.d.ts","sourceRoot":"","sources":["../../../src/form/fields/literal.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"literal.d.ts","sourceRoot":"","sources":["../../../src/form/fields/literal.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,WAAW,EAAO,MAAM,WAAW,CAAA;AAK3C,qBAAa,gBAAgB;IACzB,WAAW,EAAE,WAAW,CAAA;gBAGpB,GAAG,EAAE,WAAW,EAChB,YAAY,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAO,EAC5C,WAAW,GAAE,MAAM,GAAG,KAAa;IAgCvC,IAAI,IAAI,IAAI;IAEZ,IAAI,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,CAE7C;IAED,KAAK,IAAI,OAAO;CAGnB"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { Schema } from "prosemirror-model";
|
|
1
2
|
import { toggleMark } from "prosemirror-commands";
|
|
2
3
|
import { InlineInput, icon } from "fwtoolkit";
|
|
3
|
-
import {
|
|
4
|
+
import { litSpec } from "bibliojson";
|
|
5
|
+
const litSchema = new Schema(litSpec);
|
|
4
6
|
export class LiteralFieldForm {
|
|
5
7
|
inlineInput;
|
|
6
8
|
constructor(dom, initialValue = [], placeHolder = false) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"literal.js","sourceRoot":"","sources":["../../../src/form/fields/literal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAC,WAAW,EAAE,IAAI,EAAC,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"literal.js","sourceRoot":"","sources":["../../../src/form/fields/literal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAA;AACxC,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAC,WAAW,EAAE,IAAI,EAAC,MAAM,WAAW,CAAA;AAC3C,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAA;AAElC,MAAM,SAAS,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAA;AAErC,MAAM,OAAO,gBAAgB;IACzB,WAAW,CAAa;IAExB,YACI,GAAgB,EAChB,eAA0C,EAAE,EAC5C,cAA8B,KAAK;QAEnC,IAAI,CAAC,WAAW,GAAG,IAAI,WAAW,CAAC,GAAG,EAAE;YACpC,MAAM,EAAE,SAAS;YACjB,QAAQ,EAAE,SAAS;YACnB,YAAY;YACZ,WAAW,EAAE,WAAW,IAAI,SAAS;YACrC,KAAK,EAAE;gBACH;oBACI,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC;oBAC3C,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;iBACzC;gBACD;oBACI,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;oBACvC,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;iBACvC;gBACD;oBACI,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC;oBAC9C,GAAG,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;iBAChD;gBACD;oBACI,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC;oBACxC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;iBAC1C;gBACD;oBACI,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC;oBACxC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;iBAC1C;aACJ;SACJ,CAAC,CAAA;IACN,CAAC;IAED,IAAI,KAAU,CAAC;IAEf,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,CAAA;IACjC,CAAC;IAED,KAAK;QACD,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAA;IACnC,CAAC;CACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"literal_long.d.ts","sourceRoot":"","sources":["../../../src/form/fields/literal_long.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"literal_long.d.ts","sourceRoot":"","sources":["../../../src/form/fields/literal_long.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,WAAW,EAAO,MAAM,WAAW,CAAA;AAK3C,qBAAa,oBAAoB;IAC7B,WAAW,EAAE,WAAW,CAAA;gBAEZ,GAAG,EAAE,WAAW,EAAE,YAAY,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAO;IA8B1E,IAAI,IAAI,IAAI;IAEZ,IAAI,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,CAE7C;IAED,KAAK,IAAI,OAAO;CAGnB"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { Schema } from "prosemirror-model";
|
|
1
2
|
import { toggleMark } from "prosemirror-commands";
|
|
2
3
|
import { InlineInput, icon } from "fwtoolkit";
|
|
3
|
-
import {
|
|
4
|
+
import { longLitSpec } from "bibliojson";
|
|
5
|
+
const longLitSchema = new Schema(longLitSpec);
|
|
4
6
|
export class LiteralLongFieldForm {
|
|
5
7
|
inlineInput;
|
|
6
8
|
constructor(dom, initialValue = []) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"literal_long.js","sourceRoot":"","sources":["../../../src/form/fields/literal_long.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAC,WAAW,EAAE,IAAI,EAAC,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"literal_long.js","sourceRoot":"","sources":["../../../src/form/fields/literal_long.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAA;AACxC,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAC,WAAW,EAAE,IAAI,EAAC,MAAM,WAAW,CAAA;AAC3C,OAAO,EAAC,WAAW,EAAC,MAAM,YAAY,CAAA;AAEtC,MAAM,aAAa,GAAG,IAAI,MAAM,CAAC,WAAW,CAAC,CAAA;AAE7C,MAAM,OAAO,oBAAoB;IAC7B,WAAW,CAAa;IAExB,YAAY,GAAgB,EAAE,eAA0C,EAAE;QACtE,IAAI,CAAC,WAAW,GAAG,IAAI,WAAW,CAAC,GAAG,EAAE;YACpC,MAAM,EAAE,aAAa;YACrB,QAAQ,EAAE,aAAa;YACvB,YAAY;YACZ,KAAK,EAAE;gBACH;oBACI,OAAO,EAAE,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC;oBAC/C,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;iBACzC;gBACD;oBACI,OAAO,EAAE,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;oBAC3C,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;iBACvC;gBACD;oBACI,OAAO,EAAE,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,SAAS,CAAC;oBAClD,GAAG,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;iBAChD;gBACD;oBACI,OAAO,EAAE,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC;oBAC5C,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;iBAC1C;gBACD;oBACI,OAAO,EAAE,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC;oBAC5C,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;iBAC1C;aACJ;SACJ,CAAC,CAAA;IACN,CAAC;IAED,IAAI,KAAU,CAAC;IAEf,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,CAAA;IACjC,CAAC;IAED,KAAK;QACD,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAA;IACnC,CAAC;CACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../src/form/fields/title.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../src/form/fields/title.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,WAAW,EAAO,MAAM,WAAW,CAAA;AAK3C,qBAAa,cAAc;IACvB,WAAW,EAAE,WAAW,CAAA;gBAEZ,GAAG,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE;IAkCrE,IAAI,IAAI,IAAI;IAEZ,IAAI,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,CAE7C;IAED,KAAK,IAAI,OAAO;CAGnB"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { Schema } from "prosemirror-model";
|
|
1
2
|
import { toggleMark } from "prosemirror-commands";
|
|
2
3
|
import { InlineInput, icon } from "fwtoolkit";
|
|
3
|
-
import {
|
|
4
|
+
import { titleSpec } from "bibliojson";
|
|
5
|
+
const titleSchema = new Schema(titleSpec);
|
|
4
6
|
export class TitleFieldForm {
|
|
5
7
|
inlineInput;
|
|
6
8
|
constructor(dom, initialValue) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"title.js","sourceRoot":"","sources":["../../../src/form/fields/title.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAC,WAAW,EAAE,IAAI,EAAC,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"title.js","sourceRoot":"","sources":["../../../src/form/fields/title.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAA;AACxC,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAC,WAAW,EAAE,IAAI,EAAC,MAAM,WAAW,CAAA;AAC3C,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAA;AAEpC,MAAM,WAAW,GAAG,IAAI,MAAM,CAAC,SAAS,CAAC,CAAA;AAEzC,MAAM,OAAO,cAAc;IACvB,WAAW,CAAa;IAExB,YAAY,GAAgB,EAAE,YAAuC;QACjE,IAAI,CAAC,WAAW,GAAG,IAAI,WAAW,CAAC,GAAG,EAAE;YACpC,MAAM,EAAE,WAAW;YACnB,QAAQ,EAAE,SAAS;YACnB,YAAY;YACZ,KAAK,EAAE;gBACH;oBACI,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC;oBAC7C,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;iBACzC;gBACD;oBACI,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;oBACzC,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;iBACvC;gBACD;oBACI,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC;oBAChD,GAAG,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;iBAChD;gBACD;oBACI,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC;oBAC1C,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;iBAC1C;gBACD;oBACI,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC;oBAC1C,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;iBAC1C;gBACD;oBACI,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC;oBAC7C,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;iBAC/C;aACJ;SACJ,CAAC,CAAA;IACN,CAAC;IAED,IAAI,KAAU,CAAC;IAEf,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,CAAA;IACjC,CAAC;IAED,KAAK;QACD,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAA;IACnC,CAAC;CACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiduswriter/bibliography-manager",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"description": "Fidus Writer bibliography manager",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -36,10 +36,6 @@
|
|
|
36
36
|
"types": "./dist/export/index.d.ts",
|
|
37
37
|
"default": "./dist/export/index.js"
|
|
38
38
|
},
|
|
39
|
-
"./schema/*": {
|
|
40
|
-
"types": "./dist/schema/*.d.ts",
|
|
41
|
-
"default": "./dist/schema/*.js"
|
|
42
|
-
},
|
|
43
39
|
"./bibliojson": {
|
|
44
40
|
"types": "./dist/bibliojson.d.ts",
|
|
45
41
|
"default": "./dist/bibliojson.js"
|
|
@@ -68,11 +64,10 @@
|
|
|
68
64
|
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --config jest.config.js"
|
|
69
65
|
},
|
|
70
66
|
"dependencies": {
|
|
71
|
-
"bibliojson": "4.0.
|
|
67
|
+
"bibliojson": "^4.0.4",
|
|
72
68
|
"fix-utf8": "2.0.1",
|
|
73
69
|
"fwtoolkit": "^0.2.0",
|
|
74
70
|
"prosemirror-model": "^1.25.0",
|
|
75
|
-
"prosemirror-schema-basic": "^1.2.4",
|
|
76
71
|
"tokenfield": "^1.2.2"
|
|
77
72
|
},
|
|
78
73
|
"devDependencies": {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import {Schema} from "prosemirror-model"
|
|
1
2
|
import {toggleMark} from "prosemirror-commands"
|
|
2
3
|
|
|
3
4
|
import {InlineInput, icon} from "fwtoolkit"
|
|
5
|
+
import {litSpec} from "bibliojson"
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
const litSchema = new Schema(litSpec)
|
|
6
8
|
|
|
7
9
|
export class LiteralFieldForm {
|
|
8
10
|
inlineInput: InlineInput
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import {Schema} from "prosemirror-model"
|
|
1
2
|
import {toggleMark} from "prosemirror-commands"
|
|
2
3
|
|
|
3
4
|
import {InlineInput, icon} from "fwtoolkit"
|
|
5
|
+
import {longLitSpec} from "bibliojson"
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
const longLitSchema = new Schema(longLitSpec)
|
|
6
8
|
|
|
7
9
|
export class LiteralLongFieldForm {
|
|
8
10
|
inlineInput: InlineInput
|
package/src/form/fields/title.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import {Schema} from "prosemirror-model"
|
|
1
2
|
import {toggleMark} from "prosemirror-commands"
|
|
2
3
|
|
|
3
4
|
import {InlineInput, icon} from "fwtoolkit"
|
|
5
|
+
import {titleSpec} from "bibliojson"
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
const titleSchema = new Schema(titleSpec)
|
|
6
8
|
|
|
7
9
|
export class TitleFieldForm {
|
|
8
10
|
inlineInput: InlineInput
|
package/src/schema/common.ts
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import type {MarkSpec, NodeSpec} from "prosemirror-model"
|
|
2
|
-
|
|
3
|
-
export const text: NodeSpec = {
|
|
4
|
-
group: "inline"
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export const literal: NodeSpec = {
|
|
8
|
-
content: "inline*",
|
|
9
|
-
marks: "_",
|
|
10
|
-
parseDOM: [{tag: "div.literal"}],
|
|
11
|
-
toDOM() {
|
|
12
|
-
return [
|
|
13
|
-
"div",
|
|
14
|
-
{
|
|
15
|
-
class: "literal"
|
|
16
|
-
},
|
|
17
|
-
0
|
|
18
|
-
]
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export const variable: NodeSpec = {
|
|
23
|
-
inline: true,
|
|
24
|
-
group: "inline",
|
|
25
|
-
attrs: {
|
|
26
|
-
variable: {default: ""}
|
|
27
|
-
},
|
|
28
|
-
parseDOM: [
|
|
29
|
-
{
|
|
30
|
-
tag: "span[data-variable]",
|
|
31
|
-
getAttrs(dom) {
|
|
32
|
-
const element = dom as Element
|
|
33
|
-
return {
|
|
34
|
-
variable: element.getAttribute("data-variable")
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
],
|
|
39
|
-
toDOM(node) {
|
|
40
|
-
return [
|
|
41
|
-
"span",
|
|
42
|
-
{"data-variable": node.attrs.variable as string},
|
|
43
|
-
node.attrs.variable as string
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export const sup: MarkSpec = {
|
|
49
|
-
parseDOM: [
|
|
50
|
-
{tag: "sup"},
|
|
51
|
-
{style: "vertical-align", getAttrs: value => value == "super" && null}
|
|
52
|
-
],
|
|
53
|
-
toDOM() {
|
|
54
|
-
return ["sup"]
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export const sub: MarkSpec = {
|
|
59
|
-
parseDOM: [
|
|
60
|
-
{tag: "sub"},
|
|
61
|
-
{style: "vertical-align", getAttrs: value => value == "sub" && null}
|
|
62
|
-
],
|
|
63
|
-
toDOM() {
|
|
64
|
-
return ["sub"]
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export const smallcaps: MarkSpec = {
|
|
69
|
-
parseDOM: [
|
|
70
|
-
{tag: "span.smallcaps"},
|
|
71
|
-
{
|
|
72
|
-
style: "font-variant",
|
|
73
|
-
getAttrs: value => value == "small-caps" && null
|
|
74
|
-
}
|
|
75
|
-
],
|
|
76
|
-
toDOM() {
|
|
77
|
-
return ["span", {class: "smallcaps"}]
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// Currently unsupported
|
|
82
|
-
|
|
83
|
-
export const url: MarkSpec = {
|
|
84
|
-
parseDOM: [{tag: "span.url"}],
|
|
85
|
-
toDOM() {
|
|
86
|
-
return ["span", {class: "url"}]
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export const enquote: MarkSpec = {
|
|
91
|
-
parseDOM: [{tag: "span.enquote"}],
|
|
92
|
-
toDOM() {
|
|
93
|
-
return ["span", {class: "enquote"}]
|
|
94
|
-
}
|
|
95
|
-
}
|
package/src/schema/csl_bib.ts
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import {Schema} from "prosemirror-model"
|
|
2
|
-
import {marks} from "prosemirror-schema-basic"
|
|
3
|
-
|
|
4
|
-
import {smallcaps, sub, sup, text} from "./common.js"
|
|
5
|
-
|
|
6
|
-
const doc: import("prosemirror-model").NodeSpec = {content: "cslbib"}
|
|
7
|
-
|
|
8
|
-
const cslbib: import("prosemirror-model").NodeSpec = {
|
|
9
|
-
content: "cslentry*",
|
|
10
|
-
parseDOM: [{tag: "div.csl-bib-body"}],
|
|
11
|
-
toDOM() {
|
|
12
|
-
return [
|
|
13
|
-
"div",
|
|
14
|
-
{
|
|
15
|
-
class: "csl-bib-body"
|
|
16
|
-
},
|
|
17
|
-
0
|
|
18
|
-
]
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const cslentry: import("prosemirror-model").NodeSpec = {
|
|
23
|
-
content: "block*",
|
|
24
|
-
parseDOM: [{tag: "div.csl-entry"}],
|
|
25
|
-
toDOM() {
|
|
26
|
-
return [
|
|
27
|
-
"div",
|
|
28
|
-
{
|
|
29
|
-
class: "csl-entry"
|
|
30
|
-
},
|
|
31
|
-
0
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// This block doesn't actually appear in the HTML output, but because the schema
|
|
37
|
-
// system doesn't allow for the mixing of inline and block content, it "imagines"
|
|
38
|
-
// that this block exists. This---rather than other blocks---is chosen, because
|
|
39
|
-
// it's the first in the list.
|
|
40
|
-
const cslinline: import("prosemirror-model").NodeSpec = {
|
|
41
|
-
group: "block",
|
|
42
|
-
content: "text*",
|
|
43
|
-
marks: "_",
|
|
44
|
-
parseDOM: [{tag: "div.csl-inline"}],
|
|
45
|
-
toDOM() {
|
|
46
|
-
return [
|
|
47
|
-
"div",
|
|
48
|
-
{
|
|
49
|
-
class: "csl-inline"
|
|
50
|
-
},
|
|
51
|
-
0
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const cslblock: import("prosemirror-model").NodeSpec = {
|
|
57
|
-
group: "block",
|
|
58
|
-
content: "text*",
|
|
59
|
-
marks: "_",
|
|
60
|
-
parseDOM: [{tag: "div.csl-block"}],
|
|
61
|
-
toDOM() {
|
|
62
|
-
return [
|
|
63
|
-
"div",
|
|
64
|
-
{
|
|
65
|
-
class: "csl-block"
|
|
66
|
-
},
|
|
67
|
-
0
|
|
68
|
-
]
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
const cslleftmargin: import("prosemirror-model").NodeSpec = {
|
|
73
|
-
group: "block",
|
|
74
|
-
content: "text*",
|
|
75
|
-
marks: "_",
|
|
76
|
-
parseDOM: [{tag: "div.csl-left-margin"}],
|
|
77
|
-
toDOM() {
|
|
78
|
-
return [
|
|
79
|
-
"div",
|
|
80
|
-
{
|
|
81
|
-
class: "csl-left-margin"
|
|
82
|
-
},
|
|
83
|
-
0
|
|
84
|
-
]
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
const cslrightinline: import("prosemirror-model").NodeSpec = {
|
|
89
|
-
group: "block",
|
|
90
|
-
content: "text*",
|
|
91
|
-
marks: "_",
|
|
92
|
-
parseDOM: [{tag: "div.csl-right-inline"}],
|
|
93
|
-
toDOM() {
|
|
94
|
-
return [
|
|
95
|
-
"div",
|
|
96
|
-
{
|
|
97
|
-
class: "csl-right-inline"
|
|
98
|
-
},
|
|
99
|
-
0
|
|
100
|
-
]
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
const cslindent: import("prosemirror-model").NodeSpec = {
|
|
105
|
-
group: "block",
|
|
106
|
-
content: "text*",
|
|
107
|
-
marks: "_",
|
|
108
|
-
parseDOM: [{tag: "div.csl-indent"}],
|
|
109
|
-
toDOM() {
|
|
110
|
-
return [
|
|
111
|
-
"div",
|
|
112
|
-
{
|
|
113
|
-
class: "csl-indent"
|
|
114
|
-
},
|
|
115
|
-
0
|
|
116
|
-
]
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
// A schema to express the citeproc HTML bibliography output
|
|
121
|
-
export const cslBibSchema = new Schema({
|
|
122
|
-
nodes: {
|
|
123
|
-
doc,
|
|
124
|
-
cslbib,
|
|
125
|
-
cslentry,
|
|
126
|
-
cslinline,
|
|
127
|
-
cslblock,
|
|
128
|
-
cslleftmargin,
|
|
129
|
-
cslrightinline,
|
|
130
|
-
cslindent,
|
|
131
|
-
text
|
|
132
|
-
},
|
|
133
|
-
marks: {
|
|
134
|
-
em: marks.em,
|
|
135
|
-
strong: marks.strong,
|
|
136
|
-
smallcaps,
|
|
137
|
-
sup,
|
|
138
|
-
sub
|
|
139
|
-
}
|
|
140
|
-
})
|
package/src/schema/literal.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
url,
|
|
3
|
-
enquote,
|
|
4
|
-
literal,
|
|
5
|
-
smallcaps,
|
|
6
|
-
sub,
|
|
7
|
-
sup,
|
|
8
|
-
text,
|
|
9
|
-
variable
|
|
10
|
-
} from "./common.js"
|
|
11
|
-
import {Schema} from "prosemirror-model"
|
|
12
|
-
import {marks} from "prosemirror-schema-basic"
|
|
13
|
-
|
|
14
|
-
const doc = {
|
|
15
|
-
content: "literal"
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const litSchema = new Schema({
|
|
19
|
-
nodes: {
|
|
20
|
-
doc,
|
|
21
|
-
literal,
|
|
22
|
-
text,
|
|
23
|
-
variable
|
|
24
|
-
},
|
|
25
|
-
marks: {
|
|
26
|
-
em: marks.em,
|
|
27
|
-
enquote,
|
|
28
|
-
smallcaps,
|
|
29
|
-
strong: marks.strong,
|
|
30
|
-
sup,
|
|
31
|
-
sub,
|
|
32
|
-
url
|
|
33
|
-
}
|
|
34
|
-
})
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
url,
|
|
3
|
-
enquote,
|
|
4
|
-
smallcaps,
|
|
5
|
-
sub,
|
|
6
|
-
sup,
|
|
7
|
-
text,
|
|
8
|
-
variable
|
|
9
|
-
} from "./common.js"
|
|
10
|
-
import type {Node} from "prosemirror-model"
|
|
11
|
-
import {Schema} from "prosemirror-model"
|
|
12
|
-
import {marks} from "prosemirror-schema-basic"
|
|
13
|
-
|
|
14
|
-
const longliteral = {
|
|
15
|
-
content: "inline*",
|
|
16
|
-
marks: "_",
|
|
17
|
-
code: true,
|
|
18
|
-
defining: true,
|
|
19
|
-
parseDOM: [{tag: "pre.long-literal"}],
|
|
20
|
-
toDOM(_node: Node) {
|
|
21
|
-
return ["pre", {class: "long-literal"}, 0] as const
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const doc = {
|
|
26
|
-
content: "longliteral"
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const longLitSchema = new Schema({
|
|
30
|
-
nodes: {
|
|
31
|
-
doc,
|
|
32
|
-
longliteral,
|
|
33
|
-
text,
|
|
34
|
-
variable
|
|
35
|
-
},
|
|
36
|
-
marks: {
|
|
37
|
-
em: marks.em,
|
|
38
|
-
enquote,
|
|
39
|
-
smallcaps,
|
|
40
|
-
strong: marks.strong,
|
|
41
|
-
sup,
|
|
42
|
-
sub,
|
|
43
|
-
url
|
|
44
|
-
}
|
|
45
|
-
})
|
package/src/schema/title.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
url,
|
|
3
|
-
enquote,
|
|
4
|
-
literal,
|
|
5
|
-
smallcaps,
|
|
6
|
-
sub,
|
|
7
|
-
sup,
|
|
8
|
-
text,
|
|
9
|
-
variable
|
|
10
|
-
} from "./common.js"
|
|
11
|
-
import {Schema} from "prosemirror-model"
|
|
12
|
-
import {marks} from "prosemirror-schema-basic"
|
|
13
|
-
|
|
14
|
-
const nocase = {
|
|
15
|
-
parseDOM: [{tag: "span.nocase"}],
|
|
16
|
-
toDOM() {
|
|
17
|
-
return ["span", {class: "nocase"}] as const
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const doc = {
|
|
22
|
-
content: "literal"
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export const titleSchema = new Schema({
|
|
26
|
-
nodes: {
|
|
27
|
-
doc,
|
|
28
|
-
literal,
|
|
29
|
-
text,
|
|
30
|
-
variable
|
|
31
|
-
},
|
|
32
|
-
marks: {
|
|
33
|
-
em: marks.em,
|
|
34
|
-
enquote,
|
|
35
|
-
nocase,
|
|
36
|
-
smallcaps,
|
|
37
|
-
strong: marks.strong,
|
|
38
|
-
sup,
|
|
39
|
-
sub,
|
|
40
|
-
url
|
|
41
|
-
}
|
|
42
|
-
})
|