@gmb/bitmark-parser-generator 5.21.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 +1022 -95
- package/dist/browser/cjs/index.cjs.map +1 -1
- package/dist/browser/cjs/index.d.cts +174 -47
- package/dist/browser/esm/index.d.ts +174 -47
- package/dist/browser/esm/index.js +1021 -95
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/cli/main.js +1042 -172
- package/dist/cli/main.js.map +1 -1
- package/dist/index.cjs +1155 -172
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +174 -47
- package/dist/index.d.ts +174 -47
- package/dist/index.js +1154 -172
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -278,6 +278,7 @@ var BitType2 = {
|
|
|
278
278
|
footNote: "foot-note",
|
|
279
279
|
formFreeText: "form-free-text",
|
|
280
280
|
formula: "formula",
|
|
281
|
+
formulaImage: "formula-image",
|
|
281
282
|
gapText: "gap-text",
|
|
282
283
|
gapTextInstructionGrouped: "gap-text-instruction-grouped",
|
|
283
284
|
glossaryTerm: "glossary-term",
|
|
@@ -633,6 +634,7 @@ var BitType2 = {
|
|
|
633
634
|
vendorPadletEmbed: "vendor-padlet-embed",
|
|
634
635
|
vendorStripePricingTable: "vendor-stripe-pricing-table",
|
|
635
636
|
vendorStripePricingTableExternal: "vendor-stripe-pricing-table-external",
|
|
637
|
+
vendorStripePricingTablePrintOnRequest: "vendor-stripe-pricing-table-print-on-request",
|
|
636
638
|
video: "video",
|
|
637
639
|
videoEmbed: "video-embed",
|
|
638
640
|
videoEmbedLandscape: "video-embed-landscape",
|
|
@@ -701,8 +703,10 @@ var TagFormat = {
|
|
|
701
703
|
// If the value is treated as a boolean
|
|
702
704
|
invertedBoolean: "invertedBoolean",
|
|
703
705
|
// If the value is treated as a boolean with the value inverted (e.g. isLongAnswer ==> isShortAnswer = false)
|
|
704
|
-
enumeration: "enumeration"
|
|
706
|
+
enumeration: "enumeration",
|
|
705
707
|
// If the value is treated as an enumeration (the value is a string that must be one of a predefined set of values)
|
|
708
|
+
coordinates: "coordinates"
|
|
709
|
+
// Comma-separated list of 4 numbers (e.g. bounding-box x, y, x1, y1)
|
|
706
710
|
};
|
|
707
711
|
|
|
708
712
|
// src/model/enum/TextFormat.ts
|
|
@@ -787,7 +791,11 @@ var AbstractTagConfig = class {
|
|
|
787
791
|
// Default: 0
|
|
788
792
|
__publicField(this, "chain");
|
|
789
793
|
__publicField(this, "jsonKey");
|
|
790
|
-
//
|
|
794
|
+
// Legacy string-form jsonKey
|
|
795
|
+
__publicField(this, "exportJsonKey");
|
|
796
|
+
// New JSON-pattern jsonKey (export-only)
|
|
797
|
+
__publicField(this, "hasExportJsonKey");
|
|
798
|
+
// True iff exportJsonKey was explicitly set
|
|
791
799
|
__publicField(this, "deprecated");
|
|
792
800
|
this.type = params.type;
|
|
793
801
|
this.configKey = params.configKey;
|
|
@@ -796,6 +804,8 @@ var AbstractTagConfig = class {
|
|
|
796
804
|
this.minCount = params.minCount;
|
|
797
805
|
this.chain = params.chain;
|
|
798
806
|
this.jsonKey = params.jsonKey;
|
|
807
|
+
this.exportJsonKey = params.exportJsonKey;
|
|
808
|
+
this.hasExportJsonKey = params.hasExportJsonKey;
|
|
799
809
|
this.deprecated = params.deprecated;
|
|
800
810
|
}
|
|
801
811
|
};
|
|
@@ -805,7 +815,6 @@ var MarkupTagConfig = class extends AbstractTagConfig {
|
|
|
805
815
|
constructor(params) {
|
|
806
816
|
super({
|
|
807
817
|
type: BitTagConfigKeyType.tag,
|
|
808
|
-
jsonKey: void 0,
|
|
809
818
|
...params
|
|
810
819
|
});
|
|
811
820
|
__publicField(this, "type", BitTagConfigKeyType.tag);
|
|
@@ -917,8 +926,8 @@ var ResourceTagConfig = class extends AbstractTagConfig {
|
|
|
917
926
|
|
|
918
927
|
// src/model/config/CardVariantConfig.ts
|
|
919
928
|
var CardVariantConfig = class {
|
|
920
|
-
//
|
|
921
|
-
constructor(tags2, bodyAllowed, bodyRequired, repeatCount, jsonKey) {
|
|
929
|
+
// Body text format. Default: bitmark++
|
|
930
|
+
constructor(tags2, bodyAllowed, bodyRequired, repeatCount, jsonKey, exportJsonKey, hasExportJsonKey = false, format) {
|
|
922
931
|
__publicField(this, "tags");
|
|
923
932
|
__publicField(this, "bodyAllowed");
|
|
924
933
|
// Default: true
|
|
@@ -928,11 +937,19 @@ var CardVariantConfig = class {
|
|
|
928
937
|
// Default: 1
|
|
929
938
|
// JSON mapping fields
|
|
930
939
|
__publicField(this, "jsonKey");
|
|
940
|
+
// JSON path for body text (legacy)
|
|
941
|
+
__publicField(this, "exportJsonKey");
|
|
942
|
+
// New JSON-pattern jsonKey
|
|
943
|
+
__publicField(this, "hasExportJsonKey");
|
|
944
|
+
__publicField(this, "format");
|
|
931
945
|
this.tags = tags2;
|
|
932
946
|
this.bodyAllowed = bodyAllowed == null ? true : bodyAllowed;
|
|
933
947
|
this.bodyRequired = bodyRequired;
|
|
934
948
|
this.repeatCount = repeatCount;
|
|
935
949
|
this.jsonKey = jsonKey;
|
|
950
|
+
this.exportJsonKey = exportJsonKey;
|
|
951
|
+
this.hasExportJsonKey = hasExportJsonKey;
|
|
952
|
+
this.format = format;
|
|
936
953
|
}
|
|
937
954
|
toString(options) {
|
|
938
955
|
const opts = Object.assign({}, options);
|
|
@@ -956,14 +973,18 @@ ${tag.toString(opts)}`;
|
|
|
956
973
|
|
|
957
974
|
// src/model/config/CardSideConfig.ts
|
|
958
975
|
var CardSideConfig = class {
|
|
959
|
-
constructor(name, repeat, variants, jsonKey) {
|
|
976
|
+
constructor(name, repeat, variants, jsonKey, exportJsonKey, hasExportJsonKey = false) {
|
|
960
977
|
__publicField(this, "name");
|
|
961
978
|
__publicField(this, "repeat");
|
|
962
979
|
__publicField(this, "jsonKey");
|
|
980
|
+
__publicField(this, "exportJsonKey");
|
|
981
|
+
__publicField(this, "hasExportJsonKey");
|
|
963
982
|
__publicField(this, "variants");
|
|
964
983
|
this.name = name;
|
|
965
984
|
this.repeat = repeat;
|
|
966
985
|
this.jsonKey = jsonKey;
|
|
986
|
+
this.exportJsonKey = exportJsonKey;
|
|
987
|
+
this.hasExportJsonKey = hasExportJsonKey;
|
|
967
988
|
this.variants = variants;
|
|
968
989
|
}
|
|
969
990
|
toString(options) {
|
|
@@ -985,13 +1006,17 @@ var CardSideConfig = class {
|
|
|
985
1006
|
|
|
986
1007
|
// src/model/config/CardSetConfig.ts
|
|
987
1008
|
var CardSetConfig = class {
|
|
988
|
-
constructor(configKey, jsonKey, sections, sides) {
|
|
1009
|
+
constructor(configKey, jsonKey, exportJsonKey, hasExportJsonKey, sections, sides) {
|
|
989
1010
|
__publicField(this, "configKey");
|
|
990
1011
|
__publicField(this, "jsonKey");
|
|
1012
|
+
__publicField(this, "exportJsonKey");
|
|
1013
|
+
__publicField(this, "hasExportJsonKey");
|
|
991
1014
|
__publicField(this, "sections");
|
|
992
1015
|
__publicField(this, "sides");
|
|
993
1016
|
this.configKey = configKey;
|
|
994
1017
|
this.jsonKey = jsonKey;
|
|
1018
|
+
this.exportJsonKey = exportJsonKey;
|
|
1019
|
+
this.hasExportJsonKey = hasExportJsonKey;
|
|
995
1020
|
this.sections = sections;
|
|
996
1021
|
this.sides = sides;
|
|
997
1022
|
}
|
|
@@ -1286,6 +1311,7 @@ var propertyKeys = {
|
|
|
1286
1311
|
property_formula: "@formula",
|
|
1287
1312
|
property_fullName: "@fullName",
|
|
1288
1313
|
property_groupTag: "@groupTag",
|
|
1314
|
+
property_gUri: "@gUri",
|
|
1289
1315
|
property_handInAcceptFileType: "@handInAcceptFileType",
|
|
1290
1316
|
property_handInInstruction: "@handInInstruction",
|
|
1291
1317
|
property_handInRequirement: "@handInRequirement",
|
|
@@ -1344,6 +1370,8 @@ var propertyKeys = {
|
|
|
1344
1370
|
property_padletId: "@padletId",
|
|
1345
1371
|
property_page: "@page",
|
|
1346
1372
|
property_printParentChapterLevel: "@printParentChapterLevel",
|
|
1373
|
+
property_printOnRequestCustomerId: "@printOnRequestCustomerId",
|
|
1374
|
+
property_printOnRequestProductId: "@printOnRequestProductId",
|
|
1347
1375
|
property_pageNo: "@pageNo",
|
|
1348
1376
|
property_partialAnswer: "@partialAnswer",
|
|
1349
1377
|
property_partner: "@partner",
|
|
@@ -1419,6 +1447,7 @@ var propertyKeys = {
|
|
|
1419
1447
|
property_siteName: "@siteName",
|
|
1420
1448
|
property_size: "@size",
|
|
1421
1449
|
property_slug: "@slug",
|
|
1450
|
+
property_sourceBB: "@sourceBB",
|
|
1422
1451
|
property_sourceDocument: "@sourceDocument",
|
|
1423
1452
|
property_sourceRL: "@sourceRL",
|
|
1424
1453
|
property_spaceId: "@spaceId",
|
|
@@ -2172,25 +2201,29 @@ var CARDSETS = {
|
|
|
2172
2201
|
//
|
|
2173
2202
|
[CardSetConfigKey.flashcard]: {
|
|
2174
2203
|
jsonKey: "cards",
|
|
2204
|
+
exportJsonKey: { cards: "$" },
|
|
2175
2205
|
sides: [
|
|
2176
2206
|
{
|
|
2177
2207
|
name: "question",
|
|
2178
2208
|
variants: [
|
|
2179
2209
|
{
|
|
2180
2210
|
jsonKey: "question.text",
|
|
2211
|
+
exportJsonKey: { question: { text: "$" } },
|
|
2181
2212
|
tags: [
|
|
2182
2213
|
{
|
|
2183
2214
|
key: ConfigKey.group_standardTags,
|
|
2184
2215
|
description: "Standard tags for the flashcard."
|
|
2185
2216
|
},
|
|
2186
2217
|
{
|
|
2218
|
+
exportJsonKey: { title: "$" },
|
|
2187
2219
|
key: ConfigKey.tag_title,
|
|
2188
2220
|
description: "Title of the flashcard."
|
|
2189
2221
|
},
|
|
2190
2222
|
{
|
|
2191
2223
|
key: ConfigKey.group_resourceIcon,
|
|
2192
2224
|
description: "Icon resource for the flashcard.",
|
|
2193
|
-
jsonKey: "question.icon"
|
|
2225
|
+
jsonKey: "question.icon|resource(type=image, key=image)",
|
|
2226
|
+
exportJsonKey: { question: { icon: { type: "image", image: { src: "$" } } } }
|
|
2194
2227
|
}
|
|
2195
2228
|
]
|
|
2196
2229
|
}
|
|
@@ -2201,36 +2234,45 @@ var CARDSETS = {
|
|
|
2201
2234
|
variants: [
|
|
2202
2235
|
{
|
|
2203
2236
|
jsonKey: "answer.text",
|
|
2237
|
+
exportJsonKey: { answer: { text: "$" } },
|
|
2204
2238
|
tags: [
|
|
2205
2239
|
{
|
|
2206
2240
|
key: ConfigKey.group_standardTags,
|
|
2207
2241
|
description: "Standard tags for the flashcard."
|
|
2208
2242
|
},
|
|
2209
2243
|
{
|
|
2244
|
+
exportJsonKey: { title: "$" },
|
|
2210
2245
|
key: ConfigKey.tag_title,
|
|
2211
2246
|
description: "Title of the flashcard."
|
|
2212
2247
|
},
|
|
2213
2248
|
{
|
|
2214
2249
|
key: ConfigKey.group_resourceIcon,
|
|
2215
2250
|
description: "Icon resource for the flashcard.",
|
|
2216
|
-
jsonKey: "answer.icon"
|
|
2251
|
+
jsonKey: "answer.icon|resource(type=image, key=image)",
|
|
2252
|
+
exportJsonKey: { answer: { icon: { type: "image", image: { src: "$" } } } }
|
|
2217
2253
|
}
|
|
2218
2254
|
]
|
|
2219
2255
|
},
|
|
2220
2256
|
{
|
|
2221
2257
|
jsonKey: "alternativeAnswers[].text",
|
|
2258
|
+
exportJsonKey: { alternativeAnswers: [{ text: "$" }] },
|
|
2222
2259
|
tags: [
|
|
2223
2260
|
{
|
|
2224
2261
|
key: ConfigKey.group_standardTags,
|
|
2225
2262
|
description: "Standard tags for the flashcard."
|
|
2226
2263
|
},
|
|
2227
2264
|
{
|
|
2265
|
+
exportJsonKey: { title: "$" },
|
|
2228
2266
|
key: ConfigKey.tag_title,
|
|
2229
2267
|
description: "Title of the flashcard."
|
|
2230
2268
|
},
|
|
2231
2269
|
{
|
|
2232
2270
|
key: ConfigKey.group_resourceIcon,
|
|
2233
|
-
description: "Icon resource for the flashcard."
|
|
2271
|
+
description: "Icon resource for the flashcard.",
|
|
2272
|
+
jsonKey: "alternativeAnswers[].icon|resource(type=image, key=image)",
|
|
2273
|
+
exportJsonKey: {
|
|
2274
|
+
alternativeAnswers: [{ icon: { type: "image", image: { src: "$" } } }]
|
|
2275
|
+
}
|
|
2234
2276
|
}
|
|
2235
2277
|
],
|
|
2236
2278
|
repeatCount: Count.infinity
|
|
@@ -2244,12 +2286,14 @@ var CARDSETS = {
|
|
|
2244
2286
|
//
|
|
2245
2287
|
[CardSetConfigKey.definitionList]: {
|
|
2246
2288
|
jsonKey: "definitions",
|
|
2289
|
+
exportJsonKey: { definitions: "$" },
|
|
2247
2290
|
sides: [
|
|
2248
2291
|
{
|
|
2249
2292
|
name: "term",
|
|
2250
2293
|
variants: [
|
|
2251
2294
|
{
|
|
2252
2295
|
jsonKey: "term.text",
|
|
2296
|
+
exportJsonKey: { term: { text: "$" } },
|
|
2253
2297
|
tags: [
|
|
2254
2298
|
{
|
|
2255
2299
|
key: ConfigKey.group_standardTags,
|
|
@@ -2258,12 +2302,16 @@ var CARDSETS = {
|
|
|
2258
2302
|
{
|
|
2259
2303
|
key: ConfigKey.tag_title,
|
|
2260
2304
|
description: "Title of the definition.",
|
|
2261
|
-
|
|
2305
|
+
format: TagFormat.plainText,
|
|
2306
|
+
jsonKey: "^heading.forKeys",
|
|
2307
|
+
exportJsonKey: { "@bit": { heading: { forKeys: "$" } } }
|
|
2262
2308
|
},
|
|
2263
2309
|
{
|
|
2264
2310
|
key: ConfigKey.group_resourceIcon,
|
|
2265
2311
|
description: "Icon resource for the definition.",
|
|
2266
|
-
|
|
2312
|
+
format: TagFormat.plainText,
|
|
2313
|
+
jsonKey: "term.icon|resource(type=image, key=image)",
|
|
2314
|
+
exportJsonKey: { term: { icon: { type: "image", image: { src: "$" } } } }
|
|
2267
2315
|
}
|
|
2268
2316
|
]
|
|
2269
2317
|
}
|
|
@@ -2274,6 +2322,7 @@ var CARDSETS = {
|
|
|
2274
2322
|
variants: [
|
|
2275
2323
|
{
|
|
2276
2324
|
jsonKey: "definition.text",
|
|
2325
|
+
exportJsonKey: { definition: { text: "$" } },
|
|
2277
2326
|
tags: [
|
|
2278
2327
|
{
|
|
2279
2328
|
key: ConfigKey.group_standardTags,
|
|
@@ -2282,29 +2331,38 @@ var CARDSETS = {
|
|
|
2282
2331
|
{
|
|
2283
2332
|
key: ConfigKey.tag_title,
|
|
2284
2333
|
description: "Title of the definition.",
|
|
2285
|
-
|
|
2334
|
+
format: TagFormat.plainText,
|
|
2335
|
+
jsonKey: "^heading.forValues",
|
|
2336
|
+
exportJsonKey: { "@bit": { heading: { forValues: "$" } } }
|
|
2286
2337
|
},
|
|
2287
2338
|
{
|
|
2288
2339
|
key: ConfigKey.group_resourceIcon,
|
|
2289
2340
|
description: "Icon resource for the definition.",
|
|
2290
|
-
jsonKey: "definition.icon"
|
|
2341
|
+
jsonKey: "definition.icon|resource(type=image, key=image)",
|
|
2342
|
+
exportJsonKey: { definition: { icon: { type: "image", image: { src: "$" } } } }
|
|
2291
2343
|
}
|
|
2292
2344
|
]
|
|
2293
2345
|
},
|
|
2294
2346
|
{
|
|
2295
2347
|
jsonKey: "alternativeDefinitions[].text",
|
|
2348
|
+
exportJsonKey: { alternativeDefinitions: [{ text: "$" }] },
|
|
2296
2349
|
tags: [
|
|
2297
2350
|
{
|
|
2298
2351
|
key: ConfigKey.group_standardTags,
|
|
2299
2352
|
description: "Standard tags for the definition."
|
|
2300
2353
|
},
|
|
2301
2354
|
{
|
|
2355
|
+
exportJsonKey: { title: "$" },
|
|
2302
2356
|
key: ConfigKey.tag_title,
|
|
2303
2357
|
description: "Title of the definition."
|
|
2304
2358
|
},
|
|
2305
2359
|
{
|
|
2306
2360
|
key: ConfigKey.group_resourceIcon,
|
|
2307
|
-
description: "Icon resource for the definition."
|
|
2361
|
+
description: "Icon resource for the definition.",
|
|
2362
|
+
jsonKey: "alternativeDefinitions[].icon|resource(type=image, key=image)",
|
|
2363
|
+
exportJsonKey: {
|
|
2364
|
+
alternativeDefinitions: [{ icon: { type: "image", image: { src: "$" } } }]
|
|
2365
|
+
}
|
|
2308
2366
|
}
|
|
2309
2367
|
],
|
|
2310
2368
|
repeatCount: Count.infinity
|
|
@@ -2318,12 +2376,14 @@ var CARDSETS = {
|
|
|
2318
2376
|
//
|
|
2319
2377
|
[CardSetConfigKey.matchPairs]: {
|
|
2320
2378
|
jsonKey: "pairs",
|
|
2379
|
+
exportJsonKey: { pairs: "$" },
|
|
2321
2380
|
sides: [
|
|
2322
2381
|
{
|
|
2323
2382
|
name: "key",
|
|
2324
2383
|
variants: [
|
|
2325
2384
|
{
|
|
2326
2385
|
jsonKey: "key",
|
|
2386
|
+
exportJsonKey: { key: "$" },
|
|
2327
2387
|
tags: [
|
|
2328
2388
|
{
|
|
2329
2389
|
key: ConfigKey.group_standardTags,
|
|
@@ -2332,22 +2392,30 @@ var CARDSETS = {
|
|
|
2332
2392
|
{
|
|
2333
2393
|
key: ConfigKey.tag_title,
|
|
2334
2394
|
description: "Title of the match pair.",
|
|
2335
|
-
|
|
2395
|
+
format: TagFormat.plainText,
|
|
2396
|
+
jsonKey: "^heading.forKeys",
|
|
2397
|
+
exportJsonKey: { "@bit": { heading: { forKeys: "$" } } }
|
|
2336
2398
|
},
|
|
2337
2399
|
{
|
|
2338
2400
|
key: ConfigKey.property_isCaseSensitive,
|
|
2401
|
+
exportJsonKey: [
|
|
2402
|
+
{ "@absent": { isCaseSensitive: "$ancestor" } },
|
|
2403
|
+
{ isCaseSensitive: "$" }
|
|
2404
|
+
],
|
|
2339
2405
|
description: "Property to indicate if the match is case sensitive.",
|
|
2340
2406
|
format: TagFormat.boolean
|
|
2341
2407
|
},
|
|
2342
2408
|
{
|
|
2343
2409
|
key: ConfigKey.resource_audio,
|
|
2344
2410
|
description: "Audio resource for the match pair.",
|
|
2345
|
-
jsonKey: "keyAudio"
|
|
2411
|
+
jsonKey: "keyAudio",
|
|
2412
|
+
exportJsonKey: { keyAudio: "$" }
|
|
2346
2413
|
},
|
|
2347
2414
|
{
|
|
2348
2415
|
key: ConfigKey.resource_image,
|
|
2349
2416
|
description: "Image resource for the match pair.",
|
|
2350
|
-
jsonKey: "keyImage"
|
|
2417
|
+
jsonKey: "keyImage",
|
|
2418
|
+
exportJsonKey: { keyImage: "$" }
|
|
2351
2419
|
}
|
|
2352
2420
|
]
|
|
2353
2421
|
}
|
|
@@ -2359,6 +2427,7 @@ var CARDSETS = {
|
|
|
2359
2427
|
variants: [
|
|
2360
2428
|
{
|
|
2361
2429
|
jsonKey: "values[]",
|
|
2430
|
+
exportJsonKey: { values: ["$"] },
|
|
2362
2431
|
tags: [
|
|
2363
2432
|
{
|
|
2364
2433
|
key: ConfigKey.group_standardTags,
|
|
@@ -2367,10 +2436,16 @@ var CARDSETS = {
|
|
|
2367
2436
|
{
|
|
2368
2437
|
key: ConfigKey.tag_title,
|
|
2369
2438
|
description: "Title of the match pair.",
|
|
2370
|
-
|
|
2439
|
+
format: TagFormat.plainText,
|
|
2440
|
+
jsonKey: "^heading.forValues",
|
|
2441
|
+
exportJsonKey: { "@bit": { heading: { forValues: "$" } } }
|
|
2371
2442
|
},
|
|
2372
2443
|
{
|
|
2373
2444
|
key: ConfigKey.property_isCaseSensitive,
|
|
2445
|
+
exportJsonKey: [
|
|
2446
|
+
{ "@absent": { isCaseSensitive: "$ancestor" } },
|
|
2447
|
+
{ isCaseSensitive: "$" }
|
|
2448
|
+
],
|
|
2374
2449
|
description: "Property to indicate if the match is case sensitive.",
|
|
2375
2450
|
format: TagFormat.boolean
|
|
2376
2451
|
}
|
|
@@ -2386,12 +2461,14 @@ var CARDSETS = {
|
|
|
2386
2461
|
//
|
|
2387
2462
|
[CardSetConfigKey.matchAudioPairs]: {
|
|
2388
2463
|
jsonKey: "pairs",
|
|
2464
|
+
exportJsonKey: { pairs: "$" },
|
|
2389
2465
|
sides: [
|
|
2390
2466
|
{
|
|
2391
2467
|
name: "key",
|
|
2392
2468
|
variants: [
|
|
2393
2469
|
{
|
|
2394
2470
|
jsonKey: "key",
|
|
2471
|
+
exportJsonKey: { key: "$" },
|
|
2395
2472
|
tags: [
|
|
2396
2473
|
{
|
|
2397
2474
|
key: ConfigKey.group_standardTags,
|
|
@@ -2400,12 +2477,15 @@ var CARDSETS = {
|
|
|
2400
2477
|
{
|
|
2401
2478
|
key: ConfigKey.tag_title,
|
|
2402
2479
|
description: "Title of the audio match pair.",
|
|
2403
|
-
|
|
2480
|
+
format: TagFormat.plainText,
|
|
2481
|
+
jsonKey: "^heading.forKeys",
|
|
2482
|
+
exportJsonKey: { "@bit": { heading: { forKeys: "$" } } }
|
|
2404
2483
|
},
|
|
2405
2484
|
{
|
|
2406
2485
|
key: ConfigKey.resource_audio,
|
|
2407
2486
|
description: "Audio resource for the match pair.",
|
|
2408
|
-
jsonKey: "keyAudio"
|
|
2487
|
+
jsonKey: "keyAudio",
|
|
2488
|
+
exportJsonKey: { keyAudio: "$" }
|
|
2409
2489
|
}
|
|
2410
2490
|
]
|
|
2411
2491
|
}
|
|
@@ -2417,6 +2497,7 @@ var CARDSETS = {
|
|
|
2417
2497
|
variants: [
|
|
2418
2498
|
{
|
|
2419
2499
|
jsonKey: "values[]",
|
|
2500
|
+
exportJsonKey: { values: ["$"] },
|
|
2420
2501
|
tags: [
|
|
2421
2502
|
{
|
|
2422
2503
|
key: ConfigKey.group_standardTags,
|
|
@@ -2425,7 +2506,9 @@ var CARDSETS = {
|
|
|
2425
2506
|
{
|
|
2426
2507
|
key: ConfigKey.tag_title,
|
|
2427
2508
|
description: "Title of the audio match pair.",
|
|
2428
|
-
|
|
2509
|
+
format: TagFormat.plainText,
|
|
2510
|
+
jsonKey: "^heading.forValues",
|
|
2511
|
+
exportJsonKey: { "@bit": { heading: { forValues: "$" } } }
|
|
2429
2512
|
},
|
|
2430
2513
|
{
|
|
2431
2514
|
key: ConfigKey.resource_audio,
|
|
@@ -2443,12 +2526,14 @@ var CARDSETS = {
|
|
|
2443
2526
|
//
|
|
2444
2527
|
[CardSetConfigKey.matchImagePairs]: {
|
|
2445
2528
|
jsonKey: "pairs",
|
|
2529
|
+
exportJsonKey: { pairs: "$" },
|
|
2446
2530
|
sides: [
|
|
2447
2531
|
{
|
|
2448
2532
|
name: "key",
|
|
2449
2533
|
variants: [
|
|
2450
2534
|
{
|
|
2451
2535
|
jsonKey: "key",
|
|
2536
|
+
exportJsonKey: { key: "$" },
|
|
2452
2537
|
tags: [
|
|
2453
2538
|
{
|
|
2454
2539
|
key: ConfigKey.group_standardTags,
|
|
@@ -2457,12 +2542,15 @@ var CARDSETS = {
|
|
|
2457
2542
|
{
|
|
2458
2543
|
key: ConfigKey.tag_title,
|
|
2459
2544
|
description: "Title of the image match pair.",
|
|
2460
|
-
|
|
2545
|
+
format: TagFormat.plainText,
|
|
2546
|
+
jsonKey: "^heading.forKeys",
|
|
2547
|
+
exportJsonKey: { "@bit": { heading: { forKeys: "$" } } }
|
|
2461
2548
|
},
|
|
2462
2549
|
{
|
|
2463
2550
|
key: ConfigKey.resource_image,
|
|
2464
2551
|
description: "Image resource for the match pair.",
|
|
2465
|
-
jsonKey: "keyImage"
|
|
2552
|
+
jsonKey: "keyImage",
|
|
2553
|
+
exportJsonKey: { keyImage: "$" }
|
|
2466
2554
|
}
|
|
2467
2555
|
]
|
|
2468
2556
|
}
|
|
@@ -2474,6 +2562,7 @@ var CARDSETS = {
|
|
|
2474
2562
|
variants: [
|
|
2475
2563
|
{
|
|
2476
2564
|
jsonKey: "values[]",
|
|
2565
|
+
exportJsonKey: { values: ["$"] },
|
|
2477
2566
|
tags: [
|
|
2478
2567
|
{
|
|
2479
2568
|
key: ConfigKey.group_standardTags,
|
|
@@ -2482,7 +2571,9 @@ var CARDSETS = {
|
|
|
2482
2571
|
{
|
|
2483
2572
|
key: ConfigKey.tag_title,
|
|
2484
2573
|
description: "Title of the image match pair.",
|
|
2485
|
-
|
|
2574
|
+
format: TagFormat.plainText,
|
|
2575
|
+
jsonKey: "^heading.forValues",
|
|
2576
|
+
exportJsonKey: { "@bit": { heading: { forValues: "$" } } }
|
|
2486
2577
|
},
|
|
2487
2578
|
{
|
|
2488
2579
|
key: ConfigKey.resource_image,
|
|
@@ -2500,12 +2591,14 @@ var CARDSETS = {
|
|
|
2500
2591
|
//
|
|
2501
2592
|
[CardSetConfigKey.matchMatrix]: {
|
|
2502
2593
|
jsonKey: "matrix",
|
|
2594
|
+
exportJsonKey: { matrix: "$" },
|
|
2503
2595
|
sides: [
|
|
2504
2596
|
{
|
|
2505
2597
|
name: "key",
|
|
2506
2598
|
variants: [
|
|
2507
2599
|
{
|
|
2508
2600
|
jsonKey: "key",
|
|
2601
|
+
exportJsonKey: { key: "$" },
|
|
2509
2602
|
tags: [
|
|
2510
2603
|
{
|
|
2511
2604
|
key: ConfigKey.group_standardItemLeadInstructionHint,
|
|
@@ -2513,16 +2606,27 @@ var CARDSETS = {
|
|
|
2513
2606
|
},
|
|
2514
2607
|
{
|
|
2515
2608
|
key: ConfigKey.property_example,
|
|
2609
|
+
exportJsonKey: [
|
|
2610
|
+
{ "@keyonly": { isExample: true, "@bit": { isExample: true } } },
|
|
2611
|
+
{ "@absent": { isExample: true, "@bit": { isExample: true } } },
|
|
2612
|
+
{ isExample: true, example: "$", "@bit": { isExample: true } }
|
|
2613
|
+
],
|
|
2516
2614
|
description: "Example text for the match matrix.",
|
|
2517
2615
|
format: TagFormat.plainText
|
|
2518
2616
|
},
|
|
2519
2617
|
{
|
|
2520
2618
|
key: ConfigKey.tag_title,
|
|
2521
2619
|
description: "Title of the match matrix.",
|
|
2522
|
-
|
|
2620
|
+
format: TagFormat.plainText,
|
|
2621
|
+
jsonKey: "^heading.forKeys",
|
|
2622
|
+
exportJsonKey: { "@bit": { heading: { forKeys: "$" } } }
|
|
2523
2623
|
},
|
|
2524
2624
|
{
|
|
2525
2625
|
key: ConfigKey.property_isCaseSensitive,
|
|
2626
|
+
exportJsonKey: [
|
|
2627
|
+
{ "@absent": { isCaseSensitive: "$ancestor" } },
|
|
2628
|
+
{ isCaseSensitive: "$" }
|
|
2629
|
+
],
|
|
2526
2630
|
description: "Property to indicate if the match is case sensitive.",
|
|
2527
2631
|
format: TagFormat.boolean
|
|
2528
2632
|
}
|
|
@@ -2536,6 +2640,7 @@ var CARDSETS = {
|
|
|
2536
2640
|
variants: [
|
|
2537
2641
|
{
|
|
2538
2642
|
jsonKey: "cells[{s}].values[]",
|
|
2643
|
+
exportJsonKey: { cells: { $s: { values: ["$"] } } },
|
|
2539
2644
|
tags: [
|
|
2540
2645
|
{
|
|
2541
2646
|
key: ConfigKey.group_standardItemLeadInstructionHint,
|
|
@@ -2543,16 +2648,34 @@ var CARDSETS = {
|
|
|
2543
2648
|
},
|
|
2544
2649
|
{
|
|
2545
2650
|
key: ConfigKey.property_example,
|
|
2651
|
+
exportJsonKey: [
|
|
2652
|
+
{
|
|
2653
|
+
"@keyonly": {
|
|
2654
|
+
cells: { $s: { isExample: true, example: "$parent.values[0]" } },
|
|
2655
|
+
"@bit": { isExample: true }
|
|
2656
|
+
}
|
|
2657
|
+
},
|
|
2658
|
+
{
|
|
2659
|
+
"@absent": { cells: { $s: { isExample: true, example: "$parent.values[0]" } } }
|
|
2660
|
+
},
|
|
2661
|
+
{ cells: { $s: { isExample: true, example: "$" } }, "@bit": { isExample: true } }
|
|
2662
|
+
],
|
|
2546
2663
|
description: "Example text for the match matrix.",
|
|
2547
2664
|
format: TagFormat.plainText
|
|
2548
2665
|
},
|
|
2549
2666
|
{
|
|
2550
2667
|
key: ConfigKey.tag_title,
|
|
2551
2668
|
description: "Title of the match matrix.",
|
|
2552
|
-
|
|
2669
|
+
format: TagFormat.plainText,
|
|
2670
|
+
jsonKey: "^heading.forValues",
|
|
2671
|
+
exportJsonKey: { "@bit": { heading: { forValues: "$" } } }
|
|
2553
2672
|
},
|
|
2554
2673
|
{
|
|
2555
2674
|
key: ConfigKey.property_isCaseSensitive,
|
|
2675
|
+
exportJsonKey: [
|
|
2676
|
+
{ "@absent": { isCaseSensitive: "$ancestor" } },
|
|
2677
|
+
{ isCaseSensitive: "$" }
|
|
2678
|
+
],
|
|
2556
2679
|
description: "Property to indicate if the match is case sensitive.",
|
|
2557
2680
|
format: TagFormat.boolean
|
|
2558
2681
|
}
|
|
@@ -2568,23 +2691,27 @@ var CARDSETS = {
|
|
|
2568
2691
|
//
|
|
2569
2692
|
[CardSetConfigKey.statements]: {
|
|
2570
2693
|
jsonKey: "statements",
|
|
2694
|
+
exportJsonKey: { statements: "$" },
|
|
2571
2695
|
sides: [
|
|
2572
2696
|
{
|
|
2573
2697
|
name: "statement",
|
|
2574
2698
|
variants: [
|
|
2575
2699
|
{
|
|
2576
2700
|
jsonKey: "statement",
|
|
2701
|
+
exportJsonKey: { statement: "$" },
|
|
2577
2702
|
tags: [
|
|
2578
2703
|
{
|
|
2579
2704
|
key: ConfigKey.tag_true,
|
|
2580
2705
|
description: "Tag for true statements.",
|
|
2581
2706
|
jsonKey: "statement|set(isCorrect=true)",
|
|
2707
|
+
exportJsonKey: { statement: "$", isCorrect: true },
|
|
2582
2708
|
maxCount: 1
|
|
2583
2709
|
},
|
|
2584
2710
|
{
|
|
2585
2711
|
key: ConfigKey.tag_false,
|
|
2586
2712
|
description: "Tag for false statements.",
|
|
2587
2713
|
jsonKey: "statement|set(isCorrect=false)",
|
|
2714
|
+
exportJsonKey: { statement: "$", isCorrect: false },
|
|
2588
2715
|
maxCount: 1
|
|
2589
2716
|
},
|
|
2590
2717
|
{
|
|
@@ -2603,6 +2730,7 @@ var CARDSETS = {
|
|
|
2603
2730
|
//
|
|
2604
2731
|
[CardSetConfigKey.quiz]: {
|
|
2605
2732
|
jsonKey: "quizzes",
|
|
2733
|
+
exportJsonKey: { quizzes: "$" },
|
|
2606
2734
|
sides: [
|
|
2607
2735
|
{
|
|
2608
2736
|
name: "choices",
|
|
@@ -2630,6 +2758,7 @@ var CARDSETS = {
|
|
|
2630
2758
|
//
|
|
2631
2759
|
[CardSetConfigKey.feedback]: {
|
|
2632
2760
|
jsonKey: "feedbacks",
|
|
2761
|
+
exportJsonKey: { feedbacks: "$" },
|
|
2633
2762
|
sides: [
|
|
2634
2763
|
{
|
|
2635
2764
|
name: "choices",
|
|
@@ -2648,7 +2777,9 @@ var CARDSETS = {
|
|
|
2648
2777
|
{
|
|
2649
2778
|
key: ConfigKey.tag_title,
|
|
2650
2779
|
description: "Title of the feedback.",
|
|
2651
|
-
|
|
2780
|
+
format: TagFormat.plainText,
|
|
2781
|
+
jsonKey: "^heading.forKeys",
|
|
2782
|
+
exportJsonKey: { "@bit": { heading: { forKeys: "$" } } }
|
|
2652
2783
|
}
|
|
2653
2784
|
],
|
|
2654
2785
|
bodyAllowed: false
|
|
@@ -2660,6 +2791,7 @@ var CARDSETS = {
|
|
|
2660
2791
|
variants: [
|
|
2661
2792
|
{
|
|
2662
2793
|
jsonKey: "reason.text",
|
|
2794
|
+
exportJsonKey: { reason: { text: "$" } },
|
|
2663
2795
|
tags: [
|
|
2664
2796
|
{
|
|
2665
2797
|
key: ConfigKey.group_standardItemLeadInstructionHint,
|
|
@@ -2667,18 +2799,29 @@ var CARDSETS = {
|
|
|
2667
2799
|
},
|
|
2668
2800
|
{
|
|
2669
2801
|
key: ConfigKey.property_reasonableNumOfChars,
|
|
2802
|
+
exportJsonKey: [
|
|
2803
|
+
{ "@absent": { reasonableNumOfChars: "$ancestor" } },
|
|
2804
|
+
{ reasonableNumOfChars: "$" }
|
|
2805
|
+
],
|
|
2670
2806
|
description: "Property for reasonable number of characters.",
|
|
2671
2807
|
format: TagFormat.number
|
|
2672
2808
|
},
|
|
2673
2809
|
{
|
|
2674
2810
|
key: ConfigKey.property_example,
|
|
2811
|
+
exportJsonKey: [
|
|
2812
|
+
{ "@keyonly": { isExample: true, example: true, "@bit": { isExample: true } } },
|
|
2813
|
+
{ "@absent": { isExample: true, example: true, "@bit": { isExample: true } } },
|
|
2814
|
+
{ isExample: true, example: "$", "@bit": { isExample: true } }
|
|
2815
|
+
],
|
|
2675
2816
|
description: "Example text for the feedback.",
|
|
2676
2817
|
format: TagFormat.plainText
|
|
2677
2818
|
},
|
|
2678
2819
|
{
|
|
2679
2820
|
key: ConfigKey.tag_title,
|
|
2680
2821
|
description: "Title of the feedback.",
|
|
2681
|
-
|
|
2822
|
+
format: TagFormat.plainText,
|
|
2823
|
+
jsonKey: "^heading.forValues",
|
|
2824
|
+
exportJsonKey: { "@bit": { heading: { forValues: "$" } } }
|
|
2682
2825
|
}
|
|
2683
2826
|
],
|
|
2684
2827
|
bodyAllowed: true
|
|
@@ -2692,21 +2835,29 @@ var CARDSETS = {
|
|
|
2692
2835
|
//
|
|
2693
2836
|
[CardSetConfigKey.questions]: {
|
|
2694
2837
|
jsonKey: "questions",
|
|
2838
|
+
exportJsonKey: { questions: "$" },
|
|
2695
2839
|
sides: [
|
|
2696
2840
|
{
|
|
2697
2841
|
name: "question",
|
|
2698
2842
|
variants: [
|
|
2699
2843
|
{
|
|
2700
2844
|
jsonKey: "question",
|
|
2845
|
+
exportJsonKey: { question: "$" },
|
|
2701
2846
|
tags: [
|
|
2702
2847
|
{
|
|
2703
2848
|
key: ConfigKey.property_reasonableNumOfChars,
|
|
2849
|
+
exportJsonKey: [
|
|
2850
|
+
{ "@absent": { reasonableNumOfChars: "$ancestor" } },
|
|
2851
|
+
{ reasonableNumOfChars: "$" }
|
|
2852
|
+
],
|
|
2704
2853
|
description: "Property for reasonable number of characters.",
|
|
2705
2854
|
format: TagFormat.number
|
|
2706
2855
|
},
|
|
2707
2856
|
{
|
|
2857
|
+
exportJsonKey: { sampleSolution: "$" },
|
|
2708
2858
|
key: ConfigKey.tag_sampleSolution,
|
|
2709
|
-
description: "Sample solution for the question."
|
|
2859
|
+
description: "Sample solution for the question.",
|
|
2860
|
+
format: TagFormat.plainText
|
|
2710
2861
|
},
|
|
2711
2862
|
{
|
|
2712
2863
|
key: ConfigKey.property_sampleSolution,
|
|
@@ -2746,6 +2897,7 @@ var CARDSETS = {
|
|
|
2746
2897
|
variants: [
|
|
2747
2898
|
{
|
|
2748
2899
|
jsonKey: "elements[]",
|
|
2900
|
+
exportJsonKey: { elements: ["$"] },
|
|
2749
2901
|
tags: [
|
|
2750
2902
|
{
|
|
2751
2903
|
key: ConfigKey.group_standardItemLeadInstructionHint,
|
|
@@ -2753,6 +2905,11 @@ var CARDSETS = {
|
|
|
2753
2905
|
},
|
|
2754
2906
|
{
|
|
2755
2907
|
key: ConfigKey.property_example,
|
|
2908
|
+
exportJsonKey: [
|
|
2909
|
+
{ "@keyonly": { isExample: true, example: true, "@bit": { isExample: true } } },
|
|
2910
|
+
{ "@absent": { isExample: true, example: true, "@bit": { isExample: true } } },
|
|
2911
|
+
{ isExample: true, example: "$", "@bit": { isExample: true } }
|
|
2912
|
+
],
|
|
2756
2913
|
description: "Example text for the element.",
|
|
2757
2914
|
format: TagFormat.plainText
|
|
2758
2915
|
}
|
|
@@ -2768,6 +2925,7 @@ var CARDSETS = {
|
|
|
2768
2925
|
//
|
|
2769
2926
|
[CardSetConfigKey.table]: {
|
|
2770
2927
|
jsonKey: "table.data",
|
|
2928
|
+
exportJsonKey: { table: { data: "$" } },
|
|
2771
2929
|
sides: [
|
|
2772
2930
|
{
|
|
2773
2931
|
name: "cell",
|
|
@@ -2783,6 +2941,7 @@ var CARDSETS = {
|
|
|
2783
2941
|
{
|
|
2784
2942
|
key: ConfigKey.tag_title,
|
|
2785
2943
|
jsonKey: "^table.columns[]",
|
|
2944
|
+
exportJsonKey: { "@bit": { table: { columns: ["$"] } } },
|
|
2786
2945
|
description: "Title of the table."
|
|
2787
2946
|
},
|
|
2788
2947
|
{
|
|
@@ -2823,18 +2982,34 @@ var CARDSETS = {
|
|
|
2823
2982
|
[CardSetConfigKey.tableExtended]: {
|
|
2824
2983
|
jsonKey: null,
|
|
2825
2984
|
sections: {
|
|
2826
|
-
"table-header": {
|
|
2827
|
-
|
|
2828
|
-
|
|
2985
|
+
"table-header": {
|
|
2986
|
+
jsonKey: "table.header.rows",
|
|
2987
|
+
exportJsonKey: { table: { header: { rows: "$" } } },
|
|
2988
|
+
sideJsonKey: "cells[{s}]|set(title=true)",
|
|
2989
|
+
sideExportJsonKey: { cells: { $s: { title: true, $: "$" } } }
|
|
2990
|
+
},
|
|
2991
|
+
"table-body": {
|
|
2992
|
+
jsonKey: "table.body.rows",
|
|
2993
|
+
exportJsonKey: { table: { body: { rows: "$" } } },
|
|
2994
|
+
isDefault: true
|
|
2995
|
+
},
|
|
2996
|
+
"table-footer": {
|
|
2997
|
+
jsonKey: "table.footer.rows",
|
|
2998
|
+
exportJsonKey: { table: { footer: { rows: "$" } } },
|
|
2999
|
+
sideJsonKey: "cells[{s}]|set(title=true)",
|
|
3000
|
+
sideExportJsonKey: { cells: { $s: { title: true, $: "$" } } }
|
|
3001
|
+
}
|
|
2829
3002
|
},
|
|
2830
3003
|
sides: [
|
|
2831
3004
|
{
|
|
2832
3005
|
name: "cell",
|
|
2833
3006
|
repeat: true,
|
|
2834
3007
|
jsonKey: "cells[{s}]",
|
|
3008
|
+
exportJsonKey: { cells: { $s: "$" } },
|
|
2835
3009
|
variants: [
|
|
2836
3010
|
{
|
|
2837
3011
|
jsonKey: "content",
|
|
3012
|
+
exportJsonKey: { content: "$" },
|
|
2838
3013
|
tags: [
|
|
2839
3014
|
{
|
|
2840
3015
|
key: ConfigKey.group_standardItemLeadInstructionHint,
|
|
@@ -2843,29 +3018,38 @@ var CARDSETS = {
|
|
|
2843
3018
|
{
|
|
2844
3019
|
key: ConfigKey.tag_title,
|
|
2845
3020
|
jsonKey: ".",
|
|
3021
|
+
exportJsonKey: {
|
|
3022
|
+
"@bit": {
|
|
3023
|
+
table: { header: { rows: { cells: { cells: { $s: { content: "$" } } } } } }
|
|
3024
|
+
}
|
|
3025
|
+
},
|
|
2846
3026
|
description: "Title of the table cell."
|
|
2847
3027
|
},
|
|
2848
3028
|
{
|
|
2849
3029
|
key: ConfigKey.property_tableCellType,
|
|
2850
3030
|
jsonKey: "title|bool(th)",
|
|
3031
|
+
exportJsonKey: [{ "@value=th": { title: true } }],
|
|
2851
3032
|
description: "Table cell type (th/td).",
|
|
2852
3033
|
format: TagFormat.plainText
|
|
2853
3034
|
},
|
|
2854
3035
|
{
|
|
2855
3036
|
key: ConfigKey.property_tableRowSpan,
|
|
2856
3037
|
jsonKey: "rowspan",
|
|
3038
|
+
exportJsonKey: { rowspan: "$" },
|
|
2857
3039
|
description: "Number of rows the cell spans.",
|
|
2858
3040
|
format: TagFormat.number
|
|
2859
3041
|
},
|
|
2860
3042
|
{
|
|
2861
3043
|
key: ConfigKey.property_tableColSpan,
|
|
2862
3044
|
jsonKey: "colspan",
|
|
3045
|
+
exportJsonKey: { colspan: "$" },
|
|
2863
3046
|
description: "Number of columns the cell spans.",
|
|
2864
3047
|
format: TagFormat.number
|
|
2865
3048
|
},
|
|
2866
3049
|
{
|
|
2867
3050
|
key: ConfigKey.property_tableScope,
|
|
2868
3051
|
jsonKey: "scope",
|
|
3052
|
+
exportJsonKey: { scope: "$" },
|
|
2869
3053
|
description: "Scope attribute for header cells.",
|
|
2870
3054
|
format: TagFormat.plainText
|
|
2871
3055
|
},
|
|
@@ -2886,6 +3070,7 @@ var CARDSETS = {
|
|
|
2886
3070
|
//
|
|
2887
3071
|
[CardSetConfigKey.pronunciationTable]: {
|
|
2888
3072
|
jsonKey: "pronunciationTable.data",
|
|
3073
|
+
exportJsonKey: { pronunciationTable: { data: "$" } },
|
|
2889
3074
|
sides: [
|
|
2890
3075
|
{
|
|
2891
3076
|
name: "cell",
|
|
@@ -2893,12 +3078,14 @@ var CARDSETS = {
|
|
|
2893
3078
|
variants: [
|
|
2894
3079
|
{
|
|
2895
3080
|
jsonKey: "body",
|
|
3081
|
+
exportJsonKey: { body: "$" },
|
|
2896
3082
|
tags: [
|
|
2897
3083
|
{
|
|
2898
3084
|
key: ConfigKey.group_standardItemLeadInstructionHint,
|
|
2899
3085
|
description: "Standard tags for lead, instruction, and hint."
|
|
2900
3086
|
},
|
|
2901
3087
|
{
|
|
3088
|
+
exportJsonKey: { title: "$" },
|
|
2902
3089
|
key: ConfigKey.tag_title,
|
|
2903
3090
|
description: "Title of the pronunciation table."
|
|
2904
3091
|
},
|
|
@@ -2919,12 +3106,15 @@ var CARDSETS = {
|
|
|
2919
3106
|
//
|
|
2920
3107
|
[CardSetConfigKey.botActionResponses]: {
|
|
2921
3108
|
jsonKey: "responses",
|
|
3109
|
+
exportJsonKey: { responses: "$" },
|
|
2922
3110
|
sides: [
|
|
2923
3111
|
{
|
|
2924
3112
|
name: "response",
|
|
2925
3113
|
variants: [
|
|
2926
3114
|
{
|
|
2927
3115
|
jsonKey: "feedback",
|
|
3116
|
+
exportJsonKey: { feedback: "$" },
|
|
3117
|
+
format: TextFormat2.plainText,
|
|
2928
3118
|
tags: [
|
|
2929
3119
|
{
|
|
2930
3120
|
key: ConfigKey.property_reaction,
|
|
@@ -2932,16 +3122,53 @@ var CARDSETS = {
|
|
|
2932
3122
|
format: TagFormat.plainText
|
|
2933
3123
|
},
|
|
2934
3124
|
{
|
|
2935
|
-
key: ConfigKey.
|
|
2936
|
-
|
|
3125
|
+
key: ConfigKey.tag_item,
|
|
3126
|
+
jsonKey: "item",
|
|
3127
|
+
exportJsonKey: { item: "$" },
|
|
3128
|
+
format: TagFormat.plainText,
|
|
3129
|
+
description: "The item for the bit",
|
|
3130
|
+
chain: [
|
|
3131
|
+
{
|
|
3132
|
+
key: ConfigKey.tag_item,
|
|
3133
|
+
jsonKey: "lead",
|
|
3134
|
+
exportJsonKey: { lead: "$" },
|
|
3135
|
+
description: "The lead for the bit",
|
|
3136
|
+
maxCount: 1,
|
|
3137
|
+
chain: [
|
|
3138
|
+
{
|
|
3139
|
+
key: ConfigKey.tag_item,
|
|
3140
|
+
jsonKey: "pageNumber",
|
|
3141
|
+
exportJsonKey: { pageNumber: "$" },
|
|
3142
|
+
description: "The page number for the bit",
|
|
3143
|
+
maxCount: 1,
|
|
3144
|
+
chain: [
|
|
3145
|
+
{
|
|
3146
|
+
key: ConfigKey.tag_item,
|
|
3147
|
+
jsonKey: "marginNumber",
|
|
3148
|
+
exportJsonKey: { marginNumber: "$" },
|
|
3149
|
+
description: "The margin number for the bit",
|
|
3150
|
+
maxCount: 1
|
|
3151
|
+
}
|
|
3152
|
+
]
|
|
3153
|
+
}
|
|
3154
|
+
]
|
|
3155
|
+
}
|
|
3156
|
+
]
|
|
2937
3157
|
},
|
|
2938
3158
|
{
|
|
2939
3159
|
key: ConfigKey.tag_instruction,
|
|
2940
3160
|
description: "The response label for the bot action.",
|
|
2941
|
-
jsonKey: "response"
|
|
3161
|
+
jsonKey: "response",
|
|
3162
|
+
exportJsonKey: { response: "$" },
|
|
3163
|
+
format: TagFormat.plainText
|
|
2942
3164
|
},
|
|
2943
3165
|
{
|
|
2944
3166
|
key: ConfigKey.property_example,
|
|
3167
|
+
exportJsonKey: [
|
|
3168
|
+
{ "@keyonly": { isExample: true, example: true, "@bit": { isExample: true } } },
|
|
3169
|
+
{ "@absent": { isExample: true, example: true, "@bit": { isExample: true } } },
|
|
3170
|
+
{ isExample: true, example: "$", "@bit": { isExample: true } }
|
|
3171
|
+
],
|
|
2945
3172
|
description: "Example text for the bot action response.",
|
|
2946
3173
|
format: TagFormat.plainText
|
|
2947
3174
|
}
|
|
@@ -2956,12 +3183,14 @@ var CARDSETS = {
|
|
|
2956
3183
|
//
|
|
2957
3184
|
[CardSetConfigKey.clozeList]: {
|
|
2958
3185
|
jsonKey: "listItems",
|
|
3186
|
+
exportJsonKey: { listItems: "$" },
|
|
2959
3187
|
sides: [
|
|
2960
3188
|
{
|
|
2961
3189
|
name: "content",
|
|
2962
3190
|
variants: [
|
|
2963
3191
|
{
|
|
2964
3192
|
jsonKey: "body",
|
|
3193
|
+
exportJsonKey: { body: "$" },
|
|
2965
3194
|
tags: [
|
|
2966
3195
|
{
|
|
2967
3196
|
key: ConfigKey.group_standardTags,
|
|
@@ -2982,18 +3211,21 @@ var CARDSETS = {
|
|
|
2982
3211
|
//
|
|
2983
3212
|
[CardSetConfigKey.exampleBitList]: {
|
|
2984
3213
|
jsonKey: "listItems",
|
|
3214
|
+
exportJsonKey: { listItems: "$" },
|
|
2985
3215
|
sides: [
|
|
2986
3216
|
{
|
|
2987
3217
|
name: "item",
|
|
2988
3218
|
variants: [
|
|
2989
3219
|
{
|
|
2990
3220
|
jsonKey: "body",
|
|
3221
|
+
exportJsonKey: { body: "$" },
|
|
2991
3222
|
tags: [
|
|
2992
3223
|
{
|
|
2993
3224
|
key: ConfigKey.group_standardTags,
|
|
2994
3225
|
description: "Standard tags for example bits."
|
|
2995
3226
|
},
|
|
2996
3227
|
{
|
|
3228
|
+
exportJsonKey: { title: "$" },
|
|
2997
3229
|
key: ConfigKey.tag_title,
|
|
2998
3230
|
description: "Title of the example bit."
|
|
2999
3231
|
}
|
|
@@ -3008,28 +3240,35 @@ var CARDSETS = {
|
|
|
3008
3240
|
//
|
|
3009
3241
|
[CardSetConfigKey.ingredients]: {
|
|
3010
3242
|
jsonKey: "ingredients",
|
|
3243
|
+
exportJsonKey: { ingredients: "$" },
|
|
3011
3244
|
sides: [
|
|
3012
3245
|
{
|
|
3013
3246
|
name: "ingredient",
|
|
3014
3247
|
variants: [
|
|
3015
3248
|
{
|
|
3016
3249
|
jsonKey: "ingredient",
|
|
3250
|
+
exportJsonKey: { ingredient: "$" },
|
|
3017
3251
|
tags: [
|
|
3018
3252
|
{
|
|
3253
|
+
exportJsonKey: { title: "$" },
|
|
3019
3254
|
key: ConfigKey.tag_title,
|
|
3020
3255
|
description: "Title of the ingredient."
|
|
3021
3256
|
},
|
|
3022
3257
|
{
|
|
3023
3258
|
key: ConfigKey.tag_true,
|
|
3024
3259
|
description: "Checked state for the ingredient.",
|
|
3025
|
-
jsonKey: "
|
|
3260
|
+
jsonKey: "|set(checked=true)",
|
|
3261
|
+
exportJsonKey: { checked: true, $: "$" },
|
|
3026
3262
|
maxCount: 1
|
|
3263
|
+
// nullable: true,
|
|
3027
3264
|
},
|
|
3028
3265
|
{
|
|
3029
3266
|
key: ConfigKey.tag_false,
|
|
3030
3267
|
description: "Unchecked state for the ingredient.",
|
|
3031
|
-
jsonKey: "
|
|
3268
|
+
jsonKey: "|set(checked=false)",
|
|
3269
|
+
exportJsonKey: { checked: false, $: "$" },
|
|
3032
3270
|
maxCount: 1
|
|
3271
|
+
// nullable: true,
|
|
3033
3272
|
},
|
|
3034
3273
|
{
|
|
3035
3274
|
key: ConfigKey.group_standardItemLead,
|
|
@@ -3038,9 +3277,12 @@ var CARDSETS = {
|
|
|
3038
3277
|
{
|
|
3039
3278
|
key: ConfigKey.tag_instruction,
|
|
3040
3279
|
description: "The quantity of the ingredient.",
|
|
3041
|
-
jsonKey: "quantity"
|
|
3280
|
+
jsonKey: "quantity",
|
|
3281
|
+
exportJsonKey: { quantity: "$" },
|
|
3282
|
+
format: TagFormat.number
|
|
3042
3283
|
},
|
|
3043
3284
|
{
|
|
3285
|
+
exportJsonKey: { hint: "$" },
|
|
3044
3286
|
key: ConfigKey.tag_hint,
|
|
3045
3287
|
description: "The hint for the ingredient."
|
|
3046
3288
|
},
|
|
@@ -3076,6 +3318,7 @@ var CARDSETS = {
|
|
|
3076
3318
|
//
|
|
3077
3319
|
[CardSetConfigKey.bookReferenceList]: {
|
|
3078
3320
|
jsonKey: "bookReferences",
|
|
3321
|
+
exportJsonKey: { bookReferences: "$" },
|
|
3079
3322
|
sides: [
|
|
3080
3323
|
{
|
|
3081
3324
|
name: "reference",
|
|
@@ -3135,6 +3378,11 @@ var GROUPS = {
|
|
|
3135
3378
|
format: TagFormat.plainText,
|
|
3136
3379
|
maxCount: Count.infinity
|
|
3137
3380
|
},
|
|
3381
|
+
{
|
|
3382
|
+
key: ConfigKey.property_gUri,
|
|
3383
|
+
description: "Global URI for the bit",
|
|
3384
|
+
format: TagFormat.plainText
|
|
3385
|
+
},
|
|
3138
3386
|
{
|
|
3139
3387
|
key: ConfigKey.property_customerId,
|
|
3140
3388
|
description: "The customer-specific identifier for the bit",
|
|
@@ -3318,12 +3566,14 @@ var GROUPS = {
|
|
|
3318
3566
|
{
|
|
3319
3567
|
key: ConfigKey.property_groupTag,
|
|
3320
3568
|
jsonKey: "groupTag.name",
|
|
3569
|
+
exportJsonKey: { groupTag: { name: "$" } },
|
|
3321
3570
|
description: "The group tag(s) for the bit",
|
|
3322
3571
|
format: TagFormat.plainText,
|
|
3323
3572
|
maxCount: Count.infinity,
|
|
3324
3573
|
chain: [
|
|
3325
3574
|
{
|
|
3326
3575
|
key: ConfigKey.property_tag,
|
|
3576
|
+
exportJsonKey: { tags: ["$"] },
|
|
3327
3577
|
description: "The tag(s) for the group",
|
|
3328
3578
|
format: TagFormat.plainText,
|
|
3329
3579
|
maxCount: Count.infinity
|
|
@@ -3354,6 +3604,12 @@ var GROUPS = {
|
|
|
3354
3604
|
format: TagFormat.plainText,
|
|
3355
3605
|
maxCount: Count.infinity
|
|
3356
3606
|
},
|
|
3607
|
+
{
|
|
3608
|
+
key: ConfigKey.property_sourceBB,
|
|
3609
|
+
description: "The source bounding box(es) for the bit (x, y, x1, y1)",
|
|
3610
|
+
format: TagFormat.coordinates,
|
|
3611
|
+
maxCount: Count.infinity
|
|
3612
|
+
},
|
|
3357
3613
|
{
|
|
3358
3614
|
key: ConfigKey.property_levelCEFRp,
|
|
3359
3615
|
description: "The CEFRp level for the bit",
|
|
@@ -3391,8 +3647,10 @@ var GROUPS = {
|
|
|
3391
3647
|
maxCount: Count.infinity
|
|
3392
3648
|
},
|
|
3393
3649
|
{
|
|
3650
|
+
exportJsonKey: { anchor: "$" },
|
|
3394
3651
|
key: ConfigKey.tag_anchor,
|
|
3395
3652
|
name: "Anchor",
|
|
3653
|
+
format: TagFormat.plainText,
|
|
3396
3654
|
description: "The anchor for the bit"
|
|
3397
3655
|
},
|
|
3398
3656
|
{
|
|
@@ -3427,23 +3685,27 @@ var GROUPS = {
|
|
|
3427
3685
|
{
|
|
3428
3686
|
key: ConfigKey.tag_item,
|
|
3429
3687
|
jsonKey: "item",
|
|
3688
|
+
exportJsonKey: { item: "$" },
|
|
3430
3689
|
description: "The item for the bit",
|
|
3431
3690
|
chain: [
|
|
3432
3691
|
{
|
|
3433
3692
|
key: ConfigKey.tag_item,
|
|
3434
3693
|
jsonKey: "lead",
|
|
3694
|
+
exportJsonKey: { lead: "$" },
|
|
3435
3695
|
description: "The lead for the bit",
|
|
3436
3696
|
maxCount: 1,
|
|
3437
3697
|
chain: [
|
|
3438
3698
|
{
|
|
3439
3699
|
key: ConfigKey.tag_item,
|
|
3440
3700
|
jsonKey: "pageNumber",
|
|
3701
|
+
exportJsonKey: { pageNumber: "$" },
|
|
3441
3702
|
description: "The page number for the bit",
|
|
3442
3703
|
maxCount: 1,
|
|
3443
3704
|
chain: [
|
|
3444
3705
|
{
|
|
3445
3706
|
key: ConfigKey.tag_item,
|
|
3446
3707
|
jsonKey: "marginNumber",
|
|
3708
|
+
exportJsonKey: { marginNumber: "$" },
|
|
3447
3709
|
description: "The margin number for the bit",
|
|
3448
3710
|
maxCount: 1
|
|
3449
3711
|
}
|
|
@@ -3464,11 +3726,13 @@ var GROUPS = {
|
|
|
3464
3726
|
description: "Item, lead, page number, and margin number tags"
|
|
3465
3727
|
},
|
|
3466
3728
|
{
|
|
3729
|
+
exportJsonKey: { instruction: "$" },
|
|
3467
3730
|
key: ConfigKey.tag_instruction,
|
|
3468
3731
|
name: "Instruction",
|
|
3469
3732
|
description: "The instruction for the bit"
|
|
3470
3733
|
},
|
|
3471
3734
|
{
|
|
3735
|
+
exportJsonKey: { hint: "$" },
|
|
3472
3736
|
key: ConfigKey.tag_hint,
|
|
3473
3737
|
name: "Hint",
|
|
3474
3738
|
description: "The hint for the bit"
|
|
@@ -3488,9 +3752,17 @@ var GROUPS = {
|
|
|
3488
3752
|
description: "Item, lead, page number, margin number, instruction and hint tags"
|
|
3489
3753
|
},
|
|
3490
3754
|
{
|
|
3755
|
+
// Bit-level example tag: bare/synthesized records the marker only;
|
|
3756
|
+
// valued [@example:text] emits `isExample: true` and `example` as
|
|
3757
|
+
// PM-rendered rich text (bitmark+ format).
|
|
3491
3758
|
key: ConfigKey.property_example,
|
|
3759
|
+
exportJsonKey: [
|
|
3760
|
+
{ "@keyonly": { isExample: true } },
|
|
3761
|
+
{ "@absent": { isExample: true } },
|
|
3762
|
+
{ isExample: true, example: "$" }
|
|
3763
|
+
],
|
|
3492
3764
|
description: "The example(s) for the bit",
|
|
3493
|
-
format: TagFormat.
|
|
3765
|
+
format: TagFormat.bitmarkText
|
|
3494
3766
|
}
|
|
3495
3767
|
]
|
|
3496
3768
|
},
|
|
@@ -3501,6 +3773,7 @@ var GROUPS = {
|
|
|
3501
3773
|
{
|
|
3502
3774
|
key: ConfigKey.property_imageSource,
|
|
3503
3775
|
jsonKey: "imageSource.url",
|
|
3776
|
+
exportJsonKey: { imageSource: { url: "$" } },
|
|
3504
3777
|
description: "The source of an image",
|
|
3505
3778
|
format: TagFormat.plainText,
|
|
3506
3779
|
chain: [
|
|
@@ -3535,6 +3808,7 @@ var GROUPS = {
|
|
|
3535
3808
|
{
|
|
3536
3809
|
key: ConfigKey.property_technicalTerm,
|
|
3537
3810
|
jsonKey: "technicalTerm.technicalTerm",
|
|
3811
|
+
exportJsonKey: { technicalTerm: { technicalTerm: "$" } },
|
|
3538
3812
|
description: "The technical term",
|
|
3539
3813
|
format: TagFormat.plainText,
|
|
3540
3814
|
chain: [
|
|
@@ -3553,7 +3827,8 @@ var GROUPS = {
|
|
|
3553
3827
|
tags: [
|
|
3554
3828
|
{
|
|
3555
3829
|
key: ConfigKey.property_person,
|
|
3556
|
-
jsonKey: "
|
|
3830
|
+
jsonKey: "partner.name",
|
|
3831
|
+
exportJsonKey: { partner: { name: "$" } },
|
|
3557
3832
|
description: "A person",
|
|
3558
3833
|
format: TagFormat.plainText,
|
|
3559
3834
|
chain: [
|
|
@@ -3564,6 +3839,8 @@ var GROUPS = {
|
|
|
3564
3839
|
},
|
|
3565
3840
|
{
|
|
3566
3841
|
key: ConfigKey.group_resourceImage,
|
|
3842
|
+
jsonKey: "avatarImage|resource(type=image, key=image)",
|
|
3843
|
+
exportJsonKey: { avatarImage: { type: "image", image: { src: "$" } } },
|
|
3567
3844
|
description: "The image of the person"
|
|
3568
3845
|
}
|
|
3569
3846
|
]
|
|
@@ -3572,6 +3849,7 @@ var GROUPS = {
|
|
|
3572
3849
|
// Deprecated (parter renamed to person)
|
|
3573
3850
|
key: ConfigKey.property_partner,
|
|
3574
3851
|
jsonKey: "partner.name",
|
|
3852
|
+
exportJsonKey: { partner: { name: "$" } },
|
|
3575
3853
|
description: "A partner",
|
|
3576
3854
|
format: TagFormat.plainText,
|
|
3577
3855
|
chain: [
|
|
@@ -3582,6 +3860,8 @@ var GROUPS = {
|
|
|
3582
3860
|
},
|
|
3583
3861
|
{
|
|
3584
3862
|
key: ConfigKey.group_resourceImage,
|
|
3863
|
+
jsonKey: "avatarImage|resource(type=image, key=image)",
|
|
3864
|
+
exportJsonKey: { avatarImage: { type: "image", image: { src: "$" } } },
|
|
3585
3865
|
description: "The image of the partner"
|
|
3586
3866
|
}
|
|
3587
3867
|
]
|
|
@@ -3593,15 +3873,19 @@ var GROUPS = {
|
|
|
3593
3873
|
description: "Gap chain",
|
|
3594
3874
|
tags: [
|
|
3595
3875
|
{
|
|
3876
|
+
exportJsonKey: { solutions: [["$"]] },
|
|
3596
3877
|
key: ConfigKey.tag_gap,
|
|
3597
3878
|
description: "The value of a gap in the content",
|
|
3598
3879
|
maxCount: Count.infinity,
|
|
3880
|
+
format: TagFormat.plainText,
|
|
3599
3881
|
chain: [
|
|
3600
3882
|
{
|
|
3601
3883
|
key: ConfigKey.tag_gap,
|
|
3602
3884
|
jsonKey: "solutions[]",
|
|
3885
|
+
exportJsonKey: { solutions: ["$"] },
|
|
3603
3886
|
description: "Alternative values for the gaps in the content",
|
|
3604
|
-
maxCount: Count.infinity
|
|
3887
|
+
maxCount: Count.infinity,
|
|
3888
|
+
format: TagFormat.plainText
|
|
3605
3889
|
},
|
|
3606
3890
|
{
|
|
3607
3891
|
key: ConfigKey.group_standardItemLeadInstructionHint,
|
|
@@ -3610,12 +3894,33 @@ var GROUPS = {
|
|
|
3610
3894
|
{
|
|
3611
3895
|
key: ConfigKey.property_example,
|
|
3612
3896
|
jsonKey: "example",
|
|
3897
|
+
exportJsonKey: [
|
|
3898
|
+
{
|
|
3899
|
+
"@keyonly": {
|
|
3900
|
+
isExample: true,
|
|
3901
|
+
example: "$parent.solutions[0]",
|
|
3902
|
+
"@bit": { isExample: true }
|
|
3903
|
+
}
|
|
3904
|
+
},
|
|
3905
|
+
{
|
|
3906
|
+
"@absent": {
|
|
3907
|
+
isExample: true,
|
|
3908
|
+
example: "$parent.solutions[0]",
|
|
3909
|
+
"@bit": { isExample: true }
|
|
3910
|
+
}
|
|
3911
|
+
},
|
|
3912
|
+
{ isExample: true, example: "$", "@bit": { isExample: true } }
|
|
3913
|
+
],
|
|
3613
3914
|
description: "An example for the gap",
|
|
3614
|
-
format: TagFormat.
|
|
3915
|
+
format: TagFormat.bitmarkText
|
|
3615
3916
|
},
|
|
3616
3917
|
{
|
|
3617
3918
|
key: ConfigKey.property_isCaseSensitive,
|
|
3618
3919
|
jsonKey: "isCaseSensitive",
|
|
3920
|
+
exportJsonKey: [
|
|
3921
|
+
{ "@absent": { isCaseSensitive: "$ancestor" } },
|
|
3922
|
+
{ isCaseSensitive: "$" }
|
|
3923
|
+
],
|
|
3619
3924
|
description: "If true, the gap text is case sensitive",
|
|
3620
3925
|
format: TagFormat.boolean,
|
|
3621
3926
|
defaultValue: "true"
|
|
@@ -3629,21 +3934,27 @@ var GROUPS = {
|
|
|
3629
3934
|
description: "True/False chain",
|
|
3630
3935
|
tags: [
|
|
3631
3936
|
{
|
|
3937
|
+
exportJsonKey: { choices: [{ choice: "$", isCorrect: true }] },
|
|
3632
3938
|
key: ConfigKey.tag_true,
|
|
3633
3939
|
description: "True value for a true/false statement/question",
|
|
3634
3940
|
maxCount: Count.infinity,
|
|
3941
|
+
format: TagFormat.plainText,
|
|
3635
3942
|
chain: [
|
|
3636
3943
|
{
|
|
3637
3944
|
key: ConfigKey.tag_true,
|
|
3638
3945
|
jsonKey: "choices[]|set(isCorrect=true)",
|
|
3946
|
+
exportJsonKey: { choices: [{ choice: "$", isCorrect: true }] },
|
|
3639
3947
|
description: "True values for a true/false statement/question",
|
|
3640
|
-
maxCount: Count.infinity
|
|
3948
|
+
maxCount: Count.infinity,
|
|
3949
|
+
format: TagFormat.plainText
|
|
3641
3950
|
},
|
|
3642
3951
|
{
|
|
3643
3952
|
key: ConfigKey.tag_false,
|
|
3644
3953
|
jsonKey: "choices[]|set(isCorrect=false)",
|
|
3954
|
+
exportJsonKey: { choices: [{ choice: "$", isCorrect: false }] },
|
|
3645
3955
|
description: "False values for a true/false statement/question",
|
|
3646
|
-
maxCount: Count.infinity
|
|
3956
|
+
maxCount: Count.infinity,
|
|
3957
|
+
format: TagFormat.plainText
|
|
3647
3958
|
},
|
|
3648
3959
|
{
|
|
3649
3960
|
key: ConfigKey.group_standardItemLeadInstructionHint,
|
|
@@ -3652,27 +3963,50 @@ var GROUPS = {
|
|
|
3652
3963
|
{
|
|
3653
3964
|
key: ConfigKey.property_example,
|
|
3654
3965
|
jsonKey: "example",
|
|
3966
|
+
exportJsonKey: [
|
|
3967
|
+
{
|
|
3968
|
+
"@keyonly": {
|
|
3969
|
+
isExample: true,
|
|
3970
|
+
example: "$parent.isCorrect",
|
|
3971
|
+
"@bit": { isExample: true }
|
|
3972
|
+
}
|
|
3973
|
+
},
|
|
3974
|
+
{
|
|
3975
|
+
"@absent": {
|
|
3976
|
+
isExample: true,
|
|
3977
|
+
example: "$parent.isCorrect",
|
|
3978
|
+
"@bit": { isExample: true }
|
|
3979
|
+
}
|
|
3980
|
+
},
|
|
3981
|
+
{ isExample: true, example: "$", "@bit": { isExample: true } }
|
|
3982
|
+
],
|
|
3655
3983
|
description: "An example for the true/false statement/question",
|
|
3656
|
-
format: TagFormat.
|
|
3984
|
+
format: TagFormat.bitmarkText
|
|
3657
3985
|
}
|
|
3658
3986
|
]
|
|
3659
3987
|
},
|
|
3660
3988
|
{
|
|
3989
|
+
exportJsonKey: { choices: [{ choice: "$", isCorrect: false }] },
|
|
3661
3990
|
key: ConfigKey.tag_false,
|
|
3662
3991
|
description: "False value for a true/false statement/question",
|
|
3663
3992
|
maxCount: Count.infinity,
|
|
3993
|
+
format: TagFormat.plainText,
|
|
3664
3994
|
chain: [
|
|
3665
3995
|
{
|
|
3666
3996
|
key: ConfigKey.tag_true,
|
|
3667
3997
|
jsonKey: "choices[]|set(isCorrect=true)",
|
|
3998
|
+
exportJsonKey: { choices: [{ choice: "$", isCorrect: true }] },
|
|
3668
3999
|
description: "True values for a true/false statement/question",
|
|
3669
|
-
maxCount: Count.infinity
|
|
4000
|
+
maxCount: Count.infinity,
|
|
4001
|
+
format: TagFormat.plainText
|
|
3670
4002
|
},
|
|
3671
4003
|
{
|
|
3672
4004
|
key: ConfigKey.tag_false,
|
|
3673
4005
|
jsonKey: "choices[]|set(isCorrect=false)",
|
|
4006
|
+
exportJsonKey: { choices: [{ choice: "$", isCorrect: false }] },
|
|
3674
4007
|
description: "False values for a true/false statement/question",
|
|
3675
|
-
maxCount: Count.infinity
|
|
4008
|
+
maxCount: Count.infinity,
|
|
4009
|
+
format: TagFormat.plainText
|
|
3676
4010
|
},
|
|
3677
4011
|
{
|
|
3678
4012
|
key: ConfigKey.group_standardItemLeadInstructionHint,
|
|
@@ -3681,8 +4015,25 @@ var GROUPS = {
|
|
|
3681
4015
|
{
|
|
3682
4016
|
key: ConfigKey.property_example,
|
|
3683
4017
|
jsonKey: "example",
|
|
4018
|
+
exportJsonKey: [
|
|
4019
|
+
{
|
|
4020
|
+
"@keyonly": {
|
|
4021
|
+
isExample: true,
|
|
4022
|
+
example: "$parent.isCorrect",
|
|
4023
|
+
"@bit": { isExample: true }
|
|
4024
|
+
}
|
|
4025
|
+
},
|
|
4026
|
+
{
|
|
4027
|
+
"@absent": {
|
|
4028
|
+
isExample: true,
|
|
4029
|
+
example: "$parent.isCorrect",
|
|
4030
|
+
"@bit": { isExample: true }
|
|
4031
|
+
}
|
|
4032
|
+
},
|
|
4033
|
+
{ isExample: true, example: "$", "@bit": { isExample: true } }
|
|
4034
|
+
],
|
|
3684
4035
|
description: "An example for the true/false statement/question",
|
|
3685
|
-
format: TagFormat.
|
|
4036
|
+
format: TagFormat.bitmarkText
|
|
3686
4037
|
}
|
|
3687
4038
|
]
|
|
3688
4039
|
}
|
|
@@ -3695,6 +4046,7 @@ var GROUPS = {
|
|
|
3695
4046
|
{
|
|
3696
4047
|
key: ConfigKey.property_mark,
|
|
3697
4048
|
jsonKey: "marks.mark",
|
|
4049
|
+
exportJsonKey: { marks: { mark: ["$"] } },
|
|
3698
4050
|
description: "The mark configuration",
|
|
3699
4051
|
format: TagFormat.plainText,
|
|
3700
4052
|
maxCount: Count.infinity,
|
|
@@ -3718,9 +4070,11 @@ var GROUPS = {
|
|
|
3718
4070
|
description: "Mark chain",
|
|
3719
4071
|
tags: [
|
|
3720
4072
|
{
|
|
4073
|
+
exportJsonKey: { solution: ["$"] },
|
|
3721
4074
|
key: ConfigKey.tag_mark,
|
|
3722
4075
|
description: "The marked content",
|
|
3723
4076
|
maxCount: Count.infinity,
|
|
4077
|
+
format: TagFormat.plainText,
|
|
3724
4078
|
chain: [
|
|
3725
4079
|
{
|
|
3726
4080
|
key: ConfigKey.property_mark,
|
|
@@ -3731,8 +4085,13 @@ var GROUPS = {
|
|
|
3731
4085
|
{
|
|
3732
4086
|
key: ConfigKey.property_example,
|
|
3733
4087
|
jsonKey: "example",
|
|
4088
|
+
exportJsonKey: [
|
|
4089
|
+
{ "@keyonly": { isExample: true, example: true, "@bit": { isExample: true } } },
|
|
4090
|
+
{ "@absent": { isExample: true, example: true, "@bit": { isExample: true } } },
|
|
4091
|
+
{ isExample: true, example: "$", "@bit": { isExample: true } }
|
|
4092
|
+
],
|
|
3734
4093
|
description: "An example for the marked content",
|
|
3735
|
-
format: TagFormat.
|
|
4094
|
+
format: TagFormat.bitmarkText
|
|
3736
4095
|
}
|
|
3737
4096
|
]
|
|
3738
4097
|
}
|
|
@@ -3820,7 +4179,9 @@ var GROUPS = {
|
|
|
3820
4179
|
key: ConfigKey.tag_title,
|
|
3821
4180
|
name: "Title",
|
|
3822
4181
|
description: "The title of the book",
|
|
3823
|
-
maxCount: 2
|
|
4182
|
+
maxCount: 2,
|
|
4183
|
+
jsonKey: "title|multi(count=2, key=subtitle)",
|
|
4184
|
+
exportJsonKey: [{ "@level=1": { title: "$" } }, { "@level=2": { subtitle: "$" } }]
|
|
3824
4185
|
},
|
|
3825
4186
|
{
|
|
3826
4187
|
key: ConfigKey.property_subtype,
|
|
@@ -3835,6 +4196,8 @@ var GROUPS = {
|
|
|
3835
4196
|
},
|
|
3836
4197
|
{
|
|
3837
4198
|
key: ConfigKey.resource_coverImage,
|
|
4199
|
+
jsonKey: "coverImage|resource(type=image, key=image)",
|
|
4200
|
+
exportJsonKey: { coverImage: { type: "image", image: { src: "$" } } },
|
|
3838
4201
|
description: "The cover image of the book",
|
|
3839
4202
|
chain: [
|
|
3840
4203
|
{
|
|
@@ -3851,6 +4214,8 @@ var GROUPS = {
|
|
|
3851
4214
|
},
|
|
3852
4215
|
{
|
|
3853
4216
|
key: ConfigKey.resource_backgroundImage,
|
|
4217
|
+
jsonKey: "backgroundImage|resource(type=image, key=image)",
|
|
4218
|
+
exportJsonKey: { backgroundImage: { type: "image", image: { src: "$" } } },
|
|
3854
4219
|
description: "The background image of the book",
|
|
3855
4220
|
chain: [
|
|
3856
4221
|
{
|
|
@@ -4010,9 +4375,21 @@ var GROUPS = {
|
|
|
4010
4375
|
format: TagFormat.plainText,
|
|
4011
4376
|
chain: [
|
|
4012
4377
|
{
|
|
4378
|
+
exportJsonKey: { reference: "$" },
|
|
4013
4379
|
key: ConfigKey.tag_reference,
|
|
4014
|
-
|
|
4015
|
-
|
|
4380
|
+
format: TagFormat.plainText,
|
|
4381
|
+
description: "The reference for the book(s) in the learning path",
|
|
4382
|
+
maxCount: 1,
|
|
4383
|
+
chain: [
|
|
4384
|
+
{
|
|
4385
|
+
key: ConfigKey.tag_reference,
|
|
4386
|
+
jsonKey: "referenceEnd",
|
|
4387
|
+
exportJsonKey: { referenceEnd: "$" },
|
|
4388
|
+
format: TagFormat.plainText,
|
|
4389
|
+
description: "The referenceEnd for the book(s) in the learning path",
|
|
4390
|
+
maxCount: 1
|
|
4391
|
+
}
|
|
4392
|
+
]
|
|
4016
4393
|
}
|
|
4017
4394
|
]
|
|
4018
4395
|
}
|
|
@@ -4152,6 +4529,8 @@ var GROUPS = {
|
|
|
4152
4529
|
tags: [
|
|
4153
4530
|
{
|
|
4154
4531
|
key: ConfigKey.resource_imagePlaceholder,
|
|
4532
|
+
jsonKey: "imagePlaceholder|resource(type=image, key=image)",
|
|
4533
|
+
exportJsonKey: { imagePlaceholder: { type: "image", image: { src: "$" } } },
|
|
4155
4534
|
description: "Placeholder image for the resource",
|
|
4156
4535
|
chain: [
|
|
4157
4536
|
{
|
|
@@ -4336,6 +4715,7 @@ var GROUPS = {
|
|
|
4336
4715
|
{
|
|
4337
4716
|
key: ConfigKey.property_posterImage,
|
|
4338
4717
|
jsonKey: "posterImage.src",
|
|
4718
|
+
exportJsonKey: { posterImage: { src: "$" } },
|
|
4339
4719
|
description: "The poster image for the video",
|
|
4340
4720
|
format: TagFormat.plainText,
|
|
4341
4721
|
chain: [
|
|
@@ -4392,6 +4772,7 @@ var GROUPS = {
|
|
|
4392
4772
|
tags: [
|
|
4393
4773
|
{
|
|
4394
4774
|
key: ConfigKey.resource_image,
|
|
4775
|
+
exportJsonKey: { resource: { type: "image", image: { src: "$" } } },
|
|
4395
4776
|
description: "The image resource",
|
|
4396
4777
|
chain: [
|
|
4397
4778
|
{
|
|
@@ -4456,6 +4837,7 @@ var GROUPS = {
|
|
|
4456
4837
|
tags: [
|
|
4457
4838
|
{
|
|
4458
4839
|
key: ConfigKey.resource_imageLink,
|
|
4840
|
+
exportJsonKey: { resource: { type: "image-link", imageLink: { url: "$" } } },
|
|
4459
4841
|
description: "The link to the image resource",
|
|
4460
4842
|
chain: [
|
|
4461
4843
|
{
|
|
@@ -4472,6 +4854,7 @@ var GROUPS = {
|
|
|
4472
4854
|
tags: [
|
|
4473
4855
|
{
|
|
4474
4856
|
key: ConfigKey.resource_audio,
|
|
4857
|
+
exportJsonKey: { resource: { type: "audio", audio: { src: "$" } } },
|
|
4475
4858
|
description: "The audio resource",
|
|
4476
4859
|
chain: [
|
|
4477
4860
|
{
|
|
@@ -4488,6 +4871,7 @@ var GROUPS = {
|
|
|
4488
4871
|
tags: [
|
|
4489
4872
|
{
|
|
4490
4873
|
key: ConfigKey.resource_audioEmbed,
|
|
4874
|
+
exportJsonKey: { resource: { type: "audio-embed", audioEmbed: { src: "$" } } },
|
|
4491
4875
|
description: "The embedded audio resource",
|
|
4492
4876
|
chain: [
|
|
4493
4877
|
{
|
|
@@ -4504,6 +4888,7 @@ var GROUPS = {
|
|
|
4504
4888
|
tags: [
|
|
4505
4889
|
{
|
|
4506
4890
|
key: ConfigKey.resource_audioLink,
|
|
4891
|
+
exportJsonKey: { resource: { type: "audio-link", audioLink: { url: "$" } } },
|
|
4507
4892
|
description: "The link to the audio resource",
|
|
4508
4893
|
chain: [
|
|
4509
4894
|
{
|
|
@@ -4520,6 +4905,7 @@ var GROUPS = {
|
|
|
4520
4905
|
tags: [
|
|
4521
4906
|
{
|
|
4522
4907
|
key: ConfigKey.resource_video,
|
|
4908
|
+
exportJsonKey: { resource: { type: "video", video: { src: "$" } } },
|
|
4523
4909
|
description: "The video resource",
|
|
4524
4910
|
chain: [
|
|
4525
4911
|
{
|
|
@@ -4536,6 +4922,7 @@ var GROUPS = {
|
|
|
4536
4922
|
tags: [
|
|
4537
4923
|
{
|
|
4538
4924
|
key: ConfigKey.resource_videoEmbed,
|
|
4925
|
+
exportJsonKey: { resource: { type: "video-embed", videoEmbed: { url: "$" } } },
|
|
4539
4926
|
description: "The embedded video resource",
|
|
4540
4927
|
chain: [
|
|
4541
4928
|
{
|
|
@@ -4552,6 +4939,7 @@ var GROUPS = {
|
|
|
4552
4939
|
tags: [
|
|
4553
4940
|
{
|
|
4554
4941
|
key: ConfigKey.resource_videoLink,
|
|
4942
|
+
exportJsonKey: { resource: { type: "video-link", videoLink: { url: "$" } } },
|
|
4555
4943
|
description: "The link to the video resource",
|
|
4556
4944
|
chain: [
|
|
4557
4945
|
{
|
|
@@ -4568,6 +4956,9 @@ var GROUPS = {
|
|
|
4568
4956
|
tags: [
|
|
4569
4957
|
{
|
|
4570
4958
|
key: ConfigKey.resource_stillImageFilmEmbed,
|
|
4959
|
+
exportJsonKey: {
|
|
4960
|
+
resource: { type: "still-image-film-embed", stillImageFilmEmbed: { url: "$" } }
|
|
4961
|
+
},
|
|
4571
4962
|
description: "The embedded still image film resource",
|
|
4572
4963
|
chain: [
|
|
4573
4964
|
{
|
|
@@ -4584,6 +4975,9 @@ var GROUPS = {
|
|
|
4584
4975
|
tags: [
|
|
4585
4976
|
{
|
|
4586
4977
|
key: ConfigKey.resource_stillImageFilmLink,
|
|
4978
|
+
exportJsonKey: {
|
|
4979
|
+
resource: { type: "still-image-film-link", stillImageFilmLink: { url: "$" } }
|
|
4980
|
+
},
|
|
4587
4981
|
description: "The link to the still image film resource",
|
|
4588
4982
|
chain: [
|
|
4589
4983
|
{
|
|
@@ -4648,6 +5042,7 @@ var GROUPS = {
|
|
|
4648
5042
|
tags: [
|
|
4649
5043
|
{
|
|
4650
5044
|
key: ConfigKey.resource_document,
|
|
5045
|
+
exportJsonKey: { resource: { type: "document", document: { url: "$" } } },
|
|
4651
5046
|
description: "The document resource",
|
|
4652
5047
|
chain: [
|
|
4653
5048
|
{
|
|
@@ -4664,6 +5059,7 @@ var GROUPS = {
|
|
|
4664
5059
|
tags: [
|
|
4665
5060
|
{
|
|
4666
5061
|
key: ConfigKey.resource_documentEmbed,
|
|
5062
|
+
exportJsonKey: { resource: { type: "document-embed", documentEmbed: { url: "$" } } },
|
|
4667
5063
|
description: "The embedded document resource",
|
|
4668
5064
|
chain: [
|
|
4669
5065
|
{
|
|
@@ -4680,6 +5076,7 @@ var GROUPS = {
|
|
|
4680
5076
|
tags: [
|
|
4681
5077
|
{
|
|
4682
5078
|
key: ConfigKey.resource_documentLink,
|
|
5079
|
+
exportJsonKey: { resource: { type: "document-link", documentLink: { url: "$" } } },
|
|
4683
5080
|
description: "The link to the document resource",
|
|
4684
5081
|
chain: [
|
|
4685
5082
|
{
|
|
@@ -4696,6 +5093,7 @@ var GROUPS = {
|
|
|
4696
5093
|
tags: [
|
|
4697
5094
|
{
|
|
4698
5095
|
key: ConfigKey.resource_documentDownload,
|
|
5096
|
+
exportJsonKey: { resource: { type: "document-download", documentDownload: { url: "$" } } },
|
|
4699
5097
|
description: "The downloadable document resource",
|
|
4700
5098
|
chain: [
|
|
4701
5099
|
{
|
|
@@ -4712,6 +5110,7 @@ var GROUPS = {
|
|
|
4712
5110
|
tags: [
|
|
4713
5111
|
{
|
|
4714
5112
|
key: ConfigKey.resource_appLink,
|
|
5113
|
+
exportJsonKey: { resource: { type: "app-link", appLink: { url: "$" } } },
|
|
4715
5114
|
description: "The link to the app resource",
|
|
4716
5115
|
chain: [
|
|
4717
5116
|
{
|
|
@@ -4728,6 +5127,7 @@ var GROUPS = {
|
|
|
4728
5127
|
tags: [
|
|
4729
5128
|
{
|
|
4730
5129
|
key: ConfigKey.resource_websiteLink,
|
|
5130
|
+
exportJsonKey: { resource: { type: "website-link", websiteLink: { url: "$" } } },
|
|
4731
5131
|
description: "The link to the website resource",
|
|
4732
5132
|
chain: [
|
|
4733
5133
|
{
|
|
@@ -4785,6 +5185,8 @@ var GROUPS = {
|
|
|
4785
5185
|
tags: [
|
|
4786
5186
|
{
|
|
4787
5187
|
key: ConfigKey.resource_previewImage,
|
|
5188
|
+
jsonKey: "previewImage|resource(type=image, key=image)",
|
|
5189
|
+
exportJsonKey: { previewImage: { type: "image", image: { src: "$" } } },
|
|
4788
5190
|
description: "The preview image resource",
|
|
4789
5191
|
chain: [
|
|
4790
5192
|
{
|
|
@@ -4801,6 +5203,8 @@ var GROUPS = {
|
|
|
4801
5203
|
tags: [
|
|
4802
5204
|
{
|
|
4803
5205
|
key: ConfigKey.resource_previewVideo,
|
|
5206
|
+
jsonKey: "previewVideo|resource(type=video, key=video)",
|
|
5207
|
+
exportJsonKey: { previewVideo: { type: "video", video: { src: "$" } } },
|
|
4804
5208
|
description: "The preview video resource",
|
|
4805
5209
|
chain: [
|
|
4806
5210
|
{
|
|
@@ -4865,20 +5269,48 @@ var ConfigHydrator = class {
|
|
|
4865
5269
|
_side.name,
|
|
4866
5270
|
_side.repeat ?? false,
|
|
4867
5271
|
variantsOfSide,
|
|
4868
|
-
_side.jsonKey
|
|
5272
|
+
_side.jsonKey,
|
|
5273
|
+
_side.exportJsonKey,
|
|
5274
|
+
Object.prototype.hasOwnProperty.call(_side, "exportJsonKey")
|
|
4869
5275
|
);
|
|
4870
5276
|
sides.push(sideConfig);
|
|
4871
5277
|
}
|
|
4872
5278
|
const cardSetConfig = new CardSetConfig(
|
|
4873
5279
|
_cardSet,
|
|
4874
5280
|
_cardSetConfig.jsonKey,
|
|
4875
|
-
_cardSetConfig.
|
|
5281
|
+
_cardSetConfig.exportJsonKey,
|
|
5282
|
+
Object.prototype.hasOwnProperty.call(_cardSetConfig, "exportJsonKey"),
|
|
5283
|
+
this.hydrateCardSections(_cardSetConfig.sections),
|
|
4876
5284
|
sides
|
|
4877
5285
|
);
|
|
4878
5286
|
return cardSetConfig;
|
|
4879
5287
|
}
|
|
5288
|
+
hydrateCardSections(sections) {
|
|
5289
|
+
if (!sections) return void 0;
|
|
5290
|
+
const out = {};
|
|
5291
|
+
for (const [k, v] of Object.entries(sections)) {
|
|
5292
|
+
out[k] = {
|
|
5293
|
+
jsonKey: v.jsonKey,
|
|
5294
|
+
exportJsonKey: v.exportJsonKey,
|
|
5295
|
+
hasExportJsonKey: Object.prototype.hasOwnProperty.call(v, "exportJsonKey"),
|
|
5296
|
+
isDefault: v.isDefault,
|
|
5297
|
+
sideJsonKey: v.sideJsonKey,
|
|
5298
|
+
sideExportJsonKey: v.sideExportJsonKey,
|
|
5299
|
+
hasSideExportJsonKey: Object.prototype.hasOwnProperty.call(v, "sideExportJsonKey")
|
|
5300
|
+
};
|
|
5301
|
+
}
|
|
5302
|
+
return out;
|
|
5303
|
+
}
|
|
4880
5304
|
hydrateTagConfig(_tag) {
|
|
4881
|
-
const {
|
|
5305
|
+
const {
|
|
5306
|
+
key: _configKey,
|
|
5307
|
+
maxCount,
|
|
5308
|
+
minCount,
|
|
5309
|
+
chain: _chain,
|
|
5310
|
+
deprecated,
|
|
5311
|
+
jsonKey,
|
|
5312
|
+
exportJsonKey
|
|
5313
|
+
} = _tag;
|
|
4882
5314
|
const configKey = Enum2(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
|
|
4883
5315
|
if (!configKey) throw new Error(`No tag key found for config key '${configKey}'`);
|
|
4884
5316
|
const tag = Enum2(Tag).fromValue(configKey);
|
|
@@ -4893,6 +5325,9 @@ var ConfigHydrator = class {
|
|
|
4893
5325
|
maxCount: maxCount ?? MAX_COUNT_DEFAULT,
|
|
4894
5326
|
minCount: minCount ?? MIN_COUNT_DEFAULT,
|
|
4895
5327
|
chain,
|
|
5328
|
+
jsonKey,
|
|
5329
|
+
exportJsonKey,
|
|
5330
|
+
hasExportJsonKey: Object.prototype.hasOwnProperty.call(_tag, "exportJsonKey"),
|
|
4896
5331
|
deprecated
|
|
4897
5332
|
});
|
|
4898
5333
|
return {
|
|
@@ -4911,7 +5346,8 @@ var ConfigHydrator = class {
|
|
|
4911
5346
|
format,
|
|
4912
5347
|
values,
|
|
4913
5348
|
defaultValue,
|
|
4914
|
-
jsonKey
|
|
5349
|
+
jsonKey,
|
|
5350
|
+
exportJsonKey
|
|
4915
5351
|
} = _tag;
|
|
4916
5352
|
const configKey = Enum2(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
|
|
4917
5353
|
if (!configKey) throw new Error(`No property key found for config key '${configKey}'`);
|
|
@@ -4927,6 +5363,8 @@ var ConfigHydrator = class {
|
|
|
4927
5363
|
minCount: minCount ?? MIN_COUNT_DEFAULT,
|
|
4928
5364
|
chain,
|
|
4929
5365
|
jsonKey,
|
|
5366
|
+
exportJsonKey,
|
|
5367
|
+
hasExportJsonKey: Object.prototype.hasOwnProperty.call(_tag, "exportJsonKey"),
|
|
4930
5368
|
format,
|
|
4931
5369
|
values,
|
|
4932
5370
|
defaultValue,
|
|
@@ -4939,7 +5377,15 @@ var ConfigHydrator = class {
|
|
|
4939
5377
|
};
|
|
4940
5378
|
}
|
|
4941
5379
|
hydrateResourceTagConfig(_tag) {
|
|
4942
|
-
const {
|
|
5380
|
+
const {
|
|
5381
|
+
key: _configKey,
|
|
5382
|
+
maxCount,
|
|
5383
|
+
minCount,
|
|
5384
|
+
chain: _chain,
|
|
5385
|
+
deprecated,
|
|
5386
|
+
jsonKey,
|
|
5387
|
+
exportJsonKey
|
|
5388
|
+
} = _tag;
|
|
4943
5389
|
const configKey = Enum2(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
|
|
4944
5390
|
if (!configKey) throw new Error(`No resource key found for config key '${configKey}'`);
|
|
4945
5391
|
const tag = _configKey.substring(1);
|
|
@@ -4954,6 +5400,8 @@ var ConfigHydrator = class {
|
|
|
4954
5400
|
minCount: minCount ?? MIN_COUNT_DEFAULT,
|
|
4955
5401
|
chain,
|
|
4956
5402
|
jsonKey,
|
|
5403
|
+
exportJsonKey,
|
|
5404
|
+
hasExportJsonKey: Object.prototype.hasOwnProperty.call(_tag, "exportJsonKey"),
|
|
4957
5405
|
deprecated
|
|
4958
5406
|
});
|
|
4959
5407
|
return {
|
|
@@ -4985,14 +5433,25 @@ var ConfigHydrator = class {
|
|
|
4985
5433
|
};
|
|
4986
5434
|
}
|
|
4987
5435
|
hydrateCardVariantConfig(_variant) {
|
|
4988
|
-
const {
|
|
5436
|
+
const {
|
|
5437
|
+
tags: _tags,
|
|
5438
|
+
bodyAllowed,
|
|
5439
|
+
bodyRequired,
|
|
5440
|
+
repeatCount,
|
|
5441
|
+
jsonKey,
|
|
5442
|
+
exportJsonKey,
|
|
5443
|
+
format
|
|
5444
|
+
} = _variant;
|
|
4989
5445
|
const tags2 = this.hydrateTagsConfig(_tags);
|
|
4990
5446
|
const cardSetConfig = new CardVariantConfig(
|
|
4991
5447
|
tags2.tags,
|
|
4992
5448
|
bodyAllowed,
|
|
4993
5449
|
bodyRequired,
|
|
4994
5450
|
repeatCount,
|
|
4995
|
-
jsonKey
|
|
5451
|
+
jsonKey,
|
|
5452
|
+
exportJsonKey,
|
|
5453
|
+
Object.prototype.hasOwnProperty.call(_variant, "exportJsonKey"),
|
|
5454
|
+
format
|
|
4996
5455
|
);
|
|
4997
5456
|
return cardSetConfig;
|
|
4998
5457
|
}
|
|
@@ -5030,6 +5489,7 @@ var BITS = {
|
|
|
5030
5489
|
description: "Common tags for quiz bits"
|
|
5031
5490
|
},
|
|
5032
5491
|
{
|
|
5492
|
+
exportJsonKey: { title: "$" },
|
|
5033
5493
|
key: ConfigKey.tag_title,
|
|
5034
5494
|
description: "The title of the flashcard quiz"
|
|
5035
5495
|
},
|
|
@@ -5038,6 +5498,20 @@ var BITS = {
|
|
|
5038
5498
|
description: "The flashcard set to use for the app flashcards",
|
|
5039
5499
|
format: TagFormat.plainText,
|
|
5040
5500
|
maxCount: Count.infinity
|
|
5501
|
+
},
|
|
5502
|
+
{
|
|
5503
|
+
// Override inherited @example from group_standardTags: string root
|
|
5504
|
+
// example. Bare/synthesized emits `example: "true"` (a text literal
|
|
5505
|
+
// that field-coerces to a paragraph "true" in bitmark+ contexts);
|
|
5506
|
+
// valued [@example:text] emits the user's text via `$`.
|
|
5507
|
+
key: ConfigKey.property_example,
|
|
5508
|
+
exportJsonKey: [
|
|
5509
|
+
{ "@keyonly": { isExample: true, example: "true" } },
|
|
5510
|
+
{ "@absent": { isExample: true, example: "true" } },
|
|
5511
|
+
{ isExample: true, example: "$" }
|
|
5512
|
+
],
|
|
5513
|
+
description: "The example text for the bit",
|
|
5514
|
+
format: TagFormat.plainText
|
|
5041
5515
|
}
|
|
5042
5516
|
],
|
|
5043
5517
|
rootExampleType: ExampleType.string
|
|
@@ -5119,6 +5593,7 @@ var BITS = {
|
|
|
5119
5593
|
description: "Article bit, used for articles / paragraphs",
|
|
5120
5594
|
tags: [
|
|
5121
5595
|
{
|
|
5596
|
+
exportJsonKey: { title: "$" },
|
|
5122
5597
|
key: ConfigKey.tag_title,
|
|
5123
5598
|
description: "The title of the article"
|
|
5124
5599
|
}
|
|
@@ -5225,7 +5700,9 @@ var BITS = {
|
|
|
5225
5700
|
{
|
|
5226
5701
|
key: ConfigKey.tag_title,
|
|
5227
5702
|
description: "Title and subtitle of the catalog item",
|
|
5228
|
-
maxCount: 2
|
|
5703
|
+
maxCount: 2,
|
|
5704
|
+
jsonKey: "title|multi(count=2, key=subtitle)",
|
|
5705
|
+
exportJsonKey: [{ "@level=1": { title: "$" } }, { "@level=2": { subtitle: "$" } }]
|
|
5229
5706
|
},
|
|
5230
5707
|
{
|
|
5231
5708
|
key: ConfigKey.property_coverImage,
|
|
@@ -5234,6 +5711,8 @@ var BITS = {
|
|
|
5234
5711
|
},
|
|
5235
5712
|
{
|
|
5236
5713
|
key: ConfigKey.resource_coverImage,
|
|
5714
|
+
jsonKey: "coverImage|resource(type=image, key=image)",
|
|
5715
|
+
exportJsonKey: { coverImage: { type: "image", image: { src: "$" } } },
|
|
5237
5716
|
description: "Cover image of the catalog item",
|
|
5238
5717
|
chain: [
|
|
5239
5718
|
{
|
|
@@ -5361,6 +5840,17 @@ var BITS = {
|
|
|
5361
5840
|
key: ConfigKey.group_previewVideos,
|
|
5362
5841
|
description: "Array of preview videos for the catalog item",
|
|
5363
5842
|
maxCount: Count.infinity
|
|
5843
|
+
},
|
|
5844
|
+
{
|
|
5845
|
+
// Override inherited @example from group_standardTags: string root example.
|
|
5846
|
+
key: ConfigKey.property_example,
|
|
5847
|
+
exportJsonKey: [
|
|
5848
|
+
{ "@keyonly": { isExample: true, example: "true" } },
|
|
5849
|
+
{ "@absent": { isExample: true, example: "true" } },
|
|
5850
|
+
{ isExample: true, example: "$" }
|
|
5851
|
+
],
|
|
5852
|
+
description: "The example text for the bit",
|
|
5853
|
+
format: TagFormat.plainText
|
|
5364
5854
|
}
|
|
5365
5855
|
],
|
|
5366
5856
|
rootExampleType: ExampleType.string
|
|
@@ -5373,7 +5863,9 @@ var BITS = {
|
|
|
5373
5863
|
{
|
|
5374
5864
|
key: ConfigKey.tag_title,
|
|
5375
5865
|
description: "Title and subtitle of the catalog item",
|
|
5376
|
-
maxCount: 2
|
|
5866
|
+
maxCount: 2,
|
|
5867
|
+
jsonKey: "title|multi(count=2, key=subtitle)",
|
|
5868
|
+
exportJsonKey: [{ "@level=1": { title: "$" } }, { "@level=2": { subtitle: "$" } }]
|
|
5377
5869
|
},
|
|
5378
5870
|
{
|
|
5379
5871
|
key: ConfigKey.property_coverImage,
|
|
@@ -5382,6 +5874,8 @@ var BITS = {
|
|
|
5382
5874
|
},
|
|
5383
5875
|
{
|
|
5384
5876
|
key: ConfigKey.resource_coverImage,
|
|
5877
|
+
jsonKey: "coverImage|resource(type=image, key=image)",
|
|
5878
|
+
exportJsonKey: { coverImage: { type: "image", image: { src: "$" } } },
|
|
5385
5879
|
description: "Cover image of the catalog item",
|
|
5386
5880
|
chain: [
|
|
5387
5881
|
{
|
|
@@ -5509,6 +6003,17 @@ var BITS = {
|
|
|
5509
6003
|
key: ConfigKey.group_previewVideos,
|
|
5510
6004
|
description: "Array of preview videos for the catalog item",
|
|
5511
6005
|
maxCount: Count.infinity
|
|
6006
|
+
},
|
|
6007
|
+
{
|
|
6008
|
+
// Override inherited @example from group_standardTags: string root example.
|
|
6009
|
+
key: ConfigKey.property_example,
|
|
6010
|
+
exportJsonKey: [
|
|
6011
|
+
{ "@keyonly": { isExample: true, example: "true" } },
|
|
6012
|
+
{ "@absent": { isExample: true, example: "true" } },
|
|
6013
|
+
{ isExample: true, example: "$" }
|
|
6014
|
+
],
|
|
6015
|
+
description: "The example text for the bit",
|
|
6016
|
+
format: TagFormat.plainText
|
|
5512
6017
|
}
|
|
5513
6018
|
],
|
|
5514
6019
|
rootExampleType: ExampleType.string
|
|
@@ -5521,7 +6026,9 @@ var BITS = {
|
|
|
5521
6026
|
{
|
|
5522
6027
|
key: ConfigKey.tag_title,
|
|
5523
6028
|
description: "Title and subtitle of the catalog item",
|
|
5524
|
-
maxCount: 2
|
|
6029
|
+
maxCount: 2,
|
|
6030
|
+
jsonKey: "title|multi(count=2, key=subtitle)",
|
|
6031
|
+
exportJsonKey: [{ "@level=1": { title: "$" } }, { "@level=2": { subtitle: "$" } }]
|
|
5525
6032
|
},
|
|
5526
6033
|
{
|
|
5527
6034
|
key: ConfigKey.property_coverImage,
|
|
@@ -5647,6 +6154,17 @@ var BITS = {
|
|
|
5647
6154
|
key: ConfigKey.group_previewVideos,
|
|
5648
6155
|
description: "Array of preview videos for the catalog item",
|
|
5649
6156
|
maxCount: Count.infinity
|
|
6157
|
+
},
|
|
6158
|
+
{
|
|
6159
|
+
// Override inherited @example from group_standardTags: string root example.
|
|
6160
|
+
key: ConfigKey.property_example,
|
|
6161
|
+
exportJsonKey: [
|
|
6162
|
+
{ "@keyonly": { isExample: true, example: "true" } },
|
|
6163
|
+
{ "@absent": { isExample: true, example: "true" } },
|
|
6164
|
+
{ isExample: true, example: "$" }
|
|
6165
|
+
],
|
|
6166
|
+
description: "The example text for the bit",
|
|
6167
|
+
format: TagFormat.plainText
|
|
5650
6168
|
}
|
|
5651
6169
|
],
|
|
5652
6170
|
rootExampleType: ExampleType.string
|
|
@@ -5848,11 +6366,15 @@ var BITS = {
|
|
|
5848
6366
|
description: "Bit alias, used to create an alias for a bit",
|
|
5849
6367
|
tags: [
|
|
5850
6368
|
{
|
|
6369
|
+
exportJsonKey: { reference: "$" },
|
|
5851
6370
|
key: ConfigKey.tag_reference,
|
|
6371
|
+
format: TagFormat.plainText,
|
|
5852
6372
|
description: "The reference to the bit that this alias points to"
|
|
5853
6373
|
},
|
|
5854
6374
|
{
|
|
6375
|
+
exportJsonKey: { anchor: "$" },
|
|
5855
6376
|
key: ConfigKey.tag_anchor,
|
|
6377
|
+
format: TagFormat.plainText,
|
|
5856
6378
|
description: "The anchor for the bit alias, used for linking"
|
|
5857
6379
|
}
|
|
5858
6380
|
]
|
|
@@ -6050,8 +6572,10 @@ var BITS = {
|
|
|
6050
6572
|
{
|
|
6051
6573
|
key: ConfigKey.tag_title,
|
|
6052
6574
|
description: "The title of the book cover",
|
|
6053
|
-
maxCount: 2
|
|
6575
|
+
maxCount: 2,
|
|
6054
6576
|
// title & subtitle
|
|
6577
|
+
jsonKey: "title|multi(count=2, key=subtitle)",
|
|
6578
|
+
exportJsonKey: [{ "@level=1": { title: "$" } }, { "@level=2": { subtitle: "$" } }]
|
|
6055
6579
|
},
|
|
6056
6580
|
{
|
|
6057
6581
|
key: ConfigKey.property_coverColor,
|
|
@@ -6195,12 +6719,16 @@ var BITS = {
|
|
|
6195
6719
|
description: "Chapter bit, used to define chapters in books or articles",
|
|
6196
6720
|
tags: [
|
|
6197
6721
|
{
|
|
6722
|
+
exportJsonKey: { anchor: "$" },
|
|
6198
6723
|
key: ConfigKey.tag_anchor,
|
|
6724
|
+
format: TagFormat.plainText,
|
|
6199
6725
|
description: "The anchor for the chapter, used for linking"
|
|
6200
6726
|
},
|
|
6201
6727
|
{
|
|
6202
6728
|
key: ConfigKey.tag_title,
|
|
6203
|
-
description: "The title of the chapter"
|
|
6729
|
+
description: "The title of the chapter",
|
|
6730
|
+
jsonKey: "title|setMulti(level)",
|
|
6731
|
+
exportJsonKey: { title: "$", level: "$level" }
|
|
6204
6732
|
},
|
|
6205
6733
|
{
|
|
6206
6734
|
key: ConfigKey.property_toc,
|
|
@@ -6253,6 +6781,7 @@ var BITS = {
|
|
|
6253
6781
|
},
|
|
6254
6782
|
{
|
|
6255
6783
|
key: ConfigKey.property_isCaseSensitive,
|
|
6784
|
+
exportJsonKey: {},
|
|
6256
6785
|
description: "If the cloze answers are case sensitive",
|
|
6257
6786
|
format: TagFormat.boolean,
|
|
6258
6787
|
defaultValue: "true"
|
|
@@ -6350,6 +6879,11 @@ var BITS = {
|
|
|
6350
6879
|
description: "Formula bit, used for mathematical formulas in articles or documents",
|
|
6351
6880
|
textFormatDefault: TextFormat2.latex
|
|
6352
6881
|
},
|
|
6882
|
+
[BitType2.formulaImage]: {
|
|
6883
|
+
since: "5.23.0",
|
|
6884
|
+
baseBitType: BitType2.formula,
|
|
6885
|
+
description: "Formula image bit, used for mathematical formulas rendered as images"
|
|
6886
|
+
},
|
|
6353
6887
|
[BitType2.smartStandardFormula]: {
|
|
6354
6888
|
since: "3.11.0",
|
|
6355
6889
|
baseBitType: BitType2.formula,
|
|
@@ -6702,6 +7236,7 @@ var BITS = {
|
|
|
6702
7236
|
{
|
|
6703
7237
|
key: ConfigKey.property_servings,
|
|
6704
7238
|
jsonKey: "servings.servings",
|
|
7239
|
+
exportJsonKey: { servings: { servings: "$" } },
|
|
6705
7240
|
description: "The number of servings for the ingredients",
|
|
6706
7241
|
format: TagFormat.number,
|
|
6707
7242
|
chain: [
|
|
@@ -6727,8 +7262,10 @@ var BITS = {
|
|
|
6727
7262
|
format: TagFormat.boolean
|
|
6728
7263
|
},
|
|
6729
7264
|
{
|
|
7265
|
+
exportJsonKey: { hint: "$" },
|
|
6730
7266
|
key: ConfigKey.tag_hint,
|
|
6731
|
-
description: "Hint for the ingredient, used to provide additional information"
|
|
7267
|
+
description: "Hint for the ingredient, used to provide additional information",
|
|
7268
|
+
format: TagFormat.plainText
|
|
6732
7269
|
}
|
|
6733
7270
|
]
|
|
6734
7271
|
}
|
|
@@ -6903,6 +7440,17 @@ var BITS = {
|
|
|
6903
7440
|
description: "Reference for the essay, used to link to external resources",
|
|
6904
7441
|
format: TagFormat.plainText,
|
|
6905
7442
|
maxCount: Count.infinity
|
|
7443
|
+
},
|
|
7444
|
+
{
|
|
7445
|
+
// Override inherited @example from group_standardTags: string root example.
|
|
7446
|
+
key: ConfigKey.property_example,
|
|
7447
|
+
exportJsonKey: [
|
|
7448
|
+
{ "@keyonly": { isExample: true, example: "true" } },
|
|
7449
|
+
{ "@absent": { isExample: true, example: "true" } },
|
|
7450
|
+
{ isExample: true, example: "$" }
|
|
7451
|
+
],
|
|
7452
|
+
description: "The example text for the essay bit",
|
|
7453
|
+
format: TagFormat.plainText
|
|
6906
7454
|
}
|
|
6907
7455
|
],
|
|
6908
7456
|
rootExampleType: ExampleType.string
|
|
@@ -6923,8 +7471,20 @@ var BITS = {
|
|
|
6923
7471
|
description: "Example bit, used to provide examples in articles or books",
|
|
6924
7472
|
tags: [
|
|
6925
7473
|
{
|
|
7474
|
+
exportJsonKey: { title: "$" },
|
|
6926
7475
|
key: ConfigKey.tag_title,
|
|
6927
7476
|
description: "The title of the example"
|
|
7477
|
+
},
|
|
7478
|
+
{
|
|
7479
|
+
// Override inherited @example from group_standardTags: string root example.
|
|
7480
|
+
key: ConfigKey.property_example,
|
|
7481
|
+
exportJsonKey: [
|
|
7482
|
+
{ "@keyonly": { isExample: true, example: "true" } },
|
|
7483
|
+
{ "@absent": { isExample: true, example: "true" } },
|
|
7484
|
+
{ isExample: true, example: "$" }
|
|
7485
|
+
],
|
|
7486
|
+
description: "The example text for the example bit",
|
|
7487
|
+
format: TagFormat.plainText
|
|
6928
7488
|
}
|
|
6929
7489
|
],
|
|
6930
7490
|
rootExampleType: ExampleType.string
|
|
@@ -7790,6 +8350,7 @@ var BITS = {
|
|
|
7790
8350
|
// Image resource
|
|
7791
8351
|
key: ConfigKey.group_resourceImage,
|
|
7792
8352
|
description: "Resource image tags for logo grave images, used to attach images",
|
|
8353
|
+
exportJsonKey: { images: "$" },
|
|
7793
8354
|
minCount: 1,
|
|
7794
8355
|
maxCount: Count.infinity
|
|
7795
8356
|
}
|
|
@@ -7953,15 +8514,29 @@ var BITS = {
|
|
|
7953
8514
|
format: TagFormat.plainText,
|
|
7954
8515
|
chain: [
|
|
7955
8516
|
{
|
|
8517
|
+
exportJsonKey: { reference: "$" },
|
|
7956
8518
|
key: ConfigKey.tag_reference,
|
|
8519
|
+
format: TagFormat.plainText,
|
|
7957
8520
|
description: "Reference tag for the book, used to link to the book in the system",
|
|
7958
|
-
maxCount:
|
|
8521
|
+
maxCount: 1,
|
|
8522
|
+
chain: [
|
|
8523
|
+
{
|
|
8524
|
+
key: ConfigKey.tag_reference,
|
|
8525
|
+
jsonKey: "referenceEnd",
|
|
8526
|
+
exportJsonKey: { referenceEnd: "$" },
|
|
8527
|
+
format: TagFormat.plainText,
|
|
8528
|
+
description: "End reference tag for the book, used to specify a range",
|
|
8529
|
+
maxCount: 1
|
|
8530
|
+
}
|
|
8531
|
+
]
|
|
7959
8532
|
}
|
|
7960
8533
|
]
|
|
7961
8534
|
},
|
|
7962
8535
|
{
|
|
7963
8536
|
/* Allow incorrectly chained reference tag */
|
|
8537
|
+
exportJsonKey: { reference: "$" },
|
|
7964
8538
|
key: ConfigKey.tag_reference,
|
|
8539
|
+
format: TagFormat.plainText,
|
|
7965
8540
|
description: "Reference tag for the book, used to link to the book in the system"
|
|
7966
8541
|
},
|
|
7967
8542
|
{
|
|
@@ -8006,16 +8581,41 @@ var BITS = {
|
|
|
8006
8581
|
format: TagFormat.plainText,
|
|
8007
8582
|
chain: [
|
|
8008
8583
|
{
|
|
8584
|
+
exportJsonKey: { reference: "$" },
|
|
8009
8585
|
key: ConfigKey.tag_reference,
|
|
8586
|
+
format: TagFormat.plainText,
|
|
8010
8587
|
description: "Reference tag for the book, used to link to the book in the system",
|
|
8011
|
-
maxCount:
|
|
8588
|
+
maxCount: 1,
|
|
8589
|
+
chain: [
|
|
8590
|
+
{
|
|
8591
|
+
key: ConfigKey.tag_reference,
|
|
8592
|
+
jsonKey: "referenceEnd",
|
|
8593
|
+
exportJsonKey: { referenceEnd: "$" },
|
|
8594
|
+
format: TagFormat.plainText,
|
|
8595
|
+
description: "End reference tag for the book, used to specify a range",
|
|
8596
|
+
maxCount: 1
|
|
8597
|
+
}
|
|
8598
|
+
]
|
|
8012
8599
|
}
|
|
8013
8600
|
]
|
|
8014
8601
|
},
|
|
8015
8602
|
{
|
|
8016
8603
|
/* Allow incorrectly chained reference tag */
|
|
8604
|
+
exportJsonKey: { reference: "$" },
|
|
8017
8605
|
key: ConfigKey.tag_reference,
|
|
8018
|
-
|
|
8606
|
+
format: TagFormat.plainText,
|
|
8607
|
+
description: "Reference tag for the book, used to link to the book in the system",
|
|
8608
|
+
maxCount: 1,
|
|
8609
|
+
chain: [
|
|
8610
|
+
{
|
|
8611
|
+
key: ConfigKey.tag_reference,
|
|
8612
|
+
jsonKey: "referenceEnd",
|
|
8613
|
+
exportJsonKey: { referenceEnd: "$" },
|
|
8614
|
+
format: TagFormat.plainText,
|
|
8615
|
+
description: "End reference tag for the book, used to specify a range",
|
|
8616
|
+
maxCount: 1
|
|
8617
|
+
}
|
|
8618
|
+
]
|
|
8019
8619
|
},
|
|
8020
8620
|
{
|
|
8021
8621
|
key: ConfigKey.property_buttonCaption,
|
|
@@ -8044,9 +8644,21 @@ var BITS = {
|
|
|
8044
8644
|
maxCount: Count.infinity,
|
|
8045
8645
|
chain: [
|
|
8046
8646
|
{
|
|
8647
|
+
exportJsonKey: { reference: "$" },
|
|
8047
8648
|
key: ConfigKey.tag_reference,
|
|
8649
|
+
format: TagFormat.plainText,
|
|
8048
8650
|
description: "Reference tag for the book, used to link to the book in the system",
|
|
8049
|
-
maxCount:
|
|
8651
|
+
maxCount: 1,
|
|
8652
|
+
chain: [
|
|
8653
|
+
{
|
|
8654
|
+
key: ConfigKey.tag_reference,
|
|
8655
|
+
jsonKey: "referenceEnd",
|
|
8656
|
+
exportJsonKey: { referenceEnd: "$" },
|
|
8657
|
+
format: TagFormat.plainText,
|
|
8658
|
+
description: "End reference tag for the book, used to specify a range",
|
|
8659
|
+
maxCount: 1
|
|
8660
|
+
}
|
|
8661
|
+
]
|
|
8050
8662
|
}
|
|
8051
8663
|
]
|
|
8052
8664
|
},
|
|
@@ -8213,6 +8825,7 @@ var BITS = {
|
|
|
8213
8825
|
tags: [
|
|
8214
8826
|
{
|
|
8215
8827
|
key: ConfigKey.resource_backgroundWallpaper,
|
|
8828
|
+
exportJsonKey: { backgroundWallpaper: { type: "image", image: { src: "$" } } },
|
|
8216
8829
|
description: "Background wallpaper for the image, used to set a background for the image",
|
|
8217
8830
|
chain: [
|
|
8218
8831
|
{
|
|
@@ -8395,6 +9008,7 @@ var BITS = {
|
|
|
8395
9008
|
},
|
|
8396
9009
|
{
|
|
8397
9010
|
key: ConfigKey.resource_backgroundWallpaper,
|
|
9011
|
+
exportJsonKey: { backgroundWallpaper: { type: "image", image: { src: "$" } } },
|
|
8398
9012
|
description: "Background wallpaper for the image, used to set a background for the image",
|
|
8399
9013
|
chain: [
|
|
8400
9014
|
{
|
|
@@ -8547,6 +9161,7 @@ var BITS = {
|
|
|
8547
9161
|
// Image resource
|
|
8548
9162
|
key: ConfigKey.group_resourceImage,
|
|
8549
9163
|
description: "Resource image tags for logo grave images, used to attach images",
|
|
9164
|
+
exportJsonKey: { logos: "$" },
|
|
8550
9165
|
minCount: 1,
|
|
8551
9166
|
maxCount: Count.infinity
|
|
8552
9167
|
}
|
|
@@ -8564,7 +9179,9 @@ var BITS = {
|
|
|
8564
9179
|
description: "Internal link bit, used to create links to other bits in articles or books",
|
|
8565
9180
|
tags: [
|
|
8566
9181
|
{
|
|
9182
|
+
exportJsonKey: { reference: "$" },
|
|
8567
9183
|
key: ConfigKey.tag_reference,
|
|
9184
|
+
format: TagFormat.plainText,
|
|
8568
9185
|
description: "Reference tag for the internal link, used to link to the target bit"
|
|
8569
9186
|
}
|
|
8570
9187
|
]
|
|
@@ -8581,6 +9198,7 @@ var BITS = {
|
|
|
8581
9198
|
},
|
|
8582
9199
|
{
|
|
8583
9200
|
key: ConfigKey.property_reasonableNumOfChars,
|
|
9201
|
+
exportJsonKey: {},
|
|
8584
9202
|
description: "Reasonable number of characters for the interview, used to limit input size",
|
|
8585
9203
|
format: TagFormat.number
|
|
8586
9204
|
}
|
|
@@ -8956,6 +9574,7 @@ var BITS = {
|
|
|
8956
9574
|
},
|
|
8957
9575
|
{
|
|
8958
9576
|
key: ConfigKey.property_isCaseSensitive,
|
|
9577
|
+
exportJsonKey: {},
|
|
8959
9578
|
description: "Case sensitivity for matching pairs, used to define if matches are case-sensitive",
|
|
8960
9579
|
format: TagFormat.boolean,
|
|
8961
9580
|
defaultValue: "true"
|
|
@@ -9008,6 +9627,7 @@ var BITS = {
|
|
|
9008
9627
|
tags: [
|
|
9009
9628
|
{
|
|
9010
9629
|
key: ConfigKey.property_reasonableNumOfChars,
|
|
9630
|
+
exportJsonKey: {},
|
|
9011
9631
|
description: "Reasonable number of characters for feedback, used to limit input size",
|
|
9012
9632
|
format: TagFormat.number
|
|
9013
9633
|
}
|
|
@@ -9149,6 +9769,7 @@ var BITS = {
|
|
|
9149
9769
|
description: "Page bit, used to create pages in articles or books",
|
|
9150
9770
|
tags: [
|
|
9151
9771
|
{
|
|
9772
|
+
exportJsonKey: { title: "$" },
|
|
9152
9773
|
key: ConfigKey.tag_title,
|
|
9153
9774
|
description: "Title of the page, used to display the page title"
|
|
9154
9775
|
},
|
|
@@ -9507,6 +10128,8 @@ var BITS = {
|
|
|
9507
10128
|
},
|
|
9508
10129
|
{
|
|
9509
10130
|
key: ConfigKey.resource_platformBackgroundImage,
|
|
10131
|
+
jsonKey: "platformBackgroundImage|resource(type=image, key=image)",
|
|
10132
|
+
exportJsonKey: { platformBackgroundImage: { type: "image", image: { src: "$" } } },
|
|
9510
10133
|
description: "The platform section chat background image",
|
|
9511
10134
|
chain: [
|
|
9512
10135
|
{
|
|
@@ -9600,6 +10223,7 @@ var BITS = {
|
|
|
9600
10223
|
description: "Review note bit, used to create review notes in articles or books",
|
|
9601
10224
|
tags: [
|
|
9602
10225
|
{
|
|
10226
|
+
exportJsonKey: { title: "$" },
|
|
9603
10227
|
key: ConfigKey.tag_title,
|
|
9604
10228
|
description: "Title of the review note, used to display the note title"
|
|
9605
10229
|
},
|
|
@@ -9618,6 +10242,17 @@ var BITS = {
|
|
|
9618
10242
|
key: ConfigKey.property_resolvedBy,
|
|
9619
10243
|
description: "Resolved by for the review note, used to define who resolved the note",
|
|
9620
10244
|
format: TagFormat.plainText
|
|
10245
|
+
},
|
|
10246
|
+
{
|
|
10247
|
+
// Override inherited @example from group_standardTags: string root example.
|
|
10248
|
+
key: ConfigKey.property_example,
|
|
10249
|
+
exportJsonKey: [
|
|
10250
|
+
{ "@keyonly": { isExample: true, example: "true" } },
|
|
10251
|
+
{ "@absent": { isExample: true, example: "true" } },
|
|
10252
|
+
{ isExample: true, example: "$" }
|
|
10253
|
+
],
|
|
10254
|
+
description: "The example text for the review note bit",
|
|
10255
|
+
format: TagFormat.plainText
|
|
9621
10256
|
}
|
|
9622
10257
|
],
|
|
9623
10258
|
rootExampleType: ExampleType.string
|
|
@@ -9670,11 +10305,15 @@ var BITS = {
|
|
|
9670
10305
|
tags: [
|
|
9671
10306
|
// Not sure if these are actually valid here, but include them as they are in the test bit.
|
|
9672
10307
|
{
|
|
10308
|
+
exportJsonKey: { anchor: "$" },
|
|
9673
10309
|
key: ConfigKey.tag_anchor,
|
|
10310
|
+
format: TagFormat.plainText,
|
|
9674
10311
|
description: "Anchor for the sample solution, used to link to the solution"
|
|
9675
10312
|
},
|
|
9676
10313
|
{
|
|
10314
|
+
exportJsonKey: { reference: "$" },
|
|
9677
10315
|
key: ConfigKey.tag_reference,
|
|
10316
|
+
format: TagFormat.plainText,
|
|
9678
10317
|
description: "Reference for the sample solution, used to link to the source of the solution"
|
|
9679
10318
|
}
|
|
9680
10319
|
]
|
|
@@ -9688,6 +10327,19 @@ var BITS = {
|
|
|
9688
10327
|
{
|
|
9689
10328
|
key: ConfigKey.group_quizCommon,
|
|
9690
10329
|
description: "Common quiz tags for sequences"
|
|
10330
|
+
},
|
|
10331
|
+
{
|
|
10332
|
+
// Override inherited @example from group_standardTags: this bit has
|
|
10333
|
+
// a boolean root example (rootExampleType: boolean), so bit-level
|
|
10334
|
+
// [@example] writes `example: true` in addition to `isExample: true`.
|
|
10335
|
+
key: ConfigKey.property_example,
|
|
10336
|
+
exportJsonKey: [
|
|
10337
|
+
{ "@keyonly": { isExample: true, example: true } },
|
|
10338
|
+
{ "@absent": { isExample: true, example: true } },
|
|
10339
|
+
{ isExample: true, example: "$" }
|
|
10340
|
+
],
|
|
10341
|
+
description: "The example flag for the bit (boolean)",
|
|
10342
|
+
format: TagFormat.plainText
|
|
9691
10343
|
}
|
|
9692
10344
|
],
|
|
9693
10345
|
cardSet: CardSetConfigKey.elements,
|
|
@@ -9795,6 +10447,7 @@ var BITS = {
|
|
|
9795
10447
|
{
|
|
9796
10448
|
key: ConfigKey.property_ratingLevelStart,
|
|
9797
10449
|
jsonKey: "ratingLevelStart.level",
|
|
10450
|
+
exportJsonKey: { ratingLevelStart: { level: "$" } },
|
|
9798
10451
|
description: "Start level for the rating survey, used to define the lowest rating",
|
|
9799
10452
|
format: TagFormat.number,
|
|
9800
10453
|
chain: [
|
|
@@ -9808,6 +10461,7 @@ var BITS = {
|
|
|
9808
10461
|
{
|
|
9809
10462
|
key: ConfigKey.property_ratingLevelEnd,
|
|
9810
10463
|
jsonKey: "ratingLevelEnd.level",
|
|
10464
|
+
exportJsonKey: { ratingLevelEnd: { level: "$" } },
|
|
9811
10465
|
description: "End level for the rating survey, used to define the highest rating",
|
|
9812
10466
|
format: TagFormat.number,
|
|
9813
10467
|
chain: [
|
|
@@ -9960,6 +10614,7 @@ var BITS = {
|
|
|
9960
10614
|
},
|
|
9961
10615
|
{
|
|
9962
10616
|
key: ConfigKey.resource_backgroundWallpaper,
|
|
10617
|
+
exportJsonKey: { backgroundWallpaper: { type: "image", image: { src: "$" } } },
|
|
9963
10618
|
description: "Background wallpaper for the image, used to set a background for the image",
|
|
9964
10619
|
chain: [
|
|
9965
10620
|
{
|
|
@@ -10343,12 +10998,34 @@ var BITS = {
|
|
|
10343
10998
|
format: TagFormat.plainText
|
|
10344
10999
|
},
|
|
10345
11000
|
{
|
|
11001
|
+
exportJsonKey: { choices: [{ choice: "$", isCorrect: true }] },
|
|
10346
11002
|
key: ConfigKey.tag_true,
|
|
10347
|
-
description: "Tag for the true option in the true/false question"
|
|
11003
|
+
description: "Tag for the true option in the true/false question",
|
|
11004
|
+
format: TagFormat.plainText
|
|
10348
11005
|
},
|
|
10349
11006
|
{
|
|
11007
|
+
exportJsonKey: { choices: [{ choice: "$", isCorrect: false }] },
|
|
10350
11008
|
key: ConfigKey.tag_false,
|
|
10351
|
-
description: "Tag for the false option in the true/false question"
|
|
11009
|
+
description: "Tag for the false option in the true/false question",
|
|
11010
|
+
format: TagFormat.plainText
|
|
11011
|
+
},
|
|
11012
|
+
{
|
|
11013
|
+
// Override inherited @example from group_standardTags: boolean root
|
|
11014
|
+
// example. Note: the legacy reference parser ties the bare-form
|
|
11015
|
+
// example value to `statement.isCorrect`, but the statement is not
|
|
11016
|
+
// yet emitted when this tag fires at bit-header. The pattern below
|
|
11017
|
+
// emits a literal `true` for bare/synthesized and `$` for valued —
|
|
11018
|
+
// sufficient for `[+...]` (correct) statements which dominate the
|
|
11019
|
+
// fixtures; `[-...]` (incorrect) bits with bare `[@example]` would
|
|
11020
|
+
// need either a runtime extension or an explicit `[@example:false]`.
|
|
11021
|
+
key: ConfigKey.property_example,
|
|
11022
|
+
exportJsonKey: [
|
|
11023
|
+
{ "@keyonly": { isExample: true, example: true } },
|
|
11024
|
+
{ "@absent": { isExample: true, example: true } },
|
|
11025
|
+
{ isExample: true, example: "$" }
|
|
11026
|
+
],
|
|
11027
|
+
description: "The example flag for the bit (boolean)",
|
|
11028
|
+
format: TagFormat.plainText
|
|
10352
11029
|
}
|
|
10353
11030
|
],
|
|
10354
11031
|
rootExampleType: ExampleType.boolean
|
|
@@ -10556,6 +11233,25 @@ var BITS = {
|
|
|
10556
11233
|
baseBitType: BitType2.vendorStripePricingTable,
|
|
10557
11234
|
description: "External Stripe pricing table bit, used to embed external Stripe pricing tables in articles or books"
|
|
10558
11235
|
},
|
|
11236
|
+
[BitType2.vendorStripePricingTablePrintOnRequest]: {
|
|
11237
|
+
since: "5.21.0",
|
|
11238
|
+
baseBitType: BitType2.vendorStripePricingTable,
|
|
11239
|
+
description: "Stripe pricing table bit with print-on-request customer/product IDs, used to embed Stripe pricing tables tied to a specific print-on-request customer and product",
|
|
11240
|
+
tags: [
|
|
11241
|
+
{
|
|
11242
|
+
key: ConfigKey.property_printOnRequestCustomerId,
|
|
11243
|
+
description: "Print-on-request customer ID, used to identify the customer for the print-on-request flow",
|
|
11244
|
+
format: TagFormat.plainText,
|
|
11245
|
+
minCount: 1
|
|
11246
|
+
},
|
|
11247
|
+
{
|
|
11248
|
+
key: ConfigKey.property_printOnRequestProductId,
|
|
11249
|
+
description: "Print-on-request product ID, used to identify the product for the print-on-request flow",
|
|
11250
|
+
format: TagFormat.plainText,
|
|
11251
|
+
minCount: 1
|
|
11252
|
+
}
|
|
11253
|
+
]
|
|
11254
|
+
},
|
|
10559
11255
|
[BitType2.video]: {
|
|
10560
11256
|
since: "1.3.0",
|
|
10561
11257
|
baseBitType: BitType2._standard,
|
|
@@ -10912,6 +11608,8 @@ var Config = class {
|
|
|
10912
11608
|
maxCount: 1,
|
|
10913
11609
|
chain: tag.chain,
|
|
10914
11610
|
jsonKey: tag.jsonKey,
|
|
11611
|
+
exportJsonKey: tag.exportJsonKey,
|
|
11612
|
+
hasExportJsonKey: tag.hasExportJsonKey,
|
|
10915
11613
|
deprecated: tag.deprecated
|
|
10916
11614
|
});
|
|
10917
11615
|
finalResourceTags[k] = newTag;
|
|
@@ -11016,7 +11714,7 @@ var instance2 = new Config();
|
|
|
11016
11714
|
// src/generated/package_info.ts
|
|
11017
11715
|
var PACKAGE_INFO = {
|
|
11018
11716
|
"name": "@gmb/bitmark-parser-generator",
|
|
11019
|
-
"version": "5.
|
|
11717
|
+
"version": "5.23.0",
|
|
11020
11718
|
"author": "Get More Brain Ltd",
|
|
11021
11719
|
"license": "ISC",
|
|
11022
11720
|
"description": "A bitmark parser and generator using Peggy.js"
|
|
@@ -11610,6 +12308,8 @@ var NodeType = {
|
|
|
11610
12308
|
gmbExternalShopItems: "gmbExternalShopItems",
|
|
11611
12309
|
groupTag: "groupTag",
|
|
11612
12310
|
groupTagValue: "groupTagValue",
|
|
12311
|
+
gUri: "gUri",
|
|
12312
|
+
gUriValue: "gUriValue",
|
|
11613
12313
|
handInAcceptFileType: "handInAcceptFileType",
|
|
11614
12314
|
handInAcceptFileTypeValue: "handInAcceptFileTypeValue",
|
|
11615
12315
|
handInInstruction: "handInInstruction",
|
|
@@ -11831,6 +12531,10 @@ var NodeType = {
|
|
|
11831
12531
|
previewVideoValue: "previewVideoValue",
|
|
11832
12532
|
printParentChapterLevel: "printParentChapterLevel",
|
|
11833
12533
|
printParentChapterLevelValue: "printParentChapterLevelValue",
|
|
12534
|
+
printOnRequestCustomerId: "printOnRequestCustomerId",
|
|
12535
|
+
printOnRequestCustomerIdValue: "printOnRequestCustomerIdValue",
|
|
12536
|
+
printOnRequestProductId: "printOnRequestProductId",
|
|
12537
|
+
printOnRequestProductIdValue: "printOnRequestProductIdValue",
|
|
11834
12538
|
processHandIn: "processHandIn",
|
|
11835
12539
|
processHandInLocation: "processHandInLocation",
|
|
11836
12540
|
processHandInLocationValue: "processHandInLocationValue",
|
|
@@ -11948,6 +12652,8 @@ var NodeType = {
|
|
|
11948
12652
|
solution: "solution",
|
|
11949
12653
|
solutions: "solutions",
|
|
11950
12654
|
solutionsValue: "solutionsValue",
|
|
12655
|
+
sourceBB: "sourceBB",
|
|
12656
|
+
sourceBBValue: "sourceBBValue",
|
|
11951
12657
|
sourceDocument: "sourceDocument",
|
|
11952
12658
|
sourceDocumentValue: "sourceDocumentValue",
|
|
11953
12659
|
sourceRL: "sourceRL",
|
|
@@ -12585,6 +13291,17 @@ function convertBasicToExtendedTableFormat(table) {
|
|
|
12585
13291
|
}))
|
|
12586
13292
|
};
|
|
12587
13293
|
}
|
|
13294
|
+
if (Array.isArray(table.columnWidths) && table.columnWidths.length > 0) {
|
|
13295
|
+
const targetCells = tableExtended.header?.rows[0]?.cells ?? tableExtended.body?.rows[0]?.cells;
|
|
13296
|
+
if (targetCells) {
|
|
13297
|
+
for (let i = 0; i < table.columnWidths.length; i++) {
|
|
13298
|
+
const width = table.columnWidths[i];
|
|
13299
|
+
if (typeof width === "number" && width > 0 && targetCells[i]) {
|
|
13300
|
+
targetCells[i].colwidth = width;
|
|
13301
|
+
}
|
|
13302
|
+
}
|
|
13303
|
+
}
|
|
13304
|
+
}
|
|
12588
13305
|
return tableExtended;
|
|
12589
13306
|
}
|
|
12590
13307
|
function convertExtendedToBasicTableFormat(tableExtended) {
|
|
@@ -12596,7 +13313,23 @@ function convertExtendedToBasicTableFormat(tableExtended) {
|
|
|
12596
13313
|
return row.cells.map((cell) => cell?.content).filter((content) => content !== void 0);
|
|
12597
13314
|
};
|
|
12598
13315
|
const dataRows = [];
|
|
13316
|
+
const widths = [];
|
|
13317
|
+
let hasAnyWidth = false;
|
|
13318
|
+
let maxCellCount = 0;
|
|
13319
|
+
const collectWidths = (cells) => {
|
|
13320
|
+
if (!cells) return;
|
|
13321
|
+
if (cells.length > maxCellCount) maxCellCount = cells.length;
|
|
13322
|
+
cells.forEach((cell, idx) => {
|
|
13323
|
+
if (cell && typeof cell.colwidth === "number" && cell.colwidth > 0) {
|
|
13324
|
+
widths[idx] = cell.colwidth;
|
|
13325
|
+
hasAnyWidth = true;
|
|
13326
|
+
}
|
|
13327
|
+
});
|
|
13328
|
+
};
|
|
12599
13329
|
const headRows = tableExtended.header?.rows ?? [];
|
|
13330
|
+
headRows.forEach((row) => collectWidths(row?.cells));
|
|
13331
|
+
(tableExtended.body?.rows ?? []).forEach((row) => collectWidths(row?.cells));
|
|
13332
|
+
(tableExtended.footer?.rows ?? []).forEach((row) => collectWidths(row?.cells));
|
|
12600
13333
|
if (headRows.length > 0) {
|
|
12601
13334
|
const primaryHeader = extractRowCells(headRows[0]);
|
|
12602
13335
|
if (primaryHeader.length > 0) {
|
|
@@ -12626,6 +13359,15 @@ function convertExtendedToBasicTableFormat(tableExtended) {
|
|
|
12626
13359
|
if (dataRows.length > 0) {
|
|
12627
13360
|
table.data = dataRows;
|
|
12628
13361
|
}
|
|
13362
|
+
if (hasAnyWidth) {
|
|
13363
|
+
const columnCount = table.columns?.length ?? maxCellCount;
|
|
13364
|
+
const columnWidths = new Array(columnCount).fill(null);
|
|
13365
|
+
for (let i = 0; i < columnCount; i++) {
|
|
13366
|
+
const w = widths[i];
|
|
13367
|
+
if (typeof w === "number") columnWidths[i] = w;
|
|
13368
|
+
}
|
|
13369
|
+
table.columnWidths = columnWidths;
|
|
13370
|
+
}
|
|
12629
13371
|
return table;
|
|
12630
13372
|
}
|
|
12631
13373
|
function normalizeTableFormat(bitType, table) {
|
|
@@ -24792,6 +25534,7 @@ var Builder = class extends BaseBuilder {
|
|
|
24792
25534
|
isCommented: data.isCommented,
|
|
24793
25535
|
// Properties
|
|
24794
25536
|
id: this.toAstProperty(bitType, ConfigKey.property_id, data.id, options),
|
|
25537
|
+
gUri: this.toAstProperty(bitType, ConfigKey.property_gUri, data.gUri, options),
|
|
24795
25538
|
internalComment: this.toAstProperty(
|
|
24796
25539
|
bitType,
|
|
24797
25540
|
ConfigKey.property_internalComment,
|
|
@@ -25003,6 +25746,7 @@ var Builder = class extends BaseBuilder {
|
|
|
25003
25746
|
data.extractorInternal,
|
|
25004
25747
|
options
|
|
25005
25748
|
),
|
|
25749
|
+
sourceBB: this.normaliseSourceBB(data.sourceBB),
|
|
25006
25750
|
levelCEFRp: this.toAstProperty(
|
|
25007
25751
|
bitType,
|
|
25008
25752
|
ConfigKey.property_levelCEFRp,
|
|
@@ -25647,6 +26391,18 @@ var Builder = class extends BaseBuilder {
|
|
|
25647
26391
|
data.printParentChapterLevel,
|
|
25648
26392
|
options
|
|
25649
26393
|
),
|
|
26394
|
+
printOnRequestCustomerId: this.toAstProperty(
|
|
26395
|
+
bitType,
|
|
26396
|
+
ConfigKey.property_printOnRequestCustomerId,
|
|
26397
|
+
data.printOnRequestCustomerId,
|
|
26398
|
+
options
|
|
26399
|
+
),
|
|
26400
|
+
printOnRequestProductId: this.toAstProperty(
|
|
26401
|
+
bitType,
|
|
26402
|
+
ConfigKey.property_printOnRequestProductId,
|
|
26403
|
+
data.printOnRequestProductId,
|
|
26404
|
+
options
|
|
26405
|
+
),
|
|
25650
26406
|
platformBrandTarget: this.toAstProperty(
|
|
25651
26407
|
bitType,
|
|
25652
26408
|
ConfigKey.property_platformBrandTarget,
|
|
@@ -26011,6 +26767,19 @@ var Builder = class extends BaseBuilder {
|
|
|
26011
26767
|
nodes = Object.values(combinedNodes);
|
|
26012
26768
|
return nodes.length > 0 ? nodes : void 0;
|
|
26013
26769
|
}
|
|
26770
|
+
/**
|
|
26771
|
+
* Normalise a sourceBB input into the AST shape (always number[][]).
|
|
26772
|
+
* Accepts a single 4-number tuple or an array of tuples; returns undefined when empty.
|
|
26773
|
+
*/
|
|
26774
|
+
normaliseSourceBB(data) {
|
|
26775
|
+
if (data == null) return void 0;
|
|
26776
|
+
if (!Array.isArray(data) || data.length === 0) return void 0;
|
|
26777
|
+
const isNested = data.some(Array.isArray);
|
|
26778
|
+
const tuples = (isNested ? data : [data]).filter(
|
|
26779
|
+
(t) => Array.isArray(t) && t.length === 4 && t.every((n) => typeof n === "number")
|
|
26780
|
+
);
|
|
26781
|
+
return tuples.length > 0 ? tuples : void 0;
|
|
26782
|
+
}
|
|
26014
26783
|
/**
|
|
26015
26784
|
* Build groupTag node
|
|
26016
26785
|
*
|
|
@@ -26479,6 +27248,17 @@ var Builder = class extends BaseBuilder {
|
|
|
26479
27248
|
(row) => (row || []).map((cell) => this.handleJsonText(context, TextLocation2.tag, cell))
|
|
26480
27249
|
);
|
|
26481
27250
|
}
|
|
27251
|
+
if (Array.isArray(nodeTable.columnWidths)) {
|
|
27252
|
+
const columnCount = Array.isArray(nodeTable.columns) ? nodeTable.columns.length : void 0;
|
|
27253
|
+
const source = columnCount != null ? nodeTable.columnWidths.slice(0, columnCount) : nodeTable.columnWidths;
|
|
27254
|
+
const normalized = source.map((w) => typeof w === "number" && w > 0 ? w : null);
|
|
27255
|
+
const hasAny = normalized.some((w) => w != null);
|
|
27256
|
+
if (hasAny) {
|
|
27257
|
+
nodeTable.columnWidths = normalized;
|
|
27258
|
+
} else {
|
|
27259
|
+
delete nodeTable.columnWidths;
|
|
27260
|
+
}
|
|
27261
|
+
}
|
|
26482
27262
|
const buildSection = (section) => {
|
|
26483
27263
|
if (!section || !Array.isArray(section.rows)) return void 0;
|
|
26484
27264
|
const rows = section.rows.map((row) => {
|
|
@@ -28319,6 +29099,23 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
28319
29099
|
format: TagFormat.plainText
|
|
28320
29100
|
});
|
|
28321
29101
|
}
|
|
29102
|
+
// bitmarkAst -> bits -> bitsValue -> sourceBB
|
|
29103
|
+
enter_sourceBB(node, route) {
|
|
29104
|
+
const parent = this.getParentNode(route);
|
|
29105
|
+
if (parent?.key !== NodeType.bitsValue) return false;
|
|
29106
|
+
const tuples = node.value;
|
|
29107
|
+
if (!Array.isArray(tuples) || tuples.length === 0) return false;
|
|
29108
|
+
this.writeProperty(
|
|
29109
|
+
"sourceBB",
|
|
29110
|
+
tuples.map((t) => t.join(", ")),
|
|
29111
|
+
route,
|
|
29112
|
+
{
|
|
29113
|
+
format: TagFormat.plainText,
|
|
29114
|
+
array: true
|
|
29115
|
+
}
|
|
29116
|
+
);
|
|
29117
|
+
return false;
|
|
29118
|
+
}
|
|
28322
29119
|
// bitmarkAst -> bits -> bitsValue -> questions -> questionsValue -> additionalSolutions -> additionalSolutionsValue
|
|
28323
29120
|
leaf_additionalSolutionsValue(node, route) {
|
|
28324
29121
|
const parent = this.getParentNode(route, 2);
|
|
@@ -30442,6 +31239,16 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
30442
31239
|
enter_ratingLevelEnd(node, route) {
|
|
30443
31240
|
return this.standardHandler(node, route, NodeType.bitsValue, { array: false });
|
|
30444
31241
|
}
|
|
31242
|
+
// bitmarkAst -> bits -> bitsValue -> sourceBB
|
|
31243
|
+
enter_sourceBB(node, route) {
|
|
31244
|
+
const tuples = node.value;
|
|
31245
|
+
const parent = this.getParentNode(route);
|
|
31246
|
+
if (parent?.key !== NodeType.bitsValue) return false;
|
|
31247
|
+
if (tuples && tuples.length > 0) {
|
|
31248
|
+
this.bitJson.sourceBB = tuples.length === 1 ? tuples[0] : tuples;
|
|
31249
|
+
}
|
|
31250
|
+
return false;
|
|
31251
|
+
}
|
|
30445
31252
|
// bitmarkAst -> bits -> bitsValue -> productId
|
|
30446
31253
|
enter_productId(node, route) {
|
|
30447
31254
|
const productIds = node.value;
|
|
@@ -31469,6 +32276,10 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
31469
32276
|
if (instance2.isOfBitType(bitType, BitType2.vendorStripePricingTable)) {
|
|
31470
32277
|
if (bitJson.stripePricingTableId == null) bitJson.stripePricingTableId = "";
|
|
31471
32278
|
if (bitJson.stripePublishableKey == null) bitJson.stripePublishableKey = "";
|
|
32279
|
+
if (instance2.isOfBitType(bitType, BitType2.vendorStripePricingTablePrintOnRequest)) {
|
|
32280
|
+
if (bitJson.printOnRequestCustomerId == null) bitJson.printOnRequestCustomerId = "";
|
|
32281
|
+
if (bitJson.printOnRequestProductId == null) bitJson.printOnRequestProductId = "";
|
|
32282
|
+
}
|
|
31472
32283
|
}
|
|
31473
32284
|
if (instance2.isOfBitType(bitType, BitType2.callToAction)) {
|
|
31474
32285
|
if (bitJson.buttonCaption == null) bitJson.buttonCaption = "";
|
|
@@ -35116,6 +35927,17 @@ function propertyContentProcessor(context, contentDepth, tagsConfig, content, ta
|
|
|
35116
35927
|
format: TextFormat2.bitmarkText,
|
|
35117
35928
|
location: TextLocation2.tag
|
|
35118
35929
|
});
|
|
35930
|
+
case TagFormat.coordinates:
|
|
35931
|
+
const coordRaw = instance3.unbreakscape(v2, {
|
|
35932
|
+
format: TextFormat2.plainText,
|
|
35933
|
+
location: TextLocation2.tag
|
|
35934
|
+
});
|
|
35935
|
+
if (coordRaw == null) return void 0;
|
|
35936
|
+
const coordParts = coordRaw.split(",").map((p) => instance6.asNumber(p.trim()));
|
|
35937
|
+
if (coordParts.length !== 4 || coordParts.some((n) => n == null)) {
|
|
35938
|
+
return void 0;
|
|
35939
|
+
}
|
|
35940
|
+
return coordParts;
|
|
35119
35941
|
}
|
|
35120
35942
|
}
|
|
35121
35943
|
return instance3.unbreakscape(v2, {
|
|
@@ -35152,6 +35974,8 @@ function propertyContentProcessor(context, contentDepth, tagsConfig, content, ta
|
|
|
35152
35974
|
minCount: 1,
|
|
35153
35975
|
chain: void 0,
|
|
35154
35976
|
jsonKey: void 0,
|
|
35977
|
+
exportJsonKey: void 0,
|
|
35978
|
+
hasExportJsonKey: false,
|
|
35155
35979
|
format: TagFormat.bitmarkText,
|
|
35156
35980
|
values: void 0,
|
|
35157
35981
|
defaultValue: void 0,
|
|
@@ -35162,19 +35986,18 @@ function propertyContentProcessor(context, contentDepth, tagsConfig, content, ta
|
|
|
35162
35986
|
}
|
|
35163
35987
|
|
|
35164
35988
|
// src/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.ts
|
|
35165
|
-
function referenceTagContentProcessor(
|
|
35166
|
-
const { value } = content;
|
|
35989
|
+
function referenceTagContentProcessor(context, _contentDepth, tagsConfig, content, target) {
|
|
35990
|
+
const { value, chain } = content;
|
|
35167
35991
|
const trimmedStringValue = stringUtils.trimmedString(value);
|
|
35168
|
-
|
|
35169
|
-
|
|
35170
|
-
|
|
35171
|
-
|
|
35172
|
-
|
|
35173
|
-
|
|
35174
|
-
|
|
35175
|
-
|
|
35176
|
-
|
|
35177
|
-
});
|
|
35992
|
+
target.reference = instance3.unbreakscape(trimmedStringValue, {
|
|
35993
|
+
format: TextFormat2.bitmarkText,
|
|
35994
|
+
location: TextLocation2.tag
|
|
35995
|
+
});
|
|
35996
|
+
if (Array.isArray(chain) && chain.length > 0) {
|
|
35997
|
+
const sub = context.bitContentProcessor(ContentDepth.Chain, tagsConfig, chain);
|
|
35998
|
+
if (sub.reference != null) {
|
|
35999
|
+
target.referenceEnd = sub.reference;
|
|
36000
|
+
}
|
|
35178
36001
|
}
|
|
35179
36002
|
}
|
|
35180
36003
|
|
|
@@ -35860,7 +36683,6 @@ var BitmarkPegParserProcessor = class {
|
|
|
35860
36683
|
result.markConfig = [];
|
|
35861
36684
|
result.extraProperties = {};
|
|
35862
36685
|
result.internalComments = [];
|
|
35863
|
-
let seenReference = false;
|
|
35864
36686
|
let inFooter = false;
|
|
35865
36687
|
const bodyParts = [];
|
|
35866
36688
|
let bodyTextPart = instance3.EMPTY_STRING;
|
|
@@ -35896,15 +36718,7 @@ var BitmarkPegParserProcessor = class {
|
|
|
35896
36718
|
defaultTagContentProcessor(this.context, contentDepth, tagsConfig, content, result);
|
|
35897
36719
|
break;
|
|
35898
36720
|
case TypeKey.Reference:
|
|
35899
|
-
referenceTagContentProcessor(
|
|
35900
|
-
this.context,
|
|
35901
|
-
contentDepth,
|
|
35902
|
-
tagsConfig,
|
|
35903
|
-
content,
|
|
35904
|
-
result,
|
|
35905
|
-
seenReference
|
|
35906
|
-
);
|
|
35907
|
-
seenReference = true;
|
|
36721
|
+
referenceTagContentProcessor(this.context, contentDepth, tagsConfig, content, result);
|
|
35908
36722
|
break;
|
|
35909
36723
|
case TypeKey.Title:
|
|
35910
36724
|
titleTagContentProcessor(this.context, contentDepth, tagsConfig, content, result);
|
|
@@ -40284,6 +41098,117 @@ var JsonStringGenerator = class {
|
|
|
40284
41098
|
}
|
|
40285
41099
|
};
|
|
40286
41100
|
|
|
41101
|
+
// src/utils/BoundingBox.ts
|
|
41102
|
+
function toBbox(arr) {
|
|
41103
|
+
if (!Array.isArray(arr) || arr.length !== 4) return null;
|
|
41104
|
+
if (!arr.every(Number.isFinite)) return null;
|
|
41105
|
+
return [arr[0], arr[1], arr[2], arr[3]];
|
|
41106
|
+
}
|
|
41107
|
+
function parseSourceBB(sourceBB) {
|
|
41108
|
+
if (sourceBB == null) return [];
|
|
41109
|
+
if (!Array.isArray(sourceBB) || sourceBB.length === 0) return [];
|
|
41110
|
+
const isNested = sourceBB.some(Array.isArray);
|
|
41111
|
+
const candidates = isNested ? sourceBB : [sourceBB];
|
|
41112
|
+
const out = [];
|
|
41113
|
+
for (const candidate of candidates) {
|
|
41114
|
+
const box = toBbox(candidate);
|
|
41115
|
+
if (box) out.push(box);
|
|
41116
|
+
}
|
|
41117
|
+
return out;
|
|
41118
|
+
}
|
|
41119
|
+
function boundingBoxIntersects(a, b) {
|
|
41120
|
+
return a[0] < b[2] && a[2] > b[0] && a[1] < b[3] && a[3] > b[1];
|
|
41121
|
+
}
|
|
41122
|
+
function boundingBoxUnion(boxes) {
|
|
41123
|
+
if (boxes.length === 0) return null;
|
|
41124
|
+
let [x0, y0, x1, y1] = boxes[0];
|
|
41125
|
+
for (let i = 1; i < boxes.length; i++) {
|
|
41126
|
+
const b = boxes[i];
|
|
41127
|
+
if (b[0] < x0) x0 = b[0];
|
|
41128
|
+
if (b[1] < y0) y0 = b[1];
|
|
41129
|
+
if (b[2] > x1) x1 = b[2];
|
|
41130
|
+
if (b[3] > y1) y1 = b[3];
|
|
41131
|
+
}
|
|
41132
|
+
return [x0, y0, x1, y1];
|
|
41133
|
+
}
|
|
41134
|
+
var BoundingBoxIndex = class _BoundingBoxIndex {
|
|
41135
|
+
constructor(entries) {
|
|
41136
|
+
__publicField(this, "_entries");
|
|
41137
|
+
__publicField(this, "bitmarkParser", new BitmarkParserGenerator());
|
|
41138
|
+
this._entries = entries;
|
|
41139
|
+
}
|
|
41140
|
+
/**
|
|
41141
|
+
* Build an index from already-parsed bits. Bits without a parseable
|
|
41142
|
+
* `sourceBB` are dropped. Order of the input is preserved.
|
|
41143
|
+
*
|
|
41144
|
+
* Pass `options.sourceRL` to scope the index to a single source page —
|
|
41145
|
+
* bits whose `sourceRL` doesn't match (or is absent) are excluded.
|
|
41146
|
+
*/
|
|
41147
|
+
static fromBits(wrappers, options) {
|
|
41148
|
+
const filterSourceRL = options?.sourceRL;
|
|
41149
|
+
const entries = [];
|
|
41150
|
+
for (const wrapper of wrappers) {
|
|
41151
|
+
if (!wrapper?.bit) continue;
|
|
41152
|
+
if (filterSourceRL !== void 0 && wrapper.bit.sourceRL !== filterSourceRL) {
|
|
41153
|
+
continue;
|
|
41154
|
+
}
|
|
41155
|
+
const boxes = parseSourceBB(wrapper.bit.sourceBB);
|
|
41156
|
+
if (boxes.length === 0) continue;
|
|
41157
|
+
entries.push({ bit: wrapper.bit, wrapper, boxes });
|
|
41158
|
+
}
|
|
41159
|
+
return new _BoundingBoxIndex(entries);
|
|
41160
|
+
}
|
|
41161
|
+
/** All bits with at least one valid `sourceBB`, in input order. */
|
|
41162
|
+
get entries() {
|
|
41163
|
+
return this._entries;
|
|
41164
|
+
}
|
|
41165
|
+
/**
|
|
41166
|
+
* Bits whose ANY `sourceBB` box intersects `query` (strict overlap —
|
|
41167
|
+
* touching-only edges do NOT count as an intersection).
|
|
41168
|
+
*/
|
|
41169
|
+
intersecting(query) {
|
|
41170
|
+
const matches = [];
|
|
41171
|
+
for (const entry of this._entries) {
|
|
41172
|
+
if (entry.boxes.some((box) => boundingBoxIntersects(query, box))) {
|
|
41173
|
+
matches.push(entry);
|
|
41174
|
+
}
|
|
41175
|
+
}
|
|
41176
|
+
return matches;
|
|
41177
|
+
}
|
|
41178
|
+
/**
|
|
41179
|
+
* Flat list of every individual `sourceBB` box that intersects `query`.
|
|
41180
|
+
* For a multi-box bit, only the boxes that themselves intersected are
|
|
41181
|
+
* returned.
|
|
41182
|
+
*/
|
|
41183
|
+
intersectingBoxes(query) {
|
|
41184
|
+
const matches = [];
|
|
41185
|
+
for (const entry of this._entries) {
|
|
41186
|
+
for (const box of entry.boxes) {
|
|
41187
|
+
if (boundingBoxIntersects(query, box)) matches.push(box);
|
|
41188
|
+
}
|
|
41189
|
+
}
|
|
41190
|
+
return matches;
|
|
41191
|
+
}
|
|
41192
|
+
/**
|
|
41193
|
+
* Smallest axis-aligned box that fully encloses every individual `sourceBB`
|
|
41194
|
+
* box that intersected the query. For a multi-box bit, only the boxes that
|
|
41195
|
+
* themselves intersected contribute to the union — non-intersecting boxes
|
|
41196
|
+
* from the same bit are ignored. Returns `null` if no box matches.
|
|
41197
|
+
*/
|
|
41198
|
+
enclosingBoundingBox(query) {
|
|
41199
|
+
return boundingBoxUnion(this.intersectingBoxes(query));
|
|
41200
|
+
}
|
|
41201
|
+
/** Render selected bits back to bitmark text. Empty input returns `''`. */
|
|
41202
|
+
toBitmark(entries) {
|
|
41203
|
+
if (entries.length === 0) return "";
|
|
41204
|
+
const wrappers = entries.map((e) => e.wrapper);
|
|
41205
|
+
return this.bitmarkParser.convert(wrappers, {
|
|
41206
|
+
outputFormat: Output.bitmark,
|
|
41207
|
+
bitmarkOptions: { prettifyJson: true }
|
|
41208
|
+
});
|
|
41209
|
+
}
|
|
41210
|
+
};
|
|
41211
|
+
|
|
40287
41212
|
// src/index.ts
|
|
40288
41213
|
init();
|
|
40289
41214
|
export {
|
|
@@ -40296,6 +41221,7 @@ export {
|
|
|
40296
41221
|
BitmarkStringGenerator,
|
|
40297
41222
|
BitmarkVersion,
|
|
40298
41223
|
BodyTextFormat,
|
|
41224
|
+
BoundingBoxIndex,
|
|
40299
41225
|
Builder,
|
|
40300
41226
|
CardSetVersion,
|
|
40301
41227
|
InfoFormat,
|