proskomma-core 0.10.7 → 0.10.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.js +18 -7
- package/dist/index.mjs +18 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15986,7 +15986,7 @@ var bitset = {
|
|
|
15986
15986
|
})(bitset, bitsetExports);
|
|
15987
15987
|
const BitSet = /* @__PURE__ */ getDefaultExportFromCjs(bitsetExports);
|
|
15988
15988
|
const name = "proskomma-core";
|
|
15989
|
-
const version = "0.10.
|
|
15989
|
+
const version = "0.10.9";
|
|
15990
15990
|
const description$b = "A Scripture Runtime Engine";
|
|
15991
15991
|
const files = [
|
|
15992
15992
|
"dist"
|
|
@@ -34022,19 +34022,19 @@ const lexingRegexes = [
|
|
|
34022
34022
|
XRegExp('([ \\t]*\\|?[ \\t]*([A-Za-z0-9\\-]+)="([^"]*)"[ \\t]?)')
|
|
34023
34023
|
],
|
|
34024
34024
|
["attribute", "defaultAttribute", XRegExp("([ \\t]*\\|[ \\t]*([^\\|\\\\]*))")],
|
|
34025
|
-
["milestone", "emptyMilestone", XRegExp(
|
|
34025
|
+
["milestone", "emptyMilestone", XRegExp('(\\\\([a-z1-9]+)([ \\t]*\\|[ \\t]*[a-z1-9]+="[^\\|\\\\"]*")*\\\\[*])')],
|
|
34026
34026
|
["milestone", "startMilestoneTag", XRegExp("(\\\\([a-z1-9]+)-([se]))")],
|
|
34027
34027
|
["milestone", "endMilestoneMarker", XRegExp("(\\\\([*]))")],
|
|
34028
34028
|
["tag", "endTag", XRegExp("(\\\\([+]?[a-z\\-]+)([1-9]?(-([1-9]))?)[*])")],
|
|
34029
34029
|
["tag", "startTag", XRegExp("(\\\\([+]?[a-z\\-]+)([1-9]?(-([1-9]))?)[ \\t]?)")],
|
|
34030
34030
|
["bad", "bareSlash", XRegExp("(\\\\)")],
|
|
34031
34031
|
["printable", "eol", XRegExp("([ \\t]*[\\r\\n]+[ \\t]*)")],
|
|
34032
|
-
[
|
|
34032
|
+
// ['break', 'noBreakSpace', xre('~')],
|
|
34033
34033
|
["break", "softLineBreak", XRegExp("//")],
|
|
34034
34034
|
[
|
|
34035
34035
|
"printable",
|
|
34036
34036
|
"wordLike",
|
|
34037
|
-
XRegExp("([\\p{Letter}\\p{Number}\\p{Mark}\\u2060]{1,127})")
|
|
34037
|
+
XRegExp("([\\p{Letter}\\p{Number}\\p{Mark}\\u2060~]{1,127})")
|
|
34038
34038
|
],
|
|
34039
34039
|
["printable", "lineSpace", XRegExp("([\\p{Separator} ]{1,127})")],
|
|
34040
34040
|
[
|
|
@@ -34049,7 +34049,7 @@ const lexingRegexes = [
|
|
|
34049
34049
|
const mainRegex = XRegExp.union(lexingRegexes.map((x) => x[2]));
|
|
34050
34050
|
const makePrintable = (subclass, matchedBits) => ({
|
|
34051
34051
|
subclass,
|
|
34052
|
-
printValue: matchedBits[0]
|
|
34052
|
+
printValue: matchedBits[0].replace(/~/g, " ")
|
|
34053
34053
|
});
|
|
34054
34054
|
const makeChapter = (subclass, matchedBits) => ({
|
|
34055
34055
|
subclass,
|
|
@@ -34111,6 +34111,12 @@ const makeMilestone = (subclass, matchedBits) => {
|
|
|
34111
34111
|
ret.tagName = matchedBits[2];
|
|
34112
34112
|
if (subclass === "emptyMilestone") {
|
|
34113
34113
|
ret.printValue = `\\${ret.tagName}\\*`;
|
|
34114
|
+
ret.attributes = matchedBits[1] ? matchedBits[1].split("|").slice(1).map((a) => a.split("=")).map(
|
|
34115
|
+
(aa) => [
|
|
34116
|
+
aa[0],
|
|
34117
|
+
aa[1].replace(/"/g, "").replace(/[\\*]/g, "")
|
|
34118
|
+
]
|
|
34119
|
+
) : [];
|
|
34114
34120
|
} else {
|
|
34115
34121
|
ret.printValue = `\\${ret.tagName}`;
|
|
34116
34122
|
ret.sOrE = matchedBits[3];
|
|
@@ -39491,7 +39497,9 @@ const specs = (pt) => [
|
|
|
39491
39497
|
// EMPTY MILESTONE - add open and close scope
|
|
39492
39498
|
contexts: [["emptyMilestone"]],
|
|
39493
39499
|
parser: {
|
|
39494
|
-
during: (parser, pt2) =>
|
|
39500
|
+
during: (parser, pt2) => {
|
|
39501
|
+
parser.addEmptyMilestone(labelForScope$2("milestone", [pt2.tagName]));
|
|
39502
|
+
}
|
|
39495
39503
|
}
|
|
39496
39504
|
},
|
|
39497
39505
|
{
|
|
@@ -50515,7 +50523,10 @@ class Proskomma {
|
|
|
50515
50523
|
if (!bookCodes2 || bookCodes2.length === 0) {
|
|
50516
50524
|
throw new Error("bookCodes argument must be present and contain at least one element in augmentSuccinctDocSet");
|
|
50517
50525
|
}
|
|
50518
|
-
const selectDocs = (dId) =>
|
|
50526
|
+
const selectDocs = (dId) => {
|
|
50527
|
+
const doc = succinctOb.docs[dId];
|
|
50528
|
+
return bookCodes2.includes(doc.headers.bookCode);
|
|
50529
|
+
};
|
|
50519
50530
|
if (!this.docSets[succinctOb.id]) {
|
|
50520
50531
|
throw new Error(`docSet id '${succinctOb.id}' not found in Proskomma when using augmentSuccinctDocSet. Load it first with optional bookCodes argument`);
|
|
50521
50532
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -15984,7 +15984,7 @@ var bitset = {
|
|
|
15984
15984
|
})(bitset, bitsetExports);
|
|
15985
15985
|
const BitSet = /* @__PURE__ */ getDefaultExportFromCjs(bitsetExports);
|
|
15986
15986
|
const name = "proskomma-core";
|
|
15987
|
-
const version = "0.10.
|
|
15987
|
+
const version = "0.10.9";
|
|
15988
15988
|
const description$b = "A Scripture Runtime Engine";
|
|
15989
15989
|
const files = [
|
|
15990
15990
|
"dist"
|
|
@@ -34020,19 +34020,19 @@ const lexingRegexes = [
|
|
|
34020
34020
|
XRegExp('([ \\t]*\\|?[ \\t]*([A-Za-z0-9\\-]+)="([^"]*)"[ \\t]?)')
|
|
34021
34021
|
],
|
|
34022
34022
|
["attribute", "defaultAttribute", XRegExp("([ \\t]*\\|[ \\t]*([^\\|\\\\]*))")],
|
|
34023
|
-
["milestone", "emptyMilestone", XRegExp(
|
|
34023
|
+
["milestone", "emptyMilestone", XRegExp('(\\\\([a-z1-9]+)([ \\t]*\\|[ \\t]*[a-z1-9]+="[^\\|\\\\"]*")*\\\\[*])')],
|
|
34024
34024
|
["milestone", "startMilestoneTag", XRegExp("(\\\\([a-z1-9]+)-([se]))")],
|
|
34025
34025
|
["milestone", "endMilestoneMarker", XRegExp("(\\\\([*]))")],
|
|
34026
34026
|
["tag", "endTag", XRegExp("(\\\\([+]?[a-z\\-]+)([1-9]?(-([1-9]))?)[*])")],
|
|
34027
34027
|
["tag", "startTag", XRegExp("(\\\\([+]?[a-z\\-]+)([1-9]?(-([1-9]))?)[ \\t]?)")],
|
|
34028
34028
|
["bad", "bareSlash", XRegExp("(\\\\)")],
|
|
34029
34029
|
["printable", "eol", XRegExp("([ \\t]*[\\r\\n]+[ \\t]*)")],
|
|
34030
|
-
[
|
|
34030
|
+
// ['break', 'noBreakSpace', xre('~')],
|
|
34031
34031
|
["break", "softLineBreak", XRegExp("//")],
|
|
34032
34032
|
[
|
|
34033
34033
|
"printable",
|
|
34034
34034
|
"wordLike",
|
|
34035
|
-
XRegExp("([\\p{Letter}\\p{Number}\\p{Mark}\\u2060]{1,127})")
|
|
34035
|
+
XRegExp("([\\p{Letter}\\p{Number}\\p{Mark}\\u2060~]{1,127})")
|
|
34036
34036
|
],
|
|
34037
34037
|
["printable", "lineSpace", XRegExp("([\\p{Separator} ]{1,127})")],
|
|
34038
34038
|
[
|
|
@@ -34047,7 +34047,7 @@ const lexingRegexes = [
|
|
|
34047
34047
|
const mainRegex = XRegExp.union(lexingRegexes.map((x) => x[2]));
|
|
34048
34048
|
const makePrintable = (subclass, matchedBits) => ({
|
|
34049
34049
|
subclass,
|
|
34050
|
-
printValue: matchedBits[0]
|
|
34050
|
+
printValue: matchedBits[0].replace(/~/g, " ")
|
|
34051
34051
|
});
|
|
34052
34052
|
const makeChapter = (subclass, matchedBits) => ({
|
|
34053
34053
|
subclass,
|
|
@@ -34109,6 +34109,12 @@ const makeMilestone = (subclass, matchedBits) => {
|
|
|
34109
34109
|
ret.tagName = matchedBits[2];
|
|
34110
34110
|
if (subclass === "emptyMilestone") {
|
|
34111
34111
|
ret.printValue = `\\${ret.tagName}\\*`;
|
|
34112
|
+
ret.attributes = matchedBits[1] ? matchedBits[1].split("|").slice(1).map((a) => a.split("=")).map(
|
|
34113
|
+
(aa) => [
|
|
34114
|
+
aa[0],
|
|
34115
|
+
aa[1].replace(/"/g, "").replace(/[\\*]/g, "")
|
|
34116
|
+
]
|
|
34117
|
+
) : [];
|
|
34112
34118
|
} else {
|
|
34113
34119
|
ret.printValue = `\\${ret.tagName}`;
|
|
34114
34120
|
ret.sOrE = matchedBits[3];
|
|
@@ -39489,7 +39495,9 @@ const specs = (pt) => [
|
|
|
39489
39495
|
// EMPTY MILESTONE - add open and close scope
|
|
39490
39496
|
contexts: [["emptyMilestone"]],
|
|
39491
39497
|
parser: {
|
|
39492
|
-
during: (parser, pt2) =>
|
|
39498
|
+
during: (parser, pt2) => {
|
|
39499
|
+
parser.addEmptyMilestone(labelForScope$2("milestone", [pt2.tagName]));
|
|
39500
|
+
}
|
|
39493
39501
|
}
|
|
39494
39502
|
},
|
|
39495
39503
|
{
|
|
@@ -50513,7 +50521,10 @@ class Proskomma {
|
|
|
50513
50521
|
if (!bookCodes2 || bookCodes2.length === 0) {
|
|
50514
50522
|
throw new Error("bookCodes argument must be present and contain at least one element in augmentSuccinctDocSet");
|
|
50515
50523
|
}
|
|
50516
|
-
const selectDocs = (dId) =>
|
|
50524
|
+
const selectDocs = (dId) => {
|
|
50525
|
+
const doc = succinctOb.docs[dId];
|
|
50526
|
+
return bookCodes2.includes(doc.headers.bookCode);
|
|
50527
|
+
};
|
|
50517
50528
|
if (!this.docSets[succinctOb.id]) {
|
|
50518
50529
|
throw new Error(`docSet id '${succinctOb.id}' not found in Proskomma when using augmentSuccinctDocSet. Load it first with optional bookCodes argument`);
|
|
50519
50530
|
}
|