@archivist-gg/dnd5e 0.3.17 → 0.3.24

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.
Files changed (439) hide show
  1. package/LICENSE +48 -21
  2. package/README.md +26 -48
  3. package/dist/armor/armor.codec.d.ts +0 -7
  4. package/dist/armor/armor.codec.js +1 -9
  5. package/dist/armor/armor.parser.js +1 -8
  6. package/dist/armor/armor.schema.js +1 -7
  7. package/dist/armor/armor.types.d.ts +0 -3
  8. package/dist/background/background.codec.d.ts +0 -6
  9. package/dist/background/background.codec.js +1 -12
  10. package/dist/background/background.parser.js +1 -11
  11. package/dist/background/background.schema.js +1 -12
  12. package/dist/background/background.types.d.ts +0 -5
  13. package/dist/chunk-2EOGK6R6.js +1 -0
  14. package/dist/chunk-2HRRH3WL.js +1 -0
  15. package/dist/chunk-2LCGKNVM.js +1 -0
  16. package/dist/chunk-2NUDWOFG.js +1 -0
  17. package/dist/chunk-334WLI7V.js +1 -0
  18. package/dist/chunk-3LWOVRLA.js +1 -0
  19. package/dist/chunk-3QQOATV3.js +1 -0
  20. package/dist/chunk-4E2GIWJE.js +1 -0
  21. package/dist/chunk-4GN3GYMP.js +1 -0
  22. package/dist/chunk-4IAMSRHD.js +1 -0
  23. package/dist/chunk-4JEF3CET.js +1 -0
  24. package/dist/chunk-4KVVAENP.js +1 -0
  25. package/dist/chunk-56JK6VCL.js +1 -0
  26. package/dist/chunk-5FEXHY4U.js +1 -0
  27. package/dist/chunk-63YJPWTM.js +1 -0
  28. package/dist/chunk-6ASJ3MVB.js +1 -0
  29. package/dist/chunk-6IC53O3Q.js +1 -0
  30. package/dist/chunk-6LCNV26D.js +1 -0
  31. package/dist/chunk-6W253VHH.js +1 -0
  32. package/dist/chunk-7AKJBRBD.js +1 -0
  33. package/dist/chunk-7EL3GWWJ.js +1 -0
  34. package/dist/chunk-7FPQJDFD.js +1 -0
  35. package/dist/chunk-7J5BNH2D.js +1 -0
  36. package/dist/chunk-7LPKI27J.js +1 -0
  37. package/dist/chunk-7UPYRKMF.js +1 -0
  38. package/dist/chunk-A7H6LX47.js +1 -0
  39. package/dist/chunk-AINRPPLH.js +1 -0
  40. package/dist/chunk-BC52J4LA.js +1 -0
  41. package/dist/chunk-BCXGB4HP.js +1 -0
  42. package/dist/chunk-BGX36NPE.js +1 -0
  43. package/dist/chunk-BPKG6RZ7.js +1 -0
  44. package/dist/chunk-BREHZNTL.js +1 -0
  45. package/dist/chunk-BZ6BGGZS.js +1 -0
  46. package/dist/chunk-CAPYNIGK.js +1 -0
  47. package/dist/chunk-CCFIINBA.js +1 -0
  48. package/dist/chunk-CMIEZQL4.js +1 -0
  49. package/dist/chunk-DVUXUIPV.js +1 -0
  50. package/dist/chunk-DY6FVAGA.js +1 -0
  51. package/dist/chunk-DZITM5AG.js +1 -0
  52. package/dist/chunk-DZKSXSJF.js +1 -0
  53. package/dist/chunk-EAARMPCW.js +1 -0
  54. package/dist/chunk-EVT7MGAC.js +1 -0
  55. package/dist/chunk-FOLHTMSC.js +1 -0
  56. package/dist/chunk-GCYUCIDN.js +1 -0
  57. package/dist/chunk-GIOV6JW7.js +1 -0
  58. package/dist/chunk-HCK6IUB3.js +1 -0
  59. package/dist/chunk-HR5MKCP2.js +1 -0
  60. package/dist/chunk-I26FHSI6.js +1 -0
  61. package/dist/chunk-I4O2FIDT.js +1 -0
  62. package/dist/chunk-IGVRLGLM.js +1 -0
  63. package/dist/chunk-IHPLT2ZT.js +1 -0
  64. package/dist/chunk-IOCJIWCV.js +1 -0
  65. package/dist/chunk-JXDX2DKF.js +1 -0
  66. package/dist/chunk-KBFSJ5WE.js +1 -0
  67. package/dist/chunk-KM75CC6Q.js +1 -0
  68. package/dist/chunk-KZDDFG4O.js +1 -0
  69. package/dist/chunk-LJNT3PJP.js +1 -0
  70. package/dist/chunk-LR6UMA5V.js +1 -0
  71. package/dist/chunk-M6RPOLKS.js +1 -0
  72. package/dist/chunk-MC6PLWRZ.js +1 -0
  73. package/dist/chunk-MGGKZGLG.js +1 -0
  74. package/dist/chunk-N3RYJ7RE.js +1 -0
  75. package/dist/chunk-NEMX7QGG.js +1 -0
  76. package/dist/chunk-NI364WV7.js +1 -0
  77. package/dist/chunk-O2QZ73GA.js +1 -0
  78. package/dist/chunk-O776WL7O.js +1 -0
  79. package/dist/chunk-OTFNINUY.js +1 -0
  80. package/dist/chunk-PQAVMK3T.js +1 -0
  81. package/dist/chunk-PZ3ZZ5H5.js +1 -0
  82. package/dist/chunk-PZ4L2EEG.js +1 -0
  83. package/dist/chunk-PZUPZBTN.js +1 -0
  84. package/dist/chunk-QBA757AU.js +1 -0
  85. package/dist/chunk-QFIGPOFW.js +1 -0
  86. package/dist/chunk-QMEKQTUT.js +1 -0
  87. package/dist/chunk-QVWT67WA.js +1 -0
  88. package/dist/chunk-RDXQAZBA.js +1 -0
  89. package/dist/chunk-RE5Z5RNK.js +1 -0
  90. package/dist/chunk-RL4VY2AL.js +1 -0
  91. package/dist/chunk-RQGTBHJW.js +1 -0
  92. package/dist/chunk-RQZCGXUZ.js +1 -0
  93. package/dist/chunk-S5UCI27C.js +1 -0
  94. package/dist/chunk-SEOASDO4.js +1 -0
  95. package/dist/chunk-SU4MEZ5P.js +1 -0
  96. package/dist/chunk-T55DELVL.js +1 -0
  97. package/dist/chunk-TKIEPC6F.js +1 -0
  98. package/dist/chunk-TLXFGGWH.js +1 -0
  99. package/dist/chunk-UBUKCRZ3.js +1 -0
  100. package/dist/chunk-V6NQ547U.js +1 -0
  101. package/dist/chunk-VA3ZWV7C.js +1 -0
  102. package/dist/chunk-VIP3FH2O.js +1 -0
  103. package/dist/chunk-VTQ4RWEG.js +1 -0
  104. package/dist/chunk-WUHTSLG4.js +1 -0
  105. package/dist/chunk-X22SISGM.js +1 -0
  106. package/dist/chunk-XKJXT2PN.js +1 -0
  107. package/dist/chunk-XQMKH4R4.js +1 -0
  108. package/dist/chunk-YGH7S5ZF.js +1 -0
  109. package/dist/chunk-ZE46ADXS.js +1 -0
  110. package/dist/chunk-ZI3FEUX3.js +1 -0
  111. package/dist/class/class.codec.d.ts +0 -7
  112. package/dist/class/class.codec.js +1 -18
  113. package/dist/class/class.parser.js +1 -17
  114. package/dist/class/class.schema.d.ts +2 -1
  115. package/dist/class/class.schema.js +1 -15
  116. package/dist/class/class.slug.d.ts +0 -11
  117. package/dist/class/class.slug.js +1 -8
  118. package/dist/class/class.standard-array.d.ts +0 -7
  119. package/dist/class/class.standard-array.js +1 -20
  120. package/dist/class/class.types.d.ts +0 -20
  121. package/dist/condition/condition.codec.d.ts +0 -6
  122. package/dist/condition/condition.parser.d.ts +0 -10
  123. package/dist/condition/condition.parser.js +1 -7
  124. package/dist/condition/condition.schema.d.ts +0 -16
  125. package/dist/condition/condition.types.d.ts +0 -3
  126. package/dist/data-srd/index.generated.js +1 -146
  127. package/dist/dnd/amount-text.d.ts +4 -27
  128. package/dist/dnd/amount-text.js +1 -13
  129. package/dist/dnd/constants.d.ts +0 -18
  130. package/dist/dnd/constants.js +1 -42
  131. package/dist/dnd/formula-tags.d.ts +0 -2
  132. package/dist/dnd/formula-tags.js +1 -119
  133. package/dist/dnd/math.d.ts +0 -26
  134. package/dist/dnd/math.js +1 -45
  135. package/dist/dnd/prose-tags.d.ts +1 -15
  136. package/dist/dnd/prose-tags.js +1 -18
  137. package/dist/dnd/resource-die.d.ts +0 -4
  138. package/dist/dnd/resource-die.js +1 -17
  139. package/dist/dnd/resource-formula.d.ts +0 -43
  140. package/dist/dnd/resource-formula.js +1 -14
  141. package/dist/dnd/resource-words.d.ts +0 -2
  142. package/dist/dnd/resource-words.js +1 -30
  143. package/dist/dnd/srd-tag-converter.d.ts +0 -21
  144. package/dist/dnd/srd-tag-converter.js +1 -12
  145. package/dist/dnd/tag-grammar.js +1 -12
  146. package/dist/dnd/warn-once.js +1 -8
  147. package/dist/encounter/encounter.ai-schema.js +1 -8
  148. package/dist/entities/base-item-resolver.d.ts +0 -26
  149. package/dist/entities/base-item-resolver.js +1 -11
  150. package/dist/entities/registry-revision.d.ts +10 -0
  151. package/dist/entities/registry-revision.js +1 -0
  152. package/dist/entities/slug.d.ts +1 -31
  153. package/dist/entities/slug.js +1 -12
  154. package/dist/entities/wikilink-display.d.ts +0 -2
  155. package/dist/entities/wikilink-display.js +1 -10
  156. package/dist/feat/feat.category-codes.d.ts +1 -26
  157. package/dist/feat/feat.category-codes.js +1 -14
  158. package/dist/feat/feat.codec.d.ts +0 -6
  159. package/dist/feat/feat.codec.js +1 -12
  160. package/dist/feat/feat.parser.js +1 -11
  161. package/dist/feat/feat.schema.d.ts +31 -1
  162. package/dist/feat/feat.schema.js +1 -10
  163. package/dist/feat/feat.types.d.ts +0 -6
  164. package/dist/index.js +45 -138113
  165. package/dist/inline-tag-parser.js +1 -6
  166. package/dist/item/item.actions-map.d.ts +4 -63
  167. package/dist/item/item.actions-map.js +1 -10
  168. package/dist/item/item.ai-schema.js +1 -6
  169. package/dist/item/item.attunement.d.ts +0 -14
  170. package/dist/item/item.attunement.js +1 -6
  171. package/dist/item/item.bonuses.js +1 -10
  172. package/dist/item/item.codec.js +1 -9
  173. package/dist/item/item.conditions.d.ts +0 -7
  174. package/dist/item/item.conditions.js +1 -11
  175. package/dist/item/item.conditions.types.d.ts +0 -2
  176. package/dist/item/item.cost.js +1 -29
  177. package/dist/item/item.enrichment.js +1 -9
  178. package/dist/item/item.icon.d.ts +0 -8
  179. package/dist/item/item.icon.js +1 -211
  180. package/dist/item/item.parser.js +1 -8
  181. package/dist/item/item.schema.d.ts +2 -0
  182. package/dist/item/item.schema.js +1 -11
  183. package/dist/item/item.types.d.ts +2 -28
  184. package/dist/monster/monster.ai-schema.js +1 -6
  185. package/dist/monster/monster.codec.d.ts +0 -10
  186. package/dist/monster/monster.enrichment.js +1 -19
  187. package/dist/monster/monster.format.d.ts +0 -69
  188. package/dist/monster/monster.format.js +1 -78
  189. package/dist/monster/monster.parser.d.ts +0 -4
  190. package/dist/monster/monster.parser.js +1 -15
  191. package/dist/monster/monster.resolve.d.ts +0 -4
  192. package/dist/monster/monster.schema.d.ts +0 -9
  193. package/dist/monster/monster.schema.js +1 -34
  194. package/dist/monster/monster.types.d.ts +0 -3
  195. package/dist/monster/monster.types.js +1 -1
  196. package/dist/optional-feature/optional-feature.codec.d.ts +0 -11
  197. package/dist/optional-feature/optional-feature.codec.js +1 -13
  198. package/dist/optional-feature/optional-feature.parser.js +1 -12
  199. package/dist/optional-feature/optional-feature.schema.d.ts +30 -1
  200. package/dist/optional-feature/optional-feature.schema.js +1 -15
  201. package/dist/pack.d.ts +0 -9
  202. package/dist/pc/conditions.constants.js +1 -6
  203. package/dist/pc/decision-recognizer.js +1 -8
  204. package/dist/pc/pc.additional-spells.d.ts +4 -14
  205. package/dist/pc/pc.additional-spells.js +1 -23
  206. package/dist/pc/pc.amount-bindings.d.ts +4 -20
  207. package/dist/pc/pc.amount-bindings.js +1 -23
  208. package/dist/pc/pc.asi-flatten.d.ts +0 -59
  209. package/dist/pc/pc.asi-flatten.js +1 -16
  210. package/dist/pc/pc.conditions.d.ts +1 -0
  211. package/dist/pc/pc.conditions.js +1 -6
  212. package/dist/pc/pc.containment.d.ts +0 -5
  213. package/dist/pc/pc.containment.js +1 -24
  214. package/dist/pc/pc.decision-engine.d.ts +4 -141
  215. package/dist/pc/pc.decision-engine.js +1 -52
  216. package/dist/pc/pc.defense-normalize.d.ts +0 -10
  217. package/dist/pc/pc.defense-normalize.js +1 -6
  218. package/dist/pc/pc.entry-overrides.d.ts +0 -58
  219. package/dist/pc/pc.entry-overrides.js +1 -40
  220. package/dist/pc/pc.equipment.d.ts +2 -22
  221. package/dist/pc/pc.equipment.js +1 -33
  222. package/dist/pc/pc.feature-effects.d.ts +23 -275
  223. package/dist/pc/pc.feature-effects.js +1 -26
  224. package/dist/pc/pc.formula-context.js +1 -11
  225. package/dist/pc/pc.infusions.d.ts +0 -65
  226. package/dist/pc/pc.infusions.js +1 -64
  227. package/dist/pc/pc.item-effects.d.ts +18 -0
  228. package/dist/pc/pc.member-choices.d.ts +18 -49
  229. package/dist/pc/pc.member-choices.js +1 -32
  230. package/dist/pc/pc.parser.js +1 -58
  231. package/dist/pc/pc.pools.d.ts +7 -10
  232. package/dist/pc/pc.pools.js +1 -26
  233. package/dist/pc/pc.proficiencies.d.ts +7 -33
  234. package/dist/pc/pc.proficiencies.js +1 -107
  235. package/dist/pc/pc.proficiency-grants.d.ts +0 -26
  236. package/dist/pc/pc.proficiency-normalize.d.ts +4 -25
  237. package/dist/pc/pc.proficiency-normalize.js +1 -12
  238. package/dist/pc/pc.proficiency-query.d.ts +0 -13
  239. package/dist/pc/pc.proficiency-query.js +1 -27
  240. package/dist/pc/pc.recalc.d.ts +7 -131
  241. package/dist/pc/pc.recalc.js +1 -946
  242. package/dist/pc/pc.resolver.d.ts +0 -104
  243. package/dist/pc/pc.resolver.js +1 -59
  244. package/dist/pc/pc.resource-seed.d.ts +0 -8
  245. package/dist/pc/pc.resource-seed.js +1 -42
  246. package/dist/pc/pc.resources.d.ts +1 -59
  247. package/dist/pc/pc.resources.js +1 -23
  248. package/dist/pc/pc.rest.d.ts +1 -20
  249. package/dist/pc/pc.rest.js +1 -230
  250. package/dist/pc/pc.schema.d.ts +19 -2
  251. package/dist/pc/pc.schema.js +1 -9
  252. package/dist/pc/pc.slotting.d.ts +0 -29
  253. package/dist/pc/pc.slotting.js +1 -28
  254. package/dist/pc/pc.speeds.d.ts +19 -0
  255. package/dist/pc/pc.spell-scope.d.ts +6 -0
  256. package/dist/pc/pc.spellcasting.d.ts +0 -70
  257. package/dist/pc/pc.spellcasting.js +1 -28
  258. package/dist/pc/pc.table-column.d.ts +0 -22
  259. package/dist/pc/pc.table-column.js +1 -18
  260. package/dist/pc/pc.tool-picks.d.ts +0 -27
  261. package/dist/pc/pc.tool-picks.js +1 -18
  262. package/dist/pc/pc.types.d.ts +85 -344
  263. package/dist/pc/pc.weapon-grant.d.ts +0 -6
  264. package/dist/pc/pool-layout.d.ts +0 -39
  265. package/dist/pc/pool-layout.js +1 -18
  266. package/dist/pc/resource-equivalents.d.ts +2 -40
  267. package/dist/pc/roll-scope.js +1 -8
  268. package/dist/pc/roll-tag-labels.d.ts +0 -32
  269. package/dist/pc/roll-tag-labels.js +1 -17
  270. package/dist/pc/spell-source.d.ts +0 -11
  271. package/dist/pc/spell-source.js +1 -8
  272. package/dist/race/race.codec.d.ts +0 -6
  273. package/dist/race/race.codec.js +1 -15
  274. package/dist/race/race.parser.js +1 -14
  275. package/dist/race/race.schema.d.ts +0 -8
  276. package/dist/race/race.schema.js +1 -14
  277. package/dist/race/race.structural.d.ts +0 -6
  278. package/dist/race/race.structural.js +1 -6
  279. package/dist/race/race.types.d.ts +0 -8
  280. package/dist/schemas/attack-schema.d.ts +5 -0
  281. package/dist/schemas/caster-type-schema.d.ts +1 -6
  282. package/dist/schemas/caster-type-schema.js +1 -6
  283. package/dist/schemas/choice-schema.js +1 -7
  284. package/dist/schemas/duration-schema.d.ts +0 -2
  285. package/dist/schemas/duration-schema.js +1 -6
  286. package/dist/schemas/entity-extras-schema.d.ts +0 -30
  287. package/dist/schemas/entity-extras-schema.js +1 -10
  288. package/dist/schemas/equipment-grant-schema.d.ts +0 -2
  289. package/dist/schemas/equipment-grant-schema.js +1 -12
  290. package/dist/schemas/feature-alias.d.ts +0 -27
  291. package/dist/schemas/feature-effect-schema.d.ts +30 -1
  292. package/dist/schemas/feature-effect-schema.js +1 -6
  293. package/dist/schemas/feature-schema.d.ts +0 -6
  294. package/dist/schemas/feature-schema.js +1 -12
  295. package/dist/schemas/resource-schema.d.ts +1 -34
  296. package/dist/schemas/resource-schema.js +1 -12
  297. package/dist/schemas/selection-pool-schema.js +1 -10
  298. package/dist/spell/casting-time.d.ts +0 -15
  299. package/dist/spell/casting-time.js +1 -6
  300. package/dist/spell/spell.access.d.ts +0 -6
  301. package/dist/spell/spell.access.js +1 -45
  302. package/dist/spell/spell.ai-schema.js +1 -6
  303. package/dist/spell/spell.codec.js +1 -9
  304. package/dist/spell/spell.enrichment.js +1 -9
  305. package/dist/spell/spell.filter.d.ts +0 -5
  306. package/dist/spell/spell.filter.js +1 -75
  307. package/dist/spell/spell.parser.d.ts +0 -31
  308. package/dist/spell/spell.parser.js +1 -16
  309. package/dist/spell/spell.scaling.d.ts +0 -46
  310. package/dist/spell/spell.scaling.js +1 -79
  311. package/dist/spell/spell.schema.js +1 -7
  312. package/dist/spell/spell.types.d.ts +0 -7
  313. package/dist/srd/retired-items.d.ts +0 -4
  314. package/dist/srd/retired-items.js +1 -11
  315. package/dist/srd-store.d.ts +0 -33
  316. package/dist/subclass/subclass.codec.d.ts +0 -8
  317. package/dist/subclass/subclass.codec.js +1 -17
  318. package/dist/subclass/subclass.parser.js +1 -16
  319. package/dist/subclass/subclass.schema.d.ts +2 -1
  320. package/dist/subclass/subclass.schema.js +1 -14
  321. package/dist/subclass/subclass.types.d.ts +0 -3
  322. package/dist/types/attack.d.ts +2 -0
  323. package/dist/types/casting-option.d.ts +0 -4
  324. package/dist/types/choice.d.ts +1 -72
  325. package/dist/types/choice.js +1 -24
  326. package/dist/types/edition.d.ts +0 -3
  327. package/dist/types/equipment-grant.d.ts +1 -27
  328. package/dist/types/equipment-grant.js +1 -12
  329. package/dist/types/feature-effect.d.ts +14 -14
  330. package/dist/types/feature.d.ts +0 -22
  331. package/dist/types/optional-feature.types.d.ts +1 -31
  332. package/dist/types/resource.d.ts +1 -21
  333. package/dist/types/selection-pool.d.ts +0 -24
  334. package/dist/weapon/weapon-mastery.d.ts +0 -1
  335. package/dist/weapon/weapon.classify.d.ts +0 -11
  336. package/dist/weapon/weapon.classify.js +1 -7
  337. package/dist/weapon/weapon.codec.d.ts +0 -9
  338. package/dist/weapon/weapon.codec.js +1 -9
  339. package/dist/weapon/weapon.parser.js +1 -8
  340. package/dist/weapon/weapon.schema.js +1 -7
  341. package/dist/weapon/weapon.types.d.ts +0 -3
  342. package/package.json +3 -3
  343. package/src/data-srd/ATTRIBUTION.md +1 -1
  344. package/dist/chunk-2FRUSVZS.js +0 -489
  345. package/dist/chunk-2JSQE3DD.js +0 -206
  346. package/dist/chunk-2LULMQTF.js +0 -14
  347. package/dist/chunk-2UDSN6VW.js +0 -18
  348. package/dist/chunk-3LWMFYKS.js +0 -57
  349. package/dist/chunk-3MGQFFNE.js +0 -110
  350. package/dist/chunk-3TM34RSJ.js +0 -23
  351. package/dist/chunk-3VZZDKRA.js +0 -1014
  352. package/dist/chunk-4U55VNC7.js +0 -22
  353. package/dist/chunk-5GKJAUMX.js +0 -59
  354. package/dist/chunk-5MXFW4O3.js +0 -71
  355. package/dist/chunk-656QCX4U.js +0 -22
  356. package/dist/chunk-6EI737IO.js +0 -19
  357. package/dist/chunk-6GNXYAYP.js +0 -25
  358. package/dist/chunk-6PXTNCBP.js +0 -133
  359. package/dist/chunk-6X2NV665.js +0 -33
  360. package/dist/chunk-7ATNGKBS.js +0 -178
  361. package/dist/chunk-7Q2VPKCD.js +0 -181
  362. package/dist/chunk-7QN7XSAK.js +0 -19
  363. package/dist/chunk-A54HHCWW.js +0 -67
  364. package/dist/chunk-AZRGFUSR.js +0 -18
  365. package/dist/chunk-B3DP42OM.js +0 -55
  366. package/dist/chunk-CJYCVNW2.js +0 -7
  367. package/dist/chunk-CM5CWO4K.js +0 -735
  368. package/dist/chunk-DEEHHLAP.js +0 -271
  369. package/dist/chunk-DOXSFYLH.js +0 -158
  370. package/dist/chunk-DPUJDOKV.js +0 -365
  371. package/dist/chunk-EJP263OP.js +0 -186
  372. package/dist/chunk-EVMUJYUD.js +0 -195
  373. package/dist/chunk-EYX4JMAU.js +0 -101
  374. package/dist/chunk-FANQVQ3D.js +0 -89
  375. package/dist/chunk-FC4IGH5Y.js +0 -18
  376. package/dist/chunk-G6MHJDVT.js +0 -41
  377. package/dist/chunk-G6PBI2BU.js +0 -18
  378. package/dist/chunk-H5PTKYXL.js +0 -101
  379. package/dist/chunk-HHBD4SQ6.js +0 -24
  380. package/dist/chunk-HS6FIOLP.js +0 -52
  381. package/dist/chunk-HTYMW5CH.js +0 -228
  382. package/dist/chunk-IHE6KVC3.js +0 -13
  383. package/dist/chunk-IN4M4X7P.js +0 -34
  384. package/dist/chunk-IUAAXXNO.js +0 -58
  385. package/dist/chunk-JCMUVZIK.js +0 -133
  386. package/dist/chunk-JSM6JFZR.js +0 -709
  387. package/dist/chunk-K5NJBTE2.js +0 -18
  388. package/dist/chunk-KR6JF3BF.js +0 -14
  389. package/dist/chunk-KSTV7J2U.js +0 -112
  390. package/dist/chunk-KU3YLF6D.js +0 -106
  391. package/dist/chunk-LBEXLN6I.js +0 -91
  392. package/dist/chunk-LF5AGJA4.js +0 -81
  393. package/dist/chunk-LHZXYFBU.js +0 -94
  394. package/dist/chunk-LSLSG67V.js +0 -31
  395. package/dist/chunk-LVQLWRCU.js +0 -15
  396. package/dist/chunk-MBX25B6D.js +0 -18
  397. package/dist/chunk-MYY2C5MB.js +0 -233
  398. package/dist/chunk-OFCSP6MT.js +0 -23
  399. package/dist/chunk-ONTGZR5T.js +0 -1806
  400. package/dist/chunk-OOSRUJBI.js +0 -19
  401. package/dist/chunk-PDJSUH24.js +0 -110
  402. package/dist/chunk-PKX6TGRE.js +0 -93
  403. package/dist/chunk-PQZ4LM4Z.js +0 -19
  404. package/dist/chunk-PTXBIDG7.js +0 -63
  405. package/dist/chunk-PVCEA4HZ.js +0 -6
  406. package/dist/chunk-PXVNAY7T.js +0 -84
  407. package/dist/chunk-QH36K2PU.js +0 -158
  408. package/dist/chunk-QS5L5YTJ.js +0 -24
  409. package/dist/chunk-QYZV2MQA.js +0 -97
  410. package/dist/chunk-QZSWN2KT.js +0 -18
  411. package/dist/chunk-RLGQ5PZZ.js +0 -16
  412. package/dist/chunk-RYLXAYIQ.js +0 -18
  413. package/dist/chunk-S3YUXDSC.js +0 -278
  414. package/dist/chunk-S7REMWW4.js +0 -21
  415. package/dist/chunk-T6QIF5XR.js +0 -348
  416. package/dist/chunk-TOM66P2P.js +0 -38
  417. package/dist/chunk-TULQ4FFX.js +0 -353
  418. package/dist/chunk-UA5KS2PL.js +0 -26
  419. package/dist/chunk-UUBJCNQU.js +0 -187
  420. package/dist/chunk-UZXG6QSY.js +0 -58
  421. package/dist/chunk-VPYBK2MG.js +0 -18
  422. package/dist/chunk-VRV3NNTA.js +0 -161
  423. package/dist/chunk-VTTA2ALZ.js +0 -16
  424. package/dist/chunk-W6GC6OKK.js +0 -16
  425. package/dist/chunk-WELIKLZF.js +0 -256
  426. package/dist/chunk-WSVMLNTO.js +0 -31
  427. package/dist/chunk-WYGD2UGN.js +0 -14
  428. package/dist/chunk-XCFC7LGF.js +0 -122
  429. package/dist/chunk-XJ2F2WO6.js +0 -8
  430. package/dist/chunk-Y5VVP73C.js +0 -23
  431. package/dist/chunk-YBLDE5CG.js +0 -42
  432. package/dist/chunk-YD2VAHA6.js +0 -159
  433. package/dist/chunk-YDGMBMYI.js +0 -25
  434. package/dist/chunk-YHYTW5QA.js +0 -20
  435. package/dist/chunk-YKL6SHRJ.js +0 -23
  436. package/dist/chunk-ZCTUYGNV.js +0 -26
  437. package/dist/chunk-ZDAEGJH4.js +0 -102
  438. package/dist/chunk-ZJXSXVFP.js +0 -58
  439. package/dist/chunk-ZUQW5VBZ.js +0 -89
@@ -1,12 +1 @@
1
- import {
2
- featureObjectSchema,
3
- featureSchema
4
- } from "../chunk-YD2VAHA6.js";
5
- import "../chunk-WYGD2UGN.js";
6
- import "../chunk-ZJXSXVFP.js";
7
- import "../chunk-5MXFW4O3.js";
8
- import "../chunk-2JSQE3DD.js";
9
- export {
10
- featureObjectSchema,
11
- featureSchema
12
- };
1
+ import{featureObjectSchema,featureSchema}from"../chunk-V6NQ547U.js";import"../chunk-ZE46ADXS.js";import"../chunk-CCFIINBA.js";import"../chunk-KBFSJ5WE.js";import"../chunk-6IC53O3Q.js";export{featureObjectSchema,featureSchema};
@@ -47,6 +47,7 @@ export declare const resourceSchema: z.ZodObject<{
47
47
  band: "band";
48
48
  tab: "tab";
49
49
  }>>;
50
+ equivalent_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
50
51
  recovery: z.ZodOptional<z.ZodArray<z.ZodObject<{
51
52
  id: z.ZodString;
52
53
  name: z.ZodString;
@@ -75,40 +76,6 @@ export declare const resourceSchema: z.ZodObject<{
75
76
  }>>;
76
77
  }, z.core.$strip>>>;
77
78
  }, z.core.$strip>;
78
- /** A feature's / optional feature's resource spend.
79
- *
80
- * `amount` is the MINIMUM spend. When `amount_max` is present the spend is a
81
- * RANGE (`amount` .. `amount_max`). Readers of `consumes.resource`, re-measured
82
- * 2026-09-05 across both repos' `src` after plugin task T4 landed: the ENGINE still has
83
- * exactly one, `pc/pc.pools.ts`'s pool vote (R4-G4 §4.2.3, whose owner-aware form T2 shipped;
84
- * the `consumes.resource` key itself PREDATES T2, measured on `821f80d`), which reads the
85
- * id to pick `ResolvedPool.resource` and never spends it; the PLUGIN now has SEVEN FUNCTIONS over
86
- * EIGHT code lines in four files (the unit matters: `grep -rn "consumes\.resource\|consumes?\.resource"
87
- * packages/obsidian/src` returns NINE lines, one of them docblock prose, and `consumeCost` reads the
88
- * field on two of the eight). They are: `renderSpendControl` (`components/actions/spend-control.ts`),
89
- * which SPENDS it; the four row sites that gate that call, `PoolTab.row`, `PoolTab.grantedRow` and
90
- * `PoolTab.blockCard` (`components/pool-tab.ts`) and `renderBoonRow`
91
- * (`components/actions/boon-rows.ts`). Their gates, measured 2026-09-05 with `grep -n` on
92
- * `pool-tab.ts`, are NOT the same test, because their callers differ: `row` is gated on the entry
93
- * being SELECTED (`renderSpellLike` sends it every available candidate), `blockCard` on the entry
94
- * being GRANTED OR SELECTED (`renderBlocks` sends it the available candidates, then the stranded
95
- * picks, then the grants), and `grantedRow` is UNCONDITIONAL because it is reached only by the loop
96
- * over `pool.grants`, as is `renderBoonRow`, which the plugin's `section-renderer.ts` reaches only
97
- * with a `kind` of "selected" or "granted". One rule, KNOWN entries only, expressed four ways;
98
- * `renderFeatureRow` (`components/actions/feature-rows.ts`), whose owner-and-spender rule
99
- * decides between the row slot, the expand card and no control at all; and `consumeCost`
100
- * (`components/pool-tab.ts`), the ONE Cost label the row sub-line and the block card now
101
- * share, which prints the resource's NAME from the index and keeps the raw id only as the
102
- * fallback for an id the character does not own (it no longer singularizes or capitalizes
103
- * it). The field IS spent as of R4-G4 T4: §3's control spends `amount` exactly through
104
- * `CharacterEditState.spendFeatureUse`, the clamped quantity-taking primitive the plugin
105
- * already had. What R4-G4 does NOT do (§15): the HOW-MUCH UI for a range spend
106
- * and its validation rule stay G8, and the converter un-withhold that would emit
107
- * `amount_max` at all is a G7 handoff. So `amount_max` stays DECLARED here only, with
108
- * zero emitted carriers, and the refine is undefined-safe by construction so the
109
- * corpus that ships without the key keeps parsing: 294 `Feature.consumes` carriers
110
- * over 161 documents, plus 70 `OptionalFeature.consumes` documents (R4-G3a §9; an
111
- * unguarded refine refuses all 231, measured). */
112
79
  export declare const resourceConsumptionSchema: z.ZodObject<{
113
80
  source: z.ZodOptional<z.ZodEnum<{
114
81
  "spell-slots": "spell-slots";
@@ -1,12 +1 @@
1
- import {
2
- actionCostEnum,
3
- resetTriggerEnum,
4
- resourceConsumptionSchema,
5
- resourceSchema
6
- } from "../chunk-ZJXSXVFP.js";
7
- export {
8
- actionCostEnum,
9
- resetTriggerEnum,
10
- resourceConsumptionSchema,
11
- resourceSchema
12
- };
1
+ import{actionCostEnum,resetTriggerEnum,resourceConsumptionSchema,resourceSchema}from"../chunk-CCFIINBA.js";export{actionCostEnum,resetTriggerEnum,resourceConsumptionSchema,resourceSchema};
@@ -1,10 +1 @@
1
- import {
2
- poolGrantSchema,
3
- selectionPoolSchema,
4
- tabDeclSchema
5
- } from "../chunk-G6MHJDVT.js";
6
- export {
7
- poolGrantSchema,
8
- selectionPoolSchema,
9
- tabDeclSchema
10
- };
1
+ import{poolGrantSchema,selectionPoolSchema,tabDeclSchema}from"../chunk-GCYUCIDN.js";export{poolGrantSchema,selectionPoolSchema,tabDeclSchema};
@@ -1,22 +1,7 @@
1
- /**
2
- * The ONE reader of a spell's `casting_time` string. Every consumer (the plugin's compact Cast-table label,
3
- * the add-drawer's filter bucket and its sort rank) goes through here, so a spelling that one of them
4
- * understands the others understand too. Before this, each kept its own exact-string switch over the bundle's
5
- * spellings (`action`, `bonus-action`, `1minute`), and they drifted: a converted or AI-generated spell's
6
- * `1 action` / `10 minute` printed raw in the Cast table, and every vault spell spelled `bonus action`,
7
- * `1 minute` or `1 hour` filtered as "special".
8
- *
9
- * The LEADING token decides. Prose after it (a reaction's trigger, Plant Growth's "or 8 hours") is left for
10
- * the caller's tooltip and never matched, and the trailing word boundary stops a word that merely starts with
11
- * a unit (`reactionary`, `bonuses`, `minuteman`) from reading as one. A count is optional and only meaningful
12
- * for minutes and hours; `bonus` may drop the word `action`, which hand-authored spells do.
13
- */
14
1
  export type CastingTimeKind = "action" | "bonus" | "reaction" | "time";
15
2
  export interface ParsedCastingTime {
16
3
  kind: CastingTimeKind;
17
- /** 1 for the action economy; the stated number of minutes / hours for `time` (1 when omitted). */
18
4
  count: number;
19
- /** Present only for `time`. */
20
5
  unit?: "minute" | "hour";
21
6
  }
22
7
  export declare function parseCastingTime(token: string | undefined): ParsedCastingTime | null;
@@ -1,6 +1 @@
1
- import {
2
- parseCastingTime
3
- } from "../chunk-W6GC6OKK.js";
4
- export {
5
- parseCastingTime
6
- };
1
+ import{parseCastingTime}from"../chunk-CMIEZQL4.js";export{parseCastingTime};
@@ -6,10 +6,4 @@ export interface SpellCandidate {
6
6
  level: number;
7
7
  entity: Spell;
8
8
  }
9
- /**
10
- * Pure spell-picker filter. Enumerates all `spell` entities from the registry
11
- * (an empty query returns every spell of the type), drops already-known slugs,
12
- * then applies the name search and — unless `showAll` is set — the class/level
13
- * gate. Results are sorted by level then name.
14
- */
15
9
  export declare function classSpellCandidates(registry: EntityRegistry, classSlugs: string[], maxLevel: number, knownSlugs: Set<string>, showAll?: boolean, query?: string): SpellCandidate[];
@@ -1,45 +1 @@
1
- import {
2
- baseClassName
3
- } from "../chunk-VTTA2ALZ.js";
4
-
5
- // src/spell/spell.access.ts
6
- var LISTED_CLASS_NAMES = /* @__PURE__ */ new WeakMap();
7
- function listedClassNames(registry) {
8
- const count = registry.count();
9
- const cached = LISTED_CLASS_NAMES.get(registry);
10
- if (cached && cached.count === count) return cached.names;
11
- const names = /* @__PURE__ */ new Set();
12
- for (const e of registry.search("", "spell", Number.POSITIVE_INFINITY)) {
13
- const classes = e.data.classes;
14
- if (!Array.isArray(classes)) continue;
15
- for (const c of classes) names.add(baseClassName(String(c)));
16
- }
17
- LISTED_CLASS_NAMES.set(registry, { count, names });
18
- return names;
19
- }
20
- function classSpellCandidates(registry, classSlugs, maxLevel, knownSlugs, showAll = false, query = "") {
21
- const all = registry.search(query, "spell", Number.POSITIVE_INFINITY);
22
- const q = query.toLowerCase();
23
- const classSet = new Set(classSlugs.map((s) => baseClassName(s)));
24
- let unlistable = false;
25
- if (!showAll && classSet.size > 0) {
26
- const listed = listedClassNames(registry);
27
- unlistable = [...classSet].some((n) => !listed.has(n));
28
- }
29
- return all.filter((e) => !knownSlugs.has(e.slug)).map((e) => {
30
- var _a;
31
- const entity = e.data;
32
- return { slug: e.slug, name: e.name, entity, level: (_a = entity.level) != null ? _a : 0 };
33
- }).filter((c) => {
34
- var _a;
35
- if (q && !c.name.toLowerCase().includes(q)) return false;
36
- if (showAll) return true;
37
- if (c.level > maxLevel) return false;
38
- if (unlistable) return true;
39
- const classes = ((_a = c.entity.classes) != null ? _a : []).map((x) => baseClassName(x));
40
- return classes.some((x) => classSet.has(x));
41
- }).sort((a, b) => a.level - b.level || a.name.localeCompare(b.name));
42
- }
43
- export {
44
- classSpellCandidates
45
- };
1
+ import{baseClassName}from"../chunk-CAPYNIGK.js";var LISTED_CLASS_NAMES=new WeakMap;function listedClassNames(registry){const count=registry.count();const cached=LISTED_CLASS_NAMES.get(registry);if(cached&&cached.count===count)return cached.names;const names=new Set;for(const e of registry.search("","spell",Number.POSITIVE_INFINITY)){const classes=e.data.classes;if(!Array.isArray(classes))continue;for(const c of classes)names.add(baseClassName(String(c)))}LISTED_CLASS_NAMES.set(registry,{count,names});return names}function classSpellCandidates(registry,classSlugs,maxLevel,knownSlugs,showAll=false,query=""){const all=registry.search(query,"spell",Number.POSITIVE_INFINITY);const q=query.toLowerCase();const classSet=new Set(classSlugs.map(s=>baseClassName(s)));let unlistable=false;if(!showAll&&classSet.size>0){const listed=listedClassNames(registry);unlistable=[...classSet].some(n=>!listed.has(n))}return all.filter(e=>!knownSlugs.has(e.slug)).map(e=>{var _a;const entity=e.data;return{slug:e.slug,name:e.name,entity,level:(_a=entity.level)!=null?_a:0}}).filter(c=>{var _a;if(q&&!c.name.toLowerCase().includes(q))return false;if(showAll)return true;if(c.level>maxLevel)return false;if(unlistable)return true;const classes=((_a=c.entity.classes)!=null?_a:[]).map(x=>baseClassName(x));return classes.some(x=>classSet.has(x))}).sort((a,b)=>a.level-b.level||a.name.localeCompare(b.name))}export{classSpellCandidates};
@@ -1,6 +1 @@
1
- import {
2
- spellInputSchema
3
- } from "../chunk-656QCX4U.js";
4
- export {
5
- spellInputSchema
6
- };
1
+ import{spellInputSchema}from"../chunk-IHPLT2ZT.js";export{spellInputSchema};
@@ -1,9 +1 @@
1
- import {
2
- spellCodec
3
- } from "../chunk-OOSRUJBI.js";
4
- import "../chunk-7Q2VPKCD.js";
5
- import "../chunk-ZDAEGJH4.js";
6
- import "../chunk-UA5KS2PL.js";
7
- export {
8
- spellCodec
9
- };
1
+ import{spellCodec}from"../chunk-XKJXT2PN.js";import"../chunk-4KVVAENP.js";import"../chunk-7EL3GWWJ.js";import"../chunk-I26FHSI6.js";export{spellCodec};
@@ -1,9 +1 @@
1
- import {
2
- enrichSpell
3
- } from "../chunk-WSVMLNTO.js";
4
- import "../chunk-DEEHHLAP.js";
5
- import "../chunk-PDJSUH24.js";
6
- import "../chunk-WELIKLZF.js";
7
- export {
8
- enrichSpell
9
- };
1
+ import{enrichSpell}from"../chunk-2NUDWOFG.js";import"../chunk-MGGKZGLG.js";import"../chunk-7FPQJDFD.js";import"../chunk-EVT7MGAC.js";export{enrichSpell};
@@ -1,15 +1,10 @@
1
1
  import type { SpellCandidate } from "./spell.access.js";
2
2
  export type CastTimeCat = "action" | "bonus" | "reaction" | "long" | "special";
3
3
  export type RangeCat = "self" | "touch" | "ranged" | "special";
4
- /** Cast-time bucket, read through `parseCastingTime` (the same reader the Cast table's label uses, so the two
5
- * cannot drift). Minutes/hours fold into "long"; unreadable or absent → "special". */
6
4
  export declare function castTimeCategory(token: string | undefined): CastTimeCat;
7
- /** Range bucket from the human range string. Honest read, documented buckets:
8
- * "Self…"→self, "Touch…"→touch, "<n> feet|ft"→ranged, else (mile/Sight/…)→special. */
9
5
  export declare function rangeCategory(range: string | undefined): RangeCat;
10
6
  export type SortKey = "name" | "level" | "time" | "school" | "range" | "damage" | "save" | "source";
11
7
  export type SortDir = "asc" | "desc";
12
8
  export declare function castTimeRank(token: string | undefined): number;
13
- /** Numeric sort weight for a range string: Self=0, Touch=1, "<n> feet"=n, else large. */
14
9
  export declare function rangeSortValue(range: string | undefined): number;
15
10
  export declare function compareCandidates(a: SpellCandidate, b: SpellCandidate, key: SortKey, dir: SortDir): number;
@@ -1,75 +1 @@
1
- import {
2
- parseCastingTime
3
- } from "../chunk-W6GC6OKK.js";
4
-
5
- // src/spell/spell.filter.ts
6
- function castTimeCategory(token) {
7
- const parsed = parseCastingTime(token);
8
- if (!parsed) return "special";
9
- return parsed.kind === "time" ? "long" : parsed.kind;
10
- }
11
- function rangeCategory(range) {
12
- if (!range) return "special";
13
- if (/^self/i.test(range)) return "self";
14
- if (/^touch/i.test(range)) return "touch";
15
- if (/\d+\s*(feet|ft)\b/i.test(range)) return "ranged";
16
- return "special";
17
- }
18
- var CAST_RANK = { action: 0, bonus: 1, reaction: 2, long: 3, special: 4 };
19
- function castTimeRank(token) {
20
- return CAST_RANK[castTimeCategory(token)];
21
- }
22
- function rangeSortValue(range) {
23
- if (!range) return 99999;
24
- if (/^self/i.test(range)) return 0;
25
- if (/^touch/i.test(range)) return 1;
26
- const m = range.match(/(\d+)\s*(feet|ft)\b/i);
27
- return m ? Number(m[1]) : 99999;
28
- }
29
- var EDITION_RANK = { "2014": 0, "2024": 1 };
30
- function cmpMaybe(a, b) {
31
- if (a && b) return a.localeCompare(b);
32
- if (a) return -1;
33
- if (b) return 1;
34
- return 0;
35
- }
36
- function compareCandidates(a, b, key, dir) {
37
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
38
- const mul = dir === "asc" ? 1 : -1;
39
- let r = 0;
40
- switch (key) {
41
- case "name":
42
- r = a.name.localeCompare(b.name);
43
- break;
44
- case "level":
45
- r = a.level - b.level;
46
- break;
47
- case "time":
48
- r = castTimeRank(a.entity.casting_time) - castTimeRank(b.entity.casting_time);
49
- break;
50
- case "school":
51
- r = cmpMaybe(a.entity.school, b.entity.school);
52
- break;
53
- case "range":
54
- r = rangeSortValue(a.entity.range) - rangeSortValue(b.entity.range);
55
- break;
56
- case "damage":
57
- r = cmpMaybe((_b = (_a = a.entity.damage) == null ? void 0 : _a.types) == null ? void 0 : _b[0], (_d = (_c = b.entity.damage) == null ? void 0 : _c.types) == null ? void 0 : _d[0]);
58
- break;
59
- case "save":
60
- r = cmpMaybe((_e = a.entity.saving_throw) == null ? void 0 : _e.ability, (_f = b.entity.saving_throw) == null ? void 0 : _f.ability);
61
- break;
62
- case "source":
63
- r = ((_h = EDITION_RANK[(_g = a.entity.edition) != null ? _g : ""]) != null ? _h : 9) - ((_j = EDITION_RANK[(_i = b.entity.edition) != null ? _i : ""]) != null ? _j : 9);
64
- break;
65
- }
66
- if (r === 0 && key !== "name") r = a.name.localeCompare(b.name);
67
- return r * mul;
68
- }
69
- export {
70
- castTimeCategory,
71
- castTimeRank,
72
- compareCandidates,
73
- rangeCategory,
74
- rangeSortValue
75
- };
1
+ import{parseCastingTime}from"../chunk-CMIEZQL4.js";function castTimeCategory(token){const parsed=parseCastingTime(token);if(!parsed)return"special";return parsed.kind==="time"?"long":parsed.kind}function rangeCategory(range){if(!range)return"special";if(/^self/i.test(range))return"self";if(/^touch/i.test(range))return"touch";if(/\d+\s*(feet|ft)\b/i.test(range))return"ranged";return"special"}var CAST_RANK={action:0,bonus:1,reaction:2,long:3,special:4};function castTimeRank(token){return CAST_RANK[castTimeCategory(token)]}function rangeSortValue(range){if(!range)return 99999;if(/^self/i.test(range))return 0;if(/^touch/i.test(range))return 1;const m=range.match(/(\d+)\s*(feet|ft)\b/i);return m?Number(m[1]):99999}var EDITION_RANK={"2014":0,"2024":1};function cmpMaybe(a,b){if(a&&b)return a.localeCompare(b);if(a)return-1;if(b)return 1;return 0}function compareCandidates(a,b,key,dir){var _a,_b,_c,_d,_e,_f,_g,_h,_i,_j;const mul=dir==="asc"?1:-1;let r=0;switch(key){case"name":r=a.name.localeCompare(b.name);break;case"level":r=a.level-b.level;break;case"time":r=castTimeRank(a.entity.casting_time)-castTimeRank(b.entity.casting_time);break;case"school":r=cmpMaybe(a.entity.school,b.entity.school);break;case"range":r=rangeSortValue(a.entity.range)-rangeSortValue(b.entity.range);break;case"damage":r=cmpMaybe((_b=(_a=a.entity.damage)==null?void 0:_a.types)==null?void 0:_b[0],(_d=(_c=b.entity.damage)==null?void 0:_c.types)==null?void 0:_d[0]);break;case"save":r=cmpMaybe((_e=a.entity.saving_throw)==null?void 0:_e.ability,(_f=b.entity.saving_throw)==null?void 0:_f.ability);break;case"source":r=((_h=EDITION_RANK[(_g=a.entity.edition)!=null?_g:""])!=null?_h:9)-((_j=EDITION_RANK[(_i=b.entity.edition)!=null?_i:""])!=null?_j:9);break}if(r===0&&key!=="name")r=a.name.localeCompare(b.name);return r*mul}export{castTimeCategory,castTimeRank,compareCandidates,rangeCategory,rangeSortValue};
@@ -1,38 +1,7 @@
1
1
  import { Spell, SpellMaterial } from "./spell.types.js";
2
2
  import { ParseResult } from "@archivist-gg/core";
3
- /**
4
- * §3.3 · collapse the converter's structured `components` object to the corpus's own string form
5
- * (`V, S, M (a coin), R`), leaving a string input byte-unchanged. Letter order is V, S, M, R;
6
- * `m` object -> `M (<text>)` (the text already carries the cost prose), `m` string -> `M (<value>)`,
7
- * `m: true` -> a bare `M`. A boolean flag contributes its letter only when it is exactly `true`.
8
- * Casing follows the 862 string-form carriers (uppercase letters); `R` has no precedent among them
9
- * and is an invented-but-decided literal (Gate 0 B-5).
10
- *
11
- * The parameter is `unknown` on purpose: `spellComponentsObjectSchema` stays local and unexported,
12
- * so this function narrows structurally instead of importing the schema's type. `toStringSafe` is
13
- * the unreachable-shape fallback (the schema has already accepted the value by the time we run).
14
- */
15
3
  export declare function normalizeSpellComponents(value: unknown): string;
16
- /**
17
- * D2b-B · the structured material component the string form cannot carry: `components.m` when it is an OBJECT (`text` with an
18
- * optional `cost` and `consume`), copied field by field; `undefined` for every other shape. Structural narrowing, as above.
19
- */
20
4
  export declare function spellMaterialOf(value: unknown): SpellMaterial | undefined;
21
- /**
22
- * §3.3 · collapse the converter's structured `duration` array to the corpus's own lowercase string
23
- * form (`until dispelled`, `up to 1 hour`), leaving a string input byte-unchanged. Concentration is
24
- * NEVER synthesised here — the separate `concentration` boolean drives the sheet's `Conc · ` prefix.
25
- * Zero docs carry more than one entry; the `; ` join is the defensive path for the day one does.
26
- */
27
5
  export declare function normalizeSpellDuration(value: unknown): string;
28
- /**
29
- * R4-G7 §7.5 · the RESOLVE-time twin of the two normalisations `parseSpell` performs below. The PC pipeline
30
- * reads RAW registry entities (`reg.data as unknown as Spell`), so a converter spell reaches the sheet with a
31
- * structured `components` object and `duration` array unless it passes through here; `componentLetters`
32
- * (the sheet) and the add drawer's duration cell both read strings. The `!= null` guards MIRROR `parseSpell`'s
33
- * own, so a spell that authors neither key keeps neither. Lives HERE, beside the normalisers, and not in
34
- * `pc.resolver.ts`, which already imports `pc.additional-spells` and would make the two a value cycle
35
- * [G2-I-2]. Returns a fresh object; the shared registry entity is never mutated.
36
- */
37
6
  export declare function mirrorSpellShapes(entity: Spell): Spell;
38
7
  export declare function parseSpell(source: string): ParseResult<Spell>;
@@ -1,16 +1 @@
1
- import {
2
- mirrorSpellShapes,
3
- normalizeSpellComponents,
4
- normalizeSpellDuration,
5
- parseSpell,
6
- spellMaterialOf
7
- } from "../chunk-7Q2VPKCD.js";
8
- import "../chunk-ZDAEGJH4.js";
9
- import "../chunk-UA5KS2PL.js";
10
- export {
11
- mirrorSpellShapes,
12
- normalizeSpellComponents,
13
- normalizeSpellDuration,
14
- parseSpell,
15
- spellMaterialOf
16
- };
1
+ import{mirrorSpellShapes,normalizeSpellComponents,normalizeSpellDuration,parseSpell,spellMaterialOf}from"../chunk-4KVVAENP.js";import"../chunk-7EL3GWWJ.js";import"../chunk-I26FHSI6.js";export{mirrorSpellShapes,normalizeSpellComponents,normalizeSpellDuration,parseSpell,spellMaterialOf};
@@ -1,59 +1,13 @@
1
1
  import type { Spell } from "./spell.types.js";
2
- /** A spell repeats under higher levels only if it has a real upcast benefit. */
3
2
  export declare function spellScales(spell: Spell): boolean;
4
- /** The `casting_options` field a scaled value was read from (R4-G7 T8 RIDER-16). */
5
3
  export type SpellEffectField = "damage_roll" | "target_count" | "duration" | "desc";
6
- /** A scaled value and the FIELD it came from, so a renderer decides where it prints from the field. */
7
4
  export interface SpellEffectParts {
8
5
  field: SpellEffectField;
9
- /** As printed: the roll, `"<N> targets"`, the duration, or the authored sentence verbatim. */
10
6
  value: string;
11
7
  }
12
- /** The spell's base roll (`damage_roll`), trimmed, or null when absent, empty or whitespace-only. The ONE base-roll
13
- * check: every reader of `damage_roll` (the scaling readers here, the spell card) goes through it. */
14
8
  export declare function spellBaseRoll(spell: Spell): string | null;
15
- /**
16
- * At-a-glance effect for casting a LEVELLED `spell` with a slot of `slotLevel`, WITH the field
17
- * it came from. Returns null when absent or untrustworthy.
18
- *
19
- * A structured `casting_options` entry for that slot (`type: "slot_level_<N>"`) wins: the FIRST
20
- * present field, in this order: `damage_roll`, `target_count`, `duration`, `desc` (so an option
21
- * carrying a roll AND a sentence yields the roll). A `target_count` that equals the slot level is
22
- * the known SRD-2014 bad encoding (e.g. Magic Missile 2nd->2 instead of 4) and is suppressed.
23
- *
24
- * With no option for the slot, the spell's BASE roll (`damage_roll`) answers at the spell's OWN
25
- * level only. Above it, whether the base roll is still the roll dealt is `spellBaseRollAtSlot`'s
26
- * question (it is when the damage does not scale); a SCALING spell missing its option above base
27
- * stays null here. A CANTRIP is never read by slot (null): its roll follows the character's level,
28
- * `spellEffectAtCharacterLevel`, even when it is cast from a scroll. This errs toward showing
29
- * nothing rather than a wrong number.
30
- */
31
9
  export declare function spellEffectPartsAtSlot(spell: Spell, slotLevel: number): SpellEffectParts | null;
32
- /**
33
- * The spell's BASE roll at a slot of `slotLevel` when the data PROVES its damage does not scale, so every slot at or
34
- * above the spell's level deals the base roll. Two proofs, and only these:
35
- * (a) it has `slot_level_<N>` options and every one carries only a `duration` and / or a `target_count` (plus the
36
- * `concentration` flag a duration carries): 2024 Hex and Hunter's Mark scale their duration, Magic Missile and
37
- * Scorching Ray their target count;
38
- * (b) it has no slot options AND no `at_higher_levels` text (Finger of Death).
39
- * Anything else is NOT proof: prose-only scaling (2014 Cure Wounds' "increases by 1d8 for each slot level above
40
- * 1st", with no options) would print the unscaled base on every upcast row, so it stays null there. The companion of
41
- * `spellEffectPartsAtSlot`: a row prints this roll beside a target count, and the duration a slot option carries
42
- * prints in its own cell. Null for a cantrip, below the spell's level, and when the spell has no base roll.
43
- */
44
10
  export declare function spellBaseRollAtSlot(spell: Spell, slotLevel: number): string | null;
45
- /** The value of `spellEffectPartsAtSlot`, without its field. */
46
11
  export declare function spellEffectAtSlot(spell: Spell, slotLevel: number): string | null;
47
- /**
48
- * R4-G7 T8 RIDER-15 (F-NODICE (a)): a CANTRIP's damage roll at the character's total level, read from structured
49
- * `casting_options` (`type: "player_level_<N>"`). The roll of the HIGHEST `N <= characterLevel` wins: SRD 5e authors
50
- * one option per level from 5 to 20, SRD 2024 and the converter author only 5 / 11 / 17. An option with no roll or an
51
- * EMPTY one never qualifies (SRD 5e Acid Splash and Poison Spray open with `player_level_2..4` carrying
52
- * `damage_roll: ''`; Eldritch Blast 2024 authors `target_count` only). When no tier qualifies (below the first tier,
53
- * or tiers that carry no roll) the spell's BASE roll `damage_roll` answers: the tier-1 roll (Fire Bolt `1d10` at 4,
54
- * Eldritch Blast's per-beam `1d10` at any level). Null for a levelled spell, for a level that is not a finite number
55
- * (a fixture-built `derived` omits `totalLevel`), and when neither a tier nor a non-empty base roll exists.
56
- */
57
12
  export declare function spellEffectAtCharacterLevel(spell: Spell, characterLevel: number): string | null;
58
- /** Owned slot levels strictly above the spell's base level (scaling spells only). */
59
13
  export declare function upcastLevelsFor(spell: Spell, ownedSlotLevels: number[]): number[];
@@ -1,79 +1 @@
1
- // src/spell/spell.scaling.ts
2
- function spellScales(spell) {
3
- var _a, _b, _c, _d;
4
- return ((_b = (_a = spell.casting_options) == null ? void 0 : _a.length) != null ? _b : 0) > 0 || ((_d = (_c = spell.at_higher_levels) == null ? void 0 : _c.length) != null ? _d : 0) > 0;
5
- }
6
- function spellBaseRoll(spell) {
7
- const roll = typeof spell.damage_roll === "string" ? spell.damage_roll.trim() : "";
8
- return roll !== "" ? roll : null;
9
- }
10
- function spellEffectPartsAtSlot(spell, slotLevel) {
11
- var _a, _b;
12
- const base = (_a = spell.level) != null ? _a : 0;
13
- if (base === 0) return null;
14
- const opt = ((_b = spell.casting_options) != null ? _b : []).find((o) => o.type === `slot_level_${slotLevel}`);
15
- if (!opt) {
16
- const roll = spellBaseRoll(spell);
17
- return roll !== null && slotLevel === base ? { field: "damage_roll", value: roll } : null;
18
- }
19
- if (opt.damage_roll) return { field: "damage_roll", value: opt.damage_roll };
20
- if (typeof opt.target_count === "number") {
21
- if (opt.target_count === slotLevel) return null;
22
- return { field: "target_count", value: `${opt.target_count} targets` };
23
- }
24
- if (opt.duration) return { field: "duration", value: opt.duration };
25
- return opt.desc != null ? { field: "desc", value: opt.desc } : null;
26
- }
27
- var NON_ROLL_SCALES = /* @__PURE__ */ new Set(["duration", "target_count"]);
28
- var NON_ROLL_OPTION_FIELDS = /* @__PURE__ */ new Set([...NON_ROLL_SCALES, "concentration"]);
29
- function spellBaseRollAtSlot(spell, slotLevel) {
30
- var _a, _b, _c;
31
- const base = (_a = spell.level) != null ? _a : 0;
32
- if (base === 0 || slotLevel < base) return null;
33
- const roll = spellBaseRoll(spell);
34
- if (roll === null) return null;
35
- const slotOptions = ((_b = spell.casting_options) != null ? _b : []).filter((o) => {
36
- var _a2;
37
- return /^slot_level_\d+$/.test(String((_a2 = o.type) != null ? _a2 : ""));
38
- });
39
- if (slotOptions.length > 0) {
40
- const onlyNonRoll = slotOptions.every((o) => {
41
- const fields = Object.entries(o).filter(([k, v]) => k !== "type" && v != null).map(([k]) => k);
42
- return fields.some((k) => NON_ROLL_SCALES.has(k)) && fields.every((k) => NON_ROLL_OPTION_FIELDS.has(k));
43
- });
44
- return onlyNonRoll ? roll : null;
45
- }
46
- return ((_c = spell.at_higher_levels) != null ? _c : []).some((t) => typeof t === "string" && t.trim() !== "") ? null : roll;
47
- }
48
- function spellEffectAtSlot(spell, slotLevel) {
49
- var _a, _b;
50
- return (_b = (_a = spellEffectPartsAtSlot(spell, slotLevel)) == null ? void 0 : _a.value) != null ? _b : null;
51
- }
52
- var PLAYER_LEVEL_TYPE = /^player_level_(\d+)$/;
53
- function spellEffectAtCharacterLevel(spell, characterLevel) {
54
- var _a, _b, _c;
55
- if (((_a = spell.level) != null ? _a : 0) !== 0 || !Number.isFinite(characterLevel)) return null;
56
- let best = null;
57
- for (const opt of (_b = spell.casting_options) != null ? _b : []) {
58
- const m = PLAYER_LEVEL_TYPE.exec(String((_c = opt.type) != null ? _c : ""));
59
- if (!m || typeof opt.damage_roll !== "string" || opt.damage_roll.trim() === "") continue;
60
- const n = Number(m[1]);
61
- if (n <= characterLevel && (best === null || n > best.n)) best = { n, roll: opt.damage_roll };
62
- }
63
- return best ? best.roll : spellBaseRoll(spell);
64
- }
65
- function upcastLevelsFor(spell, ownedSlotLevels) {
66
- var _a;
67
- const base = (_a = spell.level) != null ? _a : 0;
68
- if (base < 1 || !spellScales(spell)) return [];
69
- return ownedSlotLevels.filter((l) => l > base).sort((a, b) => a - b);
70
- }
71
- export {
72
- spellBaseRoll,
73
- spellBaseRollAtSlot,
74
- spellEffectAtCharacterLevel,
75
- spellEffectAtSlot,
76
- spellEffectPartsAtSlot,
77
- spellScales,
78
- upcastLevelsFor
79
- };
1
+ function spellScales(spell){var _a,_b,_c,_d;return((_b=(_a=spell.casting_options)==null?void 0:_a.length)!=null?_b:0)>0||((_d=(_c=spell.at_higher_levels)==null?void 0:_c.length)!=null?_d:0)>0}function spellBaseRoll(spell){const roll=typeof spell.damage_roll==="string"?spell.damage_roll.trim():"";return roll!==""?roll:null}function spellEffectPartsAtSlot(spell,slotLevel){var _a,_b;const base=(_a=spell.level)!=null?_a:0;if(base===0)return null;const opt=((_b=spell.casting_options)!=null?_b:[]).find(o=>o.type===`slot_level_${slotLevel}`);if(!opt){const roll=spellBaseRoll(spell);return roll!==null&&slotLevel===base?{field:"damage_roll",value:roll}:null}if(opt.damage_roll)return{field:"damage_roll",value:opt.damage_roll};if(typeof opt.target_count==="number"){if(opt.target_count===slotLevel)return null;return{field:"target_count",value:`${opt.target_count} targets`}}if(opt.duration)return{field:"duration",value:opt.duration};return opt.desc!=null?{field:"desc",value:opt.desc}:null}var NON_ROLL_SCALES=new Set(["duration","target_count"]);var NON_ROLL_OPTION_FIELDS=new Set([...NON_ROLL_SCALES,"concentration"]);function spellBaseRollAtSlot(spell,slotLevel){var _a,_b,_c;const base=(_a=spell.level)!=null?_a:0;if(base===0||slotLevel<base)return null;const roll=spellBaseRoll(spell);if(roll===null)return null;const slotOptions=((_b=spell.casting_options)!=null?_b:[]).filter(o=>{var _a2;return/^slot_level_\d+$/.test(String((_a2=o.type)!=null?_a2:""))});if(slotOptions.length>0){const onlyNonRoll=slotOptions.every(o=>{const fields=Object.entries(o).filter(([k,v])=>k!=="type"&&v!=null).map(([k])=>k);return fields.some(k=>NON_ROLL_SCALES.has(k))&&fields.every(k=>NON_ROLL_OPTION_FIELDS.has(k))});return onlyNonRoll?roll:null}return((_c=spell.at_higher_levels)!=null?_c:[]).some(t=>typeof t==="string"&&t.trim()!=="")?null:roll}function spellEffectAtSlot(spell,slotLevel){var _a,_b;return(_b=(_a=spellEffectPartsAtSlot(spell,slotLevel))==null?void 0:_a.value)!=null?_b:null}var PLAYER_LEVEL_TYPE=/^player_level_(\d+)$/;function spellEffectAtCharacterLevel(spell,characterLevel){var _a,_b,_c;if(((_a=spell.level)!=null?_a:0)!==0||!Number.isFinite(characterLevel))return null;let best=null;for(const opt of(_b=spell.casting_options)!=null?_b:[]){const m=PLAYER_LEVEL_TYPE.exec(String((_c=opt.type)!=null?_c:""));if(!m||typeof opt.damage_roll!=="string"||opt.damage_roll.trim()==="")continue;const n=Number(m[1]);if(n<=characterLevel&&(best===null||n>best.n))best={n,roll:opt.damage_roll}}return best?best.roll:spellBaseRoll(spell)}function upcastLevelsFor(spell,ownedSlotLevels){var _a;const base=(_a=spell.level)!=null?_a:0;if(base<1||!spellScales(spell))return[];return ownedSlotLevels.filter(l=>l>base).sort((a,b)=>a-b)}export{spellBaseRoll,spellBaseRollAtSlot,spellEffectAtCharacterLevel,spellEffectAtSlot,spellEffectPartsAtSlot,spellScales,upcastLevelsFor};
@@ -1,7 +1 @@
1
- import {
2
- spellEntitySchema
3
- } from "../chunk-ZDAEGJH4.js";
4
- import "../chunk-UA5KS2PL.js";
5
- export {
6
- spellEntitySchema
7
- };
1
+ import{spellEntitySchema}from"../chunk-7EL3GWWJ.js";import"../chunk-I26FHSI6.js";export{spellEntitySchema};
@@ -12,10 +12,6 @@ export interface Spell {
12
12
  casting_time?: string;
13
13
  range?: string;
14
14
  components?: string;
15
- /** D2b-B: the converter's structured material component (`components.m` as an object), kept beside the `components` string,
16
- * which cannot carry its numbers: `cost` in copper pieces as authored (5etools), `consume` true or a word ("optional").
17
- * Absent for a string `components`, a bare `m: true` or a string `m`. A PARSE output only, never a YAML key: the codec
18
- * drops it on serialize. */
19
15
  material?: SpellMaterial;
20
16
  duration?: string;
21
17
  concentration?: boolean;
@@ -26,9 +22,6 @@ export interface Spell {
26
22
  damage?: {
27
23
  types: string[];
28
24
  };
29
- /** The BASE roll: the roll at the spell's own level, or a cantrip's tier-1 roll (before its first
30
- * `player_level_<N>` option). Like `casting_options[].damage_roll` it also carries healing rolls
31
- * (Cure Wounds `2d8`). Mirrors Open5e v2's top-level `damage_roll`. */
32
25
  damage_roll?: string;
33
26
  saving_throw?: {
34
27
  ability: string;
@@ -1,14 +1,10 @@
1
1
  export interface RetiredItem {
2
2
  retired_slug: string;
3
3
  retired_name: string;
4
- /** The bundle-relative note path the retired record shipped at (dnd5e 0.3.12). */
5
4
  retired_path: string;
6
5
  kept_slug: string;
7
6
  kept_name: string;
8
7
  }
9
8
  export declare const RETIRED_ITEMS: readonly RetiredItem[];
10
- /** The kept slug for a retired item slug, or undefined. */
11
9
  export declare function keptSlugFor(slug: string): string | undefined;
12
- /** The kept slug for an UNWRAPPED link target: a slug, or a compendium path (`SRD 5e/Magic Items/Hand Crossbow +2`), read
13
- * the way `resolveBaseItem` reads one. A vault-root path (`Compendium/SRD 5e/...`) never resolved and is left alone. */
14
10
  export declare function keptSlugForLink(target: string): string | undefined;
@@ -1,11 +1 @@
1
- import {
2
- RETIRED_ITEMS,
3
- keptSlugFor,
4
- keptSlugForLink
5
- } from "../chunk-CM5CWO4K.js";
6
- import "../chunk-ZCTUYGNV.js";
7
- export {
8
- RETIRED_ITEMS,
9
- keptSlugFor,
10
- keptSlugForLink
11
- };
1
+ import{RETIRED_ITEMS,keptSlugFor,keptSlugForLink}from"../chunk-PZ4L2EEG.js";import"../chunk-63YJPWTM.js";export{RETIRED_ITEMS,keptSlugFor,keptSlugForLink};
@@ -7,47 +7,14 @@ export interface SrdEntity {
7
7
  export type SrdEntityType = "monster" | "spell" | "item" | "armor" | "weapon" | "feat" | "condition" | "class" | "subclass" | "background" | "race" | "optional-feature";
8
8
  export type SrdDataSources = Record<string, Record<string, unknown>[]>;
9
9
  export declare class SrdStore {
10
- /** slug -> SrdEntity for O(1) lookup */
11
10
  private bySlug;
12
- /** entityType -> SrdEntity[] for type-scoped operations */
13
11
  private byType;
14
- /**
15
- * Load entities from a map of source-key -> raw JSON arrays.
16
- * Source keys are resolved through TYPE_MAP (e.g. "monster" -> "monster",
17
- * "magicitems" -> "item"). If a key is not in TYPE_MAP it is used as-is.
18
- */
19
12
  loadFromData(sources: SrdDataSources): void;
20
- /**
21
- * Load all bundled SRD JSON files from the canonical pipeline runtime.
22
- * Both 2014 and 2024 editions are merged into a single store; entities are
23
- * disambiguated by their edition-prefixed slugs (e.g. "srd-5e_aboleth" vs
24
- * "srd-2024_aboleth").
25
- */
26
13
  loadFromBundledJson(): void;
27
- /**
28
- * O(1) lookup by slug.
29
- */
30
14
  getBySlug(slug: string): SrdEntity | undefined;
31
- /**
32
- * Ranked search: exact match > starts-with > contains.
33
- * Case-insensitive. Optionally filtered by entityType.
34
- */
35
15
  search(query: string, entityType?: string, limit?: number): SrdEntity[];
36
- /**
37
- * Return all entities of a given type.
38
- */
39
16
  getAllOfType(entityType: string): SrdEntity[];
40
- /**
41
- * Return all registered entity type strings.
42
- */
43
17
  getTypes(): string[];
44
- /**
45
- * Total number of entities across all types.
46
- */
47
18
  count(): number;
48
- /**
49
- * @deprecated Use getBySlug() instead. Kept for backward compatibility.
50
- * Exact name match (case-insensitive). Searches all types or a specific type.
51
- */
52
19
  getByName(name: string, entityType?: string): SrdEntity | null;
53
20
  }
@@ -1,11 +1,3 @@
1
1
  import type { DocCodec } from "@archivist-gg/core";
2
2
  import type { SubclassEntity } from "./subclass.types.js";
3
- /**
4
- * Normalizing codec (0c.1a). `parse` delegates to `parseSubclass`, which validates
5
- * against `subclassEntitySchema`. `subclass.types` is this entity's dnd5e home for
6
- * `SubclassEntity` (consumed by the PC resolver/types); its `Edition`/`SubclassSpellcastingConfig`
7
- * imports resolve dnd5e-internally from `class.types`. `serialize` stays `yaml.dump`
8
- * (the edit-save path uses obsidian's separate serializer; gate (d) verifies `yaml.dump`
9
- * round-trips through `parseSubclass`).
10
- */
11
3
  export declare const subclassCodec: DocCodec<SubclassEntity>;