5etools-utils 0.17.18 → 0.17.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "5etools-utils",
3
- "version": "0.17.18",
3
+ "version": "0.17.20",
4
4
  "description": "Shared utilities for the 5etools ecosystem.",
5
5
  "type": "module",
6
6
  "main": "lib/Api.js",
@@ -3,7 +3,7 @@
3
3
  "$id": "entry.json",
4
4
  "title": "Entry",
5
5
  "description": "A recursively renderable object.",
6
- "version": "1.11.0",
6
+ "version": "1.11.2",
7
7
  "$defs": {
8
8
  "_arrayOfSpell": {
9
9
  "type": "array",
@@ -304,6 +304,50 @@
304
304
  ],
305
305
  "additionalProperties": false
306
306
  },
307
+ "entryHomebrew": {
308
+ "$comment": "Note that this is intended as homebrew-only, but, is made available everywhere to support samples.",
309
+ "type": "object",
310
+ "properties": {
311
+ "name": {
312
+ "type": "string"
313
+ },
314
+ "type": {
315
+ "type": "string",
316
+ "const": "homebrew"
317
+ },
318
+ "source": {
319
+ "$ref": "util.json#/$defs/source"
320
+ },
321
+ "page": {
322
+ "$ref": "util.json#/$defs/page"
323
+ },
324
+ "data": {
325
+ "$ref": "#/$defs/_entryDataData"
326
+ },
327
+ "id": {
328
+ "type": "string"
329
+ },
330
+ "entries": {
331
+ "type": "array",
332
+ "items": {
333
+ "$ref": "#"
334
+ }
335
+ },
336
+ "movedTo": {
337
+ "$ref": "#"
338
+ },
339
+ "oldEntries": {
340
+ "type": "array",
341
+ "items": {
342
+ "$ref": "#"
343
+ }
344
+ }
345
+ },
346
+ "required": [
347
+ "type"
348
+ ],
349
+ "additionalProperties": false
350
+ },
307
351
  "entryQuote": {
308
352
  "type": "object",
309
353
  "properties": {
@@ -1182,175 +1226,358 @@
1182
1226
  "additionalProperties": false
1183
1227
  },
1184
1228
  "abilityGeneric": {
1185
- "type": "object",
1186
- "properties": {
1187
- "name": {
1188
- "type": "string"
1189
- },
1190
- "type": {
1191
- "type": "string",
1192
- "const": "abilityGeneric"
1193
- },
1194
- "source": {
1195
- "$ref": "util.json#/$defs/source"
1196
- },
1197
- "page": {
1198
- "$ref": "util.json#/$defs/page"
1199
- },
1200
- "data": {
1201
- "$ref": "#/$defs/_entryDataData"
1202
- },
1203
- "id": {
1204
- "type": "string"
1205
- },
1206
- "text": {
1207
- "type": "string"
1229
+ "anyOf": [
1230
+ {
1231
+ "type": "object",
1232
+ "deprecated": true,
1233
+ "properties": {
1234
+ "name": {
1235
+ "type": "string"
1236
+ },
1237
+ "type": {
1238
+ "type": "string",
1239
+ "const": "abilityGeneric"
1240
+ },
1241
+ "source": {
1242
+ "$ref": "util.json#/$defs/source"
1243
+ },
1244
+ "page": {
1245
+ "$ref": "util.json#/$defs/page"
1246
+ },
1247
+ "data": {
1248
+ "$ref": "#/$defs/_entryDataData"
1249
+ },
1250
+ "id": {
1251
+ "type": "string"
1252
+ },
1253
+ "text": {
1254
+ "type": "string"
1255
+ },
1256
+ "attributes": {
1257
+ "type": "array",
1258
+ "items": {
1259
+ "$ref": "util.json#/$defs/abilityScoreAbbreviation"
1260
+ }
1261
+ }
1262
+ },
1263
+ "required": [
1264
+ "type",
1265
+ "text"
1266
+ ],
1267
+ "additionalProperties": false
1208
1268
  },
1209
- "attributes": {
1210
- "type": "array",
1211
- "items": {
1212
- "$ref": "util.json#/$defs/abilityScoreAbbreviation"
1213
- }
1269
+ {
1270
+ "type": "object",
1271
+ "properties": {
1272
+ "name": {
1273
+ "type": "string"
1274
+ },
1275
+ "type": {
1276
+ "type": "string",
1277
+ "const": "abilityGeneric"
1278
+ },
1279
+ "source": {
1280
+ "$ref": "util.json#/$defs/source"
1281
+ },
1282
+ "page": {
1283
+ "$ref": "util.json#/$defs/page"
1284
+ },
1285
+ "data": {
1286
+ "$ref": "#/$defs/_entryDataData"
1287
+ },
1288
+ "id": {
1289
+ "type": "string"
1290
+ },
1291
+ "entry": {
1292
+ "type": "string"
1293
+ },
1294
+ "attributes": {
1295
+ "type": "array",
1296
+ "items": {
1297
+ "$ref": "util.json#/$defs/abilityScoreAbbreviation"
1298
+ }
1299
+ }
1300
+ },
1301
+ "required": [
1302
+ "type",
1303
+ "entry"
1304
+ ],
1305
+ "additionalProperties": false
1214
1306
  }
1215
- },
1216
- "required": [
1217
- "type",
1218
- "text"
1219
1307
  ],
1220
- "additionalProperties": false
1308
+ "$comment": "Ditto \"entryStatblockInline\"."
1221
1309
  },
1222
1310
  "entryLink": {
1223
- "type": "object",
1224
- "properties": {
1225
- "name": {
1226
- "type": "string"
1227
- },
1228
- "type": {
1229
- "type": "string",
1230
- "const": "link"
1231
- },
1232
- "source": {
1233
- "$ref": "util.json#/$defs/source"
1234
- },
1235
- "page": {
1236
- "$ref": "util.json#/$defs/page"
1237
- },
1238
- "data": {
1239
- "$ref": "#/$defs/_entryDataData"
1240
- },
1241
- "id": {
1242
- "type": "string"
1243
- },
1244
- "text": {
1245
- "type": "string"
1246
- },
1247
- "href": {
1248
- "oneOf": [
1249
- {
1250
- "type": "object",
1251
- "properties": {
1252
- "type": {
1253
- "const": "internal"
1254
- },
1255
- "path": {
1256
- "type": "string"
1257
- },
1258
- "hash": {
1259
- "type": "string"
1260
- },
1261
- "hashPreEncoded": {
1262
- "type": "boolean"
1263
- },
1264
- "subhashes": {
1265
- "type": "array",
1266
- "items": {
1267
- "oneOf": [
1268
- {
1269
- "type": "object",
1270
- "properties": {
1271
- "key": {
1272
- "type": "string"
1273
- },
1274
- "values": {
1275
- "type": "array",
1276
- "items": {
1277
- "type": "string"
1278
- }
1311
+ "anyOf": [
1312
+ {
1313
+ "type": "object",
1314
+ "deprecated": true,
1315
+ "properties": {
1316
+ "name": {
1317
+ "type": "string"
1318
+ },
1319
+ "type": {
1320
+ "type": "string",
1321
+ "const": "link"
1322
+ },
1323
+ "source": {
1324
+ "$ref": "util.json#/$defs/source"
1325
+ },
1326
+ "page": {
1327
+ "$ref": "util.json#/$defs/page"
1328
+ },
1329
+ "data": {
1330
+ "$ref": "#/$defs/_entryDataData"
1331
+ },
1332
+ "id": {
1333
+ "type": "string"
1334
+ },
1335
+ "text": {
1336
+ "type": "string"
1337
+ },
1338
+ "href": {
1339
+ "oneOf": [
1340
+ {
1341
+ "type": "object",
1342
+ "properties": {
1343
+ "type": {
1344
+ "const": "internal"
1345
+ },
1346
+ "path": {
1347
+ "type": "string"
1348
+ },
1349
+ "hash": {
1350
+ "type": "string"
1351
+ },
1352
+ "hashPreEncoded": {
1353
+ "type": "boolean"
1354
+ },
1355
+ "subhashes": {
1356
+ "type": "array",
1357
+ "items": {
1358
+ "oneOf": [
1359
+ {
1360
+ "type": "object",
1361
+ "properties": {
1362
+ "key": {
1363
+ "type": "string"
1364
+ },
1365
+ "values": {
1366
+ "type": "array",
1367
+ "items": {
1368
+ "type": "string"
1369
+ }
1370
+ },
1371
+ "preEncoded": {
1372
+ "type": "boolean"
1373
+ }
1374
+ },
1375
+ "required": [
1376
+ "key",
1377
+ "values"
1378
+ ],
1379
+ "additionalProperties": false
1279
1380
  },
1280
- "preEncoded": {
1281
- "type": "boolean"
1381
+ {
1382
+ "type": "object",
1383
+ "properties": {
1384
+ "key": {
1385
+ "type": "string"
1386
+ },
1387
+ "value": {
1388
+ "type": "string"
1389
+ },
1390
+ "preEncoded": {
1391
+ "type": "boolean"
1392
+ }
1393
+ },
1394
+ "required": [
1395
+ "key",
1396
+ "value"
1397
+ ],
1398
+ "additionalProperties": false
1282
1399
  }
1400
+ ]
1401
+ }
1402
+ },
1403
+ "hover": {
1404
+ "type": "object",
1405
+ "properties": {
1406
+ "page": {
1407
+ "$ref": "util.json#/$defs/page"
1283
1408
  },
1284
- "required": [
1285
- "key",
1286
- "values"
1287
- ],
1288
- "additionalProperties": false
1289
- },
1290
- {
1291
- "type": "object",
1292
- "properties": {
1293
- "key": {
1294
- "type": "string"
1295
- },
1296
- "value": {
1297
- "type": "string"
1298
- },
1299
- "preEncoded": {
1300
- "type": "boolean"
1301
- }
1409
+ "source": {
1410
+ "$ref": "util.json#/$defs/source"
1302
1411
  },
1303
- "required": [
1304
- "key",
1305
- "value"
1306
- ],
1307
- "additionalProperties": false
1308
- }
1309
- ]
1310
- }
1412
+ "hash": {
1413
+ "description": "Optional; overrides the href hash for hover handlers.",
1414
+ "type": "string",
1415
+ "markdownDescription": "Optional; overrides the href hash for hover handlers."
1416
+ },
1417
+ "hashPreEncoded": {
1418
+ "type": "boolean"
1419
+ }
1420
+ },
1421
+ "additionalProperties": false,
1422
+ "required": [
1423
+ "page",
1424
+ "source"
1425
+ ]
1426
+ }
1427
+ },
1428
+ "required": [
1429
+ "path"
1430
+ ],
1431
+ "additionalProperties": false
1311
1432
  },
1312
- "hover": {
1433
+ {
1434
+ "$ref": "#/$defs/mediaHrefExternal"
1435
+ }
1436
+ ]
1437
+ }
1438
+ },
1439
+ "required": [
1440
+ "type",
1441
+ "text",
1442
+ "href"
1443
+ ],
1444
+ "additionalProperties": false
1445
+ },
1446
+ {
1447
+ "type": "object",
1448
+ "properties": {
1449
+ "name": {
1450
+ "type": "string"
1451
+ },
1452
+ "type": {
1453
+ "type": "string",
1454
+ "const": "link"
1455
+ },
1456
+ "source": {
1457
+ "$ref": "util.json#/$defs/source"
1458
+ },
1459
+ "page": {
1460
+ "$ref": "util.json#/$defs/page"
1461
+ },
1462
+ "data": {
1463
+ "$ref": "#/$defs/_entryDataData"
1464
+ },
1465
+ "id": {
1466
+ "type": "string"
1467
+ },
1468
+ "entry": {
1469
+ "type": "string"
1470
+ },
1471
+ "href": {
1472
+ "oneOf": [
1473
+ {
1313
1474
  "type": "object",
1314
1475
  "properties": {
1315
- "page": {
1316
- "$ref": "util.json#/$defs/page"
1476
+ "type": {
1477
+ "const": "internal"
1317
1478
  },
1318
- "source": {
1319
- "$ref": "util.json#/$defs/source"
1479
+ "path": {
1480
+ "type": "string"
1320
1481
  },
1321
1482
  "hash": {
1322
- "description": "Optional; overrides the href hash for hover handlers.",
1323
- "type": "string",
1324
- "markdownDescription": "Optional; overrides the href hash for hover handlers."
1483
+ "type": "string"
1325
1484
  },
1326
1485
  "hashPreEncoded": {
1327
1486
  "type": "boolean"
1487
+ },
1488
+ "subhashes": {
1489
+ "type": "array",
1490
+ "items": {
1491
+ "oneOf": [
1492
+ {
1493
+ "type": "object",
1494
+ "properties": {
1495
+ "key": {
1496
+ "type": "string"
1497
+ },
1498
+ "values": {
1499
+ "type": "array",
1500
+ "items": {
1501
+ "type": "string"
1502
+ }
1503
+ },
1504
+ "preEncoded": {
1505
+ "type": "boolean"
1506
+ }
1507
+ },
1508
+ "required": [
1509
+ "key",
1510
+ "values"
1511
+ ],
1512
+ "additionalProperties": false
1513
+ },
1514
+ {
1515
+ "type": "object",
1516
+ "properties": {
1517
+ "key": {
1518
+ "type": "string"
1519
+ },
1520
+ "value": {
1521
+ "type": "string"
1522
+ },
1523
+ "preEncoded": {
1524
+ "type": "boolean"
1525
+ }
1526
+ },
1527
+ "required": [
1528
+ "key",
1529
+ "value"
1530
+ ],
1531
+ "additionalProperties": false
1532
+ }
1533
+ ]
1534
+ }
1535
+ },
1536
+ "hover": {
1537
+ "type": "object",
1538
+ "properties": {
1539
+ "page": {
1540
+ "$ref": "util.json#/$defs/page"
1541
+ },
1542
+ "source": {
1543
+ "$ref": "util.json#/$defs/source"
1544
+ },
1545
+ "hash": {
1546
+ "description": "Optional; overrides the href hash for hover handlers.",
1547
+ "type": "string",
1548
+ "markdownDescription": "Optional; overrides the href hash for hover handlers."
1549
+ },
1550
+ "hashPreEncoded": {
1551
+ "type": "boolean"
1552
+ }
1553
+ },
1554
+ "additionalProperties": false,
1555
+ "required": [
1556
+ "page",
1557
+ "source"
1558
+ ]
1328
1559
  }
1329
1560
  },
1330
- "additionalProperties": false,
1331
1561
  "required": [
1332
- "page",
1333
- "source"
1334
- ]
1562
+ "path"
1563
+ ],
1564
+ "additionalProperties": false
1565
+ },
1566
+ {
1567
+ "$ref": "#/$defs/mediaHrefExternal"
1335
1568
  }
1336
- },
1337
- "required": [
1338
- "path"
1339
- ],
1340
- "additionalProperties": false
1341
- },
1342
- {
1343
- "$ref": "#/$defs/mediaHrefExternal"
1569
+ ]
1344
1570
  }
1345
- ]
1571
+ },
1572
+ "required": [
1573
+ "type",
1574
+ "entry",
1575
+ "href"
1576
+ ],
1577
+ "additionalProperties": false
1346
1578
  }
1347
- },
1348
- "required": [
1349
- "type",
1350
- "text",
1351
- "href"
1352
1579
  ],
1353
- "additionalProperties": false
1580
+ "$comment": "Ditto \"entryStatblockInline\"."
1354
1581
  },
1355
1582
  "entryOptFeature": {
1356
1583
  "description": "For e.g. Eldritch Invocations which require prerequisite text. Deprecated; prefer \"refOptionalfeature\" or \"statblock\" entries instead.",
@@ -4880,49 +5107,6 @@
4880
5107
  ]
4881
5108
  }
4882
5109
  ]
4883
- },
4884
- "entryHomebrew": {
4885
- "type": "object",
4886
- "properties": {
4887
- "name": {
4888
- "type": "string"
4889
- },
4890
- "type": {
4891
- "type": "string",
4892
- "const": "homebrew"
4893
- },
4894
- "source": {
4895
- "$ref": "util.json#/$defs/source"
4896
- },
4897
- "page": {
4898
- "$ref": "util.json#/$defs/page"
4899
- },
4900
- "data": {
4901
- "$ref": "#/$defs/_entryDataData"
4902
- },
4903
- "id": {
4904
- "type": "string"
4905
- },
4906
- "entries": {
4907
- "type": "array",
4908
- "items": {
4909
- "$ref": "#"
4910
- }
4911
- },
4912
- "movedTo": {
4913
- "$ref": "#"
4914
- },
4915
- "oldEntries": {
4916
- "type": "array",
4917
- "items": {
4918
- "$ref": "#"
4919
- }
4920
- }
4921
- },
4922
- "required": [
4923
- "type"
4924
- ],
4925
- "additionalProperties": false
4926
5110
  }
4927
5111
  },
4928
5112
  "anyOf": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "version": "1.15.0",
3
+ "version": "1.15.1",
4
4
  "type": "object",
5
5
  "description": "Homebrew for 5etools. Should include arrays titled similarly to the main site data, e.g. `spell` or `class`",
6
6
  "$defs": {
@@ -833,6 +833,10 @@
833
833
  },
834
834
  "encounterShape": {
835
835
  "$ref": "encounterbuilder.json#/properties/encounterShape"
836
+ },
837
+ "renderdemo": {
838
+ "$comment": "(Provided for completion's sake, please ignore)",
839
+ "$ref": "renderdemo.json#/properties/renderdemo"
836
840
  }
837
841
  },
838
842
  "additionalProperties": false,
@@ -1,16 +1,37 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "renderdemo.json",
4
- "version": "1.0.1",
4
+ "version": "1.1.0",
5
5
  "type": "object",
6
6
  "properties": {
7
- "data": {
7
+ "renderdemo": {
8
8
  "type": "array",
9
9
  "minItems": 1,
10
10
  "items": {
11
- "$ref": "entry.json"
11
+ "type": "object",
12
+ "properties": {
13
+ "name": {
14
+ "type": "string",
15
+ "minLength": 1
16
+ },
17
+ "source": {
18
+ "$ref": "util.json#/$defs/source"
19
+ },
20
+ "entry": {
21
+ "$ref": "entry.json"
22
+ }
23
+ },
24
+ "required": [
25
+ "name",
26
+ "source",
27
+ "entry"
28
+ ],
29
+ "additionalProperties": false
12
30
  }
13
31
  }
14
32
  },
33
+ "required": [
34
+ "renderdemo"
35
+ ],
15
36
  "additionalProperties": false
16
37
  }