From db465051fb782c4874f04a86607579bf4931f56b Mon Sep 17 00:00:00 2001 From: Jeremy Valentine <38669521+valentine195@users.noreply.github.com> Date: Sat, 22 Apr 2023 13:52:01 -0400 Subject: [PATCH] fix: use types from statblocks --- index.ts | 17 +---------------- package-lock.json | 44 +++++++++++++++++++++++++++++--------------- package.json | 2 +- 3 files changed, 31 insertions(+), 32 deletions(-) diff --git a/index.ts b/index.ts index 1e0300f2..14f98bc5 100644 --- a/index.ts +++ b/index.ts @@ -1,5 +1,6 @@ import "obsidian"; import type { Creature } from "./src/utils/creature"; +import type { Spell, Trait, ability } from "obsidian-overload"; // CUSTOM EVENTS // ------------------------ @@ -184,22 +185,6 @@ export interface HomebrewCreature { "statblock-link"?: string; } -export type ability = - | "strength" - | "dexterity" - | "constitution" - | "intelligence" - | "wisdom" - | "charisma"; - -export type Spell = string | { [key: string]: string }; - -export interface Trait { - name: string; - desc: string; - [key: string]: any; -} - export interface UpdateLogMessage { name: string; hp: number | null; diff --git a/package-lock.json b/package-lock.json index e2631ffc..3887833a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "esbuild-svelte": "^0.6.0", "jest": "^29.5.0", "obsidian": "^0.16.3", - "obsidian-overload": "^1.11.0", + "obsidian-overload": "^1.14.0", "standard-version": "^9.3.2", "svelte": "^3.49.0", "svelte-dnd-action": "^0.9.13", @@ -3828,6 +3828,12 @@ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, + "node_modules/initiative-tracker": { + "version": "9.6.4", + "resolved": "https://registry.npmjs.org/initiative-tracker/-/initiative-tracker-9.6.4.tgz", + "integrity": "sha512-QOS+2ra63pTXBl1MLkLsULilzUFpqUuxX2VOf4lyKiD83Cq2a6PJfk/RD15MzrFwoZwt0hE1Z2cZO9ff5AktTg==", + "dev": true + }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -6462,25 +6468,26 @@ } }, "node_modules/obsidian-leaflet": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/obsidian-leaflet/-/obsidian-leaflet-5.5.3.tgz", - "integrity": "sha512-lii7N5ZTuII71I78IiWunJ44sVg7Uffrg1jQzi4g8vahr6yt3eonJ+kmbA9hAv+ws/z4P+9tCF28jykClEwUrQ==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/obsidian-leaflet/-/obsidian-leaflet-5.5.4.tgz", + "integrity": "sha512-WeGcfsY88J62wid0yjmOfYfgThMBEObGDM9LhyNjtVfVt20qC+vEzS8ibbKSa8bmuY6PsR3h7SoY4oudF75OtA==", "dev": true, "dependencies": { "pako": "^2.1.0" } }, "node_modules/obsidian-overload": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/obsidian-overload/-/obsidian-overload-1.11.0.tgz", - "integrity": "sha512-3n3Go2KnJ40zYyIo1FYhNhrNJ0BoysaBlHFCVD3itqbhb2qZP8C3YU44Crh+BTi7qqB6RHF7cSYPOT4PVvp0vg==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/obsidian-overload/-/obsidian-overload-1.14.0.tgz", + "integrity": "sha512-VYRh9fvDu4fZMFrR+J2mRoy8QDLWAi3lrlyZcQes8VSa0FW3WGYr7bQ1vJ4vRHbAVFQWZGOtYLmk+Wl/fnQnIA==", "dev": true, "dependencies": { "fantasy-statblocks": "^3.5.4", + "initiative-tracker": "^9.6.4", "obsidian": "^1.1.1", "obsidian-dataview": "^0.4.21", "obsidian-dice-roller": "^8.14.2", - "obsidian-leaflet": "^5.5.3" + "obsidian-leaflet": "^5.5.4" } }, "node_modules/obsidian-overload/node_modules/obsidian": { @@ -11201,6 +11208,12 @@ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, + "initiative-tracker": { + "version": "9.6.4", + "resolved": "https://registry.npmjs.org/initiative-tracker/-/initiative-tracker-9.6.4.tgz", + "integrity": "sha512-QOS+2ra63pTXBl1MLkLsULilzUFpqUuxX2VOf4lyKiD83Cq2a6PJfk/RD15MzrFwoZwt0hE1Z2cZO9ff5AktTg==", + "dev": true + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -13189,25 +13202,26 @@ } }, "obsidian-leaflet": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/obsidian-leaflet/-/obsidian-leaflet-5.5.3.tgz", - "integrity": "sha512-lii7N5ZTuII71I78IiWunJ44sVg7Uffrg1jQzi4g8vahr6yt3eonJ+kmbA9hAv+ws/z4P+9tCF28jykClEwUrQ==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/obsidian-leaflet/-/obsidian-leaflet-5.5.4.tgz", + "integrity": "sha512-WeGcfsY88J62wid0yjmOfYfgThMBEObGDM9LhyNjtVfVt20qC+vEzS8ibbKSa8bmuY6PsR3h7SoY4oudF75OtA==", "dev": true, "requires": { "pako": "^2.1.0" } }, "obsidian-overload": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/obsidian-overload/-/obsidian-overload-1.11.0.tgz", - "integrity": "sha512-3n3Go2KnJ40zYyIo1FYhNhrNJ0BoysaBlHFCVD3itqbhb2qZP8C3YU44Crh+BTi7qqB6RHF7cSYPOT4PVvp0vg==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/obsidian-overload/-/obsidian-overload-1.14.0.tgz", + "integrity": "sha512-VYRh9fvDu4fZMFrR+J2mRoy8QDLWAi3lrlyZcQes8VSa0FW3WGYr7bQ1vJ4vRHbAVFQWZGOtYLmk+Wl/fnQnIA==", "dev": true, "requires": { "fantasy-statblocks": "^3.5.4", + "initiative-tracker": "^9.6.4", "obsidian": "^1.1.1", "obsidian-dataview": "^0.4.21", "obsidian-dice-roller": "^8.14.2", - "obsidian-leaflet": "^5.5.3" + "obsidian-leaflet": "^5.5.4" }, "dependencies": { "obsidian": { diff --git a/package.json b/package.json index 74cacce5..cf3b739f 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "esbuild-svelte": "^0.6.0", "jest": "^29.5.0", "obsidian": "^0.16.3", - "obsidian-overload": "^1.11.0", + "obsidian-overload": "^1.14.0", "standard-version": "^9.3.2", "svelte": "^3.49.0", "svelte-dnd-action": "^0.9.13",