@gmb/bitmark-parser-generator 5.22.0 → 5.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/bitmark-parser-generator.min.js +1 -1
- package/dist/browser/bundle-report.html +2 -2
- package/dist/browser/cjs/index.cjs +881 -90
- package/dist/browser/cjs/index.cjs.map +1 -1
- package/dist/browser/cjs/index.d.cts +160 -47
- package/dist/browser/esm/index.d.ts +160 -47
- package/dist/browser/esm/index.js +880 -90
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/cli/main.js +889 -169
- package/dist/cli/main.js.map +1 -1
- package/dist/index.cjs +1002 -169
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +160 -47
- package/dist/index.d.ts +160 -47
- package/dist/index.js +1001 -169
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -269,6 +269,7 @@ declare const BitType: {
|
|
|
269
269
|
readonly footNote: "foot-note";
|
|
270
270
|
readonly formFreeText: "form-free-text";
|
|
271
271
|
readonly formula: "formula";
|
|
272
|
+
readonly formulaImage: "formula-image";
|
|
272
273
|
readonly gapText: "gap-text";
|
|
273
274
|
readonly gapTextInstructionGrouped: "gap-text-instruction-grouped";
|
|
274
275
|
readonly glossaryTerm: "glossary-term";
|
|
@@ -818,6 +819,7 @@ declare const ConfigKey: {
|
|
|
818
819
|
readonly property_formula: "@formula";
|
|
819
820
|
readonly property_fullName: "@fullName";
|
|
820
821
|
readonly property_groupTag: "@groupTag";
|
|
822
|
+
readonly property_gUri: "@gUri";
|
|
821
823
|
readonly property_handInAcceptFileType: "@handInAcceptFileType";
|
|
822
824
|
readonly property_handInInstruction: "@handInInstruction";
|
|
823
825
|
readonly property_handInRequirement: "@handInRequirement";
|
|
@@ -952,6 +954,7 @@ declare const ConfigKey: {
|
|
|
952
954
|
readonly property_siteName: "@siteName";
|
|
953
955
|
readonly property_size: "@size";
|
|
954
956
|
readonly property_slug: "@slug";
|
|
957
|
+
readonly property_sourceBB: "@sourceBB";
|
|
955
958
|
readonly property_sourceDocument: "@sourceDocument";
|
|
956
959
|
readonly property_sourceRL: "@sourceRL";
|
|
957
960
|
readonly property_spaceId: "@spaceId";
|
|
@@ -1647,6 +1650,7 @@ interface BitJson {
|
|
|
1647
1650
|
bitLevel: number;
|
|
1648
1651
|
format: string;
|
|
1649
1652
|
id: string | string[];
|
|
1653
|
+
gUri: string;
|
|
1650
1654
|
internalComment: string | string[];
|
|
1651
1655
|
customerId: string;
|
|
1652
1656
|
customerExternalId: string | string[];
|
|
@@ -1697,6 +1701,7 @@ interface BitJson {
|
|
|
1697
1701
|
bubbleTag: string | string[];
|
|
1698
1702
|
extractorTag: string | string[];
|
|
1699
1703
|
extractorInternal: string | string[];
|
|
1704
|
+
sourceBB?: number[] | number[][];
|
|
1700
1705
|
levelCEFRp: string;
|
|
1701
1706
|
levelCEFR: string;
|
|
1702
1707
|
levelILR: string;
|
|
@@ -2260,6 +2265,7 @@ interface Bit {
|
|
|
2260
2265
|
resourceType?: ResourceTypeType;
|
|
2261
2266
|
isCommented?: boolean;
|
|
2262
2267
|
id?: Property;
|
|
2268
|
+
gUri?: Property;
|
|
2263
2269
|
internalComment?: Property;
|
|
2264
2270
|
customerId?: Property;
|
|
2265
2271
|
customerExternalId?: Property;
|
|
@@ -2315,6 +2321,7 @@ interface Bit {
|
|
|
2315
2321
|
bubbleTag?: Property;
|
|
2316
2322
|
extractorTag?: Property;
|
|
2317
2323
|
extractorInternal?: Property;
|
|
2324
|
+
sourceBB?: number[][];
|
|
2318
2325
|
levelCEFRp?: Property;
|
|
2319
2326
|
levelCEFR?: Property;
|
|
2320
2327
|
levelILR?: Property;
|
|
@@ -2840,6 +2847,8 @@ declare const NodeType: {
|
|
|
2840
2847
|
readonly gmbExternalShopItems: "gmbExternalShopItems";
|
|
2841
2848
|
readonly groupTag: "groupTag";
|
|
2842
2849
|
readonly groupTagValue: "groupTagValue";
|
|
2850
|
+
readonly gUri: "gUri";
|
|
2851
|
+
readonly gUriValue: "gUriValue";
|
|
2843
2852
|
readonly handInAcceptFileType: "handInAcceptFileType";
|
|
2844
2853
|
readonly handInAcceptFileTypeValue: "handInAcceptFileTypeValue";
|
|
2845
2854
|
readonly handInInstruction: "handInInstruction";
|
|
@@ -3180,6 +3189,8 @@ declare const NodeType: {
|
|
|
3180
3189
|
readonly solution: "solution";
|
|
3181
3190
|
readonly solutions: "solutions";
|
|
3182
3191
|
readonly solutionsValue: "solutionsValue";
|
|
3192
|
+
readonly sourceBB: "sourceBB";
|
|
3193
|
+
readonly sourceBBValue: "sourceBBValue";
|
|
3183
3194
|
readonly sourceDocument: "sourceDocument";
|
|
3184
3195
|
readonly sourceDocumentValue: "sourceDocumentValue";
|
|
3185
3196
|
readonly sourceRL: "sourceRL";
|
|
@@ -3789,6 +3800,57 @@ declare const Tag: {
|
|
|
3789
3800
|
};
|
|
3790
3801
|
type TagType = EnumType<typeof Tag>;
|
|
3791
3802
|
|
|
3803
|
+
declare const TagFormat: {
|
|
3804
|
+
readonly none: "none";
|
|
3805
|
+
readonly plainText: "plainText";
|
|
3806
|
+
readonly bitmarkText: "bitmarkText";
|
|
3807
|
+
readonly number: "number";
|
|
3808
|
+
readonly boolean: "boolean";
|
|
3809
|
+
readonly invertedBoolean: "invertedBoolean";
|
|
3810
|
+
readonly enumeration: "enumeration";
|
|
3811
|
+
readonly coordinates: "coordinates";
|
|
3812
|
+
};
|
|
3813
|
+
type TagFormatType = EnumType<typeof TagFormat>;
|
|
3814
|
+
|
|
3815
|
+
declare const CardSetConfigKey: {
|
|
3816
|
+
readonly flashcard: "flashcard";
|
|
3817
|
+
readonly definitionList: "definitionList";
|
|
3818
|
+
readonly elements: "elements";
|
|
3819
|
+
readonly statements: "statements";
|
|
3820
|
+
readonly quiz: "quiz";
|
|
3821
|
+
readonly feedback: "feedback";
|
|
3822
|
+
readonly questions: "questions";
|
|
3823
|
+
readonly matchPairs: "matchPairs";
|
|
3824
|
+
readonly matchAudioPairs: "matchAudioPairs";
|
|
3825
|
+
readonly matchImagePairs: "matchImagePairs";
|
|
3826
|
+
readonly matchMatrix: "matchMatrix";
|
|
3827
|
+
readonly table: "table";
|
|
3828
|
+
readonly tableExtended: "tableExtended";
|
|
3829
|
+
readonly pronunciationTable: "pronunciationTable";
|
|
3830
|
+
readonly botActionResponses: "botActionResponses";
|
|
3831
|
+
readonly exampleBitList: "exampleBitList";
|
|
3832
|
+
readonly clozeList: "clozeList";
|
|
3833
|
+
readonly ingredients: "ingredients";
|
|
3834
|
+
readonly bookReferenceList: "bookReferenceList";
|
|
3835
|
+
};
|
|
3836
|
+
type CardSetConfigKeyType = EnumType<typeof CardSetConfigKey>;
|
|
3837
|
+
|
|
3838
|
+
/**
|
|
3839
|
+
* Type definitions for the raw configuration data.
|
|
3840
|
+
*
|
|
3841
|
+
*/
|
|
3842
|
+
|
|
3843
|
+
/**
|
|
3844
|
+
* JSON-pattern value for the new (export) jsonKey form. See specs/JSONKEY_SYNTAX.md.
|
|
3845
|
+
*
|
|
3846
|
+
* Stored verbatim in the raw configs and emitted under the field name `jsonKey`
|
|
3847
|
+
* when writing assets/config/**\/*.jsonc. Pattern-language validation (sigils,
|
|
3848
|
+
* scope-shifts, predicates) lives in the new parser's compiler, not here.
|
|
3849
|
+
*/
|
|
3850
|
+
type ExportJsonKey = null | boolean | number | string | ExportJsonKey[] | {
|
|
3851
|
+
[k: string]: ExportJsonKey;
|
|
3852
|
+
};
|
|
3853
|
+
|
|
3792
3854
|
declare abstract class AbstractTagConfig {
|
|
3793
3855
|
readonly type: BitTagConfigKeyTypeType;
|
|
3794
3856
|
readonly configKey: ConfigKeyType;
|
|
@@ -3797,6 +3859,8 @@ declare abstract class AbstractTagConfig {
|
|
|
3797
3859
|
readonly minCount: number;
|
|
3798
3860
|
readonly chain?: TagsConfig;
|
|
3799
3861
|
readonly jsonKey?: string;
|
|
3862
|
+
readonly exportJsonKey?: ExportJsonKey;
|
|
3863
|
+
readonly hasExportJsonKey: boolean;
|
|
3800
3864
|
readonly deprecated?: string;
|
|
3801
3865
|
constructor(params: {
|
|
3802
3866
|
type: BitTagConfigKeyTypeType;
|
|
@@ -3806,6 +3870,8 @@ declare abstract class AbstractTagConfig {
|
|
|
3806
3870
|
minCount: number;
|
|
3807
3871
|
chain: TagsConfig | undefined;
|
|
3808
3872
|
jsonKey: string | undefined;
|
|
3873
|
+
exportJsonKey: ExportJsonKey | undefined;
|
|
3874
|
+
hasExportJsonKey: boolean;
|
|
3809
3875
|
deprecated: string | undefined;
|
|
3810
3876
|
});
|
|
3811
3877
|
}
|
|
@@ -3822,22 +3888,14 @@ declare class MarkupTagConfig extends AbstractTagConfig {
|
|
|
3822
3888
|
maxCount: CountType;
|
|
3823
3889
|
minCount: number;
|
|
3824
3890
|
chain: TagsConfig | undefined;
|
|
3891
|
+
jsonKey: string | undefined;
|
|
3892
|
+
exportJsonKey: ExportJsonKey | undefined;
|
|
3893
|
+
hasExportJsonKey: boolean;
|
|
3825
3894
|
deprecated: string | undefined;
|
|
3826
3895
|
});
|
|
3827
3896
|
toString(options?: ToStringOptions$6): string;
|
|
3828
3897
|
}
|
|
3829
3898
|
|
|
3830
|
-
declare const TagFormat: {
|
|
3831
|
-
readonly none: "none";
|
|
3832
|
-
readonly plainText: "plainText";
|
|
3833
|
-
readonly bitmarkText: "bitmarkText";
|
|
3834
|
-
readonly number: "number";
|
|
3835
|
-
readonly boolean: "boolean";
|
|
3836
|
-
readonly invertedBoolean: "invertedBoolean";
|
|
3837
|
-
readonly enumeration: "enumeration";
|
|
3838
|
-
};
|
|
3839
|
-
type TagFormatType = EnumType<typeof TagFormat>;
|
|
3840
|
-
|
|
3841
3899
|
interface ToStringOptions$5 {
|
|
3842
3900
|
includeChains?: boolean;
|
|
3843
3901
|
includeConfigs?: boolean;
|
|
@@ -3855,6 +3913,8 @@ declare class PropertyTagConfig extends AbstractTagConfig {
|
|
|
3855
3913
|
minCount: number;
|
|
3856
3914
|
chain: TagsConfig | undefined;
|
|
3857
3915
|
jsonKey: string | undefined;
|
|
3916
|
+
exportJsonKey: ExportJsonKey | undefined;
|
|
3917
|
+
hasExportJsonKey: boolean;
|
|
3858
3918
|
format: TagFormatType | undefined;
|
|
3859
3919
|
values: string[] | undefined;
|
|
3860
3920
|
defaultValue: string | undefined;
|
|
@@ -3876,6 +3936,8 @@ declare class ResourceTagConfig extends AbstractTagConfig {
|
|
|
3876
3936
|
minCount: number;
|
|
3877
3937
|
chain: TagsConfig | undefined;
|
|
3878
3938
|
jsonKey: string | undefined;
|
|
3939
|
+
exportJsonKey: ExportJsonKey | undefined;
|
|
3940
|
+
hasExportJsonKey: boolean;
|
|
3879
3941
|
deprecated: string | undefined;
|
|
3880
3942
|
});
|
|
3881
3943
|
toString(options?: ToStringOptions$4): string;
|
|
@@ -3897,7 +3959,10 @@ declare class CardVariantConfig {
|
|
|
3897
3959
|
bodyRequired?: boolean;
|
|
3898
3960
|
repeatCount?: CountType;
|
|
3899
3961
|
readonly jsonKey?: string | null;
|
|
3900
|
-
|
|
3962
|
+
readonly exportJsonKey?: ExportJsonKey;
|
|
3963
|
+
readonly hasExportJsonKey: boolean;
|
|
3964
|
+
readonly format?: TextFormatType;
|
|
3965
|
+
constructor(tags: TagsConfig, bodyAllowed?: boolean, bodyRequired?: boolean, repeatCount?: CountType, jsonKey?: string | null, exportJsonKey?: ExportJsonKey, hasExportJsonKey?: boolean, format?: TextFormatType);
|
|
3901
3966
|
toString(options?: ToStringOptions$3): string;
|
|
3902
3967
|
}
|
|
3903
3968
|
|
|
@@ -3909,53 +3974,35 @@ declare class CardSideConfig {
|
|
|
3909
3974
|
readonly name: string;
|
|
3910
3975
|
readonly repeat: boolean;
|
|
3911
3976
|
readonly jsonKey: string | null | undefined;
|
|
3977
|
+
readonly exportJsonKey?: ExportJsonKey;
|
|
3978
|
+
readonly hasExportJsonKey: boolean;
|
|
3912
3979
|
readonly variants: CardVariantConfig[];
|
|
3913
|
-
constructor(name: string, repeat: boolean, variants: CardVariantConfig[], jsonKey?: string | null);
|
|
3980
|
+
constructor(name: string, repeat: boolean, variants: CardVariantConfig[], jsonKey?: string | null, exportJsonKey?: ExportJsonKey, hasExportJsonKey?: boolean);
|
|
3914
3981
|
toString(options?: ToStringOptions$2): string;
|
|
3915
3982
|
}
|
|
3916
3983
|
|
|
3917
|
-
declare const CardSetConfigKey: {
|
|
3918
|
-
readonly flashcard: "flashcard";
|
|
3919
|
-
readonly definitionList: "definitionList";
|
|
3920
|
-
readonly elements: "elements";
|
|
3921
|
-
readonly statements: "statements";
|
|
3922
|
-
readonly quiz: "quiz";
|
|
3923
|
-
readonly feedback: "feedback";
|
|
3924
|
-
readonly questions: "questions";
|
|
3925
|
-
readonly matchPairs: "matchPairs";
|
|
3926
|
-
readonly matchAudioPairs: "matchAudioPairs";
|
|
3927
|
-
readonly matchImagePairs: "matchImagePairs";
|
|
3928
|
-
readonly matchMatrix: "matchMatrix";
|
|
3929
|
-
readonly table: "table";
|
|
3930
|
-
readonly tableExtended: "tableExtended";
|
|
3931
|
-
readonly pronunciationTable: "pronunciationTable";
|
|
3932
|
-
readonly botActionResponses: "botActionResponses";
|
|
3933
|
-
readonly exampleBitList: "exampleBitList";
|
|
3934
|
-
readonly clozeList: "clozeList";
|
|
3935
|
-
readonly ingredients: "ingredients";
|
|
3936
|
-
readonly bookReferenceList: "bookReferenceList";
|
|
3937
|
-
};
|
|
3938
|
-
type CardSetConfigKeyType = EnumType<typeof CardSetConfigKey>;
|
|
3939
|
-
|
|
3940
3984
|
interface ToStringOptions$1 {
|
|
3941
3985
|
includeChains?: boolean;
|
|
3942
3986
|
includeConfigs?: boolean;
|
|
3943
3987
|
}
|
|
3988
|
+
interface CardSetSection {
|
|
3989
|
+
jsonKey: string;
|
|
3990
|
+
exportJsonKey?: ExportJsonKey;
|
|
3991
|
+
hasExportJsonKey?: boolean;
|
|
3992
|
+
isDefault?: boolean;
|
|
3993
|
+
sideJsonKey?: string;
|
|
3994
|
+
sideExportJsonKey?: ExportJsonKey;
|
|
3995
|
+
hasSideExportJsonKey?: boolean;
|
|
3996
|
+
}
|
|
3944
3997
|
declare class CardSetConfig {
|
|
3945
3998
|
readonly configKey: CardSetConfigKeyType;
|
|
3946
3999
|
readonly jsonKey: string | null;
|
|
3947
|
-
readonly
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
sideJsonKey?: string;
|
|
3951
|
-
}> | undefined;
|
|
4000
|
+
readonly exportJsonKey?: ExportJsonKey;
|
|
4001
|
+
readonly hasExportJsonKey: boolean;
|
|
4002
|
+
readonly sections: Record<string, CardSetSection> | undefined;
|
|
3952
4003
|
readonly sides: CardSideConfig[];
|
|
3953
4004
|
get variants(): CardVariantConfig[][];
|
|
3954
|
-
constructor(configKey: CardSetConfigKeyType, jsonKey: string | null, sections: Record<string,
|
|
3955
|
-
jsonKey: string;
|
|
3956
|
-
isDefault?: boolean;
|
|
3957
|
-
sideJsonKey?: string;
|
|
3958
|
-
}> | undefined, sides: CardSideConfig[]);
|
|
4005
|
+
constructor(configKey: CardSetConfigKeyType, jsonKey: string | null, exportJsonKey: ExportJsonKey | undefined, hasExportJsonKey: boolean, sections: Record<string, CardSetSection> | undefined, sides: CardSideConfig[]);
|
|
3959
4006
|
toString(options?: ToStringOptions$1): string;
|
|
3960
4007
|
}
|
|
3961
4008
|
|
|
@@ -4144,6 +4191,7 @@ declare class Builder extends BaseBuilder {
|
|
|
4144
4191
|
resourceType?: ResourceTypeType;
|
|
4145
4192
|
isCommented?: boolean;
|
|
4146
4193
|
id?: string | string[];
|
|
4194
|
+
gUri?: string;
|
|
4147
4195
|
internalComment?: string | string[];
|
|
4148
4196
|
customerId?: string;
|
|
4149
4197
|
customerExternalId?: string | string[];
|
|
@@ -4199,6 +4247,7 @@ declare class Builder extends BaseBuilder {
|
|
|
4199
4247
|
bubbleTag?: string | string[];
|
|
4200
4248
|
extractorTag?: string | string[];
|
|
4201
4249
|
extractorInternal?: string | string[];
|
|
4250
|
+
sourceBB?: number[] | number[][];
|
|
4202
4251
|
levelCEFRp?: string | string[];
|
|
4203
4252
|
levelCEFR?: string | string[];
|
|
4204
4253
|
levelILR?: string | string[];
|
|
@@ -4461,6 +4510,11 @@ declare class Builder extends BaseBuilder {
|
|
|
4461
4510
|
* @returns
|
|
4462
4511
|
*/
|
|
4463
4512
|
protected buildGroupTags(context: BuildContext, data: Partial<GroupTagJson> | Partial<GroupTagJson>[] | undefined): GroupTagJson[] | undefined;
|
|
4513
|
+
/**
|
|
4514
|
+
* Normalise a sourceBB input into the AST shape (always number[][]).
|
|
4515
|
+
* Accepts a single 4-number tuple or an array of tuples; returns undefined when empty.
|
|
4516
|
+
*/
|
|
4517
|
+
protected normaliseSourceBB(data: number[] | number[][] | undefined): number[][] | undefined;
|
|
4464
4518
|
/**
|
|
4465
4519
|
* Build groupTag node
|
|
4466
4520
|
*
|
|
@@ -5552,6 +5606,7 @@ declare class BitmarkGenerator extends AstWalkerGenerator<BitmarkAst, void> {
|
|
|
5552
5606
|
protected enter_sampleSolution(node: NodeInfo, route: NodeInfo[]): boolean;
|
|
5553
5607
|
protected leaf_sampleSolution(node: NodeInfo, route: NodeInfo[]): boolean;
|
|
5554
5608
|
protected leaf_reasonableNumOfChars(node: NodeInfo, route: NodeInfo[]): void;
|
|
5609
|
+
protected enter_sourceBB(node: NodeInfo, route: NodeInfo[]): boolean;
|
|
5555
5610
|
protected leaf_additionalSolutionsValue(node: NodeInfo, route: NodeInfo[]): void;
|
|
5556
5611
|
protected enter_item(node: NodeInfo, route: NodeInfo[]): boolean;
|
|
5557
5612
|
protected enter_lead(node: NodeInfo, route: NodeInfo[]): boolean;
|
|
@@ -5963,6 +6018,7 @@ declare class JsonGenerator extends AstWalkerGenerator<BitmarkAst, void> {
|
|
|
5963
6018
|
protected enter_person(node: NodeInfo, route: NodeInfo[]): boolean;
|
|
5964
6019
|
protected enter_ratingLevelStart(node: NodeInfo, route: NodeInfo[]): boolean;
|
|
5965
6020
|
protected enter_ratingLevelEnd(node: NodeInfo, route: NodeInfo[]): boolean;
|
|
6021
|
+
protected enter_sourceBB(node: NodeInfo, route: NodeInfo[]): boolean;
|
|
5966
6022
|
protected enter_productId(node: NodeInfo, route: NodeInfo[]): boolean;
|
|
5967
6023
|
protected enter_markConfig(_node: NodeInfo, _route: NodeInfo[]): boolean;
|
|
5968
6024
|
protected enter_markConfigValue(node: NodeInfo, route: NodeInfo[]): boolean;
|
|
@@ -6886,6 +6942,63 @@ declare class JsonStringGenerator implements Generator<BitmarkAst, string> {
|
|
|
6886
6942
|
generateSync(ast: BitmarkAst): string;
|
|
6887
6943
|
}
|
|
6888
6944
|
|
|
6945
|
+
/** Axis-aligned bounding box: `[x0, y0, x1, y1]` (top-left + bottom-right). */
|
|
6946
|
+
type Bbox = [number, number, number, number];
|
|
6947
|
+
interface BoundingBoxEntry {
|
|
6948
|
+
bit: BitJson;
|
|
6949
|
+
wrapper: BitWrapperJson;
|
|
6950
|
+
/** Normalized list of boxes parsed from `bit.sourceBB` (always at least one). */
|
|
6951
|
+
boxes: Bbox[];
|
|
6952
|
+
}
|
|
6953
|
+
interface FromBitsOptions {
|
|
6954
|
+
/**
|
|
6955
|
+
* If provided, only include bits whose `bit.sourceRL` exactly equals this
|
|
6956
|
+
* value. Bits with no `sourceRL` are excluded.
|
|
6957
|
+
*/
|
|
6958
|
+
sourceRL?: string;
|
|
6959
|
+
}
|
|
6960
|
+
/**
|
|
6961
|
+
* Index over a list of bits with `@sourceBB` tags, designed for live region
|
|
6962
|
+
* selection in a browser (e.g. the user drags a box and the preview updates
|
|
6963
|
+
* as they go). Each bit's `sourceBB` is parsed once at construction so that
|
|
6964
|
+
* intersection queries are pure bounding-box scans on the hot path.
|
|
6965
|
+
*/
|
|
6966
|
+
declare class BoundingBoxIndex {
|
|
6967
|
+
private readonly _entries;
|
|
6968
|
+
private readonly bitmarkParser;
|
|
6969
|
+
private constructor();
|
|
6970
|
+
/**
|
|
6971
|
+
* Build an index from already-parsed bits. Bits without a parseable
|
|
6972
|
+
* `sourceBB` are dropped. Order of the input is preserved.
|
|
6973
|
+
*
|
|
6974
|
+
* Pass `options.sourceRL` to scope the index to a single source page —
|
|
6975
|
+
* bits whose `sourceRL` doesn't match (or is absent) are excluded.
|
|
6976
|
+
*/
|
|
6977
|
+
static fromBits(wrappers: BitWrapperJson[], options?: FromBitsOptions): BoundingBoxIndex;
|
|
6978
|
+
/** All bits with at least one valid `sourceBB`, in input order. */
|
|
6979
|
+
get entries(): ReadonlyArray<BoundingBoxEntry>;
|
|
6980
|
+
/**
|
|
6981
|
+
* Bits whose ANY `sourceBB` box intersects `query` (strict overlap —
|
|
6982
|
+
* touching-only edges do NOT count as an intersection).
|
|
6983
|
+
*/
|
|
6984
|
+
intersecting(query: Bbox): BoundingBoxEntry[];
|
|
6985
|
+
/**
|
|
6986
|
+
* Flat list of every individual `sourceBB` box that intersects `query`.
|
|
6987
|
+
* For a multi-box bit, only the boxes that themselves intersected are
|
|
6988
|
+
* returned.
|
|
6989
|
+
*/
|
|
6990
|
+
intersectingBoxes(query: Bbox): Bbox[];
|
|
6991
|
+
/**
|
|
6992
|
+
* Smallest axis-aligned box that fully encloses every individual `sourceBB`
|
|
6993
|
+
* box that intersected the query. For a multi-box bit, only the boxes that
|
|
6994
|
+
* themselves intersected contribute to the union — non-intersecting boxes
|
|
6995
|
+
* from the same bit are ignored. Returns `null` if no box matches.
|
|
6996
|
+
*/
|
|
6997
|
+
enclosingBoundingBox(query: Bbox): Bbox | null;
|
|
6998
|
+
/** Render selected bits back to bitmark text. Empty input returns `''`. */
|
|
6999
|
+
toBitmark(entries: BoundingBoxEntry[]): string;
|
|
7000
|
+
}
|
|
7001
|
+
|
|
6889
7002
|
interface ParseOptions {
|
|
6890
7003
|
startRule?: string;
|
|
6891
7004
|
}
|
|
@@ -6981,4 +7094,4 @@ declare class JsonFileGenerator implements Generator<BitmarkAst> {
|
|
|
6981
7094
|
generateSync(_ast: BitmarkAst): void;
|
|
6982
7095
|
}
|
|
6983
7096
|
|
|
6984
|
-
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 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 BreakscapeOptions, type BreakscapedString, Builder, type CardBit, type CardNode, CardSetVersion, type CardSetVersionType, type ChoiceJson, type CodeBlockTextNode, type CodeBlockTextNodeAttributes, type CommentMark, 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 GapJson, type Generator, type GroupTagJson, type HeadingJson, type HeadingTextNode, type HeadingTextNodeAttributes, type HighlightJson, type HighlightTextJson, 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 };
|
|
7097
|
+
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 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 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 };
|