@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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
-
<title>@gmb/bitmark-parser-generator [2 Sep 2026 at 01:
|
|
6
|
+
<title>@gmb/bitmark-parser-generator [2 Sep 2026 at 01:44]</title>
|
|
7
7
|
<link
|
|
8
8
|
rel="shortcut icon"
|
|
9
9
|
href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAABrVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+O1foceMD///+J0/qK1Pr7/v8Xdr/9///W8P4UdL7L7P0Scr2r4Pyj3vwad8D5/f/2/f+55f3E6f34+/2H0/ojfMKpzOd0rNgQcb3F3O/j9f7c8v6g3Pz0/P/w+v/q+P7n9v6T1/uQ1vuE0vqLut/y+v+Z2fvt+f+15Pzv9fuc2/vR7v2V2Pvd6/bg9P7I6/285/2y4/yp3/zp8vk8i8kqgMT7/P31+fyv4vxGkcz6/P6/6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GCxug8MhpsMEcTEAWf3rx2vZhe/LAmtIn/6apE6PN0ULKgywD9mmdxbmFl3OvD5AS5fW5zLbv/YHmcsBTjf/afDz3MaZTVCfAP9z6/Bw6ycv8EUBWJIn9zYcoAWWlW9+OzO3vkTy8H+RANLmdrpOuYWdZYEXpo+TlCJrW5EARb7fF+bWdqf3hhyZI1nWJQHgznErZhbjoEsWqi8dQNoE294aldzFurwSABL2XXMf9+H1VQGke9exw5P/AnA5Pv5ngMul7LOvO922iwACu8WkCwLCafvM4CeWPxfA8lNHcWZSoi8EwMAIciKX2Z4SWCMAa3snCZ/G4EA8D6CMLNFsGQhkkz/gQNEBbPCbWsxGUpYVu3z8IyNAknwJkfPMEhLyrdi5RTyUVACkw4GSFRNWJNEW+fgPGwHD8/JxnRuLabN4CGNRkAE23na2+VmEAUmrYymSGjMAYqH84YUIyzgzs3XC7gNgH36Vcc4zKY9o9fgPBXUAiHHwVboBHGLiX6Zcjp1f2wu4tvzZKo0ecPnDtQYDQvJXaBeNzce45Fp28ZQLrEZVuFqgBwOalArKXnW1UzlnSusQKJqKYNuz4tOnI6sZG4zanpemv+7ySU2jbA9h6uhcgpfy6G2PahirDZ6zvq6zDduMVFTKvzw8wgyEdelwY9in3XkEPs3osJuwRQ4qTkfzifndg9Gfc4pdsu82+tTnHZTBa2EAMrqr2t43pguc8tNm7JQVQ2S0ukj2d22dhXYP0/veWtwKrCkNoNimAN5+Xr/oLrxswKbVJjteWrX7eR63o4j9q0GxnaBdWgGA5VStpanIjQmEhV0/nVt5VOFUvix6awJhPcAaTEShgrG+iGyvb5a0Ndb1YGHFPEwoqAinoaykaID1o1pdPNu7XsnCKQ3R+hwWIIhGvORcJUBYXe3Xa3vq/mF/N9V13ugufMkfXn+KHsRD0B8AAAAASUVORK5CYII="
|
|
@@ -86,7 +86,7 @@ function(){var e="function"==typeof Object.defineProperties?Object.definePropert
|
|
|
86
86
|
<body>
|
|
87
87
|
<div id="app"></div>
|
|
88
88
|
<script>
|
|
89
|
-
window.chartData = [{"label":"bitmark-parser-generator.min.js","isAsset":true,"statSize":
|
|
89
|
+
window.chartData = [{"label":"bitmark-parser-generator.min.js","isAsset":true,"statSize":1602885,"parsedSize":709844,"gzipSize":132494,"groups":[{"label":"dist/browser/cjs","path":"./dist/browser/cjs","statSize":1596823,"groups":[{"id":922,"label":"index.cjs","path":"./dist/browser/cjs/index.cjs","statSize":1596823,"parsedSize":709529,"gzipSize":132494}],"parsedSize":709529,"gzipSize":132494},{"label":"node_modules/@ncoderz/superenum/dist","path":"./node_modules/@ncoderz/superenum/dist","statSize":6062,"groups":[{"id":722,"label":"index.cjs","path":"./node_modules/@ncoderz/superenum/dist/index.cjs","statSize":6062}],"parsedSize":0,"gzipSize":0}],"isInitialByEntrypoint":{"main":true}}];
|
|
90
90
|
window.entrypoints = ["main"];
|
|
91
91
|
window.defaultSizes = "stat";
|
|
92
92
|
window.compressionAlgorithm = "gzip";
|
|
@@ -67,6 +67,8 @@ var BitType2 = {
|
|
|
67
67
|
// Used to indicate a bit is commented out
|
|
68
68
|
_standard: "_standard",
|
|
69
69
|
// Not to be used as a bit, but as a base for other bit types
|
|
70
|
+
_standardLight: "_standard-light",
|
|
71
|
+
// PLAN-021: lightweight base (minimal tag set), not to be used as a bit
|
|
70
72
|
advertising: "advertising",
|
|
71
73
|
advertisingAdvertorial: "advertising-advertorial",
|
|
72
74
|
advertisingAdvertorialPage: "advertising-advertorial-page",
|
|
@@ -354,6 +356,7 @@ var BitType2 = {
|
|
|
354
356
|
handInSystemMedia: "hand-in-system-media",
|
|
355
357
|
handInVideo: "hand-in-video",
|
|
356
358
|
handInVoice: "hand-in-voice",
|
|
359
|
+
h: "h",
|
|
357
360
|
help: "help",
|
|
358
361
|
helpAlt: "help-alt",
|
|
359
362
|
highlightText: "highlight-text",
|
|
@@ -439,6 +442,7 @@ var BitType2 = {
|
|
|
439
442
|
leWatchVideoEmbed: "le-watch-video-embed",
|
|
440
443
|
lifeSkillSticker: "life-skill-sticker",
|
|
441
444
|
list: "list",
|
|
445
|
+
listAlt: "list-alt",
|
|
442
446
|
listItem: "list-item",
|
|
443
447
|
mark: "mark",
|
|
444
448
|
match: "match",
|
|
@@ -469,6 +473,8 @@ var BitType2 = {
|
|
|
469
473
|
notebookArticle: "notebook-article",
|
|
470
474
|
noteCollapsible: "note-collapsible",
|
|
471
475
|
output: "output",
|
|
476
|
+
p: "p",
|
|
477
|
+
pAlt: "p-alt",
|
|
472
478
|
page: "page",
|
|
473
479
|
pageAcademy: "page-academy",
|
|
474
480
|
pageArticle: "page-article",
|
|
@@ -591,6 +597,7 @@ var BitType2 = {
|
|
|
591
597
|
smartStandardNoteNonNormativeCollapsible: "smart-standard-note-non-normative-collapsible",
|
|
592
598
|
smartStandardNoteNormative: "smart-standard-note-normative",
|
|
593
599
|
smartStandardNoteNormativeCollapsible: "smart-standard-note-normative-collapsible",
|
|
600
|
+
smartStandardP: "smart-standard-p",
|
|
594
601
|
smartStandardRemarkLegend: "smart-standard-remark-legend",
|
|
595
602
|
smartStandardRemarkLegendNonNormative: "smart-standard-remark-legend-non-normative",
|
|
596
603
|
smartStandardRemarkLegendNormative: "smart-standard-remark-legend-normative",
|
|
@@ -1560,6 +1567,8 @@ var import_superenum12 = require("@ncoderz/superenum");
|
|
|
1560
1567
|
var groupKeys = {
|
|
1561
1568
|
group_accessibilityDecorative: "group_accessibilityDecorative",
|
|
1562
1569
|
group_standardAllBits: "group_standardAllBits",
|
|
1570
|
+
group_standardExample: "group_standardExample",
|
|
1571
|
+
group_standardItem: "group_standardItem",
|
|
1563
1572
|
group_standardItemLead: "group_standardItemLead",
|
|
1564
1573
|
group_standardItemLeadInstructionHint: "group_standardItemLeadInstructionHint",
|
|
1565
1574
|
group_standardInstructionHint: "group_standardInstructionHint",
|
|
@@ -5059,6 +5068,31 @@ var GROUPS = {
|
|
|
5059
5068
|
}
|
|
5060
5069
|
]
|
|
5061
5070
|
},
|
|
5071
|
+
[ConfigKey.group_standardExample]: {
|
|
5072
|
+
type: GroupConfigType.standard,
|
|
5073
|
+
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).",
|
|
5074
|
+
tags: [
|
|
5075
|
+
{
|
|
5076
|
+
key: ConfigKey.property_example,
|
|
5077
|
+
exportJsonKey: [{ "@keyonly": {} }, { "@absent": { isExample: true } }, { example: "$" }],
|
|
5078
|
+
description: "The example(s) for the bit",
|
|
5079
|
+
format: TagFormat.bitmarkText,
|
|
5080
|
+
nullable: true
|
|
5081
|
+
}
|
|
5082
|
+
]
|
|
5083
|
+
},
|
|
5084
|
+
[ConfigKey.group_standardItem]: {
|
|
5085
|
+
type: GroupConfigType.standard,
|
|
5086
|
+
description: "PLAN-021: Standard group for the item tag ONLY (no lead/pageNumber/marginNumber chain). Used by the lightweight bits (_standardLight).",
|
|
5087
|
+
tags: [
|
|
5088
|
+
{
|
|
5089
|
+
key: ConfigKey.tag_item,
|
|
5090
|
+
jsonKey: "item",
|
|
5091
|
+
exportJsonKey: { item: "$" },
|
|
5092
|
+
description: "The item for the bit"
|
|
5093
|
+
}
|
|
5094
|
+
]
|
|
5095
|
+
},
|
|
5062
5096
|
[ConfigKey.group_standardItemLead]: {
|
|
5063
5097
|
type: GroupConfigType.standard,
|
|
5064
5098
|
description: "Standard group for item, lead, page number, and margin number tags",
|
|
@@ -7862,6 +7896,25 @@ var BITS = {
|
|
|
7862
7896
|
}
|
|
7863
7897
|
]
|
|
7864
7898
|
},
|
|
7899
|
+
[BitType2._standardLight]: {
|
|
7900
|
+
since: "5.40.0",
|
|
7901
|
+
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",
|
|
7902
|
+
resourceAttachmentAllowed: false,
|
|
7903
|
+
tags: [
|
|
7904
|
+
{
|
|
7905
|
+
key: ConfigKey.group_standardAllBits,
|
|
7906
|
+
description: "Standard tags for all bits"
|
|
7907
|
+
},
|
|
7908
|
+
{
|
|
7909
|
+
key: ConfigKey.group_standardItem,
|
|
7910
|
+
description: "The item tag (no lead/pageNumber/marginNumber chain)"
|
|
7911
|
+
},
|
|
7912
|
+
{
|
|
7913
|
+
key: ConfigKey.group_standardExample,
|
|
7914
|
+
description: "The bit-level example property"
|
|
7915
|
+
}
|
|
7916
|
+
]
|
|
7917
|
+
},
|
|
7865
7918
|
[BitType2.appFlashcards]: {
|
|
7866
7919
|
since: "1.3.0",
|
|
7867
7920
|
title: "Flashcards",
|
|
@@ -10689,6 +10742,23 @@ var BITS = {
|
|
|
10689
10742
|
baseBitType: BitType2.article,
|
|
10690
10743
|
description: "Glossary term bit, used to define glossary terms in articles or books"
|
|
10691
10744
|
},
|
|
10745
|
+
[BitType2.h]: {
|
|
10746
|
+
since: "5.40.0",
|
|
10747
|
+
title: "Heading",
|
|
10748
|
+
bitGroups: [BitGroup.static],
|
|
10749
|
+
baseBitType: BitType2._standardLight,
|
|
10750
|
+
description: "Lightweight heading bit with chapter-style title levels 1-7; title/level + item only \u2014 no body, no footer",
|
|
10751
|
+
bodyAllowed: false,
|
|
10752
|
+
footerAllowed: false,
|
|
10753
|
+
tags: [
|
|
10754
|
+
{
|
|
10755
|
+
key: ConfigKey.tag_title,
|
|
10756
|
+
description: "The title of the heading",
|
|
10757
|
+
jsonKey: "title|setMulti(level)",
|
|
10758
|
+
exportJsonKey: { title: "$", level: "$level" }
|
|
10759
|
+
}
|
|
10760
|
+
]
|
|
10761
|
+
},
|
|
10692
10762
|
[BitType2.help]: {
|
|
10693
10763
|
since: "1.3.0",
|
|
10694
10764
|
title: "Help",
|
|
@@ -10875,13 +10945,22 @@ var BITS = {
|
|
|
10875
10945
|
since: "1.22.0",
|
|
10876
10946
|
title: "List",
|
|
10877
10947
|
bitGroups: [BitGroup.static],
|
|
10878
|
-
|
|
10948
|
+
// PLAN-021: rebased from article onto the lightweight base
|
|
10949
|
+
baseBitType: BitType2._standardLight,
|
|
10879
10950
|
description: "List bit, used to create lists in articles or books"
|
|
10880
10951
|
},
|
|
10952
|
+
[BitType2.listAlt]: {
|
|
10953
|
+
since: "5.40.0",
|
|
10954
|
+
title: "List Alt",
|
|
10955
|
+
bitGroups: [BitGroup.static],
|
|
10956
|
+
baseBitType: BitType2.list,
|
|
10957
|
+
description: "Lightweight list bit (alternative), based on list"
|
|
10958
|
+
},
|
|
10881
10959
|
[BitType2.standardList]: {
|
|
10882
10960
|
since: "1.22.0",
|
|
10883
10961
|
bitGroups: [BitGroup.static],
|
|
10884
|
-
|
|
10962
|
+
// PLAN-021: re-rooted from article onto the lightweight list
|
|
10963
|
+
baseBitType: BitType2.list,
|
|
10885
10964
|
description: "Standard list bit, used to create standard lists in articles or books"
|
|
10886
10965
|
},
|
|
10887
10966
|
[BitType2.smartStandardList]: {
|
|
@@ -10897,6 +10976,13 @@ var BITS = {
|
|
|
10897
10976
|
"xml-niso-iec": { "@el": "ref-list", "@attr": { id: "$customerId" }, "\u25BC": "$anchor" }
|
|
10898
10977
|
}
|
|
10899
10978
|
},
|
|
10979
|
+
[BitType2.smartStandardP]: {
|
|
10980
|
+
since: "5.40.0",
|
|
10981
|
+
title: "Smart Standard Paragraph",
|
|
10982
|
+
bitGroups: [BitGroup.static],
|
|
10983
|
+
baseBitType: BitType2.p,
|
|
10984
|
+
description: "Smart standard paragraph bit, based on p"
|
|
10985
|
+
},
|
|
10900
10986
|
[BitType2.smartStandardListCollapsible]: {
|
|
10901
10987
|
since: "1.28.0",
|
|
10902
10988
|
deprecated: "5.37.0",
|
|
@@ -13478,7 +13564,8 @@ var BITS = {
|
|
|
13478
13564
|
[BitType2.listItem]: {
|
|
13479
13565
|
since: "1.22.0",
|
|
13480
13566
|
bitGroups: [BitGroup.static],
|
|
13481
|
-
|
|
13567
|
+
// PLAN-021: rebased from article onto the lightweight base
|
|
13568
|
+
baseBitType: BitType2._standardLight,
|
|
13482
13569
|
description: "List item bit, used to create list items in articles or books",
|
|
13483
13570
|
tags: [
|
|
13484
13571
|
{
|
|
@@ -13883,6 +13970,20 @@ var BITS = {
|
|
|
13883
13970
|
baseBitType: BitType2.multipleResponse,
|
|
13884
13971
|
description: "Coach self-reflection multiple response bit, used for self-reflection in coaching"
|
|
13885
13972
|
},
|
|
13973
|
+
[BitType2.p]: {
|
|
13974
|
+
since: "5.40.0",
|
|
13975
|
+
title: "Paragraph",
|
|
13976
|
+
bitGroups: [BitGroup.static],
|
|
13977
|
+
baseBitType: BitType2._standardLight,
|
|
13978
|
+
description: "Lightweight paragraph bit with a minimal tag set"
|
|
13979
|
+
},
|
|
13980
|
+
[BitType2.pAlt]: {
|
|
13981
|
+
since: "5.40.0",
|
|
13982
|
+
title: "Paragraph Alt",
|
|
13983
|
+
bitGroups: [BitGroup.static],
|
|
13984
|
+
baseBitType: BitType2.p,
|
|
13985
|
+
description: "Lightweight paragraph bit (alternative), based on p"
|
|
13986
|
+
},
|
|
13886
13987
|
[BitType2.page]: {
|
|
13887
13988
|
since: "1.3.0",
|
|
13888
13989
|
title: "Page",
|
|
@@ -16613,7 +16714,7 @@ var instance2 = new Config();
|
|
|
16613
16714
|
// src/generated/package_info.ts
|
|
16614
16715
|
var PACKAGE_INFO = {
|
|
16615
16716
|
"name": "@gmb/bitmark-parser-generator",
|
|
16616
|
-
"version": "5.
|
|
16717
|
+
"version": "5.40.0",
|
|
16617
16718
|
"author": "Get More Brain Ltd",
|
|
16618
16719
|
"license": "ISC",
|
|
16619
16720
|
"description": "A bitmark parser and generator using Peggy.js"
|
|
@@ -35534,7 +35635,7 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
35534
35635
|
leaf_level(node, route) {
|
|
35535
35636
|
const parent = this.getParentNode(route);
|
|
35536
35637
|
if (parent?.key !== NodeType.bitsValue) return true;
|
|
35537
|
-
if (!instance2.isOfBitType(this.bitType, [BitType2.chapter])) return true;
|
|
35638
|
+
if (!instance2.isOfBitType(this.bitType, [BitType2.chapter, BitType2.h])) return true;
|
|
35538
35639
|
const level = node.value;
|
|
35539
35640
|
const bit = parent?.value;
|
|
35540
35641
|
if (level > 0 && bit.title == null) {
|
|
@@ -42059,15 +42160,23 @@ function titleTagContentProcessor(context, _contentDepth, _tagsConfig, content,
|
|
|
42059
42160
|
titleString: titleText ?? ""
|
|
42060
42161
|
};
|
|
42061
42162
|
}
|
|
42062
|
-
|
|
42163
|
+
var H_TITLE_LEVEL_MAX = 7;
|
|
42164
|
+
function buildTitles(context, bitType, title) {
|
|
42063
42165
|
title = title ?? [];
|
|
42064
|
-
if (instance2.isOfBitType(bitType, BitType2.chapter)) {
|
|
42166
|
+
if (instance2.isOfBitType(bitType, [BitType2.chapter, BitType2.h])) {
|
|
42065
42167
|
let t;
|
|
42066
42168
|
if (title.length > 0) t = title[title.length - 1];
|
|
42169
|
+
let level = title.length > 0 ? title.length - 1 : void 0;
|
|
42170
|
+
if (level != null && level > H_TITLE_LEVEL_MAX && instance2.isOfBitType(bitType, BitType2.h)) {
|
|
42171
|
+
context.addWarning(
|
|
42172
|
+
`Title level of ${level} too high, setting to max value of ${H_TITLE_LEVEL_MAX}`
|
|
42173
|
+
);
|
|
42174
|
+
level = H_TITLE_LEVEL_MAX;
|
|
42175
|
+
}
|
|
42067
42176
|
return {
|
|
42068
42177
|
title: t?.titleAst ?? [],
|
|
42069
42178
|
titleString: t?.titleString ?? "",
|
|
42070
|
-
level
|
|
42179
|
+
level
|
|
42071
42180
|
};
|
|
42072
42181
|
} else {
|
|
42073
42182
|
if (Array.isArray(title)) {
|