@archivist-gg/dnd5e 0.2.0 → 0.3.1
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/background/background.codec.js +3 -3
- package/dist/background/background.parser.js +2 -2
- package/dist/background/background.schema.d.ts +8 -0
- package/dist/background/background.schema.js +5 -3
- package/dist/chunk-353WXS6S.js +25 -0
- package/dist/{chunk-DC74TZNA.js → chunk-4LZJXJJS.js} +7 -2
- package/dist/{chunk-DZXSWSBP.js → chunk-5ZBE4CWV.js} +1 -1
- package/dist/{chunk-IXZXFFFW.js → chunk-6IRYTM5V.js} +6 -1
- package/dist/chunk-7TEK5KK7.js +49 -0
- package/dist/{chunk-V6SOFUJW.js → chunk-AIRFC5NQ.js} +3 -1
- package/dist/{chunk-VTYUBINW.js → chunk-BIK4DFWK.js} +1 -1
- package/dist/{chunk-TQZB4OCJ.js → chunk-D3CLOBE3.js} +49 -21
- package/dist/{chunk-3TRGRSCH.js → chunk-LV4SNWZQ.js} +7 -1
- package/dist/{chunk-UC4FE5X3.js → chunk-N6N74K6X.js} +1 -1
- package/dist/chunk-O5EYMKFH.js +6 -0
- package/dist/{chunk-TUIFSVLI.js → chunk-SE7AZDR3.js} +1 -0
- package/dist/{chunk-5WQD3WNZ.js → chunk-TN6ZLTNU.js} +6 -5
- package/dist/{chunk-R5SQHP2X.js → chunk-TNUFPIXI.js} +48 -30
- package/dist/{chunk-J2RYSZMQ.js → chunk-VTTA2ALZ.js} +2 -2
- package/dist/class/class.slug.d.ts +7 -5
- package/dist/class/class.slug.js +1 -1
- package/dist/entities/base-item-resolver.d.ts +9 -0
- package/dist/entities/base-item-resolver.js +6 -4
- package/dist/entities/slug.d.ts +7 -0
- package/dist/entities/slug.js +3 -1
- package/dist/index.js +3902 -3623
- package/dist/item/item.actions-map.d.ts +8 -7
- package/dist/item/item.actions-map.js +3 -4
- package/dist/item/item.ai-schema.d.ts +1 -1
- package/dist/pc/pc.decision-engine.d.ts +13 -3
- package/dist/pc/pc.decision-engine.js +9 -9
- package/dist/pc/pc.equipment.js +6 -12
- package/dist/pc/pc.feature-effects.d.ts +5 -0
- package/dist/pc/pc.feature-effects.js +2 -11
- package/dist/pc/pc.parser.js +1 -1
- package/dist/pc/pc.pools.js +7 -7
- package/dist/pc/pc.proficiencies.d.ts +31 -0
- package/dist/pc/pc.proficiencies.js +96 -23
- package/dist/pc/pc.proficiency-normalize.d.ts +5 -0
- package/dist/pc/pc.proficiency-query.js +5 -1
- package/dist/pc/pc.recalc.d.ts +7 -0
- package/dist/pc/pc.recalc.js +112 -58
- package/dist/pc/pc.resolver.js +7 -7
- package/dist/pc/pc.rest.d.ts +1 -1
- package/dist/pc/pc.rest.js +20 -11
- package/dist/pc/pc.schema.d.ts +10 -4
- package/dist/pc/pc.schema.js +1 -1
- package/dist/pc/pc.slotting.js +3 -3
- package/dist/pc/pc.spellcasting.d.ts +5 -1
- package/dist/pc/pc.spellcasting.js +4 -2
- package/dist/pc/pc.types.d.ts +30 -4
- package/dist/spell/spell.access.js +1 -1
- package/dist/types/choice.d.ts +5 -0
- package/dist/types/choice.js +9 -3
- package/dist/weapon/weapon.classify.d.ts +21 -0
- package/dist/weapon/weapon.classify.js +7 -0
- package/package.json +1 -1
- package/dist/chunk-BH6AMZVY.js +0 -25
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import type { EntityRegistry, RegisteredEntity } from "@archivist-gg/core";
|
|
2
|
+
/**
|
|
3
|
+
* Convert a vault-path target (e.g. `SRD 5e/Weapons/Longsword`) to a
|
|
4
|
+
* registry-compatible slug (`srd-5e_weapon_longsword`). The middle Type folder
|
|
5
|
+
* (`segments[length-2]`) supplies the entity-type token so the slug matches
|
|
6
|
+
* the now type-namespaced registry key. For a bare basename without any `/`,
|
|
7
|
+
* returns the slugified basename - which lets legacy wikilinks like
|
|
8
|
+
* `[[longsword]]` continue to resolve when registered under that bare slug.
|
|
9
|
+
*/
|
|
10
|
+
export declare function vaultPathToSlug(target: string): string;
|
|
2
11
|
/**
|
|
3
12
|
* Public: take a `base_item` string (vault-path wikilink, alias-form
|
|
4
13
|
* wikilink, bare-slug wikilink, or bare slug) and return the matching
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveBaseItem,
|
|
3
|
-
resolveBaseItemOfType
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
resolveBaseItemOfType,
|
|
4
|
+
vaultPathToSlug
|
|
5
|
+
} from "../chunk-4LZJXJJS.js";
|
|
6
|
+
import "../chunk-LV4SNWZQ.js";
|
|
6
7
|
export {
|
|
7
8
|
resolveBaseItem,
|
|
8
|
-
resolveBaseItemOfType
|
|
9
|
+
resolveBaseItemOfType,
|
|
10
|
+
vaultPathToSlug
|
|
9
11
|
};
|
package/dist/entities/slug.d.ts
CHANGED
|
@@ -3,3 +3,10 @@
|
|
|
3
3
|
* "Ancient Red Dragon" -> "ancient-red-dragon"
|
|
4
4
|
*/
|
|
5
5
|
export declare function slugify(name: string): string;
|
|
6
|
+
/** "srd-2024_fighter" → "fighter", "srd-2024_background_acolyte" → "acolyte".
|
|
7
|
+
* Arity-robust: strips a `<prefix>_<type>_<name>` (3-part) or legacy `<prefix>_<name>`
|
|
8
|
+
* (2-part) slug down to the bare NAME, and passes a bare slug through unchanged.
|
|
9
|
+
* Name-slugs never contain `_`, so for a 3-part-or-longer slug the name is
|
|
10
|
+
* `parts.slice(2).join("_")`. Tolerates a nullish slug (degrades to "") so a
|
|
11
|
+
* malformed entity can't hard-crash the builder; the resolver backfills real slugs. */
|
|
12
|
+
export declare function bareEntitySlug(slug: string | null | undefined): string;
|