@gmb/bitmark-parser-generator 5.35.0 → 5.36.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.
@@ -1402,6 +1402,7 @@ var propertyKeys = {
1402
1402
  property_dateEnd: "@dateEnd",
1403
1403
  property_decimalPlaces: "@decimalPlaces",
1404
1404
  property_deeplink: "@deeplink",
1405
+ property_displayName: "@displayName",
1405
1406
  property_diffContext: "@diffContext",
1406
1407
  property_diffOp: "@diffOp",
1407
1408
  property_diffRef: "@diffRef",
@@ -2551,9 +2552,30 @@ var CARDSETS = {
2551
2552
  [CardSetConfigKey.definitionList]: {
2552
2553
  jsonKey: "definitions",
2553
2554
  exportJsonKey: { definitions: "$" },
2555
+ // PLAN-141 F1 (NISO import): each <def-item> is one card; the sides
2556
+ // read <term>/<def>; the enclosing <legend>'s <title> lands on the
2557
+ // term side's heading tag ([#Key] header card).
2558
+ // PLAN-141 F3: a <tbx:langSet> is ALSO one card (a terminology entry —
2559
+ // its enclosing <tbx:termEntry> is a transparent claim wrapper); its
2560
+ // children compose the term/definition sides via the side rules below.
2561
+ mappingKeys: {
2562
+ "xml-niso-iec": [
2563
+ { "@el": "def-item", "@children": "$" },
2564
+ { "@el": "tbx:langSet", "@children": "$" }
2565
+ ]
2566
+ },
2554
2567
  sides: [
2555
2568
  {
2556
2569
  name: "term",
2570
+ // F3: every <tbx:tig>'s <tbx:term> STACKS one-per-line onto the
2571
+ // single term side (the "$\n" template's authored separator; the
2572
+ // trailing one is trimmed) — the PDF's Maus/Mus/M/Müsli stack.
2573
+ mappingKeys: {
2574
+ "xml-niso-iec": [
2575
+ { "@el": "term", "@text": "$" },
2576
+ { "@el": "tbx:tig", "@children": { "@el": "tbx:term", "@text": "$\n" } }
2577
+ ]
2578
+ },
2557
2579
  variants: [
2558
2580
  {
2559
2581
  jsonKey: "term.text",
@@ -2569,7 +2591,8 @@ var CARDSETS = {
2569
2591
  format: TagFormat.plainText,
2570
2592
  nullable: true,
2571
2593
  jsonKey: "^heading.forKeys",
2572
- exportJsonKey: { "@bit": { heading: { forKeys: "$" } } }
2594
+ exportJsonKey: { "@bit": { heading: { forKeys: "$" } } },
2595
+ mappingKeys: { "xml-niso-iec": { "@el": "title", "@text": "$" } }
2573
2596
  },
2574
2597
  {
2575
2598
  key: ConfigKey.group_resourceIcon,
@@ -2595,6 +2618,24 @@ var CARDSETS = {
2595
2618
  },
2596
2619
  {
2597
2620
  name: "definition",
2621
+ // F3: the definition side COMPOSES from the entry's fields in
2622
+ // document order, with the ES-rendered locale affixes AUTHORED as
2623
+ // value-position templates (never engine text): the subject field
2624
+ // in ⟨⟩ glues (trailing space) onto the definition line; example /
2625
+ // notes / source follow as blank-line-separated lines. The TBX
2626
+ // grammar flags (normativeAuthorization, termType, partOfSpeech,
2627
+ // grammaticalNumber) are unrendered machine-only data — dropped and
2628
+ // recorded (catalog R-2, reviewed under D7 max-preservation).
2629
+ mappingKeys: {
2630
+ "xml-niso-iec": [
2631
+ { "@el": "def", "@children": "$" },
2632
+ { "@el": "tbx:subjectField", "@text": "\u27E8$\u27E9 " },
2633
+ { "@el": "tbx:definition", "@children": "$" },
2634
+ { "@el": "tbx:example", "@children": "BEISPIEL $" },
2635
+ { "@el": "tbx:note", "@children": "Anmerkung zu Begriff: $" },
2636
+ { "@el": "tbx:source", "@text": "[QUELLE: $]" }
2637
+ ]
2638
+ },
2598
2639
  variants: [
2599
2640
  {
2600
2641
  jsonKey: "definition.text",
@@ -3985,6 +4026,11 @@ var CARDSETS = {
3985
4026
  { table: { header: { rows: ["$"] } } }
3986
4027
  ],
3987
4028
  htmlKey: { "@el": "thead", "@children": { "@el": "tr", "@children": "$" } },
4029
+ // PLAN-141 F2 (NISO import): the XHTML table model NISO uses — a
4030
+ // <thead> SECTION whose <tr> rows are the header cards.
4031
+ mappingKeys: {
4032
+ "xml-niso-iec": { "@el": "thead", "@children": { "@el": "tr", "@children": "$" } }
4033
+ },
3988
4034
  sideJsonKey: "cells[{s}]|set(title=true)",
3989
4035
  sideExportJsonKey: { cells: { $s: { title: true, $: "$" } } },
3990
4036
  // Header cells are `<th>`. The `width` attribute is contributed by the
@@ -3996,12 +4042,21 @@ var CARDSETS = {
3996
4042
  jsonKey: "table.body.rows",
3997
4043
  exportJsonKey: { table: { body: { rows: "$" } } },
3998
4044
  htmlKey: { "@el": "tbody", "@children": { "@el": "tr", "@children": "$" } },
4045
+ // PLAN-141 F2 (NISO import): <tbody> rows are the (default) data cards.
4046
+ mappingKeys: {
4047
+ "xml-niso-iec": { "@el": "tbody", "@children": { "@el": "tr", "@children": "$" } }
4048
+ },
3999
4049
  isDefault: true
4000
4050
  },
4001
4051
  "table-footer": {
4002
4052
  jsonKey: "table.footer.rows",
4003
4053
  exportJsonKey: { table: { footer: { rows: "$" } } },
4004
4054
  htmlKey: { "@el": "tfoot", "@children": { "@el": "tr", "@children": "$" } },
4055
+ // PLAN-141 F2 (NISO import): NISO has no <tfoot> — the footer card's
4056
+ // source is the <table-wrap-foot> block (CONTENT-shaped: no rows; its
4057
+ // prose/notes flatten into one footer card — catalog table-wrap-foot
4058
+ // row; a contained <def-list> promotes as a sibling legend bit).
4059
+ mappingKeys: { "xml-niso-iec": { "@el": "table-wrap-foot", "@children": "$" } },
4005
4060
  sideJsonKey: "cells[{s}]|set(title=true)",
4006
4061
  sideExportJsonKey: { cells: { $s: { title: true, $: "$" } } },
4007
4062
  // Footer cells render as `<th>` (mirrors the header `title: true`
@@ -4018,6 +4073,8 @@ var CARDSETS = {
4018
4073
  // Default (body) cell → `<td>`; the header/footer sections override the
4019
4074
  // side to `<th>` via their sideHtmlKey (HTML.md §8).
4020
4075
  htmlKey: { "@el": "td", "@children": "$" },
4076
+ // PLAN-141 F2 (NISO import): a <td> row child is a body cell side.
4077
+ mappingKeys: { "xml-niso-iec": { "@el": "td", "@children": "$" } },
4021
4078
  variants: [
4022
4079
  {
4023
4080
  jsonKey: "content",
@@ -4035,7 +4092,11 @@ var CARDSETS = {
4035
4092
  // cell with `title: true` automatically.
4036
4093
  jsonKey: "content",
4037
4094
  exportJsonKey: { content: "$" },
4038
- description: "Title text of the table cell (header rows)."
4095
+ description: "Title text of the table cell (header rows).",
4096
+ // PLAN-141 F2 (NISO import): a <th> row child is a TITLE cell —
4097
+ // its content lands in the `[#…]` tag (an empty <th> keeps its
4098
+ // slot as a bare `[#]`).
4099
+ mappingKeys: { "xml-niso-iec": { "@el": "th", "@children": "$" } }
4039
4100
  },
4040
4101
  {
4041
4102
  key: ConfigKey.property_tableCellType,
@@ -4054,6 +4115,9 @@ var CARDSETS = {
4054
4115
  // HTML-C2: contribute a `rowspan` attribute onto the enclosing
4055
4116
  // cell element (`<th>`/`<td>`).
4056
4117
  htmlKey: { "@el": { "@attr": { rowspan: "$" } } },
4118
+ // PLAN-141 F2 (NISO import): recover the source cell's own
4119
+ // `rowspan` attribute (element-scope attr form).
4120
+ mappingKeys: { "xml-niso-iec": { "@el": { "@attr": { rowspan: "$" } } } },
4057
4121
  description: "Number of rows the cell spans.",
4058
4122
  format: TagFormat.number
4059
4123
  },
@@ -4064,6 +4128,9 @@ var CARDSETS = {
4064
4128
  // HTML-C2: contribute a `colspan` attribute onto the enclosing
4065
4129
  // cell element (`<th>`/`<td>`).
4066
4130
  htmlKey: { "@el": { "@attr": { colspan: "$" } } },
4131
+ // PLAN-141 F2 (NISO import): recover the source cell's own
4132
+ // `colspan` attribute (element-scope attr form).
4133
+ mappingKeys: { "xml-niso-iec": { "@el": { "@attr": { colspan: "$" } } } },
4067
4134
  description: "Number of columns the cell spans.",
4068
4135
  format: TagFormat.number
4069
4136
  },
@@ -4085,6 +4152,13 @@ var CARDSETS = {
4085
4152
  // HTML.md §8 + HTML-C2: contribute a `width` attribute onto the
4086
4153
  // enclosing cell element (`<th>`/`<td>`).
4087
4154
  htmlKey: { "@el": { "@attr": { width: "$" } } },
4155
+ // PLAN-141 F2 (NISO import): NISO carries widths as PER-COLUMN
4156
+ // <col width="…"> descriptors at container level, not on cells.
4157
+ // The matched values distribute positionally onto the first
4158
+ // (header) card's sides. Number format ⇒ only an integral
4159
+ // percentage survives ("20.0000%" → 20); a fractional one
4160
+ // (renderer-equalised "4.7619%") is dropped — catalog `col` row.
4161
+ mappingKeys: { "xml-niso-iec": { "@el": "col", "@attr": { width: "$" } } },
4088
4162
  description: "Width for the column.",
4089
4163
  format: TagFormat.number
4090
4164
  }
@@ -4458,7 +4532,22 @@ var GROUPS = {
4458
4532
  key: ConfigKey.property_externalId,
4459
4533
  description: "The external identifier for the bit",
4460
4534
  format: TagFormat.plainText,
4461
- maxCount: Count.infinity
4535
+ maxCount: Count.infinity,
4536
+ // PLAN-140 refs family (NISO import): the machine identifier of a
4537
+ // referenced standard. NESTED content slot — the tag reads (and
4538
+ // consumes) ONLY the <std-id> inside a <std> child; the remaining
4539
+ // designation/title text stays bit body. A <std> without <std-id>
4540
+ // does not fire the key.
4541
+ // PLAN-141 F5: on the [.book] bit, the DATED <std-ref> designation
4542
+ // is the document's external id. Safe rule order: <std-ref> is a
4543
+ // direct bit-element child only under <std-meta> (everywhere else
4544
+ // it nests inside <std>, which the tag spine never reaches).
4545
+ mappingKeys: {
4546
+ "xml-niso-iec": [
4547
+ { "@el": "std", "@children": { "@el": "std-id", "@text": "$" } },
4548
+ { "@el": "std-ref", "@attr": { type: "dated" }, "@text": "$" }
4549
+ ]
4550
+ }
4462
4551
  },
4463
4552
  {
4464
4553
  key: ConfigKey.property_sourceRL,
@@ -4599,7 +4688,8 @@ var GROUPS = {
4599
4688
  {
4600
4689
  key: ConfigKey.property_diffTime,
4601
4690
  description: "The diff time for the bit",
4602
- format: TagFormat.number
4691
+ format: TagFormat.number,
4692
+ nullable: true
4603
4693
  },
4604
4694
  {
4605
4695
  key: ConfigKey.property_ageRange,
@@ -4610,7 +4700,18 @@ var GROUPS = {
4610
4700
  {
4611
4701
  key: ConfigKey.property_lang,
4612
4702
  description: "The language for the bit",
4613
- format: TagFormat.plainText
4703
+ format: TagFormat.plainText,
4704
+ // PLAN-141 F3 (NISO import): a term-sec's language rides
4705
+ // <tbx:termEntry><tbx:langSet xml:lang> — a nested content slot
4706
+ // whose leaf is a $-in-ATTR-position slot (the nested counterpart
4707
+ // of the value-attr slot). Only termEntry elements match, so the
4708
+ // shared tag is inert everywhere else.
4709
+ mappingKeys: {
4710
+ "xml-niso-iec": {
4711
+ "@el": "tbx:termEntry",
4712
+ "@children": { "@el": "tbx:langSet", "@attr": { "xml:lang": "$" } }
4713
+ }
4714
+ }
4614
4715
  },
4615
4716
  {
4616
4717
  key: ConfigKey.property_publisher,
@@ -4809,6 +4910,9 @@ var GROUPS = {
4809
4910
  key: ConfigKey.tag_item,
4810
4911
  jsonKey: "item",
4811
4912
  exportJsonKey: { item: "$" },
4913
+ // PLAN-140 W3 (NISO import): the clause/note label of a mapped
4914
+ // source element ([%1], [%ANMERKUNG 1]).
4915
+ mappingKeys: { "xml-niso-iec": { "@el": "label", "@text": "$" } },
4812
4916
  description: "The item for the bit",
4813
4917
  chain: [
4814
4918
  {
@@ -5771,7 +5875,20 @@ var GROUPS = {
5771
5875
  key: ConfigKey.property_language,
5772
5876
  description: "The language of the book",
5773
5877
  format: TagFormat.plainText,
5774
- maxCount: Count.infinity
5878
+ maxCount: Count.infinity,
5879
+ // PLAN-141 F5 (NISO import): only the PRIMARY (first)
5880
+ // <content-language> survives — the maxEmits cap realises the
5881
+ // catalog's document-language rule (extras drop, R-4).
5882
+ mappingKeys: {
5883
+ "xml-niso-iec": [
5884
+ { predicates: [], maxEmits: 1, rule: { "@el": "content-language", "@text": "$" } }
5885
+ ]
5886
+ }
5887
+ },
5888
+ {
5889
+ key: ConfigKey.property_displayName,
5890
+ description: "The display name of the book",
5891
+ format: TagFormat.plainText
5775
5892
  },
5776
5893
  {
5777
5894
  key: ConfigKey.property_customerExternalId,
@@ -5847,7 +5964,18 @@ var GROUPS = {
5847
5964
  description: "The title of the book",
5848
5965
  maxCount: 2,
5849
5966
  jsonKey: "title|multi(count=2, key=subtitle)",
5850
- exportJsonKey: [{ "@level=1": { title: "$" } }, { "@level=2": { subtitle: "$" } }]
5967
+ exportJsonKey: [{ "@level=1": { title: "$" } }, { "@level=2": { subtitle: "$" } }],
5968
+ // PLAN-141 F5 (NISO import): the PRIMARY (first) <title-wrap>'s
5969
+ // assembled <full> title → [#]; the per-language extras drop (R-4).
5970
+ mappingKeys: {
5971
+ "xml-niso-iec": [
5972
+ {
5973
+ predicates: [],
5974
+ maxEmits: 1,
5975
+ rule: { "@el": "title-wrap", "@children": { "@el": "full", "@text": "$" } }
5976
+ }
5977
+ ]
5978
+ }
5851
5979
  },
5852
5980
  {
5853
5981
  key: ConfigKey.property_subtype,
@@ -6160,17 +6288,20 @@ var GROUPS = {
6160
6288
  {
6161
6289
  key: ConfigKey.property_platformMargin,
6162
6290
  description: "The platform margin",
6163
- format: TagFormat.number
6291
+ format: TagFormat.number,
6292
+ nullable: true
6164
6293
  },
6165
6294
  {
6166
6295
  key: ConfigKey.property_platformBorderRadius,
6167
6296
  description: "The platform border radius",
6168
- format: TagFormat.number
6297
+ format: TagFormat.number,
6298
+ nullable: true
6169
6299
  },
6170
6300
  {
6171
6301
  key: ConfigKey.property_platformSelectionBorderRadius,
6172
6302
  description: "The platform selection border radius",
6173
- format: TagFormat.number
6303
+ format: TagFormat.number,
6304
+ nullable: true
6174
6305
  },
6175
6306
  {
6176
6307
  key: ConfigKey.property_platformNeedsShadow,
@@ -6277,7 +6408,13 @@ var GROUPS = {
6277
6408
  {
6278
6409
  key: ConfigKey.property_caption,
6279
6410
  description: "The caption for the resource",
6280
- format: TagFormat.bitmarkText
6411
+ format: TagFormat.bitmarkText,
6412
+ // PLAN-141 F1 (NISO import): a figure's <caption><title> — the
6413
+ // nested content slot reads the title text; the caption rides the
6414
+ // resource chain ([&image:…][@caption:…], catalog D5).
6415
+ mappingKeys: {
6416
+ "xml-niso-iec": { "@el": "caption", "@children": { "@el": "title", "@text": "$" } }
6417
+ }
6281
6418
  },
6282
6419
  {
6283
6420
  key: ConfigKey.property_showInIndex,
@@ -6551,6 +6688,10 @@ var GROUPS = {
6551
6688
  {
6552
6689
  key: ConfigKey.resource_image,
6553
6690
  exportJsonKey: { resource: { type: "image", image: { src: "$" } } },
6691
+ // PLAN-141 F1 (NISO import): the image URL rides the `$`-in-attr
6692
+ // value slot — a <graphic xlink:href> child of the mapped bit
6693
+ // element roots the [&image:URL] chain.
6694
+ mappingKeys: { "xml-niso-iec": { "@el": "graphic", "@attr": { "xlink:href": "$" } } },
6554
6695
  description: "The image resource",
6555
6696
  chain: [
6556
6697
  {
@@ -7425,6 +7566,8 @@ var BITS = {
7425
7566
  maxCount: 2,
7426
7567
  jsonKey: "title|multi(count=2, key=subtitle)",
7427
7568
  exportJsonKey: [{ "@level=1": { title: "$" } }, { "@level=2": { subtitle: "$" } }],
7569
+ // PLAN-140 W3 (NISO import): the title of a mapped source element.
7570
+ mappingKeys: { "xml-niso-iec": { "@el": "title", "@text": "$" } },
7428
7571
  key: ConfigKey.tag_title,
7429
7572
  description: "The title of the article"
7430
7573
  }
@@ -7466,12 +7609,56 @@ var BITS = {
7466
7609
  [BitType2.smartStandardArticleNormative]: {
7467
7610
  since: "1.28.0",
7468
7611
  baseBitType: BitType2.standardArticleNormative,
7469
- description: "Smart standard normative article bit"
7612
+ description: "Smart standard normative article bit",
7613
+ // PLAN-140 W3 (NISO import, tranche 1): one article bit per NISO
7614
+ // paragraph (catalog D1). CONTENT keys (@children): the subtree is the
7615
+ // bit's body; nothing inside it promotes. (Ancestor-context normativity
7616
+ // is the non-normative sibling's @ancestor key — plan Q4, resolved.)
7617
+ //
7618
+ // Second rule (catalog D1 push-down): a NUMBERED-PARAGRAPH sec is an
7619
+ // article, not a chapter — the sec-type literal outranks the chapter
7620
+ // key's plain sec|app rule (most-specific-wins). Content key: the sec's
7621
+ // label rides [%] via the label tag key, its inner <p> is the body, its
7622
+ // id is the bit's customerId, and the anchor slot marks it
7623
+ // anchor-bearing.
7624
+ mappingKeys: {
7625
+ "xml-niso-iec": [
7626
+ { "@el": "p", "@attr": { id: "$customerId" }, "@children": "$" },
7627
+ {
7628
+ "@el": "sec",
7629
+ "@attr": { "sec-type": "numbered-paragraph", id: "$customerId" },
7630
+ "@children": "$",
7631
+ "\u25BC": "$anchor"
7632
+ }
7633
+ ]
7634
+ }
7470
7635
  },
7471
7636
  [BitType2.smartStandardArticleNonNormative]: {
7472
7637
  since: "1.28.0",
7473
7638
  baseBitType: BitType2.standardArticleNonNormative,
7474
- description: "Smart standard non-normative article bit"
7639
+ description: "Smart standard non-normative article bit",
7640
+ // PLAN-140 Q4 (normativity inheritance): a <p> is non-normative because
7641
+ // of an ANCESTOR element — a foreword/intro sec or an informative annex.
7642
+ // @ancestor is a reverse-match-only constraint (forward emission ignores
7643
+ // it); the rules are alternatives, first-satisfied wins, and the
7644
+ // @ancestor literals give this key higher specificity than the plain
7645
+ // normative-article <p> key wherever the context applies.
7646
+ mappingKeys: {
7647
+ "xml-niso-iec": [
7648
+ {
7649
+ "@el": "p",
7650
+ "@attr": { id: "$customerId" },
7651
+ "@ancestor": { "@attr": { "sec-type": "foreword|intro" } },
7652
+ "@children": "$"
7653
+ },
7654
+ {
7655
+ "@el": "p",
7656
+ "@attr": { id: "$customerId" },
7657
+ "@ancestor": { "@attr": { "content-type": "informative" } },
7658
+ "@children": "$"
7659
+ }
7660
+ ]
7661
+ }
7475
7662
  },
7476
7663
  [BitType2.smartStandardArticleNormativeCollapsible]: {
7477
7664
  since: "1.28.0",
@@ -8102,7 +8289,8 @@ var BITS = {
8102
8289
  {
8103
8290
  key: ConfigKey.property_maxCreatedBits,
8104
8291
  description: "The maximum number of bits that can be created from this bit",
8105
- format: TagFormat.number
8292
+ format: TagFormat.number,
8293
+ nullable: true
8106
8294
  }
8107
8295
  ],
8108
8296
  textFormatDefault: TextFormat2.plainText
@@ -8232,6 +8420,13 @@ var BITS = {
8232
8420
  since: "1.3.0",
8233
8421
  baseBitType: BitType2._standard,
8234
8422
  description: "Book bit, used to represent a book",
8423
+ // PLAN-141 F5 (NISO import): the <std-meta> front-matter container is
8424
+ // the [.book] bit (STRUCTURAL, first in document order): primary
8425
+ // title-wrap → [#], primary content-language → [@language], dated
8426
+ // std-ref → [@externalId] (tag keys with maxEmits caps — the NISO
8427
+ // convention puts the document language first). std-meta has no id, so
8428
+ // no anchor/customerId. Remaining leaves drop as recorded loss (R-4).
8429
+ mappingKeys: { "xml-niso-iec": { "@el": "std-meta" } },
8235
8430
  tags: [
8236
8431
  {
8237
8432
  key: ConfigKey.group_bookCommon,
@@ -8518,12 +8713,14 @@ var BITS = {
8518
8713
  {
8519
8714
  key: ConfigKey.property_focusX,
8520
8715
  description: "The X coordinate for focusing the image in the browser",
8521
- format: TagFormat.number
8716
+ format: TagFormat.number,
8717
+ nullable: true
8522
8718
  },
8523
8719
  {
8524
8720
  key: ConfigKey.property_focusY,
8525
8721
  description: "The Y coordinate for focusing the image in the browser",
8526
- format: TagFormat.number
8722
+ format: TagFormat.number,
8723
+ nullable: true
8527
8724
  }
8528
8725
  ]
8529
8726
  },
@@ -8554,6 +8751,15 @@ var BITS = {
8554
8751
  since: "1.3.0",
8555
8752
  baseBitType: BitType2._standard,
8556
8753
  description: "Chapter bit, used to define chapters in books or articles",
8754
+ // PLAN-140 W3 (NISO import, tranche 1): recover a chapter from a NISO
8755
+ // section or annex. STRUCTURAL key (no @children content slot): the
8756
+ // element carries no body of its own — tag children (label/title) map
8757
+ // via tag keys, every mapped descendant promotes to a following sibling
8758
+ // bit, and the chapter level derives from nesting depth (catalog D1).
8759
+ // The source id lands as [@customerId] (two-id model, D2).
8760
+ mappingKeys: {
8761
+ "xml-niso-iec": { "@el": "sec|app", "@attr": { id: "$customerId" }, "\u25BC": "$anchor" }
8762
+ },
8557
8763
  tags: [
8558
8764
  {
8559
8765
  exportJsonKey: { anchor: "$" },
@@ -8565,7 +8771,10 @@ var BITS = {
8565
8771
  key: ConfigKey.tag_title,
8566
8772
  description: "The title of the chapter",
8567
8773
  jsonKey: "title|setMulti(level)",
8568
- exportJsonKey: { title: "$", level: "$level" }
8774
+ exportJsonKey: { title: "$", level: "$level" },
8775
+ // PLAN-140 W3 (NISO import): the section/annex title; the heading
8776
+ // level rides the normalizer-derived nesting depth (plan Q2).
8777
+ mappingKeys: { "xml-niso-iec": { "@el": "title", "@text": "$" } }
8569
8778
  },
8570
8779
  {
8571
8780
  key: ConfigKey.property_toc,
@@ -8771,11 +8980,28 @@ var BITS = {
8771
8980
  since: "1.3.0",
8772
8981
  baseBitType: BitType2._standard,
8773
8982
  description: "Code bit, used for code snippets in articles or documents",
8983
+ // PLAN-141 F4 (NISO import): a <code> block is a CONTENT bit with a
8984
+ // literal text body; @language recovers as [@computerLanguage] (absent
8985
+ // attr → no tag). Anchor = the source id (D2 revised).
8986
+ mappingKeys: {
8987
+ "xml-niso-iec": {
8988
+ "@el": "code",
8989
+ "@attr": { id: "$customerId", language: "$computerLanguage" },
8990
+ "\u25BC": "$anchor",
8991
+ "@text": "$"
8992
+ }
8993
+ },
8774
8994
  tags: [
8775
8995
  {
8776
8996
  key: ConfigKey.property_computerLanguage,
8777
8997
  description: "The programming language of the code snippet",
8778
- format: TagFormat.plainText
8998
+ format: TagFormat.plainText,
8999
+ // PLAN-141 F4 (NISO import): the bit key's `language` sigil recovers
9000
+ // a present attr; this `@absent` rule supplies the AUTHORED default
9001
+ // when the source carries none (catalog code row — an untyped block
9002
+ // is `[@computerLanguage:text]`). Fires only on foreign imports,
9003
+ // never the carrier round-trip.
9004
+ mappingKeys: { "xml-niso-iec": [{ "@absent": "text" }] }
8779
9005
  },
8780
9006
  {
8781
9007
  key: ConfigKey.property_codeLineNumbers,
@@ -8814,7 +9040,20 @@ var BITS = {
8814
9040
  [BitType2.smartStandardFormulaNormative]: {
8815
9041
  since: "3.11.0",
8816
9042
  baseBitType: BitType2.formula,
8817
- description: "Smart standard normative formula bit, used for mathematical formulas in smart standards that are normative"
9043
+ description: "Smart standard normative formula bit, used for mathematical formulas in smart standards that are normative",
9044
+ // PLAN-141 F4 (NISO import): a <disp-formula> is a CONTENT bit whose
9045
+ // latex-format body carries the <mml:math> subtree VERBATIM (G1 — no
9046
+ // MathML↔LaTeX transform; ids stripped); <label> → [%]; a contained
9047
+ // <legend> PROMOTES as a sibling legend bit (cards cannot nest in a
9048
+ // body). Anchor = the source id (D2 revised).
9049
+ mappingKeys: {
9050
+ "xml-niso-iec": {
9051
+ "@el": "disp-formula",
9052
+ "@attr": { id: "$customerId" },
9053
+ "\u25BC": "$anchor",
9054
+ "@children": "$"
9055
+ }
9056
+ }
8818
9057
  },
8819
9058
  [BitType2.smartStandardRemarkFormula]: {
8820
9059
  since: "3.11.0",
@@ -9341,7 +9580,8 @@ var BITS = {
9341
9580
  {
9342
9581
  key: ConfigKey.property_reasonableNumOfChars,
9343
9582
  description: "The reasonable number of characters for the essay",
9344
- format: TagFormat.number
9583
+ format: TagFormat.number,
9584
+ nullable: true
9345
9585
  },
9346
9586
  {
9347
9587
  key: ConfigKey.property_sampleSolution,
@@ -9774,7 +10014,14 @@ var BITS = {
9774
10014
  [BitType2.smartStandardList]: {
9775
10015
  since: "1.28.0",
9776
10016
  baseBitType: BitType2.standardList,
9777
- description: "Smart standard list bit, used to create smart standard lists in articles or books"
10017
+ description: "Smart standard list bit, used to create smart standard lists in articles or books",
10018
+ // PLAN-140 refs family (NISO import): a reference list is a STRUCTURAL
10019
+ // bit (no @children — it takes a path ordinal anchor and its <ref>
10020
+ // children promote to sibling list-item bits); its <title> rides [#]
10021
+ // via the title tag key.
10022
+ mappingKeys: {
10023
+ "xml-niso-iec": { "@el": "ref-list", "@attr": { id: "$customerId" }, "\u25BC": "$anchor" }
10024
+ }
9778
10025
  },
9779
10026
  [BitType2.smartStandardListCollapsible]: {
9780
10027
  since: "1.28.0",
@@ -9819,7 +10066,17 @@ var BITS = {
9819
10066
  [BitType2.smartStandardNoteNonNormative]: {
9820
10067
  since: "1.28.0",
9821
10068
  baseBitType: BitType2.standardNoteNonNormative,
9822
- description: "Smart standard non-normative note bit, used to provide non-normative notes in smart standards"
10069
+ description: "Smart standard non-normative note bit, used to provide non-normative notes in smart standards",
10070
+ // PLAN-140 W3 (NISO import, tranche 1). CONTENT key (@children): a
10071
+ // note's inner paragraphs are note body, never separate bits.
10072
+ mappingKeys: {
10073
+ "xml-niso-iec": {
10074
+ "@el": "non-normative-note",
10075
+ "@attr": { id: "$customerId" },
10076
+ "@children": "$",
10077
+ "\u25BC": "$anchor"
10078
+ }
10079
+ }
9823
10080
  },
9824
10081
  [BitType2.smartStandardNoteNormativeCollapsible]: {
9825
10082
  since: "1.28.0",
@@ -9926,7 +10183,19 @@ var BITS = {
9926
10183
  [BitType2.smartStandardRemarkNonNormative]: {
9927
10184
  since: "1.28.0",
9928
10185
  baseBitType: BitType2.standardRemarkNonNormative,
9929
- description: "Smart standard non-normative remark bit, used to provide non-normative remarks in smart standards"
10186
+ description: "Smart standard non-normative remark bit, used to provide non-normative remarks in smart standards",
10187
+ // PLAN-140 Q4 rider: a warning/caution note routes to the remark bit —
10188
+ // the same element as the note key, distinguished by the content-type
10189
+ // attr literal (alias value: forward emits the first alternative,
10190
+ // reverse accepts any). Most-specific-wins beats the plain note key.
10191
+ mappingKeys: {
10192
+ "xml-niso-iec": {
10193
+ "@el": "non-normative-note",
10194
+ "@attr": { "content-type": "warning|caution", id: "$customerId" },
10195
+ "@children": "$",
10196
+ "\u25BC": "$anchor"
10197
+ }
10198
+ }
9930
10199
  },
9931
10200
  [BitType2.smartStandardRemarkNormativeCollapsible]: {
9932
10201
  since: "1.28.0",
@@ -10382,7 +10651,8 @@ var BITS = {
10382
10651
  {
10383
10652
  key: ConfigKey.property_pageNo,
10384
10653
  description: "Page number for the block, used to indicate the page on which the block appears",
10385
- format: TagFormat.number
10654
+ format: TagFormat.number,
10655
+ nullable: true
10386
10656
  },
10387
10657
  {
10388
10658
  key: ConfigKey.property_x,
@@ -10399,17 +10669,20 @@ var BITS = {
10399
10669
  {
10400
10670
  key: ConfigKey.property_width,
10401
10671
  description: "Width of the block, used to define the size of the block on the page",
10402
- format: TagFormat.number
10672
+ format: TagFormat.number,
10673
+ nullable: true
10403
10674
  },
10404
10675
  {
10405
10676
  key: ConfigKey.property_height,
10406
10677
  description: "Height of the block, used to define the size of the block on the page",
10407
- format: TagFormat.number
10678
+ format: TagFormat.number,
10679
+ nullable: true
10408
10680
  },
10409
10681
  {
10410
10682
  key: ConfigKey.property_index,
10411
10683
  description: "Index of the block, used to order blocks within the extractor page",
10412
- format: TagFormat.number
10684
+ format: TagFormat.number,
10685
+ nullable: true
10413
10686
  },
10414
10687
  {
10415
10688
  key: ConfigKey.property_classification,
@@ -10719,7 +10992,20 @@ var BITS = {
10719
10992
  [BitType2.smartStandardLegendNormative]: {
10720
10993
  since: "3.12.0",
10721
10994
  baseBitType: BitType2.legend,
10722
- description: "Smart standard normative legend bit, used to provide normative smart standard legends in articles or books"
10995
+ description: "Smart standard normative legend bit, used to provide normative smart standard legends in articles or books",
10996
+ // PLAN-141 F2 (NISO import): a free-standing <legend> (a formula's) or
10997
+ // bare <def-list> (a table footer's — no <legend> wrapper there) that is
10998
+ // NOT the claimed card content of its enclosing bit is a legend bit:
10999
+ // STRUCTURAL-shaped, its <title> and <def-item>s build the
11000
+ // definition-list cards via the card set's authored keys. A <legend>
11001
+ // inside a figure/table bit stays that bit's claimed card content and
11002
+ // never reaches this key. Anchor = the source id (D2 revised).
11003
+ mappingKeys: {
11004
+ "xml-niso-iec": [
11005
+ { "@el": "legend", "@attr": { id: "$customerId" }, "\u25BC": "$anchor" },
11006
+ { "@el": "def-list", "@attr": { id: "$customerId" }, "\u25BC": "$anchor" }
11007
+ ]
11008
+ }
10723
11009
  },
10724
11010
  [BitType2.smartStandardRemarkLegend]: {
10725
11011
  since: "3.12.0",
@@ -10774,7 +11060,16 @@ var BITS = {
10774
11060
  [BitType2.smartStandardDefinitionListNormative]: {
10775
11061
  since: "5.24.0",
10776
11062
  baseBitType: BitType2.standardDefinitionListNormative,
10777
- description: "Smart standard normative definition list bit, used to create normative smart standard definition lists in articles or books"
11063
+ description: "Smart standard normative definition list bit, used to create normative smart standard definition lists in articles or books",
11064
+ // PLAN-141 F3 (NISO import): a terms-and-definitions clause. STRUCTURAL-
11065
+ // shaped: <label> → [%], the tbx:termEntry/langSet subtree builds the
11066
+ // definition-list card via the card set's authored keys (all tig terms
11067
+ // stacked on the term side; definition/example/notes/source composed on
11068
+ // the definition side with authored locale affixes), langSet @xml:lang →
11069
+ // [@lang] (nested attr slot on the tag key). Anchor = the source id.
11070
+ mappingKeys: {
11071
+ "xml-niso-iec": { "@el": "term-sec", "@attr": { id: "$customerId" }, "\u25BC": "$anchor" }
11072
+ }
10778
11073
  },
10779
11074
  [BitType2.smartStandardDefinitionListNonNormative]: {
10780
11075
  since: "5.24.0",
@@ -10843,12 +11138,14 @@ var BITS = {
10843
11138
  {
10844
11139
  key: ConfigKey.property_focusX,
10845
11140
  description: "X-coordinate for the focus point, used to define the focus area in the image",
10846
- format: TagFormat.number
11141
+ format: TagFormat.number,
11142
+ nullable: true
10847
11143
  },
10848
11144
  {
10849
11145
  key: ConfigKey.property_focusY,
10850
11146
  description: "Y-coordinate for the focus point, used to define the focus area in the image",
10851
- format: TagFormat.number
11147
+ format: TagFormat.number,
11148
+ nullable: true
10852
11149
  }
10853
11150
  ]
10854
11151
  },
@@ -10955,7 +11252,15 @@ var BITS = {
10955
11252
  [BitType2.smartStandardImageFigureNormative]: {
10956
11253
  since: "1.28.0",
10957
11254
  baseBitType: BitType2.standardImageFigureNormative,
10958
- description: "Smart standard normative image figure bit, used to create smart standard normative image figures in articles or books"
11255
+ description: "Smart standard normative image figure bit, used to create smart standard normative image figures in articles or books",
11256
+ // PLAN-141 F1 (NISO import): a figure is STRUCTURAL-shaped (no
11257
+ // @children — no body): <label> → [%], <caption>/<graphic> ride the
11258
+ // [&image] resource chain, the <legend> def-list becomes the bit's
11259
+ // definition-list cards, and an inner note PROMOTES as a sibling bit.
11260
+ // Anchor = the source id (D2 revised).
11261
+ mappingKeys: {
11262
+ "xml-niso-iec": { "@el": "fig", "@attr": { id: "$customerId" }, "\u25BC": "$anchor" }
11263
+ }
10959
11264
  },
10960
11265
  [BitType2.smartStandardImageFigureNonNormative]: {
10961
11266
  since: "1.28.0",
@@ -11683,7 +11988,19 @@ var BITS = {
11683
11988
  [BitType2.smartStandardListItem]: {
11684
11989
  since: "1.28.0",
11685
11990
  baseBitType: BitType2.standardListItem,
11686
- description: "Smart standard list item bit, used to create smart standard list items in articles or books"
11991
+ description: "Smart standard list item bit, used to create smart standard list items in articles or books",
11992
+ // PLAN-140 refs family (NISO import): one list-item bit per <ref> —
11993
+ // CONTENT key (its citation subtree is the body), counter anchor scoped
11994
+ // to the containing list, <label> → [%], nested <std-id> → [@externalId]
11995
+ // (the externalId tag key's nested content slot).
11996
+ mappingKeys: {
11997
+ "xml-niso-iec": {
11998
+ "@el": "ref",
11999
+ "@attr": { id: "$customerId" },
12000
+ "@children": "$",
12001
+ "\u25BC": "$anchor"
12002
+ }
12003
+ }
11687
12004
  },
11688
12005
  [BitType2.smartStandardListItemCollapsible]: {
11689
12006
  since: "1.28.0",
@@ -12790,7 +13107,13 @@ var BITS = {
12790
13107
  // `<caption>` — placed inside the idiomatic `<table>` container as
12791
13108
  // its first child. Outside a table context it falls back to the
12792
13109
  // residual carrier.
12793
- htmlKey: { "@el": "caption", "@children": "$" }
13110
+ htmlKey: { "@el": "caption", "@children": "$" },
13111
+ // PLAN-141 F2 (NISO import): a table-wrap's <caption><title> — the
13112
+ // nested content slot reads the title text (catalog D5: the caption
13113
+ // is a TOP-LEVEL bit property on table bits).
13114
+ mappingKeys: {
13115
+ "xml-niso-iec": { "@el": "caption", "@children": { "@el": "title", "@text": "$" } }
13116
+ }
12794
13117
  },
12795
13118
  {
12796
13119
  key: ConfigKey.property_tableFixedHeader,
@@ -12963,7 +13286,16 @@ var BITS = {
12963
13286
  [BitType2.smartStandardTableExtendedNormative]: {
12964
13287
  since: "1.28.0",
12965
13288
  baseBitType: BitType2.standardTableExtendedNormative,
12966
- description: "Smart standard normative extended table bit, used to create smart standard normative extended tables in articles or books"
13289
+ description: "Smart standard normative extended table bit, used to create smart standard normative extended tables in articles or books",
13290
+ // PLAN-141 F2 (NISO import): a table-wrap is STRUCTURAL-shaped (no
13291
+ // @children — no body): <label> → [%], <caption><title> → the bit-level
13292
+ // [@caption] (D5), the inner <table>/<table-wrap-foot> build the
13293
+ // table-extended card grid via the card set's authored keys, and a
13294
+ // footer <def-list> PROMOTES as a sibling legend bit. Anchor = the
13295
+ // source id (D2 revised).
13296
+ mappingKeys: {
13297
+ "xml-niso-iec": { "@el": "table-wrap", "@attr": { id: "$customerId" }, "\u25BC": "$anchor" }
13298
+ }
12967
13299
  },
12968
13300
  [BitType2.smartStandardTableExtendedNonNormative]: {
12969
13301
  since: "1.28.0",
@@ -13038,7 +13370,8 @@ var BITS = {
13038
13370
  {
13039
13371
  key: ConfigKey.property_maxDisplayLevel,
13040
13372
  description: "Maximum display level for the chapter in the table of contents",
13041
- format: TagFormat.number
13373
+ format: TagFormat.number,
13374
+ nullable: true
13042
13375
  }
13043
13376
  ]
13044
13377
  },
@@ -13050,7 +13383,8 @@ var BITS = {
13050
13383
  {
13051
13384
  key: ConfigKey.property_maxTocChapterLevel,
13052
13385
  description: "Maximum chapter level for the inline table of contents",
13053
- format: TagFormat.number
13386
+ format: TagFormat.number,
13387
+ nullable: true
13054
13388
  }
13055
13389
  ]
13056
13390
  },
@@ -13473,13 +13807,15 @@ var BITS = {
13473
13807
  key: ConfigKey.property_width,
13474
13808
  // Same as image
13475
13809
  description: "Width for the embedded content, used to define the width in pixels",
13476
- format: TagFormat.number
13810
+ format: TagFormat.number,
13811
+ nullable: true
13477
13812
  },
13478
13813
  {
13479
13814
  key: ConfigKey.property_height,
13480
13815
  // Same as image
13481
13816
  description: "Height for the embedded content, used to define the height in pixels",
13482
- format: TagFormat.number
13817
+ format: TagFormat.number,
13818
+ nullable: true
13483
13819
  },
13484
13820
  {
13485
13821
  key: ConfigKey.property_vendorUrl,
@@ -13517,7 +13853,8 @@ var BITS = {
13517
13853
  {
13518
13854
  key: ConfigKey.property_jupyterExecutionCount,
13519
13855
  description: "Execution count for the Jupyter output, used to define the execution order",
13520
- format: TagFormat.number
13856
+ format: TagFormat.number,
13857
+ nullable: true
13521
13858
  }
13522
13859
  ],
13523
13860
  textFormatDefault: TextFormat2.plainText
@@ -14067,7 +14404,7 @@ var instance2 = new Config();
14067
14404
  // src/generated/package_info.ts
14068
14405
  var PACKAGE_INFO = {
14069
14406
  "name": "@gmb/bitmark-parser-generator",
14070
- "version": "5.35.0",
14407
+ "version": "5.36.0",
14071
14408
  "author": "Get More Brain Ltd",
14072
14409
  "license": "ISC",
14073
14410
  "description": "A bitmark parser and generator using Peggy.js"
@@ -14596,6 +14933,8 @@ var NodeType = {
14596
14933
  definition: "definition",
14597
14934
  definitions: "definitions",
14598
14935
  definitionsValue: "definitionsValue",
14936
+ displayName: "displayName",
14937
+ displayNameValue: "displayNameValue",
14599
14938
  diffContext: "diffContext",
14600
14939
  diffContextValue: "diffContextValue",
14601
14940
  diffOp: "diffOp",
@@ -28518,6 +28857,12 @@ var Builder = class extends BaseBuilder {
28518
28857
  data.publisherName,
28519
28858
  options
28520
28859
  ),
28860
+ displayName: this.toAstProperty(
28861
+ bitType,
28862
+ ConfigKey.property_displayName,
28863
+ data.displayName,
28864
+ options
28865
+ ),
28521
28866
  theme: this.toAstProperty(bitType, ConfigKey.property_theme, data.theme, options),
28522
28867
  rtl: this.toAstProperty(bitType, ConfigKey.property_rtl, data.rtl, options),
28523
28868
  computerLanguage: this.toAstProperty(