@archivist-gg/dnd5e 0.3.17 → 0.3.19

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 (99) hide show
  1. package/dist/background/background.codec.js +5 -5
  2. package/dist/background/background.parser.js +4 -4
  3. package/dist/background/background.schema.js +3 -3
  4. package/dist/{chunk-7QN7XSAK.js → chunk-3SFGWFVQ.js} +1 -1
  5. package/dist/{chunk-2UDSN6VW.js → chunk-3SIUAFDQ.js} +1 -1
  6. package/dist/chunk-4J6DS3EJ.js +30 -0
  7. package/dist/{chunk-RLGQ5PZZ.js → chunk-5JXFJ5AU.js} +11 -1
  8. package/dist/{chunk-TULQ4FFX.js → chunk-64VNLMSG.js} +31 -9
  9. package/dist/{chunk-JSM6JFZR.js → chunk-7XJHI5H5.js} +2 -2
  10. package/dist/{chunk-YD2VAHA6.js → chunk-B2QHP6UF.js} +2 -2
  11. package/dist/{chunk-AZRGFUSR.js → chunk-BJGOSM76.js} +1 -1
  12. package/dist/{chunk-JCMUVZIK.js → chunk-BJWSOQUC.js} +1 -1
  13. package/dist/{chunk-ONTGZR5T.js → chunk-EJD47JHL.js} +64 -32
  14. package/dist/{chunk-FANQVQ3D.js → chunk-FJYBLXV7.js} +2 -2
  15. package/dist/{chunk-PQZ4LM4Z.js → chunk-FMUD3LDV.js} +1 -1
  16. package/dist/{chunk-PKX6TGRE.js → chunk-FMYWORTP.js} +2 -2
  17. package/dist/{chunk-G6PBI2BU.js → chunk-FVXLP7P3.js} +1 -1
  18. package/dist/{chunk-MBX25B6D.js → chunk-GVWEFECG.js} +1 -1
  19. package/dist/{chunk-Y5VVP73C.js → chunk-HY2SRSVM.js} +1 -1
  20. package/dist/{chunk-2JSQE3DD.js → chunk-JXWNXIIZ.js} +13 -0
  21. package/dist/{chunk-VRV3NNTA.js → chunk-LICYHPI3.js} +81 -5
  22. package/dist/{chunk-LF5AGJA4.js → chunk-LNT64X7C.js} +1 -1
  23. package/dist/{chunk-6EI737IO.js → chunk-NKZMQV2C.js} +1 -1
  24. package/dist/{chunk-T6QIF5XR.js → chunk-NTU2DXNG.js} +9 -2
  25. package/dist/{chunk-3VZZDKRA.js → chunk-NXUY5XQN.js} +63 -15
  26. package/dist/{chunk-QZSWN2KT.js → chunk-NZO7M5GV.js} +1 -1
  27. package/dist/{chunk-5MXFW4O3.js → chunk-OOL4KMG2.js} +1 -1
  28. package/dist/{chunk-H5PTKYXL.js → chunk-QA3YCOML.js} +1 -1
  29. package/dist/{chunk-3MGQFFNE.js → chunk-QFWQKS3M.js} +1 -1
  30. package/dist/{chunk-HTYMW5CH.js → chunk-RD2MID3M.js} +67 -3
  31. package/dist/{chunk-PXVNAY7T.js → chunk-TRBGC4ZG.js} +29 -1
  32. package/dist/{chunk-UUBJCNQU.js → chunk-UJCK5IW4.js} +2 -2
  33. package/dist/{chunk-OFCSP6MT.js → chunk-UNYR5GLI.js} +1 -1
  34. package/dist/{chunk-DOXSFYLH.js → chunk-VN5DLURA.js} +2 -2
  35. package/dist/{chunk-7ATNGKBS.js → chunk-VP5TIXDK.js} +1 -1
  36. package/dist/{chunk-QH36K2PU.js → chunk-WOHX7YTH.js} +7 -0
  37. package/dist/{chunk-YKL6SHRJ.js → chunk-XTEFPUSN.js} +1 -1
  38. package/dist/{chunk-RYLXAYIQ.js → chunk-ZOWKWMD2.js} +1 -1
  39. package/dist/class/class.codec.js +6 -6
  40. package/dist/class/class.parser.js +5 -5
  41. package/dist/class/class.schema.js +4 -4
  42. package/dist/dnd/amount-text.d.ts +4 -0
  43. package/dist/dnd/amount-text.js +3 -1
  44. package/dist/entities/registry-revision.d.ts +25 -0
  45. package/dist/entities/registry-revision.js +10 -0
  46. package/dist/feat/feat.codec.js +5 -5
  47. package/dist/feat/feat.parser.js +4 -4
  48. package/dist/feat/feat.schema.d.ts +9 -0
  49. package/dist/feat/feat.schema.js +3 -3
  50. package/dist/index.js +3720 -338
  51. package/dist/monster/monster.parser.js +5 -5
  52. package/dist/monster/monster.schema.js +4 -4
  53. package/dist/optional-feature/optional-feature.codec.js +5 -5
  54. package/dist/optional-feature/optional-feature.parser.js +4 -4
  55. package/dist/optional-feature/optional-feature.schema.d.ts +9 -0
  56. package/dist/optional-feature/optional-feature.schema.js +3 -3
  57. package/dist/pc/pc.additional-spells.d.ts +16 -2
  58. package/dist/pc/pc.additional-spells.js +4 -1
  59. package/dist/pc/pc.amount-bindings.d.ts +11 -2
  60. package/dist/pc/pc.amount-bindings.js +6 -1
  61. package/dist/pc/pc.decision-engine.d.ts +8 -0
  62. package/dist/pc/pc.decision-engine.js +13 -10
  63. package/dist/pc/pc.entry-overrides.js +3 -2
  64. package/dist/pc/pc.equipment.js +5 -4
  65. package/dist/pc/pc.feature-effects.d.ts +9 -2
  66. package/dist/pc/pc.feature-effects.js +15 -2
  67. package/dist/pc/pc.infusions.js +3 -2
  68. package/dist/pc/pc.member-choices.d.ts +33 -1
  69. package/dist/pc/pc.member-choices.js +12 -5
  70. package/dist/pc/pc.parser.js +1 -1
  71. package/dist/pc/pc.pools.js +3 -2
  72. package/dist/pc/pc.proficiencies.d.ts +14 -0
  73. package/dist/pc/pc.proficiencies.js +68 -19
  74. package/dist/pc/pc.proficiency-normalize.d.ts +14 -0
  75. package/dist/pc/pc.proficiency-normalize.js +9 -3
  76. package/dist/pc/pc.proficiency-query.js +1 -1
  77. package/dist/pc/pc.recalc.js +151 -55
  78. package/dist/pc/pc.resolver.d.ts +4 -1
  79. package/dist/pc/pc.resolver.js +10 -9
  80. package/dist/pc/pc.rest.js +3 -2
  81. package/dist/pc/pc.schema.d.ts +19 -0
  82. package/dist/pc/pc.schema.js +1 -1
  83. package/dist/pc/pc.spell-scope.d.ts +22 -0
  84. package/dist/pc/pc.tool-picks.js +2 -2
  85. package/dist/pc/pc.types.d.ts +65 -4
  86. package/dist/race/race.codec.js +6 -6
  87. package/dist/race/race.parser.js +5 -5
  88. package/dist/race/race.schema.js +4 -4
  89. package/dist/schemas/choice-schema.js +2 -2
  90. package/dist/schemas/feature-effect-schema.d.ts +9 -0
  91. package/dist/schemas/feature-effect-schema.js +1 -1
  92. package/dist/schemas/feature-schema.js +3 -3
  93. package/dist/subclass/subclass.codec.js +6 -6
  94. package/dist/subclass/subclass.parser.js +5 -5
  95. package/dist/subclass/subclass.schema.js +4 -4
  96. package/dist/types/choice.d.ts +2 -2
  97. package/dist/types/feature-effect.d.ts +18 -0
  98. package/dist/types/optional-feature.types.d.ts +1 -1
  99. package/package.json +1 -1
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  parseClass
3
- } from "../chunk-YKL6SHRJ.js";
3
+ } from "../chunk-XTEFPUSN.js";
4
4
  import "../chunk-4U55VNC7.js";
5
- import "../chunk-UUBJCNQU.js";
5
+ import "../chunk-UJCK5IW4.js";
6
6
  import "../chunk-G6MHJDVT.js";
7
7
  import "../chunk-CJYCVNW2.js";
8
- import "../chunk-YD2VAHA6.js";
8
+ import "../chunk-B2QHP6UF.js";
9
9
  import "../chunk-WYGD2UGN.js";
10
10
  import "../chunk-ZJXSXVFP.js";
11
11
  import "../chunk-IN4M4X7P.js";
12
- import "../chunk-5MXFW4O3.js";
13
- import "../chunk-2JSQE3DD.js";
12
+ import "../chunk-OOL4KMG2.js";
13
+ import "../chunk-JXWNXIIZ.js";
14
14
  import "../chunk-UA5KS2PL.js";
15
15
  export {
16
16
  parseClass
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  classEntitySchema
3
- } from "../chunk-UUBJCNQU.js";
3
+ } from "../chunk-UJCK5IW4.js";
4
4
  import "../chunk-G6MHJDVT.js";
5
5
  import "../chunk-CJYCVNW2.js";
6
- import "../chunk-YD2VAHA6.js";
6
+ import "../chunk-B2QHP6UF.js";
7
7
  import "../chunk-WYGD2UGN.js";
8
8
  import "../chunk-ZJXSXVFP.js";
9
9
  import "../chunk-IN4M4X7P.js";
10
- import "../chunk-5MXFW4O3.js";
11
- import "../chunk-2JSQE3DD.js";
10
+ import "../chunk-OOL4KMG2.js";
11
+ import "../chunk-JXWNXIIZ.js";
12
12
  import "../chunk-UA5KS2PL.js";
13
13
  export {
14
14
  classEntitySchema
@@ -27,6 +27,10 @@ export declare function normalizeAmountPhrases(text: string): string;
27
27
  * token is unbound keeps the note's own words. Text with no phrase and no token comes back unchanged.
28
28
  */
29
29
  export declare function resolveAmountText(text: string, b: AmountBindings): string;
30
+ /** `roll` with each RESOLVED amount added (a spell's damage riders, already resolved against their owners): dice plus
31
+ * numbers fold to one roll ("2d4+5" and "2" read "2d4+7", "1d10" and "-1" read "1d10-1"); anything that does not fold
32
+ * keeps its words, joined by " + ". No amount returns `roll` unchanged. */
33
+ export declare function addToRoll(roll: string, amounts: readonly string[]): string;
30
34
  /** The leading dice roll of a resolved amount ("1d8+3" of "1d8+3 (minimum of 1)"), which the sheet makes rollable; null
31
35
  * when the amount does not open with a roll. */
32
36
  export declare function diceRollOf(resolved: string): string | null;
@@ -1,11 +1,13 @@
1
1
  import {
2
+ addToRoll,
2
3
  diceRollOf,
3
4
  diceRollPrefix,
4
5
  normalizeAmountPhrases,
5
6
  resolveAmountText
6
- } from "../chunk-QH36K2PU.js";
7
+ } from "../chunk-WOHX7YTH.js";
7
8
  import "../chunk-EVMUJYUD.js";
8
9
  export {
10
+ addToRoll,
9
11
  diceRollOf,
10
12
  diceRollPrefix,
11
13
  normalizeAmountPhrases,
@@ -0,0 +1,25 @@
1
+ /**
2
+ * A registry's change generation (PERF, Edgar 2026-09-28): a number that moves on every register, unregister and clear.
3
+ * Core's `EntityRegistry` carries none; the plugin's registry does (`RevisionedEntityRegistry`). Registry-derived data
4
+ * that does not depend on the character (an item index, a sorted bucket) is memoised per (registry, revision), so a
5
+ * write that changes only the character reads the registry zero times.
6
+ *
7
+ * The rule is strict: a registry WITHOUT a numeric `revision` is never cached, so a mock, a plain core registry or any
8
+ * other host always computes afresh and can never read stale data. (The older `registry.count()` memos in
9
+ * `pc.spellcasting.ts` and `spell.access.ts` carry a known gap, an in-place re-registration; this key has none.)
10
+ */
11
+ export declare function registryRevision(registry: unknown): number | undefined;
12
+ /** `compute()` once per (registry, revision), kept in `cache`; every call when the registry has no revision. */
13
+ export declare function memoByRevision<T>(cache: WeakMap<object, {
14
+ revision: number;
15
+ value: T;
16
+ }>, registry: object, compute: () => T): T;
17
+ /** The registry surface a bucket read needs (structurally core's `EntityRegistry` and every narrower registry type). */
18
+ interface BucketSource<T> {
19
+ search(query: string, entityType: string, limit: number): T[];
20
+ }
21
+ /** `registry.search("", type, Infinity)`, the whole bucket in the registry's own order, read ONCE per registry state
22
+ * (every call when the registry has no revision). The array is SHARED by every caller until the revision moves: read
23
+ * it, never sort or splice it in place. */
24
+ export declare function bucketOf<T>(registry: BucketSource<T>, type: string): readonly T[];
25
+ export {};
@@ -0,0 +1,10 @@
1
+ import {
2
+ bucketOf,
3
+ memoByRevision,
4
+ registryRevision
5
+ } from "../chunk-4J6DS3EJ.js";
6
+ export {
7
+ bucketOf,
8
+ memoByRevision,
9
+ registryRevision
10
+ };
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  featCodec
3
- } from "../chunk-RYLXAYIQ.js";
4
- import "../chunk-7QN7XSAK.js";
5
- import "../chunk-PKX6TGRE.js";
3
+ } from "../chunk-ZOWKWMD2.js";
4
+ import "../chunk-3SFGWFVQ.js";
5
+ import "../chunk-FMYWORTP.js";
6
6
  import "../chunk-ZJXSXVFP.js";
7
- import "../chunk-5MXFW4O3.js";
8
- import "../chunk-2JSQE3DD.js";
7
+ import "../chunk-OOL4KMG2.js";
8
+ import "../chunk-JXWNXIIZ.js";
9
9
  import "../chunk-UA5KS2PL.js";
10
10
  export {
11
11
  featCodec
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  parseFeat
3
- } from "../chunk-7QN7XSAK.js";
4
- import "../chunk-PKX6TGRE.js";
3
+ } from "../chunk-3SFGWFVQ.js";
4
+ import "../chunk-FMYWORTP.js";
5
5
  import "../chunk-ZJXSXVFP.js";
6
- import "../chunk-5MXFW4O3.js";
7
- import "../chunk-2JSQE3DD.js";
6
+ import "../chunk-OOL4KMG2.js";
7
+ import "../chunk-JXWNXIIZ.js";
8
8
  import "../chunk-UA5KS2PL.js";
9
9
  export {
10
10
  parseFeat
@@ -206,6 +206,15 @@ export declare const featEntitySchema: z.ZodObject<{
206
206
  finesse: "finesse";
207
207
  thrown: "thrown";
208
208
  }>>]>>;
209
+ spell_scope: z.ZodOptional<z.ZodObject<{
210
+ list: z.ZodOptional<z.ZodString>;
211
+ level: z.ZodOptional<z.ZodNumber>;
212
+ school: z.ZodOptional<z.ZodString>;
213
+ damage_types: z.ZodOptional<z.ZodArray<z.ZodString>>;
214
+ damage_type_pick: z.ZodOptional<z.ZodString>;
215
+ spells: z.ZodOptional<z.ZodArray<z.ZodString>>;
216
+ once: z.ZodOptional<z.ZodBoolean>;
217
+ }, z.core.$strict>>;
209
218
  condition: z.ZodOptional<z.ZodString>;
210
219
  subject: z.ZodOptional<z.ZodString>;
211
220
  }, z.core.$strip>, z.ZodObject<{
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  featEntitySchema
3
- } from "../chunk-PKX6TGRE.js";
3
+ } from "../chunk-FMYWORTP.js";
4
4
  import "../chunk-ZJXSXVFP.js";
5
- import "../chunk-5MXFW4O3.js";
6
- import "../chunk-2JSQE3DD.js";
5
+ import "../chunk-OOL4KMG2.js";
6
+ import "../chunk-JXWNXIIZ.js";
7
7
  import "../chunk-UA5KS2PL.js";
8
8
  export {
9
9
  featEntitySchema