@gmb/bitmark-parser-generator 5.38.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.
package/dist/index.d.cts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { EnumType } from '@ncoderz/superenum';
2
+ import { T as TranslationsData } from './TranslationsData-BZ_sE10e.cjs';
2
3
  import { PathLike } from 'node:fs';
3
4
 
4
5
  declare const BitType: {
@@ -3564,6 +3565,68 @@ declare class Ast {
3564
3565
  private isValue;
3565
3566
  }
3566
3567
 
3568
+ /**
3569
+ * PLAN-020: Bit group keys.
3570
+ *
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.
3576
+ *
3577
+ * Not to be confused with tag groups (`GroupConfigType` / `config/raw/groups.ts`), which
3578
+ * group tags for config reuse. See PLAN-020.
3579
+ */
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";
3627
+ };
3628
+ type BitGroupType = EnumType<typeof BitGroup>;
3629
+
3567
3630
  declare const ExampleType: {
3568
3631
  readonly none: "none";
3569
3632
  readonly string: "string";
@@ -3601,7 +3664,7 @@ declare const TagFormat: {
3601
3664
  readonly boolean: "boolean";
3602
3665
  readonly invertedBoolean: "invertedBoolean";
3603
3666
  readonly enumeration: "enumeration";
3604
- readonly coordinates: "coordinates";
3667
+ readonly numberList4: "numberList4";
3605
3668
  };
3606
3669
  type TagFormatType = EnumType<typeof TagFormat>;
3607
3670
 
@@ -3846,6 +3909,8 @@ interface ToStringOptions {
3846
3909
  declare class BitConfig {
3847
3910
  readonly since: string;
3848
3911
  readonly bitType: BitTypeType;
3912
+ readonly title?: string;
3913
+ readonly bitGroups: BitGroupType[];
3849
3914
  readonly inheritedBitTypes: BitTypeType[];
3850
3915
  readonly inheritedBitTypesSet: Set<BitTypeType>;
3851
3916
  readonly textFormatDefault: TextFormatType;
@@ -3863,6 +3928,8 @@ declare class BitConfig {
3863
3928
  constructor(config: {
3864
3929
  since: string;
3865
3930
  bitType: BitTypeType;
3931
+ title: string | undefined;
3932
+ bitGroups: BitGroupType[];
3866
3933
  inheritedBitTypes: BitTypeType[];
3867
3934
  textFormatDefault: TextFormatType;
3868
3935
  tags: TagsConfig;
@@ -6454,6 +6521,73 @@ declare class JsonGenerator extends AstWalkerGenerator<BitmarkAst, void> {
6454
6521
  writeWhiteSpace(): this;
6455
6522
  }
6456
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
+
6457
6591
  declare const BitmarkParserType: {
6458
6592
  readonly peggy: "peggy";
6459
6593
  };
@@ -6471,6 +6605,8 @@ declare const InfoType: {
6471
6605
  readonly deprecated: "deprecated";
6472
6606
  readonly all: "all";
6473
6607
  readonly bit: "bit";
6608
+ readonly bitGroups: "bitGroups";
6609
+ readonly resourceGroups: "resourceGroups";
6474
6610
  };
6475
6611
  type InfoTypeType = EnumType<typeof InfoType>;
6476
6612
 
@@ -6698,6 +6834,8 @@ interface InfoOptions {
6698
6834
  * - deprecated: list of deprecated bits
6699
6835
  * - all: list of supported bits and deprecated bits
6700
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)
6701
6839
  */
6702
6840
  type?: InfoTypeType;
6703
6841
  /**
@@ -7067,6 +7205,77 @@ declare class BitmarkParserGenerator {
7067
7205
  * Get information about the bitmark-parser-generator library
7068
7206
  */
7069
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;
7070
7279
  /**
7071
7280
  * Generate the new configuration for the bitmark parser.
7072
7281
  */
@@ -7488,4 +7697,4 @@ declare class HtmlTableGenerator {
7488
7697
  private escapeAttr;
7489
7698
  }
7490
7699
 
7491
- 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 };
package/dist/index.d.ts CHANGED
@@ -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: {
@@ -3564,6 +3565,68 @@ declare class Ast {
3564
3565
  private isValue;
3565
3566
  }
3566
3567
 
3568
+ /**
3569
+ * PLAN-020: Bit group keys.
3570
+ *
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.
3576
+ *
3577
+ * Not to be confused with tag groups (`GroupConfigType` / `config/raw/groups.ts`), which
3578
+ * group tags for config reuse. See PLAN-020.
3579
+ */
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";
3627
+ };
3628
+ type BitGroupType = EnumType<typeof BitGroup>;
3629
+
3567
3630
  declare const ExampleType: {
3568
3631
  readonly none: "none";
3569
3632
  readonly string: "string";
@@ -3601,7 +3664,7 @@ declare const TagFormat: {
3601
3664
  readonly boolean: "boolean";
3602
3665
  readonly invertedBoolean: "invertedBoolean";
3603
3666
  readonly enumeration: "enumeration";
3604
- readonly coordinates: "coordinates";
3667
+ readonly numberList4: "numberList4";
3605
3668
  };
3606
3669
  type TagFormatType = EnumType<typeof TagFormat>;
3607
3670
 
@@ -3846,6 +3909,8 @@ interface ToStringOptions {
3846
3909
  declare class BitConfig {
3847
3910
  readonly since: string;
3848
3911
  readonly bitType: BitTypeType;
3912
+ readonly title?: string;
3913
+ readonly bitGroups: BitGroupType[];
3849
3914
  readonly inheritedBitTypes: BitTypeType[];
3850
3915
  readonly inheritedBitTypesSet: Set<BitTypeType>;
3851
3916
  readonly textFormatDefault: TextFormatType;
@@ -3863,6 +3928,8 @@ declare class BitConfig {
3863
3928
  constructor(config: {
3864
3929
  since: string;
3865
3930
  bitType: BitTypeType;
3931
+ title: string | undefined;
3932
+ bitGroups: BitGroupType[];
3866
3933
  inheritedBitTypes: BitTypeType[];
3867
3934
  textFormatDefault: TextFormatType;
3868
3935
  tags: TagsConfig;
@@ -6454,6 +6521,73 @@ declare class JsonGenerator extends AstWalkerGenerator<BitmarkAst, void> {
6454
6521
  writeWhiteSpace(): this;
6455
6522
  }
6456
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
+
6457
6591
  declare const BitmarkParserType: {
6458
6592
  readonly peggy: "peggy";
6459
6593
  };
@@ -6471,6 +6605,8 @@ declare const InfoType: {
6471
6605
  readonly deprecated: "deprecated";
6472
6606
  readonly all: "all";
6473
6607
  readonly bit: "bit";
6608
+ readonly bitGroups: "bitGroups";
6609
+ readonly resourceGroups: "resourceGroups";
6474
6610
  };
6475
6611
  type InfoTypeType = EnumType<typeof InfoType>;
6476
6612
 
@@ -6698,6 +6834,8 @@ interface InfoOptions {
6698
6834
  * - deprecated: list of deprecated bits
6699
6835
  * - all: list of supported bits and deprecated bits
6700
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)
6701
6839
  */
6702
6840
  type?: InfoTypeType;
6703
6841
  /**
@@ -7067,6 +7205,77 @@ declare class BitmarkParserGenerator {
7067
7205
  * Get information about the bitmark-parser-generator library
7068
7206
  */
7069
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;
7070
7279
  /**
7071
7280
  * Generate the new configuration for the bitmark parser.
7072
7281
  */
@@ -7488,4 +7697,4 @@ declare class HtmlTableGenerator {
7488
7697
  private escapeAttr;
7489
7698
  }
7490
7699
 
7491
- 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 };