pro-editor-schema 1.2.5 → 1.2.9
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/index.d.mts +30 -2
- package/dist/index.d.ts +30 -2
- package/dist/index.js +57 -3
- package/dist/index.mjs +57 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -21,8 +21,8 @@ type Schema<TRequiredAttributes = readonly AttributeDefinition[], TOptionalAttri
|
|
|
21
21
|
matchesElement?: (element: Element) => boolean;
|
|
22
22
|
};
|
|
23
23
|
type SchemaCode = ElementSchemaCode | InlineSchemaCode | AtomSchemaCode;
|
|
24
|
-
type ElementSchemaCode = "referenceBibliomixed" | "referenceBibliography" | "bibliodiv" | "degrees" | "email" | "equation" | "fignote" | "figsource" | "firstname" | "footnote" | "footnoteno" | "honorific" | "img" | "informalfigure" | "keyword" | "label1" | "li" | "line" | "lrh" | "math" | "mathphrase" | "merror" | "mfrac" | "mi" | "mmultiscripts" | "mn" | "mo" | "mover" | "mpadded" | "mphantom" | "mprescripts" | "mroot" | "mrow" | "ms" | "mspace" | "msqrt" | "mstyle" | "msub" | "msubsup" | "msup" | "mtable" | "mtd" | "mtext" | "mtr" | "munder" | "munderover" | "olink" | "org" | "orgname" | "para" | "punc" | "rrh" | "source1" | "speaker" | "subtitle1" | "surname" | "tag" | "tblfn" | "tblsource" | "thead" | "title1" | "token" | "tp" | "abstract1" | "affiliation" | "alttext" | "appendix" | "author" | "authorgroup" | "blockquote" | "caption1" | "chapter" | "dialogue" | "epigraph" | "figure1" | "footnoteSection" | "heading" | "imageobject" | "info1" | "keywordset" | "mediaobject" | "ol" | "personname" | "poem" | "sidebar" | "table" | "table1" | "tbody" | "td" | "tgroup" | "tr" | "ul";
|
|
25
|
-
type AtomSchemaCode = "indexterm" | "primary" | "secondary" | "tertiary" | "quaternary" | "bookmark" | "see" | "commentQuerySection" | "comment" | "content" | "query" | "reply" | "deletion" | "emphasis" | "highlightmark" | "i" | "insertion" | "sc" | "strike" | "sub" | "sup" | "u" | "b" | "referenceMark" | "abbreviation";
|
|
24
|
+
type ElementSchemaCode = "referenceBibliomixed" | "referenceBibliography" | "bibliodiv" | "degrees" | "email" | "equation" | "fignote" | "figsource" | "firstname" | "footnote" | "footnoteno" | "honorific" | "img" | "informalfigure" | "keyword" | "label1" | "li" | "line" | "linegroup" | "lrh" | "math" | "mathphrase" | "merror" | "mfrac" | "mi" | "mmultiscripts" | "mn" | "mo" | "mover" | "mpadded" | "mphantom" | "mprescripts" | "mroot" | "mrow" | "ms" | "mspace" | "msqrt" | "mstyle" | "msub" | "msubsup" | "msup" | "mtable" | "mtd" | "mtext" | "mtr" | "munder" | "munderover" | "olink" | "org" | "orgname" | "para" | "punc" | "rrh" | "source1" | "speaker" | "subtitle1" | "surname" | "tag" | "tblfn" | "tblsource" | "thead" | "title1" | "token" | "tp" | "abstract1" | "affiliation" | "alttext" | "appendix" | "author" | "authorgroup" | "blockquote" | "caption1" | "chapter" | "dialogue" | "epigraph" | "figure1" | "footnoteSection" | "heading" | "imageobject" | "info1" | "keywordset" | "mediaobject" | "ol" | "personname" | "poem" | "sidebar" | "table" | "table1" | "tbody" | "td" | "tgroup" | "tr" | "ul";
|
|
25
|
+
type AtomSchemaCode = "indexterm" | "primary" | "secondary" | "tertiary" | "quaternary" | "bookmark" | "see" | "commentQuerySection" | "comment" | "content" | "query" | "reply" | "deletion" | "lineGroupRemoval" | "emphasis" | "highlightmark" | "i" | "insertion" | "sc" | "strike" | "sub" | "sup" | "u" | "b" | "referenceMark" | "abbreviation";
|
|
26
26
|
type InlineSchemaCode = "footnote1" | "inlineequation" | "link" | "uri" | "phrase";
|
|
27
27
|
|
|
28
28
|
declare const SCHEMAS: {
|
|
@@ -88,6 +88,7 @@ declare const SCHEMAS: {
|
|
|
88
88
|
degrees: Schema<readonly ["store", "ele-id"], readonly []>;
|
|
89
89
|
dialogue: Schema<readonly ["store", "ele-id"], readonly ["data-username", "data-userid", "data-time", "data-date", "role", "trackmsg"]>;
|
|
90
90
|
line: Schema<readonly ["store", "ele-id"], readonly ["role"]>;
|
|
91
|
+
linegroup: Schema<readonly ["store", "ele-id"], readonly ["data-username", "data-userid", "data-time", "data-date", "data-line-group-action", "role", "trackmsg"]>;
|
|
91
92
|
speaker: Schema<readonly ["store", "ele-id"], readonly ["role"]>;
|
|
92
93
|
equation: Schema<readonly ["store", "ele-id"], readonly ["data-username", "data-userid", "data-time", "data-date", {
|
|
93
94
|
readonly name: "eqn-data";
|
|
@@ -303,6 +304,19 @@ declare const SCHEMAS: {
|
|
|
303
304
|
readonly defaultValue: "";
|
|
304
305
|
}]>;
|
|
305
306
|
deletion: Schema<readonly ["data-username", "data-userid", "data-time", "data-date", "store", "ele-id"], readonly []>;
|
|
307
|
+
lineGroupRemoval: Schema<readonly ["data-time", "data-username", "data-userid", "data-line-group-attributes", {
|
|
308
|
+
readonly name: "data-line-group-action";
|
|
309
|
+
readonly values: readonly ["removed"];
|
|
310
|
+
readonly defaultValue: "removed";
|
|
311
|
+
}, {
|
|
312
|
+
readonly name: "data-tagname";
|
|
313
|
+
readonly values: readonly ["linegroup"];
|
|
314
|
+
readonly defaultValue: "linegroup";
|
|
315
|
+
}, {
|
|
316
|
+
readonly name: "data-track-change-wrapper";
|
|
317
|
+
readonly values: readonly ["unwrap"];
|
|
318
|
+
readonly defaultValue: "unwrap";
|
|
319
|
+
}], readonly ["store", "ele-id", "data-date"]>;
|
|
306
320
|
content: Schema<readonly ["store", "ele-id"], readonly []>;
|
|
307
321
|
comment: Schema<readonly ["store", "ele-id", "id"], readonly ["data-username", "data-userid", "data-time", "data-date", {
|
|
308
322
|
readonly name: "status";
|
|
@@ -431,6 +445,7 @@ declare const ELEMENT_SCHEMAS: {
|
|
|
431
445
|
degrees: Schema<readonly ["store", "ele-id"], readonly []>;
|
|
432
446
|
dialogue: Schema<readonly ["store", "ele-id"], readonly ["data-username", "data-userid", "data-time", "data-date", "role", "trackmsg"]>;
|
|
433
447
|
line: Schema<readonly ["store", "ele-id"], readonly ["role"]>;
|
|
448
|
+
linegroup: Schema<readonly ["store", "ele-id"], readonly ["data-username", "data-userid", "data-time", "data-date", "data-line-group-action", "role", "trackmsg"]>;
|
|
434
449
|
speaker: Schema<readonly ["store", "ele-id"], readonly ["role"]>;
|
|
435
450
|
equation: Schema<readonly ["store", "ele-id"], readonly ["data-username", "data-userid", "data-time", "data-date", {
|
|
436
451
|
readonly name: "eqn-data";
|
|
@@ -673,6 +688,19 @@ declare const ATOM_SCHEMAS: {
|
|
|
673
688
|
readonly defaultValue: "";
|
|
674
689
|
}]>;
|
|
675
690
|
deletion: Schema<readonly ["data-username", "data-userid", "data-time", "data-date", "store", "ele-id"], readonly []>;
|
|
691
|
+
lineGroupRemoval: Schema<readonly ["data-time", "data-username", "data-userid", "data-line-group-attributes", {
|
|
692
|
+
readonly name: "data-line-group-action";
|
|
693
|
+
readonly values: readonly ["removed"];
|
|
694
|
+
readonly defaultValue: "removed";
|
|
695
|
+
}, {
|
|
696
|
+
readonly name: "data-tagname";
|
|
697
|
+
readonly values: readonly ["linegroup"];
|
|
698
|
+
readonly defaultValue: "linegroup";
|
|
699
|
+
}, {
|
|
700
|
+
readonly name: "data-track-change-wrapper";
|
|
701
|
+
readonly values: readonly ["unwrap"];
|
|
702
|
+
readonly defaultValue: "unwrap";
|
|
703
|
+
}], readonly ["store", "ele-id", "data-date"]>;
|
|
676
704
|
content: Schema<readonly ["store", "ele-id"], readonly []>;
|
|
677
705
|
comment: Schema<readonly ["store", "ele-id", "id"], readonly ["data-username", "data-userid", "data-time", "data-date", {
|
|
678
706
|
readonly name: "status";
|
package/dist/index.d.ts
CHANGED
|
@@ -21,8 +21,8 @@ type Schema<TRequiredAttributes = readonly AttributeDefinition[], TOptionalAttri
|
|
|
21
21
|
matchesElement?: (element: Element) => boolean;
|
|
22
22
|
};
|
|
23
23
|
type SchemaCode = ElementSchemaCode | InlineSchemaCode | AtomSchemaCode;
|
|
24
|
-
type ElementSchemaCode = "referenceBibliomixed" | "referenceBibliography" | "bibliodiv" | "degrees" | "email" | "equation" | "fignote" | "figsource" | "firstname" | "footnote" | "footnoteno" | "honorific" | "img" | "informalfigure" | "keyword" | "label1" | "li" | "line" | "lrh" | "math" | "mathphrase" | "merror" | "mfrac" | "mi" | "mmultiscripts" | "mn" | "mo" | "mover" | "mpadded" | "mphantom" | "mprescripts" | "mroot" | "mrow" | "ms" | "mspace" | "msqrt" | "mstyle" | "msub" | "msubsup" | "msup" | "mtable" | "mtd" | "mtext" | "mtr" | "munder" | "munderover" | "olink" | "org" | "orgname" | "para" | "punc" | "rrh" | "source1" | "speaker" | "subtitle1" | "surname" | "tag" | "tblfn" | "tblsource" | "thead" | "title1" | "token" | "tp" | "abstract1" | "affiliation" | "alttext" | "appendix" | "author" | "authorgroup" | "blockquote" | "caption1" | "chapter" | "dialogue" | "epigraph" | "figure1" | "footnoteSection" | "heading" | "imageobject" | "info1" | "keywordset" | "mediaobject" | "ol" | "personname" | "poem" | "sidebar" | "table" | "table1" | "tbody" | "td" | "tgroup" | "tr" | "ul";
|
|
25
|
-
type AtomSchemaCode = "indexterm" | "primary" | "secondary" | "tertiary" | "quaternary" | "bookmark" | "see" | "commentQuerySection" | "comment" | "content" | "query" | "reply" | "deletion" | "emphasis" | "highlightmark" | "i" | "insertion" | "sc" | "strike" | "sub" | "sup" | "u" | "b" | "referenceMark" | "abbreviation";
|
|
24
|
+
type ElementSchemaCode = "referenceBibliomixed" | "referenceBibliography" | "bibliodiv" | "degrees" | "email" | "equation" | "fignote" | "figsource" | "firstname" | "footnote" | "footnoteno" | "honorific" | "img" | "informalfigure" | "keyword" | "label1" | "li" | "line" | "linegroup" | "lrh" | "math" | "mathphrase" | "merror" | "mfrac" | "mi" | "mmultiscripts" | "mn" | "mo" | "mover" | "mpadded" | "mphantom" | "mprescripts" | "mroot" | "mrow" | "ms" | "mspace" | "msqrt" | "mstyle" | "msub" | "msubsup" | "msup" | "mtable" | "mtd" | "mtext" | "mtr" | "munder" | "munderover" | "olink" | "org" | "orgname" | "para" | "punc" | "rrh" | "source1" | "speaker" | "subtitle1" | "surname" | "tag" | "tblfn" | "tblsource" | "thead" | "title1" | "token" | "tp" | "abstract1" | "affiliation" | "alttext" | "appendix" | "author" | "authorgroup" | "blockquote" | "caption1" | "chapter" | "dialogue" | "epigraph" | "figure1" | "footnoteSection" | "heading" | "imageobject" | "info1" | "keywordset" | "mediaobject" | "ol" | "personname" | "poem" | "sidebar" | "table" | "table1" | "tbody" | "td" | "tgroup" | "tr" | "ul";
|
|
25
|
+
type AtomSchemaCode = "indexterm" | "primary" | "secondary" | "tertiary" | "quaternary" | "bookmark" | "see" | "commentQuerySection" | "comment" | "content" | "query" | "reply" | "deletion" | "lineGroupRemoval" | "emphasis" | "highlightmark" | "i" | "insertion" | "sc" | "strike" | "sub" | "sup" | "u" | "b" | "referenceMark" | "abbreviation";
|
|
26
26
|
type InlineSchemaCode = "footnote1" | "inlineequation" | "link" | "uri" | "phrase";
|
|
27
27
|
|
|
28
28
|
declare const SCHEMAS: {
|
|
@@ -88,6 +88,7 @@ declare const SCHEMAS: {
|
|
|
88
88
|
degrees: Schema<readonly ["store", "ele-id"], readonly []>;
|
|
89
89
|
dialogue: Schema<readonly ["store", "ele-id"], readonly ["data-username", "data-userid", "data-time", "data-date", "role", "trackmsg"]>;
|
|
90
90
|
line: Schema<readonly ["store", "ele-id"], readonly ["role"]>;
|
|
91
|
+
linegroup: Schema<readonly ["store", "ele-id"], readonly ["data-username", "data-userid", "data-time", "data-date", "data-line-group-action", "role", "trackmsg"]>;
|
|
91
92
|
speaker: Schema<readonly ["store", "ele-id"], readonly ["role"]>;
|
|
92
93
|
equation: Schema<readonly ["store", "ele-id"], readonly ["data-username", "data-userid", "data-time", "data-date", {
|
|
93
94
|
readonly name: "eqn-data";
|
|
@@ -303,6 +304,19 @@ declare const SCHEMAS: {
|
|
|
303
304
|
readonly defaultValue: "";
|
|
304
305
|
}]>;
|
|
305
306
|
deletion: Schema<readonly ["data-username", "data-userid", "data-time", "data-date", "store", "ele-id"], readonly []>;
|
|
307
|
+
lineGroupRemoval: Schema<readonly ["data-time", "data-username", "data-userid", "data-line-group-attributes", {
|
|
308
|
+
readonly name: "data-line-group-action";
|
|
309
|
+
readonly values: readonly ["removed"];
|
|
310
|
+
readonly defaultValue: "removed";
|
|
311
|
+
}, {
|
|
312
|
+
readonly name: "data-tagname";
|
|
313
|
+
readonly values: readonly ["linegroup"];
|
|
314
|
+
readonly defaultValue: "linegroup";
|
|
315
|
+
}, {
|
|
316
|
+
readonly name: "data-track-change-wrapper";
|
|
317
|
+
readonly values: readonly ["unwrap"];
|
|
318
|
+
readonly defaultValue: "unwrap";
|
|
319
|
+
}], readonly ["store", "ele-id", "data-date"]>;
|
|
306
320
|
content: Schema<readonly ["store", "ele-id"], readonly []>;
|
|
307
321
|
comment: Schema<readonly ["store", "ele-id", "id"], readonly ["data-username", "data-userid", "data-time", "data-date", {
|
|
308
322
|
readonly name: "status";
|
|
@@ -431,6 +445,7 @@ declare const ELEMENT_SCHEMAS: {
|
|
|
431
445
|
degrees: Schema<readonly ["store", "ele-id"], readonly []>;
|
|
432
446
|
dialogue: Schema<readonly ["store", "ele-id"], readonly ["data-username", "data-userid", "data-time", "data-date", "role", "trackmsg"]>;
|
|
433
447
|
line: Schema<readonly ["store", "ele-id"], readonly ["role"]>;
|
|
448
|
+
linegroup: Schema<readonly ["store", "ele-id"], readonly ["data-username", "data-userid", "data-time", "data-date", "data-line-group-action", "role", "trackmsg"]>;
|
|
434
449
|
speaker: Schema<readonly ["store", "ele-id"], readonly ["role"]>;
|
|
435
450
|
equation: Schema<readonly ["store", "ele-id"], readonly ["data-username", "data-userid", "data-time", "data-date", {
|
|
436
451
|
readonly name: "eqn-data";
|
|
@@ -673,6 +688,19 @@ declare const ATOM_SCHEMAS: {
|
|
|
673
688
|
readonly defaultValue: "";
|
|
674
689
|
}]>;
|
|
675
690
|
deletion: Schema<readonly ["data-username", "data-userid", "data-time", "data-date", "store", "ele-id"], readonly []>;
|
|
691
|
+
lineGroupRemoval: Schema<readonly ["data-time", "data-username", "data-userid", "data-line-group-attributes", {
|
|
692
|
+
readonly name: "data-line-group-action";
|
|
693
|
+
readonly values: readonly ["removed"];
|
|
694
|
+
readonly defaultValue: "removed";
|
|
695
|
+
}, {
|
|
696
|
+
readonly name: "data-tagname";
|
|
697
|
+
readonly values: readonly ["linegroup"];
|
|
698
|
+
readonly defaultValue: "linegroup";
|
|
699
|
+
}, {
|
|
700
|
+
readonly name: "data-track-change-wrapper";
|
|
701
|
+
readonly values: readonly ["unwrap"];
|
|
702
|
+
readonly defaultValue: "unwrap";
|
|
703
|
+
}], readonly ["store", "ele-id", "data-date"]>;
|
|
676
704
|
content: Schema<readonly ["store", "ele-id"], readonly []>;
|
|
677
705
|
comment: Schema<readonly ["store", "ele-id", "id"], readonly ["data-username", "data-userid", "data-time", "data-date", {
|
|
678
706
|
readonly name: "status";
|
package/dist/index.js
CHANGED
|
@@ -269,6 +269,37 @@ var INSERTION_SCHEMA = createSchema({
|
|
|
269
269
|
]
|
|
270
270
|
});
|
|
271
271
|
|
|
272
|
+
// src/schema/elementSchemas/atoms/lineGroupRemoval.ts
|
|
273
|
+
var LINE_GROUP_REMOVAL_SCHEMA = createSchema({
|
|
274
|
+
code: "lineGroupRemoval",
|
|
275
|
+
kind: "atom",
|
|
276
|
+
tag: SPAN_TAG,
|
|
277
|
+
matchesElement: (element) => element.getAttribute("data-line-group-action") === "removed" && element.getAttribute("data-track-change-wrapper") === "unwrap",
|
|
278
|
+
requiredAttributes: [
|
|
279
|
+
TRACK_CHANGES_ATTR_DATA_TIME,
|
|
280
|
+
TRACK_CHANGES_ATTR_DATA_USERNAME,
|
|
281
|
+
TRACK_CHANGES_ATTR_DATA_USERID,
|
|
282
|
+
"data-line-group-attributes",
|
|
283
|
+
{
|
|
284
|
+
name: "data-line-group-action",
|
|
285
|
+
values: ["removed"],
|
|
286
|
+
defaultValue: "removed"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
name: "data-tagname",
|
|
290
|
+
values: ["linegroup"],
|
|
291
|
+
defaultValue: "linegroup"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
name: "data-track-change-wrapper",
|
|
295
|
+
values: ["unwrap"],
|
|
296
|
+
defaultValue: "unwrap"
|
|
297
|
+
}
|
|
298
|
+
],
|
|
299
|
+
optionalAttributes: [...ID_ATTRS, TRACK_CHANGES_ATTR_DATA_DATE],
|
|
300
|
+
allowedChildrenCodes: [{ code: "line", required: true }]
|
|
301
|
+
});
|
|
302
|
+
|
|
272
303
|
// src/schema/elementSchemas/atoms/sc.ts
|
|
273
304
|
var SC_SCHEMA = createSchema({
|
|
274
305
|
code: "sc",
|
|
@@ -599,6 +630,7 @@ var ATOM_SCHEMAS = {
|
|
|
599
630
|
commentQuerySection: COMMENT_QUERY_SECTION_SCHEMA,
|
|
600
631
|
insertion: INSERTION_SCHEMA,
|
|
601
632
|
deletion: DELETION_SCHEMA,
|
|
633
|
+
lineGroupRemoval: LINE_GROUP_REMOVAL_SCHEMA,
|
|
602
634
|
content: CONTENT_SCHEMA,
|
|
603
635
|
comment: COMMENT_SCHEMA,
|
|
604
636
|
query: QUERY_SCHEMA,
|
|
@@ -621,6 +653,7 @@ var ORG_TAG = "ORG";
|
|
|
621
653
|
var DEGREES_TAG = "DEGREES";
|
|
622
654
|
var DIALOGUE_TAG = "DIALOGUE";
|
|
623
655
|
var LINE_TAG = "LINE";
|
|
656
|
+
var LINE_GROUP_TAG = "LINEGROUP";
|
|
624
657
|
var SPEAKER_TAG = "SPEAKER";
|
|
625
658
|
var EQUATION_TAG = "EQUATION";
|
|
626
659
|
var FIGURE_TAG = "FIGURE1";
|
|
@@ -1441,6 +1474,22 @@ var LABEL_SCHEMA = createSchema({
|
|
|
1441
1474
|
]
|
|
1442
1475
|
});
|
|
1443
1476
|
|
|
1477
|
+
// src/schema/elementSchemas/elements/lineGroup.ts
|
|
1478
|
+
var LINE_GROUP_SCHEMA = createSchema({
|
|
1479
|
+
code: "linegroup",
|
|
1480
|
+
kind: "element",
|
|
1481
|
+
tag: LINE_GROUP_TAG,
|
|
1482
|
+
requiredAttributes: [...ID_ATTRS],
|
|
1483
|
+
optionalAttributes: [
|
|
1484
|
+
...TRACK_CHANGES_ATTRS,
|
|
1485
|
+
"data-line-group-action",
|
|
1486
|
+
"role",
|
|
1487
|
+
"trackmsg"
|
|
1488
|
+
],
|
|
1489
|
+
defaultChildCode: "line",
|
|
1490
|
+
allowedChildrenCodes: [{ code: "line", required: true }]
|
|
1491
|
+
});
|
|
1492
|
+
|
|
1444
1493
|
// src/schema/elementSchemas/elements/list/token.ts
|
|
1445
1494
|
var TOKEN_SCHEMA = createSchema({
|
|
1446
1495
|
code: "token",
|
|
@@ -2083,7 +2132,8 @@ var POEM_SCHEMA = createSchema({
|
|
|
2083
2132
|
optionalAttributes: [...TRACK_CHANGES_ATTRS, "role", "trackmsg"],
|
|
2084
2133
|
defaultChildCode: "line",
|
|
2085
2134
|
allowedChildrenCodes: [
|
|
2086
|
-
{ code: "line", required:
|
|
2135
|
+
{ code: "line", required: false },
|
|
2136
|
+
{ code: "linegroup", required: false },
|
|
2087
2137
|
{ code: "source1", required: false }
|
|
2088
2138
|
]
|
|
2089
2139
|
});
|
|
@@ -2181,6 +2231,7 @@ var ELEMENT_SCHEMAS = {
|
|
|
2181
2231
|
degrees: DEGREES_SCHEMA,
|
|
2182
2232
|
dialogue: DIALOGUE_SCHEMA,
|
|
2183
2233
|
line: LINE_SCHEMA,
|
|
2234
|
+
linegroup: LINE_GROUP_SCHEMA,
|
|
2184
2235
|
speaker: SPEAKER_SCHEMA,
|
|
2185
2236
|
equation: EQUATION_SCHEMA,
|
|
2186
2237
|
math: MATH_SCHEMA,
|
|
@@ -2383,7 +2434,8 @@ var IGNORED_ELEMENT_SELECTORS = [
|
|
|
2383
2434
|
"span.refIcon",
|
|
2384
2435
|
"span.missLink",
|
|
2385
2436
|
"span.ref-drag",
|
|
2386
|
-
"span#dummySpan"
|
|
2437
|
+
"span#dummySpan",
|
|
2438
|
+
"mark"
|
|
2387
2439
|
];
|
|
2388
2440
|
var IGNORED_VALIDATION_ELEMENT_SELECTORS = [
|
|
2389
2441
|
"referenceBibliomixed"
|
|
@@ -2410,7 +2462,7 @@ var IGNORED_ATTRIBUTES = [
|
|
|
2410
2462
|
var IGNORED_ATTRIBUTES_STARTS_WITH = ["er-", "er_", "drop", "drag"];
|
|
2411
2463
|
|
|
2412
2464
|
// src/schema/utils/utils.ts
|
|
2413
|
-
var isTrackChangesSchema = (schema) => schema.code === "insertion" || schema.code === "deletion";
|
|
2465
|
+
var isTrackChangesSchema = (schema) => schema.code === "insertion" || schema.code === "deletion" || schema.code === "lineGroupRemoval";
|
|
2414
2466
|
var isIgnoredAttribute = (attribute) => IGNORED_ATTRIBUTES.includes(attribute) || IGNORED_ATTRIBUTES_STARTS_WITH.some(
|
|
2415
2467
|
(startsWith) => attribute.startsWith(startsWith)
|
|
2416
2468
|
);
|
|
@@ -2491,6 +2543,7 @@ var ElementLabel = {
|
|
|
2491
2543
|
query: "Query",
|
|
2492
2544
|
reply: "Reply",
|
|
2493
2545
|
deletion: "Deletion",
|
|
2546
|
+
lineGroupRemoval: "Line Group Removal",
|
|
2494
2547
|
emphasis: "Emphasis",
|
|
2495
2548
|
highlightmark: "Highlightmark",
|
|
2496
2549
|
i: "Italic",
|
|
@@ -2517,6 +2570,7 @@ var ElementLabel = {
|
|
|
2517
2570
|
label1: "Label",
|
|
2518
2571
|
li: "List Item",
|
|
2519
2572
|
line: "Line",
|
|
2573
|
+
linegroup: "Line Group",
|
|
2520
2574
|
lrh: "Running Head Left",
|
|
2521
2575
|
math: "Math",
|
|
2522
2576
|
mathphrase: "Math Phrase",
|
package/dist/index.mjs
CHANGED
|
@@ -189,6 +189,37 @@ var INSERTION_SCHEMA = createSchema({
|
|
|
189
189
|
]
|
|
190
190
|
});
|
|
191
191
|
|
|
192
|
+
// src/schema/elementSchemas/atoms/lineGroupRemoval.ts
|
|
193
|
+
var LINE_GROUP_REMOVAL_SCHEMA = createSchema({
|
|
194
|
+
code: "lineGroupRemoval",
|
|
195
|
+
kind: "atom",
|
|
196
|
+
tag: SPAN_TAG,
|
|
197
|
+
matchesElement: (element) => element.getAttribute("data-line-group-action") === "removed" && element.getAttribute("data-track-change-wrapper") === "unwrap",
|
|
198
|
+
requiredAttributes: [
|
|
199
|
+
TRACK_CHANGES_ATTR_DATA_TIME,
|
|
200
|
+
TRACK_CHANGES_ATTR_DATA_USERNAME,
|
|
201
|
+
TRACK_CHANGES_ATTR_DATA_USERID,
|
|
202
|
+
"data-line-group-attributes",
|
|
203
|
+
{
|
|
204
|
+
name: "data-line-group-action",
|
|
205
|
+
values: ["removed"],
|
|
206
|
+
defaultValue: "removed"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
name: "data-tagname",
|
|
210
|
+
values: ["linegroup"],
|
|
211
|
+
defaultValue: "linegroup"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
name: "data-track-change-wrapper",
|
|
215
|
+
values: ["unwrap"],
|
|
216
|
+
defaultValue: "unwrap"
|
|
217
|
+
}
|
|
218
|
+
],
|
|
219
|
+
optionalAttributes: [...ID_ATTRS, TRACK_CHANGES_ATTR_DATA_DATE],
|
|
220
|
+
allowedChildrenCodes: [{ code: "line", required: true }]
|
|
221
|
+
});
|
|
222
|
+
|
|
192
223
|
// src/schema/elementSchemas/atoms/sc.ts
|
|
193
224
|
var SC_SCHEMA = createSchema({
|
|
194
225
|
code: "sc",
|
|
@@ -519,6 +550,7 @@ var ATOM_SCHEMAS = {
|
|
|
519
550
|
commentQuerySection: COMMENT_QUERY_SECTION_SCHEMA,
|
|
520
551
|
insertion: INSERTION_SCHEMA,
|
|
521
552
|
deletion: DELETION_SCHEMA,
|
|
553
|
+
lineGroupRemoval: LINE_GROUP_REMOVAL_SCHEMA,
|
|
522
554
|
content: CONTENT_SCHEMA,
|
|
523
555
|
comment: COMMENT_SCHEMA,
|
|
524
556
|
query: QUERY_SCHEMA,
|
|
@@ -541,6 +573,7 @@ var ORG_TAG = "ORG";
|
|
|
541
573
|
var DEGREES_TAG = "DEGREES";
|
|
542
574
|
var DIALOGUE_TAG = "DIALOGUE";
|
|
543
575
|
var LINE_TAG = "LINE";
|
|
576
|
+
var LINE_GROUP_TAG = "LINEGROUP";
|
|
544
577
|
var SPEAKER_TAG = "SPEAKER";
|
|
545
578
|
var EQUATION_TAG = "EQUATION";
|
|
546
579
|
var FIGURE_TAG = "FIGURE1";
|
|
@@ -1361,6 +1394,22 @@ var LABEL_SCHEMA = createSchema({
|
|
|
1361
1394
|
]
|
|
1362
1395
|
});
|
|
1363
1396
|
|
|
1397
|
+
// src/schema/elementSchemas/elements/lineGroup.ts
|
|
1398
|
+
var LINE_GROUP_SCHEMA = createSchema({
|
|
1399
|
+
code: "linegroup",
|
|
1400
|
+
kind: "element",
|
|
1401
|
+
tag: LINE_GROUP_TAG,
|
|
1402
|
+
requiredAttributes: [...ID_ATTRS],
|
|
1403
|
+
optionalAttributes: [
|
|
1404
|
+
...TRACK_CHANGES_ATTRS,
|
|
1405
|
+
"data-line-group-action",
|
|
1406
|
+
"role",
|
|
1407
|
+
"trackmsg"
|
|
1408
|
+
],
|
|
1409
|
+
defaultChildCode: "line",
|
|
1410
|
+
allowedChildrenCodes: [{ code: "line", required: true }]
|
|
1411
|
+
});
|
|
1412
|
+
|
|
1364
1413
|
// src/schema/elementSchemas/elements/list/token.ts
|
|
1365
1414
|
var TOKEN_SCHEMA = createSchema({
|
|
1366
1415
|
code: "token",
|
|
@@ -2003,7 +2052,8 @@ var POEM_SCHEMA = createSchema({
|
|
|
2003
2052
|
optionalAttributes: [...TRACK_CHANGES_ATTRS, "role", "trackmsg"],
|
|
2004
2053
|
defaultChildCode: "line",
|
|
2005
2054
|
allowedChildrenCodes: [
|
|
2006
|
-
{ code: "line", required:
|
|
2055
|
+
{ code: "line", required: false },
|
|
2056
|
+
{ code: "linegroup", required: false },
|
|
2007
2057
|
{ code: "source1", required: false }
|
|
2008
2058
|
]
|
|
2009
2059
|
});
|
|
@@ -2101,6 +2151,7 @@ var ELEMENT_SCHEMAS = {
|
|
|
2101
2151
|
degrees: DEGREES_SCHEMA,
|
|
2102
2152
|
dialogue: DIALOGUE_SCHEMA,
|
|
2103
2153
|
line: LINE_SCHEMA,
|
|
2154
|
+
linegroup: LINE_GROUP_SCHEMA,
|
|
2104
2155
|
speaker: SPEAKER_SCHEMA,
|
|
2105
2156
|
equation: EQUATION_SCHEMA,
|
|
2106
2157
|
math: MATH_SCHEMA,
|
|
@@ -2303,7 +2354,8 @@ var IGNORED_ELEMENT_SELECTORS = [
|
|
|
2303
2354
|
"span.refIcon",
|
|
2304
2355
|
"span.missLink",
|
|
2305
2356
|
"span.ref-drag",
|
|
2306
|
-
"span#dummySpan"
|
|
2357
|
+
"span#dummySpan",
|
|
2358
|
+
"mark"
|
|
2307
2359
|
];
|
|
2308
2360
|
var IGNORED_VALIDATION_ELEMENT_SELECTORS = [
|
|
2309
2361
|
"referenceBibliomixed"
|
|
@@ -2330,7 +2382,7 @@ var IGNORED_ATTRIBUTES = [
|
|
|
2330
2382
|
var IGNORED_ATTRIBUTES_STARTS_WITH = ["er-", "er_", "drop", "drag"];
|
|
2331
2383
|
|
|
2332
2384
|
// src/schema/utils/utils.ts
|
|
2333
|
-
var isTrackChangesSchema = (schema) => schema.code === "insertion" || schema.code === "deletion";
|
|
2385
|
+
var isTrackChangesSchema = (schema) => schema.code === "insertion" || schema.code === "deletion" || schema.code === "lineGroupRemoval";
|
|
2334
2386
|
var isIgnoredAttribute = (attribute) => IGNORED_ATTRIBUTES.includes(attribute) || IGNORED_ATTRIBUTES_STARTS_WITH.some(
|
|
2335
2387
|
(startsWith) => attribute.startsWith(startsWith)
|
|
2336
2388
|
);
|
|
@@ -2411,6 +2463,7 @@ var ElementLabel = {
|
|
|
2411
2463
|
query: "Query",
|
|
2412
2464
|
reply: "Reply",
|
|
2413
2465
|
deletion: "Deletion",
|
|
2466
|
+
lineGroupRemoval: "Line Group Removal",
|
|
2414
2467
|
emphasis: "Emphasis",
|
|
2415
2468
|
highlightmark: "Highlightmark",
|
|
2416
2469
|
i: "Italic",
|
|
@@ -2437,6 +2490,7 @@ var ElementLabel = {
|
|
|
2437
2490
|
label1: "Label",
|
|
2438
2491
|
li: "List Item",
|
|
2439
2492
|
line: "Line",
|
|
2493
|
+
linegroup: "Line Group",
|
|
2440
2494
|
lrh: "Running Head Left",
|
|
2441
2495
|
math: "Math",
|
|
2442
2496
|
mathphrase: "Math Phrase",
|