pro-editor-schema 0.1.195 → 0.1.197
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 +10 -37
- package/dist/index.mjs +10 -37
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -403,9 +403,9 @@ var REPLY_SCHEMA = createSchema({
|
|
|
403
403
|
var INDEX_TERM_ENTRY_REQUIRED_ATTRIBUTES = [
|
|
404
404
|
"data-date",
|
|
405
405
|
"data-user",
|
|
406
|
-
"
|
|
407
|
-
"
|
|
408
|
-
"
|
|
406
|
+
"firstentry",
|
|
407
|
+
"secondentry",
|
|
408
|
+
"thirdentry",
|
|
409
409
|
"entry",
|
|
410
410
|
"linkend",
|
|
411
411
|
...ID_ATTRS
|
|
@@ -418,7 +418,7 @@ var BOOKMARK_INDEX_POSITION_ATTRIBUTE = {
|
|
|
418
418
|
var SEE_REQUIRED_ATTRIBUTES = [
|
|
419
419
|
"linkend",
|
|
420
420
|
"data-user",
|
|
421
|
-
"crossref-
|
|
421
|
+
"crossref-pagenumber",
|
|
422
422
|
{
|
|
423
423
|
name: "role",
|
|
424
424
|
values: ["see", "see-also"],
|
|
@@ -426,10 +426,10 @@ var SEE_REQUIRED_ATTRIBUTES = [
|
|
|
426
426
|
},
|
|
427
427
|
...ID_ATTRS,
|
|
428
428
|
"data-date",
|
|
429
|
-
"crossref-
|
|
430
|
-
"crossref-
|
|
431
|
-
"crossref-
|
|
432
|
-
"crossref-
|
|
429
|
+
"crossref-firstentry",
|
|
430
|
+
"crossref-secondentry",
|
|
431
|
+
"crossref-thirdentry",
|
|
432
|
+
"crossref-fourthentry"
|
|
433
433
|
];
|
|
434
434
|
|
|
435
435
|
// src/schema/elementSchemas/atoms/indexing/bookmark.ts
|
|
@@ -2526,10 +2526,10 @@ var findSchemaByElement = (element) => {
|
|
|
2526
2526
|
return candidates[0];
|
|
2527
2527
|
};
|
|
2528
2528
|
var isAttributeRestricted = (attr) => typeof attr !== "string";
|
|
2529
|
-
var getAttributeName = (attribute) => typeof attribute === "string" ? attribute : attribute.name;
|
|
2529
|
+
var getAttributeName = (attribute) => typeof attribute === "string" ? attribute.toLowerCase() : attribute.name.toLowerCase();
|
|
2530
2530
|
var findAttributeDefinitionByName = (definitions, name) => {
|
|
2531
2531
|
for (const def of definitions) {
|
|
2532
|
-
if (getAttributeName(def) === name) {
|
|
2532
|
+
if (getAttributeName(def) === name.toLowerCase()) {
|
|
2533
2533
|
return def;
|
|
2534
2534
|
}
|
|
2535
2535
|
}
|
|
@@ -2772,33 +2772,6 @@ var validateElementAgainstSchema = (element, schema, inheritedForbiddenScope) =>
|
|
|
2772
2772
|
description: `The element is not allowed in this context.`
|
|
2773
2773
|
});
|
|
2774
2774
|
}
|
|
2775
|
-
if (schema.code === "insertion" && !element.classList.contains("ins")) {
|
|
2776
|
-
addValidationIssue(errors, {
|
|
2777
|
-
store: getStore(element),
|
|
2778
|
-
title: 'Missing class "ins" for insertion element',
|
|
2779
|
-
level: "warning",
|
|
2780
|
-
kind: "missing",
|
|
2781
|
-
description: `The element is missing the class "ins".`
|
|
2782
|
-
});
|
|
2783
|
-
}
|
|
2784
|
-
if (schema.code === "deletion" && !element.classList.contains("del")) {
|
|
2785
|
-
addValidationIssue(errors, {
|
|
2786
|
-
store: getStore(element),
|
|
2787
|
-
title: 'Missing class "del" for deletion element',
|
|
2788
|
-
level: "warning",
|
|
2789
|
-
kind: "missing",
|
|
2790
|
-
description: `The element is missing the class "del".`
|
|
2791
|
-
});
|
|
2792
|
-
}
|
|
2793
|
-
if (schema.code === "commentQuerySection" && !element.classList.contains("cmtQurySection")) {
|
|
2794
|
-
addValidationIssue(errors, {
|
|
2795
|
-
store: getStore(element),
|
|
2796
|
-
title: 'Missing class "cmtQurySection" for comment query section',
|
|
2797
|
-
level: "warning",
|
|
2798
|
-
kind: "missing",
|
|
2799
|
-
description: `The element is missing the class "cmtQurySection".`
|
|
2800
|
-
});
|
|
2801
|
-
}
|
|
2802
2775
|
errors.push(...validateAttributes(element, schema));
|
|
2803
2776
|
errors.push(...validateChildren(element, schema, inheritedForbiddenScope));
|
|
2804
2777
|
return errors;
|
package/dist/index.mjs
CHANGED
|
@@ -338,9 +338,9 @@ var REPLY_SCHEMA = createSchema({
|
|
|
338
338
|
var INDEX_TERM_ENTRY_REQUIRED_ATTRIBUTES = [
|
|
339
339
|
"data-date",
|
|
340
340
|
"data-user",
|
|
341
|
-
"
|
|
342
|
-
"
|
|
343
|
-
"
|
|
341
|
+
"firstentry",
|
|
342
|
+
"secondentry",
|
|
343
|
+
"thirdentry",
|
|
344
344
|
"entry",
|
|
345
345
|
"linkend",
|
|
346
346
|
...ID_ATTRS
|
|
@@ -353,7 +353,7 @@ var BOOKMARK_INDEX_POSITION_ATTRIBUTE = {
|
|
|
353
353
|
var SEE_REQUIRED_ATTRIBUTES = [
|
|
354
354
|
"linkend",
|
|
355
355
|
"data-user",
|
|
356
|
-
"crossref-
|
|
356
|
+
"crossref-pagenumber",
|
|
357
357
|
{
|
|
358
358
|
name: "role",
|
|
359
359
|
values: ["see", "see-also"],
|
|
@@ -361,10 +361,10 @@ var SEE_REQUIRED_ATTRIBUTES = [
|
|
|
361
361
|
},
|
|
362
362
|
...ID_ATTRS,
|
|
363
363
|
"data-date",
|
|
364
|
-
"crossref-
|
|
365
|
-
"crossref-
|
|
366
|
-
"crossref-
|
|
367
|
-
"crossref-
|
|
364
|
+
"crossref-firstentry",
|
|
365
|
+
"crossref-secondentry",
|
|
366
|
+
"crossref-thirdentry",
|
|
367
|
+
"crossref-fourthentry"
|
|
368
368
|
];
|
|
369
369
|
|
|
370
370
|
// src/schema/elementSchemas/atoms/indexing/bookmark.ts
|
|
@@ -2461,10 +2461,10 @@ var findSchemaByElement = (element) => {
|
|
|
2461
2461
|
return candidates[0];
|
|
2462
2462
|
};
|
|
2463
2463
|
var isAttributeRestricted = (attr) => typeof attr !== "string";
|
|
2464
|
-
var getAttributeName = (attribute) => typeof attribute === "string" ? attribute : attribute.name;
|
|
2464
|
+
var getAttributeName = (attribute) => typeof attribute === "string" ? attribute.toLowerCase() : attribute.name.toLowerCase();
|
|
2465
2465
|
var findAttributeDefinitionByName = (definitions, name) => {
|
|
2466
2466
|
for (const def of definitions) {
|
|
2467
|
-
if (getAttributeName(def) === name) {
|
|
2467
|
+
if (getAttributeName(def) === name.toLowerCase()) {
|
|
2468
2468
|
return def;
|
|
2469
2469
|
}
|
|
2470
2470
|
}
|
|
@@ -2707,33 +2707,6 @@ var validateElementAgainstSchema = (element, schema, inheritedForbiddenScope) =>
|
|
|
2707
2707
|
description: `The element is not allowed in this context.`
|
|
2708
2708
|
});
|
|
2709
2709
|
}
|
|
2710
|
-
if (schema.code === "insertion" && !element.classList.contains("ins")) {
|
|
2711
|
-
addValidationIssue(errors, {
|
|
2712
|
-
store: getStore(element),
|
|
2713
|
-
title: 'Missing class "ins" for insertion element',
|
|
2714
|
-
level: "warning",
|
|
2715
|
-
kind: "missing",
|
|
2716
|
-
description: `The element is missing the class "ins".`
|
|
2717
|
-
});
|
|
2718
|
-
}
|
|
2719
|
-
if (schema.code === "deletion" && !element.classList.contains("del")) {
|
|
2720
|
-
addValidationIssue(errors, {
|
|
2721
|
-
store: getStore(element),
|
|
2722
|
-
title: 'Missing class "del" for deletion element',
|
|
2723
|
-
level: "warning",
|
|
2724
|
-
kind: "missing",
|
|
2725
|
-
description: `The element is missing the class "del".`
|
|
2726
|
-
});
|
|
2727
|
-
}
|
|
2728
|
-
if (schema.code === "commentQuerySection" && !element.classList.contains("cmtQurySection")) {
|
|
2729
|
-
addValidationIssue(errors, {
|
|
2730
|
-
store: getStore(element),
|
|
2731
|
-
title: 'Missing class "cmtQurySection" for comment query section',
|
|
2732
|
-
level: "warning",
|
|
2733
|
-
kind: "missing",
|
|
2734
|
-
description: `The element is missing the class "cmtQurySection".`
|
|
2735
|
-
});
|
|
2736
|
-
}
|
|
2737
2710
|
errors.push(...validateAttributes(element, schema));
|
|
2738
2711
|
errors.push(...validateChildren(element, schema, inheritedForbiddenScope));
|
|
2739
2712
|
return errors;
|