@gmb/bitmark-parser-generator 5.37.0 → 5.39.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.
@@ -1,4 +1,5 @@
1
1
  import { EnumType } from '@ncoderz/superenum';
2
+ import { T as TranslationsData } from './TranslationsData-BZ_sE10e.js';
2
3
  import { PathLike } from 'node:fs';
3
4
 
4
5
  declare const BitType: {
@@ -705,6 +706,7 @@ type BitTagConfigKeyTypeType = EnumType<typeof BitTagConfigKeyType>;
705
706
  *
706
707
  */
707
708
  declare const ConfigKey: {
709
+ readonly group_accessibilityDecorative: "group_accessibilityDecorative";
708
710
  readonly group_standardAllBits: "group_standardAllBits";
709
711
  readonly group_standardItemLead: "group_standardItemLead";
710
712
  readonly group_standardItemLeadInstructionHint: "group_standardItemLeadInstructionHint";
@@ -762,6 +764,8 @@ declare const ConfigKey: {
762
764
  readonly group_resourceWebsiteLink: "group_resourceWebsiteLink";
763
765
  readonly group_previewImages: "group_previewImages";
764
766
  readonly group_previewVideos: "group_previewVideos";
767
+ readonly property_accessibilityGroupTag: "@accessibilityGroupTag";
768
+ readonly property_accessibilityTag: "@accessibilityTag";
765
769
  readonly property_action: "@action";
766
770
  readonly property_activityType: "@activityType";
767
771
  readonly property_additionalSolutions: "@additionalSolutions";
@@ -1754,6 +1758,8 @@ interface BitJson {
1754
1758
  slug: string;
1755
1759
  tag: string | string[];
1756
1760
  groupTag: GroupTagJson[];
1761
+ accessibilityTag: string | string[];
1762
+ accessibilityGroupTag: GroupTagJson[];
1757
1763
  reviewTag: string | string[];
1758
1764
  reviewerTag: string | string[];
1759
1765
  reductionTag: string | string[];
@@ -1954,7 +1960,7 @@ interface BitJson {
1954
1960
  level: number;
1955
1961
  toc: boolean;
1956
1962
  progress: boolean;
1957
- isCollapsible: boolean;
1963
+ isCollapsible: boolean | null;
1958
1964
  anchor: string;
1959
1965
  reference: string | string[];
1960
1966
  referenceEnd: string;
@@ -2390,6 +2396,8 @@ interface Bit {
2390
2396
  slug?: Property;
2391
2397
  tag?: Property;
2392
2398
  groupTag?: GroupTagJson[];
2399
+ accessibilityTag?: Property;
2400
+ accessibilityGroupTag?: GroupTagJson[];
2393
2401
  reviewTag?: Property;
2394
2402
  reviewerTag?: Property;
2395
2403
  reductionTag?: Property;
@@ -2689,6 +2697,10 @@ declare const NodeType: {
2689
2697
  readonly unknown: "unknown";
2690
2698
  readonly __isDefaultExample: "__isDefaultExample";
2691
2699
  readonly __typeAlias: "__typeAlias";
2700
+ readonly accessibilityGroupTag: "accessibilityGroupTag";
2701
+ readonly accessibilityGroupTagValue: "accessibilityGroupTagValue";
2702
+ readonly accessibilityTag: "accessibilityTag";
2703
+ readonly accessibilityTagValue: "accessibilityTagValue";
2692
2704
  readonly action: "action";
2693
2705
  readonly actionValue: "actionValue";
2694
2706
  readonly activityType: "activityType";
@@ -3553,344 +3565,67 @@ declare class Ast {
3553
3565
  private isValue;
3554
3566
  }
3555
3567
 
3556
- declare const BodyTextFormat: {
3557
- readonly plainText: "text";
3558
- readonly latex: "latex";
3559
- readonly json: "json";
3560
- readonly xml: "xml";
3561
- readonly bitmarkPlusPlus: "bitmark++";
3562
- };
3563
- type BodyTextFormatType = EnumType<typeof BodyTextFormat>;
3564
-
3565
3568
  /**
3566
- * The location of text.
3569
+ * PLAN-020: Bit group keys.
3567
3570
  *
3568
- * The location of the text affects how breakscaping is applied.
3569
- */
3570
- declare const TextLocation: {
3571
- readonly tag: "tag";
3572
- readonly body: "body";
3573
- };
3574
- type TextLocationType = EnumType<typeof TextLocation>;
3575
-
3576
- /**
3577
- * Configuration options for breakscape and unbreakscape operations.
3571
+ * Bit groups are search/filter categories over bit types (a bit type can belong to several
3572
+ * groups). The keys are adopted verbatim from the historical book-service `bit-types.js`
3573
+ * lists so that existing `g=<key>` search queries keep working; renames are handled via the
3574
+ * `aliases` field on the registry entries in `config/raw/bitGroups.ts`, never by changing a
3575
+ * key.
3578
3576
  *
3579
- * @public
3577
+ * Not to be confused with tag groups (`GroupConfigType` / `config/raw/groups.ts`), which
3578
+ * group tags for config reuse. See PLAN-020.
3580
3579
  */
3581
- interface BreakscapeOptions$1 {
3582
- /**
3583
- * The text format to use for processing.
3584
- * @defaultValue TextFormat.bitmarkPlusPlus
3585
- */
3586
- format?: BodyTextFormatType;
3587
- /**
3588
- * The text location context for processing.
3589
- * @defaultValue TextLocation.body
3590
- */
3591
- location?: TextLocationType;
3592
- /**
3593
- * Whether to mutate the input array in-place when processing arrays.
3594
- * If false, a new array will be created.
3595
- * @defaultValue false
3596
- */
3597
- inPlaceArray?: boolean;
3598
- /**
3599
- * Legacy: if true, perform v2 breakscaping from JSON
3600
- */
3601
- v2?: boolean;
3602
- }
3603
-
3604
- type BreakscapedString = string & {
3605
- readonly __isBreakscaped: unique symbol;
3606
- };
3607
-
3608
- declare const BitmarkVersion: {
3609
- readonly v2: 2;
3610
- readonly v3: 3;
3580
+ declare const BitGroup: {
3581
+ readonly assignment: "assignment";
3582
+ readonly authors: "authors";
3583
+ readonly botAction: "bot-action";
3584
+ readonly bots: "bots";
3585
+ readonly chat: "chat";
3586
+ readonly cloze: "cloze";
3587
+ readonly conversation: "conversation";
3588
+ readonly cooking: "cooking";
3589
+ readonly correction: "correction";
3590
+ readonly documentUpload: "document-upload";
3591
+ readonly essay: "essay";
3592
+ readonly extractor: "extractor";
3593
+ readonly flashcard: "flashcard";
3594
+ readonly group: "group";
3595
+ readonly highlightText: "highlight-text";
3596
+ readonly interview: "interview";
3597
+ readonly learningPath: "learning-path";
3598
+ readonly mark: "mark";
3599
+ readonly match: "match";
3600
+ readonly message: "message";
3601
+ readonly multipleChoice: "multiple-choice";
3602
+ readonly multipleResponse: "multiple-response";
3603
+ readonly nonProduction: "non-production";
3604
+ readonly other: "other";
3605
+ readonly pages: "pages";
3606
+ readonly preparationNote: "preparation-note";
3607
+ readonly quizzes: "quizzes";
3608
+ readonly rating: "rating";
3609
+ readonly recipes: "recipes";
3610
+ readonly recordAudio: "record-audio";
3611
+ readonly reviewErrors: "review-errors";
3612
+ readonly reviews: "reviews";
3613
+ readonly selfAssessment: "self-assessment";
3614
+ readonly sequence: "sequence";
3615
+ readonly set: "set";
3616
+ readonly static: "static";
3617
+ readonly steps: "steps";
3618
+ readonly survey: "survey";
3619
+ readonly surveyAnonymous: "survey-anonymous";
3620
+ readonly surveys: "surveys";
3621
+ readonly tables: "tables";
3622
+ readonly takePicture: "take-picture";
3623
+ readonly trueFalse: "true-false";
3624
+ readonly vocabulary: "vocabulary";
3625
+ readonly warning: "warning";
3626
+ readonly whiteLabel: "white-label";
3611
3627
  };
3612
- type BitmarkVersionType = EnumType<typeof BitmarkVersion>;
3613
-
3614
- interface Generator<T extends Node, R = void> {
3615
- generate: (ast: T, param1?: unknown, param2?: unknown) => Promise<R>;
3616
- generateSync: (ast: T, param1?: unknown, param2?: unknown) => R;
3617
- }
3618
-
3619
- /**
3620
- * Generator that walks bitmark AST.
3621
- *
3622
- * The implementation should implement functions with the correct naming, and these will be called when
3623
- * walking the AST:
3624
- *
3625
- * enter_<nodeKey>() - called when entering a branch node
3626
- * between_<nodeKey>() - called when between child nodes
3627
- * exit_<nodeKey>() - called when exiting a branch node
3628
- * leaf_<nodeKey>() - called when entering a leaf node
3629
- */
3630
- declare abstract class AstWalkerGenerator<AstType, R, Context = undefined> implements Generator<AstType, R>, AstWalkCallbacks<Context> {
3631
- protected ast: Ast;
3632
- protected debugGenerationInline: boolean;
3633
- protected printed: boolean;
3634
- abstract generate(ast: AstType, param1?: unknown, param2?: unknown): Promise<R>;
3635
- abstract generateSync(ast: AstType, param1?: unknown, param2?: unknown): R;
3636
- enter(node: NodeInfo, route: NodeInfo[], context: Context): boolean | void;
3637
- between(node: NodeInfo, left: NodeInfo, right: NodeInfo, route: NodeInfo[], context: Context): boolean | void;
3638
- exit(node: NodeInfo, route: NodeInfo[], context: Context): void;
3639
- leaf(node: NodeInfo, route: NodeInfo[], context: Context): void;
3640
- protected getParentNode(route: NodeInfo[], nodesBack?: number): NodeInfo | undefined;
3641
- protected getSiblingNodes(route: NodeInfo[]): {
3642
- left?: unknown;
3643
- right?: unknown;
3644
- };
3645
- protected isEmptyParagraph(node: TextNode): boolean;
3646
- protected abstract writeInlineDebug(key: string, state: {
3647
- open?: boolean;
3648
- close?: boolean;
3649
- single?: boolean;
3650
- }): void;
3651
- }
3652
-
3653
- /**
3654
- * Text generation options
3655
- */
3656
- interface TextOptions {
3657
- /**
3658
- * Callback for writing text
3659
- *
3660
- * If set, the callback will be called, rather than writing to the output string
3661
- */
3662
- writeCallback?: WriteCallback;
3663
- /**
3664
- * Callback for rendering body bits
3665
- */
3666
- bodyBitCallback?: BodyBitCallback;
3667
- /**
3668
- * [development only]
3669
- * Generate debug information in the output.
3670
- */
3671
- debugGenerationInline?: boolean;
3672
- }
3673
- type GenerateOptions = {
3674
- plainTextDividerAllowed?: boolean;
3675
- noBreakscaping?: boolean;
3676
- forceInline?: boolean;
3677
- noMarkup?: boolean;
3678
- };
3679
- declare const Stage: {
3680
- enter: string;
3681
- between: string;
3682
- exit: string;
3683
- };
3684
- type StageType = EnumType<typeof Stage>;
3685
- type WriteCallback = (s: string) => void;
3686
- type BodyBitCallback = (bodyBit: BodyBitJson, index: number, route: NodeInfo[]) => string;
3687
- interface MediaAttributeOptions {
3688
- ignoreAttributes?: Set<string>;
3689
- }
3690
- /**
3691
- * Generate text from a bitmark text AST
3692
- */
3693
- declare class TextGenerator extends AstWalkerGenerator<TextAst, BreakscapedString> {
3694
- protected ast: Ast;
3695
- private bitmarkVersion;
3696
- private options;
3697
- private internalTextGenerator;
3698
- private generateOptions;
3699
- private textFormat;
3700
- private textLocation;
3701
- private writerText;
3702
- private nodeIndex;
3703
- private currentIndent;
3704
- private prevIndent;
3705
- private indentationStringCache;
3706
- private inParagraph;
3707
- private inHeading;
3708
- private inCodeBlock;
3709
- private inBulletList;
3710
- private inInline;
3711
- private markDepth;
3712
- private textDepth;
3713
- private placeholderIndex;
3714
- private placeholders;
3715
- private rootParagraphNodeContentIndex;
3716
- private previousRootParagraphContextType;
3717
- private inPreText;
3718
- private thisNodeIsPreText;
3719
- private preTextIndexTemp;
3720
- private havePreText;
3721
- private preTextIndex;
3722
- /**
3723
- * Generate text from a bitmark text AST
3724
- *
3725
- * @param bitmarkVersion - bitmark version, use null to use latest version
3726
- * @param options - text generation options
3727
- */
3728
- constructor(bitmarkVersion?: BitmarkVersionType, options?: TextOptions);
3729
- /**
3730
- * Generate text from a bitmark text AST
3731
- *
3732
- * @param ast bitmark text AST
3733
- */
3734
- generate(ast: TextAst, textFormat: TextFormatType, textLocation: TextLocationType, options?: GenerateOptions): Promise<BreakscapedString>;
3735
- /**
3736
- * Generate text from a bitmark text AST synchronously
3737
- *
3738
- * @param ast bitmark text AST
3739
- */
3740
- generateSync(ast: TextAst, textFormat: TextFormatType, textLocation: TextLocationType, options?: GenerateOptions): BreakscapedString;
3741
- getPlaceholders(): BodyBitsJson;
3742
- private resetState;
3743
- private walkAndWrite;
3744
- protected enter_textAstValue(node: NodeInfo, route: NodeInfo[]): void | false;
3745
- protected between_textAstValue(node: NodeInfo, left: NodeInfo, right: NodeInfo, route: NodeInfo[]): void | false;
3746
- protected exit_textAstValue(node: NodeInfo, route: NodeInfo[]): void | false;
3747
- protected enter_contentValue(node: NodeInfo, route: NodeInfo[]): void | false;
3748
- protected between_contentValue(node: NodeInfo, left: NodeInfo, right: NodeInfo, route: NodeInfo[]): void;
3749
- protected exit_contentValue(node: NodeInfo, route: NodeInfo[]): void | false;
3750
- protected enter_contentValueValue(node: NodeInfo, route: NodeInfo[]): void | false;
3751
- protected between_contentValueValue(node: NodeInfo, left: NodeInfo, right: NodeInfo, route: NodeInfo[]): void;
3752
- protected exit_contentValueValue(node: NodeInfo, route: NodeInfo[]): void | false;
3753
- protected enter_marks(_node: NodeInfo, _route: NodeInfo[]): void | false;
3754
- protected exit_marks(_node: NodeInfo, _route: NodeInfo[]): void | false;
3755
- protected handleEnterNode(node: TextNode, route: NodeInfo[]): void | false;
3756
- protected handleBetweenNode(node: TextNode, _left: NodeInfo, _right: NodeInfo, _route: NodeInfo[]): void;
3757
- protected handleExitNode(node: TextNode, _route: NodeInfo[]): void | false;
3758
- protected handleIndent(node: TextNode): void;
3759
- protected handleDedent(node: TextNode): void;
3760
- protected handleEnterContentValueNode(_node: NodeInfo, route: NodeInfo[]): void | false;
3761
- protected handleBetweenContentValueNode(_node: NodeInfo, left: NodeInfo, _right: NodeInfo, route: NodeInfo[]): void;
3762
- protected handleExitContentValueNode(_node: NodeInfo, route: NodeInfo[]): void | false;
3763
- private updatePreTextState;
3764
- protected handleEnterNodePreTextCheck(node: TextNode, route: NodeInfo[]): void;
3765
- /**
3766
- * Check if a text node has a link mark, and if so, return the href
3767
- *
3768
- * @param node the node to check for a link mark
3769
- * @returns the href, or false if no link mark
3770
- */
3771
- protected getLinkHref(node: TextNode): string | false;
3772
- /**
3773
- * Get the current indentation string
3774
- * @returns
3775
- */
3776
- protected getIndentationString(): string;
3777
- protected writeBodyBit(node: TextNode, route: NodeInfo[]): void;
3778
- protected writeText(node: TextNode): void;
3779
- /**
3780
- * Check if a node is a link node and if so and the node has only the link mark, and the link without the
3781
- * protocol is the same as the text, return true. Otherwise return false.
3782
- *
3783
- * @param node
3784
- * @returns true if a simple link, otherwise false
3785
- */
3786
- protected isSimpleLink(node: TextNode): boolean;
3787
- /**
3788
- * Get the link text if the node is a link, otherwise return false
3789
- *
3790
- * @param node
3791
- * @returns
3792
- */
3793
- protected getLinkText(node: TextNode): string | false;
3794
- /**
3795
- * If the existing written text ends with a half-mark, and the new text starts with the same half-mark, insert a
3796
- * breakscape ^ between them to break the sequence.
3797
- *
3798
- * Only applies to bitmark version > 2
3799
- *
3800
- * @param s
3801
- */
3802
- protected getInterTextBreakscape(s: string): string;
3803
- protected validateGenerateOptions(ast: TextNode[]): void;
3804
- /**
3805
- * Write the marks for the node.
3806
- *
3807
- * All marks need to be considered at once, because if there are multiple marks, they need to be written in
3808
- * a combined manner.
3809
- *
3810
- * e.g. if there are bold and italic marks, they need to be written as
3811
- *
3812
- * ==the text==|bold|italic|
3813
- * rather than
3814
- * **__the text__**
3815
- * or
3816
- * **__the text**__
3817
- *
3818
- * @param node the text node
3819
- * @param start true if starting (before) the text, false if ending (after) the text
3820
- */
3821
- protected writeMarks(node: TextNode, stage: StageType): void | false;
3822
- protected writeParagraph(node: TextNode, route: NodeInfo[]): void;
3823
- protected writeHardBreak(_node: TextNode): void;
3824
- protected writeHeading(node: HeadingTextNode): void;
3825
- protected writeSection(node: SectionTextNode): void;
3826
- protected writeBullet(node: TextNode, route: NodeInfo[]): void;
3827
- protected writeImage(node: ImageTextNode | ImageInlineTextNode): void;
3828
- protected writeCodeBlock(node: CodeBlockTextNode): void;
3829
- protected writeLatex(node: LatexTextNode): void;
3830
- protected writeMarkTextWrapper(s: string): void;
3831
- protected writeInlineMark(mark: TextMark): void;
3832
- /**
3833
- * Resolve the marks of a text node into the marks that will actually be written.
3834
- *
3835
- * - Merges a legacy standalone 'duration' mark into its sibling 'timer' mark.
3836
- * - Drops marks the current grammar cannot express (standalone 'duration', 'timer'
3837
- * without a duration).
3838
- * - Moves a 'textStyle'/'color' mark before a preceding bare 'highlight'/'userHighlight'
3839
- * mark when its color is a valid highlight color; written in the original order the
3840
- * output would re-parse as a highlight-with-color compound mark and change meaning.
3841
- */
3842
- protected getWritableMarks(nodeMarks: TextMark[]): TextMark[];
3843
- /**
3844
- * True if the mark is written using its standard form (e.g. **bold**, !!highlight!!)
3845
- * when it is the only mark. A highlight mark with a color attribute is excluded - it
3846
- * can only be expressed using the inline chain form (==text==|highlight|color:x|).
3847
- */
3848
- protected isStandardMark(mark: TextMark): boolean;
3849
- /**
3850
- * True if the mark is written using the inline chain form (==text==|mark|).
3851
- */
3852
- protected isInlineMark(mark: TextMark): boolean;
3853
- protected writeCommentMark(mark: CommentMark): void;
3854
- protected writeLinkMark(mark: LinkMark): void;
3855
- protected writeRefMark(mark: RefMark): void;
3856
- protected writeXRefMark(mark: XRefMark): void;
3857
- protected writeExtRefMark(mark: ExtRefMark): void;
3858
- protected writeFootnoteMark(mark: FootnoteMark): void;
3859
- protected writeFootnoteStarMark(mark: FootnoteMark): void;
3860
- protected writeSymbolMark(mark: SymbolMark): void;
3861
- protected writeInlineMarkStartEnd(): void;
3862
- protected writePlainTextDivider(): void;
3863
- protected writeString(s?: string): void;
3864
- protected writeNL(): void;
3865
- protected writeInlineDebug(key: string, state: {
3866
- open?: boolean;
3867
- close?: boolean;
3868
- single?: boolean;
3869
- }): void;
3870
- protected getMediaAttrs(mediaType: string, attrs: MediaAttributes, options?: MediaAttributeOptions): string | undefined;
3871
- protected breakscape(s: string, options: BreakscapeOptions$1): string;
3872
- protected getBitType(route: NodeInfo[]): BitTypeType | undefined;
3873
- /**
3874
- * Writes a string value to the output.
3875
- * @param value - The string value to be written.
3876
- */
3877
- write(value: string): this;
3878
- /**
3879
- * Writes a new line to the output. The line is indented automatically. The line is ended with the endOfLineString.
3880
- * @param value - The line to write. When omitted, only the endOfLineString is written.
3881
- */
3882
- writeLine(value?: string): this;
3883
- /**
3884
- * Writes a collection of lines to the output. Each line is indented automatically and ended with the endOfLineString.
3885
- * @param values - The lines to write.
3886
- * @param delimiter - An optional delimiter to be written at the end of each line, except for the last one.
3887
- */
3888
- writeLines(values: string[], delimiter?: string): this;
3889
- /**
3890
- * Writes a single whitespace character to the output.
3891
- */
3892
- writeWhiteSpace(): this;
3893
- }
3628
+ type BitGroupType = EnumType<typeof BitGroup>;
3894
3629
 
3895
3630
  declare const ExampleType: {
3896
3631
  readonly none: "none";
@@ -3929,7 +3664,7 @@ declare const TagFormat: {
3929
3664
  readonly boolean: "boolean";
3930
3665
  readonly invertedBoolean: "invertedBoolean";
3931
3666
  readonly enumeration: "enumeration";
3932
- readonly coordinates: "coordinates";
3667
+ readonly numberList4: "numberList4";
3933
3668
  };
3934
3669
  type TagFormatType = EnumType<typeof TagFormat>;
3935
3670
 
@@ -4174,6 +3909,8 @@ interface ToStringOptions {
4174
3909
  declare class BitConfig {
4175
3910
  readonly since: string;
4176
3911
  readonly bitType: BitTypeType;
3912
+ readonly title?: string;
3913
+ readonly bitGroups: BitGroupType[];
4177
3914
  readonly inheritedBitTypes: BitTypeType[];
4178
3915
  readonly inheritedBitTypesSet: Set<BitTypeType>;
4179
3916
  readonly textFormatDefault: TextFormatType;
@@ -4191,6 +3928,8 @@ declare class BitConfig {
4191
3928
  constructor(config: {
4192
3929
  since: string;
4193
3930
  bitType: BitTypeType;
3931
+ title: string | undefined;
3932
+ bitGroups: BitGroupType[];
4194
3933
  inheritedBitTypes: BitTypeType[];
4195
3934
  textFormatDefault: TextFormatType;
4196
3935
  tags: TagsConfig;
@@ -4208,6 +3947,345 @@ declare class BitConfig {
4208
3947
  toString(options?: ToStringOptions): string;
4209
3948
  }
4210
3949
 
3950
+ declare const BodyTextFormat: {
3951
+ readonly plainText: "text";
3952
+ readonly latex: "latex";
3953
+ readonly json: "json";
3954
+ readonly xml: "xml";
3955
+ readonly bitmarkPlusPlus: "bitmark++";
3956
+ };
3957
+ type BodyTextFormatType = EnumType<typeof BodyTextFormat>;
3958
+
3959
+ /**
3960
+ * The location of text.
3961
+ *
3962
+ * The location of the text affects how breakscaping is applied.
3963
+ */
3964
+ declare const TextLocation: {
3965
+ readonly tag: "tag";
3966
+ readonly body: "body";
3967
+ };
3968
+ type TextLocationType = EnumType<typeof TextLocation>;
3969
+
3970
+ /**
3971
+ * Configuration options for breakscape and unbreakscape operations.
3972
+ *
3973
+ * @public
3974
+ */
3975
+ interface BreakscapeOptions$1 {
3976
+ /**
3977
+ * The text format to use for processing.
3978
+ * @defaultValue TextFormat.bitmarkPlusPlus
3979
+ */
3980
+ format?: BodyTextFormatType;
3981
+ /**
3982
+ * The text location context for processing.
3983
+ * @defaultValue TextLocation.body
3984
+ */
3985
+ location?: TextLocationType;
3986
+ /**
3987
+ * Whether to mutate the input array in-place when processing arrays.
3988
+ * If false, a new array will be created.
3989
+ * @defaultValue false
3990
+ */
3991
+ inPlaceArray?: boolean;
3992
+ /**
3993
+ * Legacy: if true, perform v2 breakscaping from JSON
3994
+ */
3995
+ v2?: boolean;
3996
+ }
3997
+
3998
+ type BreakscapedString = string & {
3999
+ readonly __isBreakscaped: unique symbol;
4000
+ };
4001
+
4002
+ declare const BitmarkVersion: {
4003
+ readonly v2: 2;
4004
+ readonly v3: 3;
4005
+ };
4006
+ type BitmarkVersionType = EnumType<typeof BitmarkVersion>;
4007
+
4008
+ interface Generator<T extends Node, R = void> {
4009
+ generate: (ast: T, param1?: unknown, param2?: unknown) => Promise<R>;
4010
+ generateSync: (ast: T, param1?: unknown, param2?: unknown) => R;
4011
+ }
4012
+
4013
+ /**
4014
+ * Generator that walks bitmark AST.
4015
+ *
4016
+ * The implementation should implement functions with the correct naming, and these will be called when
4017
+ * walking the AST:
4018
+ *
4019
+ * enter_<nodeKey>() - called when entering a branch node
4020
+ * between_<nodeKey>() - called when between child nodes
4021
+ * exit_<nodeKey>() - called when exiting a branch node
4022
+ * leaf_<nodeKey>() - called when entering a leaf node
4023
+ */
4024
+ declare abstract class AstWalkerGenerator<AstType, R, Context = undefined> implements Generator<AstType, R>, AstWalkCallbacks<Context> {
4025
+ protected ast: Ast;
4026
+ protected debugGenerationInline: boolean;
4027
+ protected printed: boolean;
4028
+ abstract generate(ast: AstType, param1?: unknown, param2?: unknown): Promise<R>;
4029
+ abstract generateSync(ast: AstType, param1?: unknown, param2?: unknown): R;
4030
+ enter(node: NodeInfo, route: NodeInfo[], context: Context): boolean | void;
4031
+ between(node: NodeInfo, left: NodeInfo, right: NodeInfo, route: NodeInfo[], context: Context): boolean | void;
4032
+ exit(node: NodeInfo, route: NodeInfo[], context: Context): void;
4033
+ leaf(node: NodeInfo, route: NodeInfo[], context: Context): void;
4034
+ protected getParentNode(route: NodeInfo[], nodesBack?: number): NodeInfo | undefined;
4035
+ protected getSiblingNodes(route: NodeInfo[]): {
4036
+ left?: unknown;
4037
+ right?: unknown;
4038
+ };
4039
+ protected isEmptyParagraph(node: TextNode): boolean;
4040
+ protected abstract writeInlineDebug(key: string, state: {
4041
+ open?: boolean;
4042
+ close?: boolean;
4043
+ single?: boolean;
4044
+ }): void;
4045
+ }
4046
+
4047
+ /**
4048
+ * Text generation options
4049
+ */
4050
+ interface TextOptions {
4051
+ /**
4052
+ * Callback for writing text
4053
+ *
4054
+ * If set, the callback will be called, rather than writing to the output string
4055
+ */
4056
+ writeCallback?: WriteCallback;
4057
+ /**
4058
+ * Callback for rendering body bits
4059
+ */
4060
+ bodyBitCallback?: BodyBitCallback;
4061
+ /**
4062
+ * [development only]
4063
+ * Generate debug information in the output.
4064
+ */
4065
+ debugGenerationInline?: boolean;
4066
+ }
4067
+ type GenerateOptions = {
4068
+ plainTextDividerAllowed?: boolean;
4069
+ noBreakscaping?: boolean;
4070
+ forceInline?: boolean;
4071
+ noMarkup?: boolean;
4072
+ };
4073
+ declare const Stage: {
4074
+ enter: string;
4075
+ between: string;
4076
+ exit: string;
4077
+ };
4078
+ type StageType = EnumType<typeof Stage>;
4079
+ type WriteCallback = (s: string) => void;
4080
+ type BodyBitCallback = (bodyBit: BodyBitJson, index: number, route: NodeInfo[]) => string;
4081
+ interface MediaAttributeOptions {
4082
+ ignoreAttributes?: Set<string>;
4083
+ }
4084
+ /**
4085
+ * Generate text from a bitmark text AST
4086
+ */
4087
+ declare class TextGenerator extends AstWalkerGenerator<TextAst, BreakscapedString> {
4088
+ protected ast: Ast;
4089
+ private bitmarkVersion;
4090
+ private options;
4091
+ private internalTextGenerator;
4092
+ private generateOptions;
4093
+ private textFormat;
4094
+ private textLocation;
4095
+ private writerText;
4096
+ private nodeIndex;
4097
+ private currentIndent;
4098
+ private prevIndent;
4099
+ private indentationStringCache;
4100
+ private inParagraph;
4101
+ private inHeading;
4102
+ private inCodeBlock;
4103
+ private inBulletList;
4104
+ private inInline;
4105
+ private markDepth;
4106
+ private textDepth;
4107
+ private placeholderIndex;
4108
+ private placeholders;
4109
+ private rootParagraphNodeContentIndex;
4110
+ private previousRootParagraphContextType;
4111
+ private inPreText;
4112
+ private thisNodeIsPreText;
4113
+ private preTextIndexTemp;
4114
+ private havePreText;
4115
+ private preTextIndex;
4116
+ /**
4117
+ * Generate text from a bitmark text AST
4118
+ *
4119
+ * @param bitmarkVersion - bitmark version, use null to use latest version
4120
+ * @param options - text generation options
4121
+ */
4122
+ constructor(bitmarkVersion?: BitmarkVersionType, options?: TextOptions);
4123
+ /**
4124
+ * Generate text from a bitmark text AST
4125
+ *
4126
+ * @param ast bitmark text AST
4127
+ */
4128
+ generate(ast: TextAst, textFormat: TextFormatType, textLocation: TextLocationType, options?: GenerateOptions): Promise<BreakscapedString>;
4129
+ /**
4130
+ * Generate text from a bitmark text AST synchronously
4131
+ *
4132
+ * @param ast bitmark text AST
4133
+ */
4134
+ generateSync(ast: TextAst, textFormat: TextFormatType, textLocation: TextLocationType, options?: GenerateOptions): BreakscapedString;
4135
+ getPlaceholders(): BodyBitsJson;
4136
+ private resetState;
4137
+ private walkAndWrite;
4138
+ protected enter_textAstValue(node: NodeInfo, route: NodeInfo[]): void | false;
4139
+ protected between_textAstValue(node: NodeInfo, left: NodeInfo, right: NodeInfo, route: NodeInfo[]): void | false;
4140
+ protected exit_textAstValue(node: NodeInfo, route: NodeInfo[]): void | false;
4141
+ protected enter_contentValue(node: NodeInfo, route: NodeInfo[]): void | false;
4142
+ protected between_contentValue(node: NodeInfo, left: NodeInfo, right: NodeInfo, route: NodeInfo[]): void;
4143
+ protected exit_contentValue(node: NodeInfo, route: NodeInfo[]): void | false;
4144
+ protected enter_contentValueValue(node: NodeInfo, route: NodeInfo[]): void | false;
4145
+ protected between_contentValueValue(node: NodeInfo, left: NodeInfo, right: NodeInfo, route: NodeInfo[]): void;
4146
+ protected exit_contentValueValue(node: NodeInfo, route: NodeInfo[]): void | false;
4147
+ protected enter_marks(_node: NodeInfo, _route: NodeInfo[]): void | false;
4148
+ protected exit_marks(_node: NodeInfo, _route: NodeInfo[]): void | false;
4149
+ protected handleEnterNode(node: TextNode, route: NodeInfo[]): void | false;
4150
+ protected handleBetweenNode(node: TextNode, _left: NodeInfo, _right: NodeInfo, _route: NodeInfo[]): void;
4151
+ protected handleExitNode(node: TextNode, _route: NodeInfo[]): void | false;
4152
+ protected handleIndent(node: TextNode): void;
4153
+ protected handleDedent(node: TextNode): void;
4154
+ protected handleEnterContentValueNode(_node: NodeInfo, route: NodeInfo[]): void | false;
4155
+ protected handleBetweenContentValueNode(_node: NodeInfo, left: NodeInfo, _right: NodeInfo, route: NodeInfo[]): void;
4156
+ protected handleExitContentValueNode(_node: NodeInfo, route: NodeInfo[]): void | false;
4157
+ private updatePreTextState;
4158
+ protected handleEnterNodePreTextCheck(node: TextNode, route: NodeInfo[]): void;
4159
+ /**
4160
+ * Check if a text node has a link mark, and if so, return the href
4161
+ *
4162
+ * @param node the node to check for a link mark
4163
+ * @returns the href, or false if no link mark
4164
+ */
4165
+ protected getLinkHref(node: TextNode): string | false;
4166
+ /**
4167
+ * Get the current indentation string
4168
+ * @returns
4169
+ */
4170
+ protected getIndentationString(): string;
4171
+ protected writeBodyBit(node: TextNode, route: NodeInfo[]): void;
4172
+ protected writeText(node: TextNode): void;
4173
+ /**
4174
+ * Check if a node is a link node and if so and the node has only the link mark, and the link without the
4175
+ * protocol is the same as the text, return true. Otherwise return false.
4176
+ *
4177
+ * @param node
4178
+ * @returns true if a simple link, otherwise false
4179
+ */
4180
+ protected isSimpleLink(node: TextNode): boolean;
4181
+ /**
4182
+ * Get the link text if the node is a link, otherwise return false
4183
+ *
4184
+ * @param node
4185
+ * @returns
4186
+ */
4187
+ protected getLinkText(node: TextNode): string | false;
4188
+ /**
4189
+ * If the existing written text ends with a half-mark, and the new text starts with the same half-mark, insert a
4190
+ * breakscape ^ between them to break the sequence.
4191
+ *
4192
+ * Only applies to bitmark version > 2
4193
+ *
4194
+ * @param s
4195
+ */
4196
+ protected getInterTextBreakscape(s: string): string;
4197
+ protected validateGenerateOptions(ast: TextNode[]): void;
4198
+ /**
4199
+ * Write the marks for the node.
4200
+ *
4201
+ * All marks need to be considered at once, because if there are multiple marks, they need to be written in
4202
+ * a combined manner.
4203
+ *
4204
+ * e.g. if there are bold and italic marks, they need to be written as
4205
+ *
4206
+ * ==the text==|bold|italic|
4207
+ * rather than
4208
+ * **__the text__**
4209
+ * or
4210
+ * **__the text**__
4211
+ *
4212
+ * @param node the text node
4213
+ * @param start true if starting (before) the text, false if ending (after) the text
4214
+ */
4215
+ protected writeMarks(node: TextNode, stage: StageType): void | false;
4216
+ protected writeParagraph(node: TextNode, route: NodeInfo[]): void;
4217
+ protected writeHardBreak(_node: TextNode): void;
4218
+ protected writeHeading(node: HeadingTextNode): void;
4219
+ protected writeSection(node: SectionTextNode): void;
4220
+ protected writeBullet(node: TextNode, route: NodeInfo[]): void;
4221
+ protected writeImage(node: ImageTextNode | ImageInlineTextNode): void;
4222
+ protected writeCodeBlock(node: CodeBlockTextNode): void;
4223
+ protected writeLatex(node: LatexTextNode): void;
4224
+ protected writeMarkTextWrapper(s: string): void;
4225
+ protected writeInlineMark(mark: TextMark): void;
4226
+ /**
4227
+ * Resolve the marks of a text node into the marks that will actually be written.
4228
+ *
4229
+ * - Merges a legacy standalone 'duration' mark into its sibling 'timer' mark.
4230
+ * - Drops marks the current grammar cannot express (standalone 'duration', 'timer'
4231
+ * without a duration).
4232
+ * - Moves a 'textStyle'/'color' mark before a preceding bare 'highlight'/'userHighlight'
4233
+ * mark when its color is a valid highlight color; written in the original order the
4234
+ * output would re-parse as a highlight-with-color compound mark and change meaning.
4235
+ */
4236
+ protected getWritableMarks(nodeMarks: TextMark[]): TextMark[];
4237
+ /**
4238
+ * True if the mark is written using its standard form (e.g. **bold**, !!highlight!!)
4239
+ * when it is the only mark. A highlight mark with a color attribute is excluded - it
4240
+ * can only be expressed using the inline chain form (==text==|highlight|color:x|).
4241
+ */
4242
+ protected isStandardMark(mark: TextMark): boolean;
4243
+ /**
4244
+ * True if the mark is written using the inline chain form (==text==|mark|).
4245
+ */
4246
+ protected isInlineMark(mark: TextMark): boolean;
4247
+ protected writeCommentMark(mark: CommentMark): void;
4248
+ protected writeLinkMark(mark: LinkMark): void;
4249
+ protected writeRefMark(mark: RefMark): void;
4250
+ protected writeXRefMark(mark: XRefMark): void;
4251
+ protected writeExtRefMark(mark: ExtRefMark): void;
4252
+ protected writeFootnoteMark(mark: FootnoteMark): void;
4253
+ protected writeFootnoteStarMark(mark: FootnoteMark): void;
4254
+ protected writeSymbolMark(mark: SymbolMark): void;
4255
+ protected writeInlineMarkStartEnd(): void;
4256
+ protected writePlainTextDivider(): void;
4257
+ protected writeString(s?: string): void;
4258
+ protected writeNL(): void;
4259
+ protected writeInlineDebug(key: string, state: {
4260
+ open?: boolean;
4261
+ close?: boolean;
4262
+ single?: boolean;
4263
+ }): void;
4264
+ protected getMediaAttrs(mediaType: string, attrs: MediaAttributes, options?: MediaAttributeOptions): string | undefined;
4265
+ protected breakscape(s: string, options: BreakscapeOptions$1): string;
4266
+ protected getBitType(route: NodeInfo[]): BitTypeType | undefined;
4267
+ /**
4268
+ * Writes a string value to the output.
4269
+ * @param value - The string value to be written.
4270
+ */
4271
+ write(value: string): this;
4272
+ /**
4273
+ * Writes a new line to the output. The line is indented automatically. The line is ended with the endOfLineString.
4274
+ * @param value - The line to write. When omitted, only the endOfLineString is written.
4275
+ */
4276
+ writeLine(value?: string): this;
4277
+ /**
4278
+ * Writes a collection of lines to the output. Each line is indented automatically and ended with the endOfLineString.
4279
+ * @param values - The lines to write.
4280
+ * @param delimiter - An optional delimiter to be written at the end of each line, except for the last one.
4281
+ */
4282
+ writeLines(values: string[], delimiter?: string): this;
4283
+ /**
4284
+ * Writes a single whitespace character to the output.
4285
+ */
4286
+ writeWhiteSpace(): this;
4287
+ }
4288
+
4211
4289
  interface BitmarkTextParserOptions {
4212
4290
  format: TextFormatType;
4213
4291
  location: TextLocationType;
@@ -4408,6 +4486,8 @@ declare class Builder extends BaseBuilder {
4408
4486
  slug?: string;
4409
4487
  tag?: string | string[];
4410
4488
  groupTag?: Partial<GroupTagJson> | Partial<GroupTagJson>[];
4489
+ accessibilityTag?: string | string[];
4490
+ accessibilityGroupTag?: Partial<GroupTagJson> | Partial<GroupTagJson>[];
4411
4491
  reviewTag?: string | string[];
4412
4492
  reviewerTag?: string | string[];
4413
4493
  reductionTag?: string | string[];
@@ -4612,7 +4692,7 @@ declare class Builder extends BaseBuilder {
4612
4692
  level?: number | string;
4613
4693
  toc?: boolean;
4614
4694
  progress?: boolean;
4615
- isCollapsible?: boolean;
4695
+ isCollapsible?: boolean | null;
4616
4696
  anchor?: string;
4617
4697
  reference?: string;
4618
4698
  referenceEnd?: string;
@@ -4675,6 +4755,19 @@ declare class Builder extends BaseBuilder {
4675
4755
  * @returns
4676
4756
  */
4677
4757
  protected buildBook(_context: BuildContext, data: Partial<BookJson> | undefined): BookJson | undefined;
4758
+ /**
4759
+ * Resolve the accessibilityGroupTag data, materialising the bit type's default when absent.
4760
+ *
4761
+ * PLAN-019: `group_accessibilityDecorative` re-declares `@accessibilityGroupTag` with a
4762
+ * `defaultValue`, and its chained `@accessibilityTag` likewise. When the bit carries no
4763
+ * authored value, synthesize the default group so it reaches both generators. An authored
4764
+ * value always wins.
4765
+ *
4766
+ * @param bitConfig - the resolved config for the bit
4767
+ * @param data - authored data for the node, if any
4768
+ * @returns
4769
+ */
4770
+ protected resolveAccessibilityGroupTag(bitConfig: BitConfig, data: Partial<GroupTagJson> | Partial<GroupTagJson>[] | undefined): Partial<GroupTagJson> | Partial<GroupTagJson>[] | undefined;
4678
4771
  /**
4679
4772
  * Build groupTag[] node
4680
4773
  *
@@ -5762,6 +5855,7 @@ declare class BitmarkGenerator extends AstWalkerGenerator<BitmarkAst, void> {
5762
5855
  protected exit_bitsValue(_node: NodeInfo, _route: NodeInfo[]): void;
5763
5856
  protected enter_internalComment(node: NodeInfo, route: NodeInfo[]): boolean;
5764
5857
  protected enter_groupTag(node: NodeInfo, route: NodeInfo[]): boolean;
5858
+ protected enter_accessibilityGroupTag(node: NodeInfo, route: NodeInfo[]): boolean;
5765
5859
  protected leaf_labelTrue(node: NodeInfo, route: NodeInfo[]): boolean;
5766
5860
  protected leaf_labelFalse(_node: NodeInfo, _route: NodeInfo[]): boolean;
5767
5861
  protected enter_imageSource(node: NodeInfo, route: NodeInfo[]): boolean;
@@ -6197,10 +6291,14 @@ declare class JsonGenerator extends AstWalkerGenerator<BitmarkAst, void> {
6197
6291
  protected enter_sourceBB(node: NodeInfo, route: NodeInfo[]): boolean;
6198
6292
  protected enter_productId(node: NodeInfo, route: NodeInfo[]): boolean;
6199
6293
  /**
6200
- * PLAN-016: `isCollapsible` is emitted only when true. `false` is the implied
6201
- * default for every bit, so it is never written to the JSON — an absent key
6202
- * means the bit's configured default (`true` for the deprecated
6203
- * `*-collapsible` bit types, `false` everywhere else).
6294
+ * `isCollapsible` is emitted only when explicitly set on the bit — an explicit
6295
+ * `true`/`false` in the source is emitted as-is, and an absent tag yields no
6296
+ * JSON key (the tag is nullable in the config: no default, unset when absent).
6297
+ *
6298
+ * Two exceptions always carry a value: chapter bits default to `false`
6299
+ * (`defaultValue: 'false'` in the bit config, applied in `cleanBitJson()`),
6300
+ * and the deprecated `*-collapsible` bit types default to `true` (materialised
6301
+ * into the AST by the Builder).
6204
6302
  *
6205
6303
  * Defining these handlers suppresses the generic property handlers that
6206
6304
  * `generatePropertyHandlers()` would otherwise install for this tag.
@@ -6423,6 +6521,73 @@ declare class JsonGenerator extends AstWalkerGenerator<BitmarkAst, void> {
6423
6521
  writeWhiteSpace(): this;
6424
6522
  }
6425
6523
 
6524
+ /**
6525
+ * PLAN-020: Resource group keys.
6526
+ *
6527
+ * Resource groups are search/filter categories over {@link ResourceType} values (canonical
6528
+ * kebab-case values only — consumers normalize legacy camelCase spellings such as
6529
+ * `imageLink` before matching). Keys are adopted verbatim from the historical book-service
6530
+ * `bit-types.js` `resourceTypes` map.
6531
+ */
6532
+ declare const ResourceGroup: {
6533
+ readonly app: "app";
6534
+ readonly article: "article";
6535
+ readonly audio: "audio";
6536
+ readonly document: "document";
6537
+ readonly image: "image";
6538
+ readonly stillImageFilm: "still-image-film";
6539
+ readonly video: "video";
6540
+ readonly website: "website";
6541
+ };
6542
+ type ResourceGroupType = EnumType<typeof ResourceGroup>;
6543
+
6544
+ interface SupportedBitsOptions {
6545
+ includeNonDeprecated?: boolean;
6546
+ includeDeprecated?: boolean;
6547
+ }
6548
+ interface SupportedBit {
6549
+ name: BitTypeType;
6550
+ title?: string;
6551
+ since: string;
6552
+ deprecated?: string;
6553
+ inheritedBitTypes?: BitTypeType[];
6554
+ bitGroups?: BitGroupType[];
6555
+ }
6556
+ /**
6557
+ * PLAN-020: Options for bit-group / resource-group queries.
6558
+ */
6559
+ interface BitGroupsOptions {
6560
+ language?: string;
6561
+ subgroupOf?: BitGroupType | string;
6562
+ includeDeprecated?: boolean;
6563
+ }
6564
+ interface ResourceGroupsOptions {
6565
+ language?: string;
6566
+ }
6567
+ /**
6568
+ * PLAN-020: A bit group with its resolved member bit types.
6569
+ */
6570
+ interface BitGroupInfo {
6571
+ key: BitGroupType;
6572
+ aliases?: string[];
6573
+ description: string;
6574
+ title: string;
6575
+ subgroupOf?: BitGroupType;
6576
+ since: string;
6577
+ bitTypes: BitTypeType[];
6578
+ }
6579
+ /**
6580
+ * PLAN-020: A resource group with its member resource types (canonical values only).
6581
+ */
6582
+ interface ResourceGroupInfo {
6583
+ key: ResourceGroupType;
6584
+ aliases?: string[];
6585
+ description: string;
6586
+ title: string;
6587
+ since: string;
6588
+ resourceTypes: ResourceTypeType[];
6589
+ }
6590
+
6426
6591
  declare const BitmarkParserType: {
6427
6592
  readonly peggy: "peggy";
6428
6593
  };
@@ -6440,6 +6605,8 @@ declare const InfoType: {
6440
6605
  readonly deprecated: "deprecated";
6441
6606
  readonly all: "all";
6442
6607
  readonly bit: "bit";
6608
+ readonly bitGroups: "bitGroups";
6609
+ readonly resourceGroups: "resourceGroups";
6443
6610
  };
6444
6611
  type InfoTypeType = EnumType<typeof InfoType>;
6445
6612
 
@@ -6667,6 +6834,8 @@ interface InfoOptions {
6667
6834
  * - deprecated: list of deprecated bits
6668
6835
  * - all: list of supported bits and deprecated bits
6669
6836
  * - bit: configuration for a specific bit, or all bits
6837
+ * - bitGroups: all bit groups with their member bit types (PLAN-020)
6838
+ * - resourceGroups: all resource groups with their member resource types (PLAN-020)
6670
6839
  */
6671
6840
  type?: InfoTypeType;
6672
6841
  /**
@@ -7036,6 +7205,77 @@ declare class BitmarkParserGenerator {
7036
7205
  * Get information about the bitmark-parser-generator library
7037
7206
  */
7038
7207
  info(options?: InfoOptions): unknown;
7208
+ /**
7209
+ * PLAN-020: Register translated display names for bit types, bit groups, and resource
7210
+ * groups.
7211
+ *
7212
+ * The data is provided by the `./translations` subpath export (kept out of the main
7213
+ * bundle for size). Without registration, all name lookups fall back to the inline
7214
+ * English titles / technical keys.
7215
+ *
7216
+ * ```ts
7217
+ * import { TRANSLATIONS } from '@gmb/bitmark-parser-generator/translations';
7218
+ * bpg.registerTranslations(TRANSLATIONS);
7219
+ * ```
7220
+ */
7221
+ registerTranslations(data: TranslationsData): void;
7222
+ /**
7223
+ * PLAN-020: Get all known bit groups, each with its aliases, description, resolved
7224
+ * title, subgroupOf metadata, and member bit types.
7225
+ *
7226
+ * @param options language (title resolution), subgroupOf (filter, e.g. 'quizzes' for
7227
+ * quiz categories), includeDeprecated (default: true)
7228
+ */
7229
+ getBitGroups(options?: BitGroupsOptions): BitGroupInfo[];
7230
+ /**
7231
+ * PLAN-020: Get all known resource groups, each with its member resource types
7232
+ * (canonical kebab-case values only).
7233
+ */
7234
+ getResourceGroups(options?: ResourceGroupsOptions): ResourceGroupInfo[];
7235
+ /**
7236
+ * PLAN-020: Get all bit types belonging to one or more bit groups (union, deduped,
7237
+ * sorted). Serves search queries such as `g=cloze&g=table`. Inputs may be canonical
7238
+ * keys or aliases; unknown inputs are ignored.
7239
+ *
7240
+ * @param options includeDeprecated: include deprecated bit types (default: true —
7241
+ * stored legacy content must still be found by search)
7242
+ */
7243
+ getBitTypesForBitGroups(bitGroups: (BitGroupType | string)[], options?: {
7244
+ includeDeprecated?: boolean;
7245
+ }): BitTypeType[];
7246
+ /**
7247
+ * PLAN-020: Get the bit groups that one or more bit types belong to, with resolved
7248
+ * titles and members. Unknown bit types are ignored.
7249
+ */
7250
+ getBitGroupsForBitTypes(bitTypes: (BitTypeType | string)[], options?: BitGroupsOptions): BitGroupInfo[];
7251
+ /**
7252
+ * PLAN-020: Get the resource types belonging to one or more resource groups (union,
7253
+ * deduped, sorted; canonical kebab-case values only — normalize legacy camelCase
7254
+ * spellings such as `imageLink` before matching).
7255
+ */
7256
+ getResourceTypesForResourceGroups(resourceGroups: (ResourceGroupType | string)[]): ResourceTypeType[];
7257
+ /**
7258
+ * PLAN-020: Get the resource groups that one or more resource types belong to.
7259
+ */
7260
+ getResourceGroupsForResourceTypes(resourceTypes: (ResourceTypeType | string)[]): ResourceGroupType[];
7261
+ /**
7262
+ * PLAN-020: Get the translated display name of a bit type.
7263
+ *
7264
+ * Fallback chain: requested BCP-47 tag (progressively stripping subtags:
7265
+ * `de-CH` → `de`) → English title → technical key. Non-English languages require
7266
+ * {@link registerTranslations}.
7267
+ */
7268
+ getBitTitle(bitType: BitTypeType | string, language?: string): string;
7269
+ /**
7270
+ * PLAN-020: Get the translated display name of a bit group (key or alias accepted).
7271
+ * Fallback chain as {@link getBitTitle}.
7272
+ */
7273
+ getBitGroupTitle(bitGroup: BitGroupType | string, language?: string): string;
7274
+ /**
7275
+ * PLAN-020: Get the translated display name of a resource group (key or alias
7276
+ * accepted). Fallback chain as {@link getBitTitle}.
7277
+ */
7278
+ getResourceGroupTitle(resourceGroup: ResourceGroupType | string, language?: string): string;
7039
7279
  /**
7040
7280
  * Generate the new configuration for the bitmark parser.
7041
7281
  */
@@ -7457,4 +7697,4 @@ declare class HtmlTableGenerator {
7457
7697
  private escapeAttr;
7458
7698
  }
7459
7699
 
7460
- export { type AppLinkResourceJson, type AppLinkResourceWrapperJson, type ArticleResourceJson, type ArticleResourceWrapperJson, Ast, type AstWalkCallbacks, type AudioEmbedResourceJson, type AudioEmbedResourceWrapperJson, type AudioLinkResourceJson, type AudioLinkResourceWrapperJson, type AudioResourceJson, type AudioResourceWrapperJson, type Bbox, type Bit, type BitJson, BitType, type BitTypeType, type BitWrapperJson, type BitmarkAst, BitmarkFileGenerator, BitmarkGenerator, type BitmarkOptions, BitmarkParser, BitmarkParserGenerator, BitmarkParserType, type BitmarkParserTypeType, BitmarkStringGenerator, BitmarkVersion, type BitmarkVersionType, type Body, type BodyBitJson, type BodyBitsJson, type BodyPart, BodyTextFormat, type BodyTextFormatType, type BookJson, type BookReferenceJson, type BotResponseJson, type BoundingBoxEntry, BoundingBoxIndex, type BreakscapeOptions, type BreakscapedString, Builder, type CardBit, type CardNode, CardSetVersion, type CardSetVersionType, type ChoiceJson, type CodeBlockTextNode, type CodeBlockTextNodeAttributes, type CommentMark, type ConvertHtmlTableOptions, type ConvertOptions, type ConvertTextOptions, type CreateAstOptions, type DefinitionListItemJson, type DocumentDownloadResourceJson, type DocumentDownloadResourceWrapperJson, type DocumentEmbedResourceJson, type DocumentEmbedResourceWrapperJson, type DocumentLinkResourceJson, type DocumentLinkResourceWrapperJson, type DocumentResourceJson, type DocumentResourceWrapperJson, type Example, type ExampleJson, type ExtRefMark, type ExtRefMarkAttibutes, type ExtraProperties, type FeedbackChoiceJson, type FeedbackJson, type FeedbackReasonJson, type FileOptions, FileWriter, type FlashcardJson, type Footer, type FootnoteAttibutes, type FootnoteMark, type FromBitsOptions, type GapJson, type Generator, type GroupTagJson, type HeadingJson, type HeadingTextNode, type HeadingTextNodeAttributes, type HighlightJson, type HighlightTextJson, type HtmlTableFormat, HtmlTableGenerator, type HtmlTableParseOptions, HtmlTableParser, type ImageInlineTextNode, type ImageLinkResourceJson, type ImageLinkResourceWrapperJson, type ImageResourceJson, type ImageResourceWrapperJson, type ImageSourceJson, type ImageTextNode, type ImageTextNodeAttributes, InfoFormat, type InfoFormatType, type InfoOptions, InfoType, type InfoTypeType, type IngredientJson, Input, InputFormat, type InputFormatType, type InputType, JsonFileGenerator, JsonGenerator, type JsonOptions, JsonParser, JsonStringGenerator, type LatexTextNode, type LatexTextNodeAttributes, type LinkMark, type LinkMarkAttibutes, type ListItemJson, type ListTextNode, type ListTextNodeAttributes, type MarkConfigJson, type MarkJson, type MatrixCellJson, type MatrixJson, type MediaAttributes, type Node, type NodeInfo, NodeType, type NodeTypeType, Output, type OutputType, type PairJson, type ParserJson, type PersonJson, type UpgradeOptions as PrettifyOptions, type PronunciationTableCellJson, type PronunciationTableJson, type Property, type QuestionJson, type QuizJson, type RatingLevelStartEndJson, type RefMark, type RefMarkAttibutes, ResourceBuilder, type ResourceDataJson, type ResourceJson, type ResourceTypeType, type ResourceWrapperJson, type ResponseJson, type SectionTextNode, type SelectJson, type SelectOptionJson, type ServingsJson, type StatementJson, type StillImageFilmEmbedResourceJson, type StillImageFilmEmbedResourceWrapperJson, type StillImageFilmLinkResourceJson, type StillImageFilmLinkResourceWrapperJson, type StillImageFilmResourceJson, type StillImageFilmResourceWrapperJson, StreamWriter, StringWriter, type SymbolMark, type TableCellJson, type TableExtendedJson, type TableJson, type TableRowJson, type TableSectionJson, type TaskItemTextNode, type TaskItemTextNodeAttributes, type TechnicalTermJson, type JsonText as Text, type TextAndIconJson, type TextAst, type TextJsonOptions, type TextMark, type TextMarkAttibutes, TextMarkType, type TextMarkTypeType, type TextNode, type TextNodeAttibutes, TextNodeType, type TextNodeTypeType, type UnbreakscapeOptions, type UpgradeOptions, type VideoEmbedResourceJson, type VideoEmbedResourceWrapperJson, type VideoLinkResourceJson, type VideoLinkResourceWrapperJson, type VideoResourceJson, type VideoResourceWrapperJson, type WebsiteLinkResourceJson, type WebsiteLinkResourceWrapperJson, type Writer, type XRefMark, type XRefMarkAttibutes, parse as bitmarkTextParse };
7700
+ export { type AppLinkResourceJson, type AppLinkResourceWrapperJson, type ArticleResourceJson, type ArticleResourceWrapperJson, Ast, type AstWalkCallbacks, type AudioEmbedResourceJson, type AudioEmbedResourceWrapperJson, type AudioLinkResourceJson, type AudioLinkResourceWrapperJson, type AudioResourceJson, type AudioResourceWrapperJson, type Bbox, type Bit, BitGroup, type BitGroupInfo, type BitGroupType, type BitGroupsOptions, type BitJson, BitType, type BitTypeType, type BitWrapperJson, type BitmarkAst, BitmarkFileGenerator, BitmarkGenerator, type BitmarkOptions, BitmarkParser, BitmarkParserGenerator, BitmarkParserType, type BitmarkParserTypeType, BitmarkStringGenerator, BitmarkVersion, type BitmarkVersionType, type Body, type BodyBitJson, type BodyBitsJson, type BodyPart, BodyTextFormat, type BodyTextFormatType, type BookJson, type BookReferenceJson, type BotResponseJson, type BoundingBoxEntry, BoundingBoxIndex, type BreakscapeOptions, type BreakscapedString, Builder, type CardBit, type CardNode, CardSetVersion, type CardSetVersionType, type ChoiceJson, type CodeBlockTextNode, type CodeBlockTextNodeAttributes, type CommentMark, type ConvertHtmlTableOptions, type ConvertOptions, type ConvertTextOptions, type CreateAstOptions, type DefinitionListItemJson, type DocumentDownloadResourceJson, type DocumentDownloadResourceWrapperJson, type DocumentEmbedResourceJson, type DocumentEmbedResourceWrapperJson, type DocumentLinkResourceJson, type DocumentLinkResourceWrapperJson, type DocumentResourceJson, type DocumentResourceWrapperJson, type Example, type ExampleJson, type ExtRefMark, type ExtRefMarkAttibutes, type ExtraProperties, type FeedbackChoiceJson, type FeedbackJson, type FeedbackReasonJson, type FileOptions, FileWriter, type FlashcardJson, type Footer, type FootnoteAttibutes, type FootnoteMark, type FromBitsOptions, type GapJson, type Generator, type GroupTagJson, type HeadingJson, type HeadingTextNode, type HeadingTextNodeAttributes, type HighlightJson, type HighlightTextJson, type HtmlTableFormat, HtmlTableGenerator, type HtmlTableParseOptions, HtmlTableParser, type ImageInlineTextNode, type ImageLinkResourceJson, type ImageLinkResourceWrapperJson, type ImageResourceJson, type ImageResourceWrapperJson, type ImageSourceJson, type ImageTextNode, type ImageTextNodeAttributes, InfoFormat, type InfoFormatType, type InfoOptions, InfoType, type InfoTypeType, type IngredientJson, Input, InputFormat, type InputFormatType, type InputType, JsonFileGenerator, JsonGenerator, type JsonOptions, JsonParser, JsonStringGenerator, type LatexTextNode, type LatexTextNodeAttributes, type LinkMark, type LinkMarkAttibutes, type ListItemJson, type ListTextNode, type ListTextNodeAttributes, type MarkConfigJson, type MarkJson, type MatrixCellJson, type MatrixJson, type MediaAttributes, type Node, type NodeInfo, NodeType, type NodeTypeType, Output, type OutputType, type PairJson, type ParserJson, type PersonJson, type UpgradeOptions as PrettifyOptions, type PronunciationTableCellJson, type PronunciationTableJson, type Property, type QuestionJson, type QuizJson, type RatingLevelStartEndJson, type RefMark, type RefMarkAttibutes, ResourceBuilder, type ResourceDataJson, ResourceGroup, type ResourceGroupInfo, type ResourceGroupType, type ResourceGroupsOptions, type ResourceJson, type ResourceTypeType, type ResourceWrapperJson, type ResponseJson, type SectionTextNode, type SelectJson, type SelectOptionJson, type ServingsJson, type StatementJson, type StillImageFilmEmbedResourceJson, type StillImageFilmEmbedResourceWrapperJson, type StillImageFilmLinkResourceJson, type StillImageFilmLinkResourceWrapperJson, type StillImageFilmResourceJson, type StillImageFilmResourceWrapperJson, StreamWriter, StringWriter, type SupportedBit, type SupportedBitsOptions, type SymbolMark, type TableCellJson, type TableExtendedJson, type TableJson, type TableRowJson, type TableSectionJson, type TaskItemTextNode, type TaskItemTextNodeAttributes, type TechnicalTermJson, type JsonText as Text, type TextAndIconJson, type TextAst, type TextJsonOptions, type TextMark, type TextMarkAttibutes, TextMarkType, type TextMarkTypeType, type TextNode, type TextNodeAttibutes, TextNodeType, type TextNodeTypeType, TranslationsData, type UnbreakscapeOptions, type UpgradeOptions, type VideoEmbedResourceJson, type VideoEmbedResourceWrapperJson, type VideoLinkResourceJson, type VideoLinkResourceWrapperJson, type VideoResourceJson, type VideoResourceWrapperJson, type WebsiteLinkResourceJson, type WebsiteLinkResourceWrapperJson, type Writer, type XRefMark, type XRefMarkAttibutes, parse as bitmarkTextParse };