@gmb/bitmark-parser-generator 5.39.0 → 5.40.0
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/browser/bitmark-parser-generator.min.js +1 -1
- package/dist/browser/bundle-report.html +2 -2
- package/dist/browser/cjs/index.cjs +117 -8
- package/dist/browser/cjs/index.cjs.map +1 -1
- package/dist/browser/cjs/index.d.cts +8 -0
- package/dist/browser/esm/index.d.ts +8 -0
- package/dist/browser/esm/index.js +117 -8
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/cli/main.js +117 -8
- package/dist/cli/main.js.map +1 -1
- package/dist/index.cjs +117 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +117 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/main.js
CHANGED
|
@@ -14,6 +14,8 @@ var BitType = {
|
|
|
14
14
|
// Used to indicate a bit is commented out
|
|
15
15
|
_standard: "_standard",
|
|
16
16
|
// Not to be used as a bit, but as a base for other bit types
|
|
17
|
+
_standardLight: "_standard-light",
|
|
18
|
+
// PLAN-021: lightweight base (minimal tag set), not to be used as a bit
|
|
17
19
|
advertising: "advertising",
|
|
18
20
|
advertisingAdvertorial: "advertising-advertorial",
|
|
19
21
|
advertisingAdvertorialPage: "advertising-advertorial-page",
|
|
@@ -301,6 +303,7 @@ var BitType = {
|
|
|
301
303
|
handInSystemMedia: "hand-in-system-media",
|
|
302
304
|
handInVideo: "hand-in-video",
|
|
303
305
|
handInVoice: "hand-in-voice",
|
|
306
|
+
h: "h",
|
|
304
307
|
help: "help",
|
|
305
308
|
helpAlt: "help-alt",
|
|
306
309
|
highlightText: "highlight-text",
|
|
@@ -386,6 +389,7 @@ var BitType = {
|
|
|
386
389
|
leWatchVideoEmbed: "le-watch-video-embed",
|
|
387
390
|
lifeSkillSticker: "life-skill-sticker",
|
|
388
391
|
list: "list",
|
|
392
|
+
listAlt: "list-alt",
|
|
389
393
|
listItem: "list-item",
|
|
390
394
|
mark: "mark",
|
|
391
395
|
match: "match",
|
|
@@ -416,6 +420,8 @@ var BitType = {
|
|
|
416
420
|
notebookArticle: "notebook-article",
|
|
417
421
|
noteCollapsible: "note-collapsible",
|
|
418
422
|
output: "output",
|
|
423
|
+
p: "p",
|
|
424
|
+
pAlt: "p-alt",
|
|
419
425
|
page: "page",
|
|
420
426
|
pageAcademy: "page-academy",
|
|
421
427
|
pageArticle: "page-article",
|
|
@@ -538,6 +544,7 @@ var BitType = {
|
|
|
538
544
|
smartStandardNoteNonNormativeCollapsible: "smart-standard-note-non-normative-collapsible",
|
|
539
545
|
smartStandardNoteNormative: "smart-standard-note-normative",
|
|
540
546
|
smartStandardNoteNormativeCollapsible: "smart-standard-note-normative-collapsible",
|
|
547
|
+
smartStandardP: "smart-standard-p",
|
|
541
548
|
smartStandardRemarkLegend: "smart-standard-remark-legend",
|
|
542
549
|
smartStandardRemarkLegendNonNormative: "smart-standard-remark-legend-non-normative",
|
|
543
550
|
smartStandardRemarkLegendNormative: "smart-standard-remark-legend-normative",
|
|
@@ -1469,6 +1476,8 @@ ${this.cardSet.toString(opts)}`;
|
|
|
1469
1476
|
var groupKeys = {
|
|
1470
1477
|
group_accessibilityDecorative: "group_accessibilityDecorative",
|
|
1471
1478
|
group_standardAllBits: "group_standardAllBits",
|
|
1479
|
+
group_standardExample: "group_standardExample",
|
|
1480
|
+
group_standardItem: "group_standardItem",
|
|
1472
1481
|
group_standardItemLead: "group_standardItemLead",
|
|
1473
1482
|
group_standardItemLeadInstructionHint: "group_standardItemLeadInstructionHint",
|
|
1474
1483
|
group_standardInstructionHint: "group_standardInstructionHint",
|
|
@@ -4956,6 +4965,31 @@ var GROUPS = {
|
|
|
4956
4965
|
}
|
|
4957
4966
|
]
|
|
4958
4967
|
},
|
|
4968
|
+
[ConfigKey.group_standardExample]: {
|
|
4969
|
+
type: GroupConfigType.standard,
|
|
4970
|
+
description: "PLAN-021: Standard group for the bit-level example property only. Mirror of the group_standardTags property_example entry, used by the lightweight bits (_standardLight).",
|
|
4971
|
+
tags: [
|
|
4972
|
+
{
|
|
4973
|
+
key: ConfigKey.property_example,
|
|
4974
|
+
exportJsonKey: [{ "@keyonly": {} }, { "@absent": { isExample: true } }, { example: "$" }],
|
|
4975
|
+
description: "The example(s) for the bit",
|
|
4976
|
+
format: TagFormat.bitmarkText,
|
|
4977
|
+
nullable: true
|
|
4978
|
+
}
|
|
4979
|
+
]
|
|
4980
|
+
},
|
|
4981
|
+
[ConfigKey.group_standardItem]: {
|
|
4982
|
+
type: GroupConfigType.standard,
|
|
4983
|
+
description: "PLAN-021: Standard group for the item tag ONLY (no lead/pageNumber/marginNumber chain). Used by the lightweight bits (_standardLight).",
|
|
4984
|
+
tags: [
|
|
4985
|
+
{
|
|
4986
|
+
key: ConfigKey.tag_item,
|
|
4987
|
+
jsonKey: "item",
|
|
4988
|
+
exportJsonKey: { item: "$" },
|
|
4989
|
+
description: "The item for the bit"
|
|
4990
|
+
}
|
|
4991
|
+
]
|
|
4992
|
+
},
|
|
4959
4993
|
[ConfigKey.group_standardItemLead]: {
|
|
4960
4994
|
type: GroupConfigType.standard,
|
|
4961
4995
|
description: "Standard group for item, lead, page number, and margin number tags",
|
|
@@ -7759,6 +7793,25 @@ var BITS = {
|
|
|
7759
7793
|
}
|
|
7760
7794
|
]
|
|
7761
7795
|
},
|
|
7796
|
+
[BitType._standardLight]: {
|
|
7797
|
+
since: "5.40.0",
|
|
7798
|
+
description: "PLAN-021: Lightweight standard base bit with a minimal tag set (item + example only \u2014 no instruction/hint/lead, no resource attachments), used as a base for other bits, should not be used directly",
|
|
7799
|
+
resourceAttachmentAllowed: false,
|
|
7800
|
+
tags: [
|
|
7801
|
+
{
|
|
7802
|
+
key: ConfigKey.group_standardAllBits,
|
|
7803
|
+
description: "Standard tags for all bits"
|
|
7804
|
+
},
|
|
7805
|
+
{
|
|
7806
|
+
key: ConfigKey.group_standardItem,
|
|
7807
|
+
description: "The item tag (no lead/pageNumber/marginNumber chain)"
|
|
7808
|
+
},
|
|
7809
|
+
{
|
|
7810
|
+
key: ConfigKey.group_standardExample,
|
|
7811
|
+
description: "The bit-level example property"
|
|
7812
|
+
}
|
|
7813
|
+
]
|
|
7814
|
+
},
|
|
7762
7815
|
[BitType.appFlashcards]: {
|
|
7763
7816
|
since: "1.3.0",
|
|
7764
7817
|
title: "Flashcards",
|
|
@@ -10586,6 +10639,23 @@ var BITS = {
|
|
|
10586
10639
|
baseBitType: BitType.article,
|
|
10587
10640
|
description: "Glossary term bit, used to define glossary terms in articles or books"
|
|
10588
10641
|
},
|
|
10642
|
+
[BitType.h]: {
|
|
10643
|
+
since: "5.40.0",
|
|
10644
|
+
title: "Heading",
|
|
10645
|
+
bitGroups: [BitGroup.static],
|
|
10646
|
+
baseBitType: BitType._standardLight,
|
|
10647
|
+
description: "Lightweight heading bit with chapter-style title levels 1-7; title/level + item only \u2014 no body, no footer",
|
|
10648
|
+
bodyAllowed: false,
|
|
10649
|
+
footerAllowed: false,
|
|
10650
|
+
tags: [
|
|
10651
|
+
{
|
|
10652
|
+
key: ConfigKey.tag_title,
|
|
10653
|
+
description: "The title of the heading",
|
|
10654
|
+
jsonKey: "title|setMulti(level)",
|
|
10655
|
+
exportJsonKey: { title: "$", level: "$level" }
|
|
10656
|
+
}
|
|
10657
|
+
]
|
|
10658
|
+
},
|
|
10589
10659
|
[BitType.help]: {
|
|
10590
10660
|
since: "1.3.0",
|
|
10591
10661
|
title: "Help",
|
|
@@ -10772,13 +10842,22 @@ var BITS = {
|
|
|
10772
10842
|
since: "1.22.0",
|
|
10773
10843
|
title: "List",
|
|
10774
10844
|
bitGroups: [BitGroup.static],
|
|
10775
|
-
|
|
10845
|
+
// PLAN-021: rebased from article onto the lightweight base
|
|
10846
|
+
baseBitType: BitType._standardLight,
|
|
10776
10847
|
description: "List bit, used to create lists in articles or books"
|
|
10777
10848
|
},
|
|
10849
|
+
[BitType.listAlt]: {
|
|
10850
|
+
since: "5.40.0",
|
|
10851
|
+
title: "List Alt",
|
|
10852
|
+
bitGroups: [BitGroup.static],
|
|
10853
|
+
baseBitType: BitType.list,
|
|
10854
|
+
description: "Lightweight list bit (alternative), based on list"
|
|
10855
|
+
},
|
|
10778
10856
|
[BitType.standardList]: {
|
|
10779
10857
|
since: "1.22.0",
|
|
10780
10858
|
bitGroups: [BitGroup.static],
|
|
10781
|
-
|
|
10859
|
+
// PLAN-021: re-rooted from article onto the lightweight list
|
|
10860
|
+
baseBitType: BitType.list,
|
|
10782
10861
|
description: "Standard list bit, used to create standard lists in articles or books"
|
|
10783
10862
|
},
|
|
10784
10863
|
[BitType.smartStandardList]: {
|
|
@@ -10794,6 +10873,13 @@ var BITS = {
|
|
|
10794
10873
|
"xml-niso-iec": { "@el": "ref-list", "@attr": { id: "$customerId" }, "\u25BC": "$anchor" }
|
|
10795
10874
|
}
|
|
10796
10875
|
},
|
|
10876
|
+
[BitType.smartStandardP]: {
|
|
10877
|
+
since: "5.40.0",
|
|
10878
|
+
title: "Smart Standard Paragraph",
|
|
10879
|
+
bitGroups: [BitGroup.static],
|
|
10880
|
+
baseBitType: BitType.p,
|
|
10881
|
+
description: "Smart standard paragraph bit, based on p"
|
|
10882
|
+
},
|
|
10797
10883
|
[BitType.smartStandardListCollapsible]: {
|
|
10798
10884
|
since: "1.28.0",
|
|
10799
10885
|
deprecated: "5.37.0",
|
|
@@ -13375,7 +13461,8 @@ var BITS = {
|
|
|
13375
13461
|
[BitType.listItem]: {
|
|
13376
13462
|
since: "1.22.0",
|
|
13377
13463
|
bitGroups: [BitGroup.static],
|
|
13378
|
-
|
|
13464
|
+
// PLAN-021: rebased from article onto the lightweight base
|
|
13465
|
+
baseBitType: BitType._standardLight,
|
|
13379
13466
|
description: "List item bit, used to create list items in articles or books",
|
|
13380
13467
|
tags: [
|
|
13381
13468
|
{
|
|
@@ -13780,6 +13867,20 @@ var BITS = {
|
|
|
13780
13867
|
baseBitType: BitType.multipleResponse,
|
|
13781
13868
|
description: "Coach self-reflection multiple response bit, used for self-reflection in coaching"
|
|
13782
13869
|
},
|
|
13870
|
+
[BitType.p]: {
|
|
13871
|
+
since: "5.40.0",
|
|
13872
|
+
title: "Paragraph",
|
|
13873
|
+
bitGroups: [BitGroup.static],
|
|
13874
|
+
baseBitType: BitType._standardLight,
|
|
13875
|
+
description: "Lightweight paragraph bit with a minimal tag set"
|
|
13876
|
+
},
|
|
13877
|
+
[BitType.pAlt]: {
|
|
13878
|
+
since: "5.40.0",
|
|
13879
|
+
title: "Paragraph Alt",
|
|
13880
|
+
bitGroups: [BitGroup.static],
|
|
13881
|
+
baseBitType: BitType.p,
|
|
13882
|
+
description: "Lightweight paragraph bit (alternative), based on p"
|
|
13883
|
+
},
|
|
13783
13884
|
[BitType.page]: {
|
|
13784
13885
|
since: "1.3.0",
|
|
13785
13886
|
title: "Page",
|
|
@@ -16510,7 +16611,7 @@ var instance2 = new Config();
|
|
|
16510
16611
|
// src/generated/package_info.ts
|
|
16511
16612
|
var PACKAGE_INFO = {
|
|
16512
16613
|
"name": "@gmb/bitmark-parser-generator",
|
|
16513
|
-
"version": "5.
|
|
16614
|
+
"version": "5.40.0",
|
|
16514
16615
|
"license": "ISC"};
|
|
16515
16616
|
var Environment = {
|
|
16516
16617
|
unknown: "",
|
|
@@ -35198,7 +35299,7 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
35198
35299
|
leaf_level(node, route) {
|
|
35199
35300
|
const parent = this.getParentNode(route);
|
|
35200
35301
|
if (parent?.key !== NodeType.bitsValue) return true;
|
|
35201
|
-
if (!instance2.isOfBitType(this.bitType, [BitType.chapter])) return true;
|
|
35302
|
+
if (!instance2.isOfBitType(this.bitType, [BitType.chapter, BitType.h])) return true;
|
|
35202
35303
|
const level = node.value;
|
|
35203
35304
|
const bit = parent?.value;
|
|
35204
35305
|
if (level > 0 && bit.title == null) {
|
|
@@ -41632,15 +41733,23 @@ function titleTagContentProcessor(context, _contentDepth, _tagsConfig, content,
|
|
|
41632
41733
|
titleString: titleText ?? ""
|
|
41633
41734
|
};
|
|
41634
41735
|
}
|
|
41635
|
-
|
|
41736
|
+
var H_TITLE_LEVEL_MAX = 7;
|
|
41737
|
+
function buildTitles(context, bitType, title) {
|
|
41636
41738
|
title = title ?? [];
|
|
41637
|
-
if (instance2.isOfBitType(bitType, BitType.chapter)) {
|
|
41739
|
+
if (instance2.isOfBitType(bitType, [BitType.chapter, BitType.h])) {
|
|
41638
41740
|
let t;
|
|
41639
41741
|
if (title.length > 0) t = title[title.length - 1];
|
|
41742
|
+
let level = title.length > 0 ? title.length - 1 : void 0;
|
|
41743
|
+
if (level != null && level > H_TITLE_LEVEL_MAX && instance2.isOfBitType(bitType, BitType.h)) {
|
|
41744
|
+
context.addWarning(
|
|
41745
|
+
`Title level of ${level} too high, setting to max value of ${H_TITLE_LEVEL_MAX}`
|
|
41746
|
+
);
|
|
41747
|
+
level = H_TITLE_LEVEL_MAX;
|
|
41748
|
+
}
|
|
41640
41749
|
return {
|
|
41641
41750
|
title: t?.titleAst ?? [],
|
|
41642
41751
|
titleString: t?.titleString ?? "",
|
|
41643
|
-
level
|
|
41752
|
+
level
|
|
41644
41753
|
};
|
|
41645
41754
|
} else {
|
|
41646
41755
|
if (Array.isArray(title)) {
|