From 0cb2722199c39f4bdca90ff8cfbce6f6411231f8 Mon Sep 17 00:00:00 2001 From: Jonas Karlsson Date: Fri, 20 Dec 2024 16:58:19 +0100 Subject: [PATCH] feat: Set minimum and verified pf2e version to 6.8.0. Update types. --- package-lock.json | 777 +++++++------ package.json | 10 +- static/module.json | 4 +- types/build/lib/compendium-pack.d.ts | 5 +- types/src/global.d.ts | 46 +- types/src/module/actor/army/data.d.ts | 191 +-- types/src/module/actor/army/document.d.ts | 1 + types/src/module/actor/army/types.d.ts | 4 +- types/src/module/actor/base.d.ts | 8 +- .../character/apps/attribute-builder.d.ts | 6 +- .../actor/character/crafting/ability.d.ts | 98 +- .../actor/character/crafting/crafting.d.ts | 6 +- .../actor/character/crafting/index.d.ts | 2 +- .../actor/character/crafting/types.d.ts | 27 +- types/src/module/actor/character/data.d.ts | 7 +- .../src/module/actor/character/document.d.ts | 14 +- .../actor/character/feats/collection.d.ts | 6 +- .../module/actor/character/feats/group.d.ts | 29 +- .../module/actor/character/feats/types.d.ts | 55 +- types/src/module/actor/character/sheet.d.ts | 36 +- .../module/actor/character/tab-manager.d.ts | 12 +- types/src/module/actor/character/values.d.ts | 3 +- types/src/module/actor/creature/data.d.ts | 4 +- types/src/module/actor/creature/document.d.ts | 13 +- types/src/module/actor/creature/sheet.d.ts | 9 +- types/src/module/actor/creature/types.d.ts | 7 +- types/src/module/actor/data/base.d.ts | 30 +- types/src/module/actor/data/iwr.d.ts | 4 +- types/src/module/actor/data/model.d.ts | 13 + types/src/module/actor/data/size.d.ts | 3 +- types/src/module/actor/familiar/data.d.ts | 94 +- types/src/module/actor/familiar/document.d.ts | 5 +- types/src/module/actor/hazard/sheet.d.ts | 2 +- types/src/module/actor/helpers.d.ts | 4 +- types/src/module/actor/inventory/index.d.ts | 9 +- types/src/module/actor/loot/data.d.ts | 63 +- types/src/module/actor/loot/document.d.ts | 3 + types/src/module/actor/modifiers.d.ts | 14 +- types/src/module/actor/npc/data.d.ts | 1 + types/src/module/actor/party/data.d.ts | 60 +- types/src/module/actor/party/document.d.ts | 5 +- .../module/actor/party/invalid-campaign.d.ts | 22 - .../module/actor/party/kingdom/builder.d.ts | 4 +- .../module/actor/party/kingdom/helpers.d.ts | 4 +- .../src/module/actor/party/kingdom/model.d.ts | 23 +- .../module/actor/party/kingdom/schema.d.ts | 1034 +++-------------- .../src/module/actor/party/kingdom/sheet.d.ts | 2 +- .../src/module/actor/party/kingdom/types.d.ts | 34 +- .../module/actor/party/kingdom/values.d.ts | 10 +- types/src/module/actor/party/sheet.d.ts | 6 +- types/src/module/actor/party/types.d.ts | 8 +- types/src/module/actor/sheet/base.d.ts | 10 +- types/src/module/actor/sheet/data-types.d.ts | 2 +- .../actor/sheet/popups/identify-popup.d.ts | 7 +- types/src/module/actor/spellcasting.d.ts | 2 +- types/src/module/actor/types.d.ts | 1 + types/src/module/actor/values.d.ts | 4 +- .../module/apps/compendium-browser/data.d.ts | 6 +- .../module/apps/compendium-browser/index.d.ts | 79 +- .../apps/compendium-browser/loader.d.ts | 3 +- .../apps/compendium-browser/tabs/action.d.ts | 7 +- .../tabs/{base.d.ts => base.svelte.d.ts} | 34 +- .../compendium-browser/tabs/bestiary.d.ts | 8 +- .../tabs/campaign-feature.d.ts | 7 +- .../apps/compendium-browser/tabs/data.d.ts | 98 +- .../compendium-browser/tabs/equipment.d.ts | 7 +- .../apps/compendium-browser/tabs/feat.d.ts | 11 +- .../apps/compendium-browser/tabs/hazard.d.ts | 8 +- .../apps/compendium-browser/tabs/spell.d.ts | 7 +- .../apps/sidebar/encounter-tracker.d.ts | 10 - types/src/module/canvas/ruler.d.ts | 6 +- types/src/module/chat-message/data.d.ts | 8 +- .../module/chat-message/roll-inspector.d.ts | 5 + types/src/module/data.d.ts | 37 +- types/src/module/encounter/document.d.ts | 5 - types/src/module/item/ability/data.d.ts | 2 +- types/src/module/item/ability/document.d.ts | 4 + types/src/module/item/ability/helpers.d.ts | 4 +- types/src/module/item/armor/data.d.ts | 14 +- types/src/module/item/armor/types.d.ts | 3 +- types/src/module/item/base/data/index.d.ts | 10 +- .../base/data/{schema.d.ts => model.d.ts} | 23 +- types/src/module/item/base/data/system.d.ts | 14 +- types/src/module/item/base/document.d.ts | 2 +- .../rule-element-form/flat-modifier.d.ts | 6 +- types/src/module/item/base/sheet/sheet.d.ts | 2 +- types/src/module/item/class/document.d.ts | 4 +- types/src/module/item/class/values.d.ts | 2 +- types/src/module/item/consumable/types.d.ts | 3 +- types/src/module/item/deity/data.d.ts | 9 +- types/src/module/item/deity/document.d.ts | 5 +- types/src/module/item/feat/data.d.ts | 12 +- types/src/module/item/feat/document.d.ts | 14 +- types/src/module/item/feat/helpers.d.ts | 5 +- types/src/module/item/feat/sheet.d.ts | 6 + types/src/module/item/feat/values.d.ts | 4 +- types/src/module/item/identification.d.ts | 8 +- types/src/module/item/kit/data.d.ts | 3 +- types/src/module/item/melee/data.d.ts | 10 +- types/src/module/item/physical/data.d.ts | 5 +- types/src/module/item/physical/document.d.ts | 17 +- types/src/module/item/physical/helpers.d.ts | 10 +- types/src/module/item/physical/materials.d.ts | 13 +- types/src/module/item/physical/runes.d.ts | 15 +- types/src/module/item/physical/schema.d.ts | 26 +- types/src/module/item/physical/values.d.ts | 4 +- types/src/module/item/spell/data.d.ts | 4 +- types/src/module/item/spell/helpers.d.ts | 6 +- .../item/spellcasting-entry/document.d.ts | 6 +- types/src/module/item/values.d.ts | 2 +- types/src/module/item/weapon/data.d.ts | 29 +- types/src/module/item/weapon/document.d.ts | 12 +- types/src/module/item/weapon/types.d.ts | 4 +- types/src/module/item/weapon/values.d.ts | 4 +- .../927-class-background-skill-longform.d.ts | 3 +- .../934-mythic-calling-category.d.ts | 8 + .../migrations/935-deity-icon-paths.d.ts | 13 + .../module/migration/migrations/index.d.ts | 2 + types/src/module/migration/runner/base.d.ts | 7 +- types/src/module/rules/index.d.ts | 2 +- .../rules/rule-element/actor-traits.d.ts | 7 +- .../adjust-degree-of-success.d.ts | 7 +- .../rules/rule-element/adjust-modifier.d.ts | 17 +- .../rules/rule-element/adjust-strike.d.ts | 6 +- .../module/rules/rule-element/ae-like.d.ts | 3 +- types/src/module/rules/rule-element/aura.d.ts | 67 +- .../module/rules/rule-element/base-speed.d.ts | 5 +- .../rule-element/battle-form/schema.d.ts | 43 +- .../rules/rule-element/battle-form/types.d.ts | 7 +- .../rules/rule-element/crafting-ability.d.ts | 46 +- .../rules/rule-element/creature-size.d.ts | 11 +- .../module/rules/rule-element/crit-spec.d.ts | 22 +- .../damage-alteration/rule-element.d.ts | 15 +- .../rules/rule-element/damage-dice.d.ts | 20 +- .../effect-spinoff/rule-element.d.ts | 19 +- .../rules/rule-element/ephemeral-effect.d.ts | 13 +- .../rules/rule-element/fast-healing.d.ts | 9 +- .../rules/rule-element/fixed-proficiency.d.ts | 24 - .../rules/rule-element/flat-modifier.d.ts | 43 +- .../rule-element/grant-item/rule-element.d.ts | 3 +- .../rules/rule-element/grant-item/schema.d.ts | 17 +- .../item-alteration/rule-element.d.ts | 6 +- .../rule-element/item-alteration/schemas.d.ts | 83 +- .../module/rules/rule-element/iwr/base.d.ts | 13 +- .../rules/rule-element/lose-hit-points.d.ts | 4 +- .../rule-element/martial-proficiency.d.ts | 10 +- .../rule-element/multiple-attack-penalty.d.ts | 5 +- .../module/rules/rule-element/roll-note.d.ts | 12 +- .../rules/rule-element/roll-option/data.d.ts | 33 +- .../module/rules/rule-element/roll-twice.d.ts | 3 +- .../src/module/rules/rule-element/sense.d.ts | 9 +- .../rules/rule-element/special-resource.d.ts | 17 +- .../rules/rule-element/special-statistic.d.ts | 21 +- .../src/module/rules/rule-element/strike.d.ts | 54 +- .../module/rules/rule-element/striking.d.ts | 5 +- .../rules/rule-element/substitute-roll.d.ts | 13 +- .../module/rules/rule-element/temp-hp.d.ts | 9 +- .../rules/rule-element/token-light.d.ts | 6 +- .../rule-element/token-mark/rule-element.d.ts | 5 +- .../module/rules/rule-element/token-name.d.ts | 6 +- .../rules/rule-element/weapon-potency.d.ts | 5 +- types/src/module/sheet/helpers.d.ts | 34 +- types/src/module/system/damage/roll.d.ts | 4 +- types/src/module/system/damage/types.d.ts | 4 +- types/src/module/system/damage/values.d.ts | 3 +- .../system/html-elements/tagify-tags.d.ts | 4 +- types/src/module/system/settings/menu.d.ts | 2 +- .../module/system/settings/variant-rules.d.ts | 7 +- types/src/module/user/document.d.ts | 3 +- types/src/scripts/config/damage.d.ts | 21 +- types/src/scripts/config/index.d.ts | 375 +++--- types/src/scripts/config/iwr.d.ts | 2 + types/src/scripts/config/traits.d.ts | 86 +- types/src/scripts/macros/hotbar.d.ts | 11 +- types/src/scripts/ui/user-visibility.d.ts | 3 +- types/src/util/destroyables.d.ts | 20 + types/src/util/index.d.ts | 1 - types/src/util/misc.d.ts | 7 +- types/src/util/sheet.d.ts | 24 - types/src/util/tags.d.ts | 3 +- .../build/generate-client-base-mixes.d.ts | 1 - .../build/generate-client-base-mixes.ts | 502 -------- .../applications/api/application.d.ts | 2 +- .../api/handlebars-application.ts | 6 +- .../applications/elements/form-element.d.ts | 6 + .../applications/sheets/item-sheet.d.ts | 4 +- .../client-esm/canvas/sources/module.d.ts | 9 - .../client-esm/canvas/tokens/module.d.ts | 1 - .../foundry/client-esm/dice/_types.d.mts | 84 ++ .../types/foundry/client-esm/dice/module.d.ts | 1 + .../client/apps/forms/sheet-config.d.ts | 12 +- types/types/foundry/client/config.d.ts | 9 +- .../data/abstract/directory-collection.ts | 81 ++ .../foundry/client/data/abstract/index.d.ts | 1 + .../data/documents/client-base-mixes.d.ts | 2 +- .../foundry/client/data/documents/user.d.ts | 2 +- .../client/pixi/core/containers/index.d.ts | 1 + .../containers}/quadtree.d.ts | 39 +- .../client/pixi/core/interaction/index.d.ts | 1 + .../client/pixi/core/interaction/targets.d.ts | 22 + .../foundry/client/pixi/groups/rendered.d.ts | 6 - .../foundry/client/pixi/helpers/index.d.ts | 1 - ...prite-mesh.ts => primary-sprite-mesh.d.ts} | 47 +- types/types/foundry/client/roll.d.ts | 62 +- .../foundry/common/abstract/type-data.d.ts | 3 +- types/types/foundry/common/data/fields.d.ts | 13 +- 206 files changed, 2611 insertions(+), 3214 deletions(-) create mode 100644 types/src/module/actor/data/model.d.ts delete mode 100644 types/src/module/actor/party/invalid-campaign.d.ts rename types/src/module/apps/compendium-browser/tabs/{base.d.ts => base.svelte.d.ts} (76%) rename types/src/module/item/base/data/{schema.d.ts => model.d.ts} (68%) create mode 100644 types/src/module/migration/migrations/934-mythic-calling-category.d.ts create mode 100644 types/src/module/migration/migrations/935-deity-icon-paths.d.ts delete mode 100644 types/src/module/rules/rule-element/fixed-proficiency.d.ts create mode 100644 types/src/util/destroyables.d.ts delete mode 100644 types/src/util/sheet.d.ts delete mode 100644 types/types/foundry/build/generate-client-base-mixes.d.ts delete mode 100644 types/types/foundry/build/generate-client-base-mixes.ts delete mode 100644 types/types/foundry/client-esm/canvas/sources/module.d.ts delete mode 100644 types/types/foundry/client-esm/canvas/tokens/module.d.ts create mode 100644 types/types/foundry/client-esm/dice/_types.d.mts create mode 100644 types/types/foundry/client/data/abstract/directory-collection.ts rename types/types/foundry/client/pixi/{helpers => core/containers}/quadtree.d.ts (84%) create mode 100644 types/types/foundry/client/pixi/core/interaction/targets.d.ts delete mode 100644 types/types/foundry/client/pixi/groups/rendered.d.ts rename types/types/foundry/client/pixi/placeables/primary-canvas-objects/{primary-sprite-mesh.ts => primary-sprite-mesh.d.ts} (81%) diff --git a/package-lock.json b/package-lock.json index 5663887ad..085df696a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,14 +9,14 @@ "version": "6.12.10", "license": "./LICENSE", "dependencies": { - "@codemirror/autocomplete": "^6.18.3", + "@codemirror/autocomplete": "^6.18.4", "@codemirror/lang-json": "^6.0.1", "@yaireo/tagify": "^4.32.2", "codemirror": "^6.0.1", "luxon": "^3.5.0", "minisearch": "^7.1.1", "nouislider": "^15.8.1", - "remeda": "^2.17.4", + "remeda": "^2.18.0", "sortablejs": "^1.15.6", "uuid": "^11.0.3" }, @@ -31,7 +31,7 @@ "@semantic-release/exec": "^6.0.3", "@semantic-release/git": "^10.0.1", "@semantic-release/github": "^11.0.1", - "@semantic-release/release-notes-generator": "^14.0.1", + "@semantic-release/release-notes-generator": "^14.0.2", "@types/eslint__js": "^8.42.3", "@types/fs-extra": "^11.0.4", "@types/glob": "^8.1.0", @@ -45,8 +45,8 @@ "@types/tooltipster": "^0.0.35", "@types/uuid": "^10.0.0", "@types/yaireo__tagify": "^4.27.0", - "@typescript-eslint/eslint-plugin": "^8.18.0", - "@typescript-eslint/parser": "^8.18.0", + "@typescript-eslint/eslint-plugin": "^8.18.1", + "@typescript-eslint/parser": "^8.18.1", "classic-level": "^1.4.1", "es-jest": "^2.1.0", "eslint": "^9.17.0", @@ -109,20 +109,14 @@ } }, "node_modules/@codemirror/autocomplete": { - "version": "6.18.3", - "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.18.3.tgz", - "integrity": "sha512-1dNIOmiM0z4BIBwxmxEfA1yoxh1MF/6KPBbh20a5vphGV0ictKlgQsbJs6D6SkR6iJpGbpwRsa6PFMNlg9T9pQ==", + "version": "6.18.4", + "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.18.4.tgz", + "integrity": "sha512-sFAphGQIqyQZfP2ZBsSHV7xQvo9Py0rV0dW7W3IMRdS+zDuNb2l3no78CvUaWKGfzFjI4FTrLdUSj86IGb2hRA==", "dependencies": { "@codemirror/language": "^6.0.0", "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.17.0", "@lezer/common": "^1.0.0" - }, - "peerDependencies": { - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "@lezer/common": "^1.0.0" } }, "node_modules/@codemirror/commands": { @@ -146,9 +140,9 @@ } }, "node_modules/@codemirror/language": { - "version": "6.10.6", - "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.10.6.tgz", - "integrity": "sha512-KrsbdCnxEztLVbB5PycWXFxas4EOyk/fPAfruSOnDDppevQgid2XZ+KbJ9u+fDikP/e7MW7HPBTvTb8JlZK9vA==", + "version": "6.10.7", + "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.10.7.tgz", + "integrity": "sha512-aOswhVOLYhMNeqykt4P7+ukQSpGL0ynZYaEyFDVHE7fl2xgluU3yuE9MdgYNfw6EmaNidoFMIQ2iTh1ADrnT6A==", "dependencies": { "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.23.0", @@ -187,9 +181,9 @@ } }, "node_modules/@codemirror/view": { - "version": "6.35.3", - "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.35.3.tgz", - "integrity": "sha512-ScY7L8+EGdPl4QtoBiOzE4FELp7JmNUsBvgBcCakXWM2uiv/K89VAzU3BMDscf0DsACLvTKePbd5+cFDTcei6g==", + "version": "6.36.1", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.36.1.tgz", + "integrity": "sha512-miD1nyT4m4uopZaDdO2uXU/LLHliKNYL9kB1C1wJHrunHLm/rpkb5QVSokqgw9hFqEZakrdlb/VGWX8aYZTslQ==", "dependencies": { "@codemirror/state": "^6.5.0", "style-mod": "^4.1.0", @@ -207,9 +201,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz", - "integrity": "sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.1.tgz", + "integrity": "sha512-rHKbvBIQEe46PUybicWHsWmStdB3fvHi7CKa36Ip6xUqEr61BmGcnrYohXRNswU9zP/okYLXMzIW6D0neeNv6Q==", "cpu": [ "ppc64" ], @@ -223,9 +217,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.0.tgz", - "integrity": "sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.1.tgz", + "integrity": "sha512-gKHsqtULVpVfsffGLaU/W4Jx+DLU8BLOQtvBrg+R22tz422VMgBK5moQ/ELDTRPR7Tqt9gLNk13XlvOFinXSzQ==", "cpu": [ "arm" ], @@ -239,9 +233,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz", - "integrity": "sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.1.tgz", + "integrity": "sha512-0jrWbRDWSPNSmt0HDp4qhWHeL69BL3YSSCGlwNn4logcOijz7nLMsHLT1g5Kb9A8T3dCjX+5qekr5zkH+gbqxQ==", "cpu": [ "arm64" ], @@ -255,9 +249,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.0.tgz", - "integrity": "sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.1.tgz", + "integrity": "sha512-FafSki3AkovwnU7zSMDyMKP93Fre1E+c7/mVErP46Y+63RiU2fvKekgpMuLkABDGLGahB/DD0PkPm0YAINmH0Q==", "cpu": [ "x64" ], @@ -271,9 +265,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", - "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.1.tgz", + "integrity": "sha512-hJU5uPOQ0SBZ+0OZVx9dkpNyS0Cj1O7sjmqFMeQdp5ATYzCHhMD0CREHgq59eB0AFtCYDBoNcZXNJPwEZ/XDpA==", "cpu": [ "arm64" ], @@ -287,9 +281,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz", - "integrity": "sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.1.tgz", + "integrity": "sha512-siNAX65WSBKU7c+XJEKByMruE/JsHY9HU+n5BIMiNlo5axVbWwGXN4HhJQzOlY4TtOwSt3LRbS0zuI5SOjgoyg==", "cpu": [ "x64" ], @@ -303,9 +297,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz", - "integrity": "sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.1.tgz", + "integrity": "sha512-Kkl8APGvkp1S1g9tttiicChe49p+A3198sISIVcUGECqDPFXk9hSmVrUmaoCZWKo/zGK9TgLczLRLXduuhLplw==", "cpu": [ "arm64" ], @@ -319,9 +313,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz", - "integrity": "sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.1.tgz", + "integrity": "sha512-7hm+A84yjna/LTVLad+8iG5cB/Ik+M/ekSrN4ALs9GolbwcyvtjSD+xoPhFFAg8D7xVu0JdDIoNNZ6+KWLcPoQ==", "cpu": [ "x64" ], @@ -335,9 +329,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz", - "integrity": "sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.1.tgz", + "integrity": "sha512-USovmgDDpiWs16nRCH/NmRfQUJEaGGDPHqK6+pGzuMZOfoe0MAciJRMu1AKP3Ky4gnpuQcXv7aPHpX0IwLWRhA==", "cpu": [ "arm" ], @@ -351,9 +345,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz", - "integrity": "sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.1.tgz", + "integrity": "sha512-hjv91wG/3V8oKFa6yAew5wFYc+8usgOL/VH6cNEqFtqpWf8RDmwMIRnTmqwxGJ9/9H5ib3KZfgcIgYwoX7F9VQ==", "cpu": [ "arm64" ], @@ -367,9 +361,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz", - "integrity": "sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.1.tgz", + "integrity": "sha512-TwspFcPJpYyBqDcoqSLBBaoGRGiPWkjH5V4raiFQ6maAkBho/rfQvtVpNPkLHEwnPlVSdl4HkHZ3n7NvvtU10w==", "cpu": [ "ia32" ], @@ -383,9 +377,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz", - "integrity": "sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.1.tgz", + "integrity": "sha512-BS3gcpF33m9hiVFeMCF2+LTdkEr/JljXZGQrlR0Bb7B3pn+uQrAJebclIGar+r8BDJ2yvX9bN4GmMPIKdS20EA==", "cpu": [ "loong64" ], @@ -399,9 +393,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz", - "integrity": "sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.1.tgz", + "integrity": "sha512-X35vI7EufAX17Nqo6XoD89/HSlPJUB5zJ1UKeTiGOLXpOaz7zo+t1trSQOoq2Gr8usOX++S77VUw6L2wTMc2cA==", "cpu": [ "mips64el" ], @@ -415,9 +409,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz", - "integrity": "sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.1.tgz", + "integrity": "sha512-I+XQCBhTIXKqyLFDcyMP9Dp0u0fx2TiH3BTh4iIg58/a5hmS3l3Yr2AHG8gEsmjUA7WGfKy2ZqxsaVud15iI1w==", "cpu": [ "ppc64" ], @@ -431,9 +425,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz", - "integrity": "sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.1.tgz", + "integrity": "sha512-wK7f0cK/Mq2x42ImYAr+OWzyv4OQUQj/RcKvbxcEoe46LFCa4w08Cqow9zX8vN9SE8BScm4NGYT7CO0G8UBrTA==", "cpu": [ "riscv64" ], @@ -447,9 +441,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz", - "integrity": "sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.1.tgz", + "integrity": "sha512-47oImRwZavr5qEvEHNPcdly8LuFp3i4xrqT9mNbUn4ZKbwyegVp10k1E1YARiOim8ggfPAPABhPqXdS1NJOAnw==", "cpu": [ "s390x" ], @@ -463,9 +457,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz", - "integrity": "sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.1.tgz", + "integrity": "sha512-8qkGHVK1hH819iH7c9OsQsfUhJ0cgznoGT6vHRNxvNFPhcn0Y7HXLS0ndpY1sUkSM+umIdknz6vEqgPk6pbyIA==", "cpu": [ "x64" ], @@ -478,10 +472,26 @@ "node": ">=18" } }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.24.1.tgz", + "integrity": "sha512-lH+bWKi8aCvlDu0vDVcZV4ENiHjVus3SQFueeydJ/mSfKywQ3LnbSjJ8PUgj+3dllq1OTFCGgh+x/14hrULVrg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz", - "integrity": "sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.1.tgz", + "integrity": "sha512-OdjqCVKtJuxRk9gPit/iI4/wSCGOnCcuPkgkT8Pt+0vM63QUOBd5oNX2umXUBr4bYTpSCL/aGxrAb3qENcqA4g==", "cpu": [ "x64" ], @@ -495,9 +505,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz", - "integrity": "sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.1.tgz", + "integrity": "sha512-wy2psEw0wc+xbSB4Et3XZaONClCagOlQTsqRJaLtCcPggnuZMfb17c5T5w6RO6pFF5J2SWoM7+MJuWUEzvQN+Q==", "cpu": [ "arm64" ], @@ -511,9 +521,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz", - "integrity": "sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.1.tgz", + "integrity": "sha512-GClG42X5JYHoQU5Jry0u+uN2vmKOwrifl10IvDBXtkxyGr9oqOJyrd2U+H2ZoZGNIt21d7WcVJJmJq3I3fl+5g==", "cpu": [ "x64" ], @@ -527,9 +537,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz", - "integrity": "sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.1.tgz", + "integrity": "sha512-a0VfBsFPrlFKxzXuJ4nP0ia3jEbzBk/JW2wEW44dwr0RDOr/Y1+d+EJgT6L3h8y9X8ctig7ks0rWlbjkPn6PcA==", "cpu": [ "x64" ], @@ -543,9 +553,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz", - "integrity": "sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.1.tgz", + "integrity": "sha512-HqeXG1ttUnENzcGlPr0ouQHk8PQIoWi3thXElmafH1pVxC94sYdBVQregb2Qz7l1BmooUIOnzCGPCT4Oma0yTg==", "cpu": [ "arm64" ], @@ -559,9 +569,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz", - "integrity": "sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.1.tgz", + "integrity": "sha512-uA0iNg5jSy9XMiugX8Qtm3p9uUl9hi4JbOY18KnFBNTB+GsfJIWrDpE1cRFZrSHePiZs9cAwnprILpAKJWuYig==", "cpu": [ "ia32" ], @@ -575,9 +585,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz", - "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.1.tgz", + "integrity": "sha512-wekV0z60AyaD8yYgRtxckqvGzzVaQmQRAhNrR352KzXLfhc4peh3UBMMmtYHbOqml6KblKy7oihC1eaZS68vRw==", "cpu": [ "x64" ], @@ -2483,9 +2493,9 @@ } }, "node_modules/@semantic-release/release-notes-generator": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/@semantic-release/release-notes-generator/-/release-notes-generator-14.0.1.tgz", - "integrity": "sha512-K0w+5220TM4HZTthE5dDpIuFrnkN1NfTGPidJFm04ULT1DEZ9WG89VNXN7F0c+6nMEpWgqmPvb7vY7JkB2jyyA==", + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/@semantic-release/release-notes-generator/-/release-notes-generator-14.0.2.tgz", + "integrity": "sha512-ur2l2tVLBfX3fSEO2rCy2X6Kzg5S7BHGqdwTHvJrpWp4mOEN7W4K/2kWAjvfAlwMenEKjMnDIhBbxxjnP0S9hw==", "dev": true, "dependencies": { "conventional-changelog-angular": "^8.0.0", @@ -2701,9 +2711,9 @@ } }, "node_modules/@types/react": { - "version": "19.0.1", - "resolved": "https://registry.npmjs.org/@types/react/-/react-19.0.1.tgz", - "integrity": "sha512-YW6614BDhqbpR5KtUYzTA+zlA7nayzJRA9ljz9CQoxthR0sDisYZLuvSMsil36t4EH/uAt8T52Xb4sVw17G+SQ==", + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.0.2.tgz", + "integrity": "sha512-USU8ZI/xyKJwFTpjSVIrSeHBVAGagkHQKPNbxeWwql/vDmnTIBgx+TJnhFnj1NXgz8XfprU0egV2dROLGpsBEg==", "dev": true, "dependencies": { "csstype": "^3.0.2" @@ -2764,16 +2774,16 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.0.tgz", - "integrity": "sha512-NR2yS7qUqCL7AIxdJUQf2MKKNDVNaig/dEB0GBLU7D+ZdHgK1NoH/3wsgO3OnPVipn51tG3MAwaODEGil70WEw==", + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.1.tgz", + "integrity": "sha512-Ncvsq5CT3Gvh+uJG0Lwlho6suwDfUXH0HztslDf5I+F2wAFAZMRwYLEorumpKLzmO2suAXZ/td1tBg4NZIi9CQ==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.18.0", - "@typescript-eslint/type-utils": "8.18.0", - "@typescript-eslint/utils": "8.18.0", - "@typescript-eslint/visitor-keys": "8.18.0", + "@typescript-eslint/scope-manager": "8.18.1", + "@typescript-eslint/type-utils": "8.18.1", + "@typescript-eslint/utils": "8.18.1", + "@typescript-eslint/visitor-keys": "8.18.1", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -2793,15 +2803,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.18.0.tgz", - "integrity": "sha512-hgUZ3kTEpVzKaK3uNibExUYm6SKKOmTU2BOxBSvOYwtJEPdVQ70kZJpPjstlnhCHcuc2WGfSbpKlb/69ttyN5Q==", + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.18.1.tgz", + "integrity": "sha512-rBnTWHCdbYM2lh7hjyXqxk70wvon3p2FyaniZuey5TrcGBpfhVp0OxOa6gxr9Q9YhZFKyfbEnxc24ZnVbbUkCA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "8.18.0", - "@typescript-eslint/types": "8.18.0", - "@typescript-eslint/typescript-estree": "8.18.0", - "@typescript-eslint/visitor-keys": "8.18.0", + "@typescript-eslint/scope-manager": "8.18.1", + "@typescript-eslint/types": "8.18.1", + "@typescript-eslint/typescript-estree": "8.18.1", + "@typescript-eslint/visitor-keys": "8.18.1", "debug": "^4.3.4" }, "engines": { @@ -2817,13 +2827,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.18.0.tgz", - "integrity": "sha512-PNGcHop0jkK2WVYGotk/hxj+UFLhXtGPiGtiaWgVBVP1jhMoMCHlTyJA+hEj4rszoSdLTK3fN4oOatrL0Cp+Xw==", + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.18.1.tgz", + "integrity": "sha512-HxfHo2b090M5s2+/9Z3gkBhI6xBH8OJCFjH9MhQ+nnoZqxU3wNxkLT+VWXWSFWc3UF3Z+CfPAyqdCTdoXtDPCQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.18.0", - "@typescript-eslint/visitor-keys": "8.18.0" + "@typescript-eslint/types": "8.18.1", + "@typescript-eslint/visitor-keys": "8.18.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2834,13 +2844,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.18.0.tgz", - "integrity": "sha512-er224jRepVAVLnMF2Q7MZJCq5CsdH2oqjP4dT7K6ij09Kyd+R21r7UVJrF0buMVdZS5QRhDzpvzAxHxabQadow==", + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.18.1.tgz", + "integrity": "sha512-jAhTdK/Qx2NJPNOTxXpMwlOiSymtR2j283TtPqXkKBdH8OAMmhiUfP0kJjc/qSE51Xrq02Gj9NY7MwK+UxVwHQ==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "8.18.0", - "@typescript-eslint/utils": "8.18.0", + "@typescript-eslint/typescript-estree": "8.18.1", + "@typescript-eslint/utils": "8.18.1", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -2857,9 +2867,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.0.tgz", - "integrity": "sha512-FNYxgyTCAnFwTrzpBGq+zrnoTO4x0c1CKYY5MuUTzpScqmY5fmsh2o3+57lqdI3NZucBDCzDgdEbIaNfAjAHQA==", + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.1.tgz", + "integrity": "sha512-7uoAUsCj66qdNQNpH2G8MyTFlgerum8ubf21s3TSM3XmKXuIn+H2Sifh/ES2nPOPiYSRJWAk0fDkW0APBWcpfw==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2870,13 +2880,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.0.tgz", - "integrity": "sha512-rqQgFRu6yPkauz+ms3nQpohwejS8bvgbPyIDq13cgEDbkXt4LH4OkDMT0/fN1RUtzG8e8AKJyDBoocuQh8qNeg==", + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.1.tgz", + "integrity": "sha512-z8U21WI5txzl2XYOW7i9hJhxoKKNG1kcU4RzyNvKrdZDmbjkmLBo8bgeiOJmA06kizLI76/CCBAAGlTlEeUfyg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.18.0", - "@typescript-eslint/visitor-keys": "8.18.0", + "@typescript-eslint/types": "8.18.1", + "@typescript-eslint/visitor-keys": "8.18.1", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -2920,15 +2930,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.0.tgz", - "integrity": "sha512-p6GLdY383i7h5b0Qrfbix3Vc3+J2k6QWw6UMUeY5JGfm3C5LbZ4QIZzJNoNOfgyRe0uuYKjvVOsO/jD4SJO+xg==", + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.1.tgz", + "integrity": "sha512-8vikiIj2ebrC4WRdcAdDcmnu9Q/MXXwg+STf40BVfT8exDqBCUPdypvzcUPxEqRGKg9ALagZ0UWcYCtn+4W2iQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.18.0", - "@typescript-eslint/types": "8.18.0", - "@typescript-eslint/typescript-estree": "8.18.0" + "@typescript-eslint/scope-manager": "8.18.1", + "@typescript-eslint/types": "8.18.1", + "@typescript-eslint/typescript-estree": "8.18.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2943,12 +2953,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.0.tgz", - "integrity": "sha512-pCh/qEA8Lb1wVIqNvBke8UaRjJ6wrAWkJO5yyIbs8Yx6TNGYyfNjOo61tLv+WwLvoLPp4BQ8B7AHKijl8NGUfw==", + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.1.tgz", + "integrity": "sha512-Vj0WLm5/ZsD013YeUKn+K0y8p1M0jPpxOkKdbD1wB0ns53a5piVY02zjf072TblEweAbcYiFiPoSMF3kp+VhhQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.18.0", + "@typescript-eslint/types": "8.18.1", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -3149,13 +3159,13 @@ "dev": true }, "node_modules/array-buffer-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", - "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", + "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", "dev": true, "dependencies": { - "call-bind": "^1.0.5", - "is-array-buffer": "^3.0.4" + "call-bound": "^1.0.3", + "is-array-buffer": "^3.0.5" }, "engines": { "node": ">= 0.4" @@ -3211,15 +3221,15 @@ } }, "node_modules/array.prototype.flat": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", - "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", + "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -3229,15 +3239,15 @@ } }, "node_modules/array.prototype.flatmap": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", - "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", + "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -3247,19 +3257,18 @@ } }, "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", - "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", + "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", "dev": true, "dependencies": { "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.5", + "call-bind": "^1.0.8", "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.2.1", - "get-intrinsic": "^1.2.3", - "is-array-buffer": "^3.0.4", - "is-shared-array-buffer": "^1.0.2" + "es-abstract": "^1.23.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "is-array-buffer": "^3.0.4" }, "engines": { "node": ">= 0.4" @@ -3437,13 +3446,13 @@ } }, "node_modules/call-bound": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.2.tgz", - "integrity": "sha512-0lk0PHFe/uz0vl527fG9CgdE9WdafjDbCXvBbs+LUv000TVt2Jjhqbs4Jwm8gz070w8xXyEAxrPOMullsxXeGg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", + "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", "dev": true, "dependencies": { - "call-bind": "^1.0.8", - "get-intrinsic": "^1.2.5" + "call-bind-apply-helpers": "^1.0.1", + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -3501,9 +3510,9 @@ } }, "node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.0.tgz", + "integrity": "sha512-ZkD35Mx92acjB2yNJgziGqT9oKHEOxjTBTDRpOsRWtdecL/0jM3z5kM/CTzHWvHIen1GvkM85p6TuFfDGfc8/Q==", "dev": true, "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" @@ -3522,9 +3531,9 @@ } }, "node_modules/chokidar": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", - "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", "dev": true, "dependencies": { "readdirp": "^4.0.1" @@ -3965,14 +3974,14 @@ } }, "node_modules/data-view-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", - "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", + "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.6", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" + "is-data-view": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -3982,29 +3991,29 @@ } }, "node_modules/data-view-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", - "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", + "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" + "is-data-view": "^1.0.2" }, "engines": { "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/inspect-js" } }, "node_modules/data-view-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", - "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", + "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.6", + "call-bound": "^1.0.2", "es-errors": "^1.3.0", "is-data-view": "^1.0.1" }, @@ -4186,12 +4195,12 @@ } }, "node_modules/dunder-proto": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.0.tgz", - "integrity": "sha512-9+Sj30DIu+4KvHqMfLUGLFYL2PkURSYMVXJyXe92nFRvlYq5hBjLEhblKB+vkd/WVlUYMWigiY07T91Fkk0+4A==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", "dev": true, "dependencies": { - "call-bind-apply-helpers": "^1.0.0", + "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" }, @@ -4346,9 +4355,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.17.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", - "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.0.tgz", + "integrity": "sha512-0/r0MySGYG8YqlayBZ6MuCfECmHFdJ5qyPh8s8wa5Hnm6SaFLSK1VYCbj+NKp090Nm1caZhD+QTnmxO7esYGyQ==", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -4548,57 +4557,59 @@ } }, "node_modules/es-abstract": { - "version": "1.23.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.5.tgz", - "integrity": "sha512-vlmniQ0WNPwXqA0BnmwV3Ng7HxiGlh6r5U6JcTMNx8OilcAGqVJBHJcPjqOMaczU9fRuRK5Px2BdVyPRnKMMVQ==", + "version": "1.23.6", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.6.tgz", + "integrity": "sha512-Ifco6n3yj2tMZDWNLyloZrytt9lqqlwvS83P3HtaETR0NUOYnIULGGHpktqYGObGy+8wc1okO25p8TjemhImvA==", "dev": true, "dependencies": { "array-buffer-byte-length": "^1.0.1", - "arraybuffer.prototype.slice": "^1.0.3", + "arraybuffer.prototype.slice": "^1.0.4", "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "data-view-buffer": "^1.0.1", "data-view-byte-length": "^1.0.1", "data-view-byte-offset": "^1.0.0", - "es-define-property": "^1.0.0", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", "es-set-tostringtag": "^2.0.3", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.4", + "es-to-primitive": "^1.3.0", + "function.prototype.name": "^1.1.7", + "get-intrinsic": "^1.2.6", "get-symbol-description": "^1.0.2", "globalthis": "^1.0.4", - "gopd": "^1.0.1", + "gopd": "^1.2.0", "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", - "has-symbols": "^1.0.3", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", "hasown": "^2.0.2", - "internal-slot": "^1.0.7", + "internal-slot": "^1.1.0", "is-array-buffer": "^3.0.4", "is-callable": "^1.2.7", - "is-data-view": "^1.0.1", + "is-data-view": "^1.0.2", "is-negative-zero": "^2.0.3", - "is-regex": "^1.1.4", + "is-regex": "^1.2.1", "is-shared-array-buffer": "^1.0.3", - "is-string": "^1.0.7", + "is-string": "^1.1.1", "is-typed-array": "^1.1.13", - "is-weakref": "^1.0.2", + "is-weakref": "^1.1.0", + "math-intrinsics": "^1.0.0", "object-inspect": "^1.13.3", "object-keys": "^1.1.1", "object.assign": "^4.1.5", "regexp.prototype.flags": "^1.5.3", - "safe-array-concat": "^1.1.2", - "safe-regex-test": "^1.0.3", - "string.prototype.trim": "^1.2.9", - "string.prototype.trimend": "^1.0.8", + "safe-array-concat": "^1.1.3", + "safe-regex-test": "^1.1.0", + "string.prototype.trim": "^1.2.10", + "string.prototype.trimend": "^1.0.9", "string.prototype.trimstart": "^1.0.8", "typed-array-buffer": "^1.0.2", "typed-array-byte-length": "^1.0.1", - "typed-array-byte-offset": "^1.0.2", - "typed-array-length": "^1.0.6", + "typed-array-byte-offset": "^1.0.3", + "typed-array-length": "^1.0.7", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.15" + "which-typed-array": "^1.1.16" }, "engines": { "node": ">= 0.4" @@ -4690,9 +4701,9 @@ } }, "node_modules/esbuild": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", - "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.1.tgz", + "integrity": "sha512-bHNW57YAKNh1VSbXP33EL9DevtRuT10czGhL9ynKpOAeBMNAkzsP8FSNoFTbU3abQB7kOb+JqUc89FqlZNbEeQ==", "dev": true, "hasInstallScript": true, "bin": { @@ -4702,30 +4713,31 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.24.0", - "@esbuild/android-arm": "0.24.0", - "@esbuild/android-arm64": "0.24.0", - "@esbuild/android-x64": "0.24.0", - "@esbuild/darwin-arm64": "0.24.0", - "@esbuild/darwin-x64": "0.24.0", - "@esbuild/freebsd-arm64": "0.24.0", - "@esbuild/freebsd-x64": "0.24.0", - "@esbuild/linux-arm": "0.24.0", - "@esbuild/linux-arm64": "0.24.0", - "@esbuild/linux-ia32": "0.24.0", - "@esbuild/linux-loong64": "0.24.0", - "@esbuild/linux-mips64el": "0.24.0", - "@esbuild/linux-ppc64": "0.24.0", - "@esbuild/linux-riscv64": "0.24.0", - "@esbuild/linux-s390x": "0.24.0", - "@esbuild/linux-x64": "0.24.0", - "@esbuild/netbsd-x64": "0.24.0", - "@esbuild/openbsd-arm64": "0.24.0", - "@esbuild/openbsd-x64": "0.24.0", - "@esbuild/sunos-x64": "0.24.0", - "@esbuild/win32-arm64": "0.24.0", - "@esbuild/win32-ia32": "0.24.0", - "@esbuild/win32-x64": "0.24.0" + "@esbuild/aix-ppc64": "0.24.1", + "@esbuild/android-arm": "0.24.1", + "@esbuild/android-arm64": "0.24.1", + "@esbuild/android-x64": "0.24.1", + "@esbuild/darwin-arm64": "0.24.1", + "@esbuild/darwin-x64": "0.24.1", + "@esbuild/freebsd-arm64": "0.24.1", + "@esbuild/freebsd-x64": "0.24.1", + "@esbuild/linux-arm": "0.24.1", + "@esbuild/linux-arm64": "0.24.1", + "@esbuild/linux-ia32": "0.24.1", + "@esbuild/linux-loong64": "0.24.1", + "@esbuild/linux-mips64el": "0.24.1", + "@esbuild/linux-ppc64": "0.24.1", + "@esbuild/linux-riscv64": "0.24.1", + "@esbuild/linux-s390x": "0.24.1", + "@esbuild/linux-x64": "0.24.1", + "@esbuild/netbsd-arm64": "0.24.1", + "@esbuild/netbsd-x64": "0.24.1", + "@esbuild/openbsd-arm64": "0.24.1", + "@esbuild/openbsd-x64": "0.24.1", + "@esbuild/sunos-x64": "0.24.1", + "@esbuild/win32-arm64": "0.24.1", + "@esbuild/win32-ia32": "0.24.1", + "@esbuild/win32-x64": "0.24.1" } }, "node_modules/escalade": { @@ -5446,15 +5458,17 @@ } }, "node_modules/function.prototype.name": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", + "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "functions-have-names": "^1.2.3", + "hasown": "^2.0.2", + "is-callable": "^1.2.7" }, "engines": { "node": ">= 0.4" @@ -5518,14 +5532,14 @@ } }, "node_modules/get-symbol-description": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", - "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", + "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", "dev": true, "dependencies": { - "call-bind": "^1.0.5", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4" + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -5701,10 +5715,13 @@ } }, "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", + "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", "dev": true, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -6045,13 +6062,14 @@ } }, "node_modules/is-array-buffer": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", - "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", + "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1" + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -6226,12 +6244,12 @@ } }, "node_modules/is-finalizationregistry": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.0.tgz", - "integrity": "sha512-qfMdqbAQEwBw78ZyReKnlA8ezmPdb9BemzIIip/JkjaZUhitfXDkkr+3QTboW0JrSXT1QWyYShpvnNHGZ4c4yA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", + "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", "dev": true, "dependencies": { - "call-bind": "^1.0.7" + "call-bound": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -6310,12 +6328,12 @@ } }, "node_modules/is-number-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.0.tgz", - "integrity": "sha512-KVSZV0Dunv9DTPkhXwcZ3Q+tUc9TsaE1ZwX5J2WMvsSGS6Md8TFPun5uwh0yRdrNerI6vf/tbJxqSx4c1ZI1Lw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", + "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", "dev": true, "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.3", "has-tostringtag": "^1.0.2" }, "engines": { @@ -6382,12 +6400,12 @@ } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", - "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", + "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", "dev": true, "dependencies": { - "call-bind": "^1.0.7" + "call-bound": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -6409,12 +6427,12 @@ } }, "node_modules/is-string": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.0.tgz", - "integrity": "sha512-PlfzajuF9vSo5wErv3MJAKD/nqf9ngAs1NFQYm16nUYFO2IzxJ2hcm+IOCg+EEopdykNNUhVq5cz35cAUxU8+g==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", + "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", "dev": true, "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.3", "has-tostringtag": "^1.0.2" }, "engines": { @@ -6442,12 +6460,12 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", - "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", "dev": true, "dependencies": { - "which-typed-array": "^1.1.14" + "which-typed-array": "^1.1.16" }, "engines": { "node": ">= 0.4" @@ -6496,13 +6514,13 @@ } }, "node_modules/is-weakset": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", - "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", + "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4" + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -6930,9 +6948,9 @@ } }, "node_modules/math-intrinsics": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.0.0.tgz", - "integrity": "sha512-4MqMiKP90ybymYvsut0CH2g4XWbfLtmlCkXmtmdcDCxNB+mQcu1w/1+L/VD7vi/PSv7X2JYV7SCcR+jiPXnQtA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", "dev": true, "engines": { "node": ">= 0.4" @@ -7054,9 +7072,9 @@ } }, "node_modules/mime": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/mime/-/mime-4.0.4.tgz", - "integrity": "sha512-v8yqInVjhXyqP6+Kw4fV3ZzeMRqEW6FotRsKXjRS5VMTNIuXsdRoAvklpoRgSqXm6o9VNH4/C0mgedko9DdLsQ==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/mime/-/mime-4.0.6.tgz", + "integrity": "sha512-4rGt7rvQHBbaSOF9POGkk1ocRP16Md1x36Xma8sz8h8/vfCUI2OtEIeCqe4Ofes853x4xDoPiFLIT47J5fI/7A==", "dev": true, "funding": [ "https://github.com/sponsors/broofa" @@ -10126,14 +10144,16 @@ } }, "node_modules/object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", + "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", "dev": true, "dependencies": { - "call-bind": "^1.0.5", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", + "es-object-atoms": "^1.0.0", + "has-symbols": "^1.1.0", "object-keys": "^1.1.1" }, "engines": { @@ -10176,12 +10196,13 @@ } }, "node_modules/object.values": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", - "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", + "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", "dev": true, "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" }, @@ -11131,19 +11152,19 @@ } }, "node_modules/reflect.getprototypeof": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.8.tgz", - "integrity": "sha512-B5dj6usc5dkk8uFliwjwDHM8To5/QwdKz9JcBZ8Ic4G1f0YmeeJTtE/ZTdgRFPAfxZFiUaPhZ1Jcs4qeagItGQ==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.9.tgz", + "integrity": "sha512-r0Ay04Snci87djAsI4U+WNRcSw5S4pOH7qFjd/veA5gC7TbqESR3tcj28ia95L/fYUDw11JKP7uqUKUAfVvV5Q==", "dev": true, "dependencies": { "call-bind": "^1.0.8", "define-properties": "^1.2.1", - "dunder-proto": "^1.0.0", - "es-abstract": "^1.23.5", + "dunder-proto": "^1.0.1", + "es-abstract": "^1.23.6", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", + "get-intrinsic": "^1.2.6", "gopd": "^1.2.0", - "which-builtin-type": "^1.2.0" + "which-builtin-type": "^1.2.1" }, "engines": { "node": ">= 0.4" @@ -11183,11 +11204,11 @@ } }, "node_modules/remeda": { - "version": "2.17.4", - "resolved": "https://registry.npmjs.org/remeda/-/remeda-2.17.4.tgz", - "integrity": "sha512-pviU2Ag7Qx9mOCAKO4voxDx/scfLzdhp3v85qDO4xxntQsU76uE9sgrAAdK1ATn4zzaOJqCXYMMNRP+O9F4Wiw==", + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/remeda/-/remeda-2.18.0.tgz", + "integrity": "sha512-wvHvaApA7crz46HWhGTotPawkzd45w1iXzPK7r4ECQgbmcSqHLrVio2LOr7ZEp1pu5QDH1U391ZKu+qra7OoLw==", "dependencies": { - "type-fest": "^4.27.0" + "type-fest": "^4.30.0" } }, "node_modules/require-directory": { @@ -11200,9 +11221,9 @@ } }, "node_modules/resolve": { - "version": "1.22.9", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.9.tgz", - "integrity": "sha512-QxrmX1DzraFIi9PxdG5VkRfRwIgjwyud+z/iBwfRRrVmHc+P9Q7u2lSSpQ6bjr2gy5lrqIiU9vb6iAeGf2400A==", + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", + "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", "dev": true, "dependencies": { "is-core-module": "^2.16.0", @@ -11212,6 +11233,9 @@ "bin": { "resolve": "bin/resolve" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -12589,21 +12613,21 @@ "dev": true }, "node_modules/tldts": { - "version": "6.1.68", - "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.68.tgz", - "integrity": "sha512-JKF17jROiYkjJPT73hUTEiTp2OBCf+kAlB+1novk8i6Q6dWjHsgEjw9VLiipV4KTJavazXhY1QUXyQFSem2T7w==", + "version": "6.1.69", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.69.tgz", + "integrity": "sha512-Oh/CqRQ1NXNY7cy9NkTPUauOWiTro0jEYZTioGbOmcQh6EC45oribyIMJp0OJO3677r13tO6SKdWoGZUx2BDFw==", "dev": true, "dependencies": { - "tldts-core": "^6.1.68" + "tldts-core": "^6.1.69" }, "bin": { "tldts": "bin/cli.js" } }, "node_modules/tldts-core": { - "version": "6.1.68", - "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.68.tgz", - "integrity": "sha512-85TdlS/DLW/gVdf2oyyzqp3ocS30WxjaL4la85EArl9cHUR/nizifKAJPziWewSZjDZS71U517/i6ciUeqtB5Q==", + "version": "6.1.69", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.69.tgz", + "integrity": "sha512-nygxy9n2PBUFQUtAXAc122gGo+04/j5qr5TGQFZTHafTKYvmARVXt2cA5rgero2/dnXUfkdPtiJoKmrd3T+wdA==", "dev": true }, "node_modules/to-regex-range": { @@ -13172,9 +13196,9 @@ } }, "node_modules/type-fest": { - "version": "4.30.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.30.1.tgz", - "integrity": "sha512-ojFL7eDMX2NF0xMbDwPZJ8sb7ckqtlAi1GsmgsFXvErT9kFTk1r0DuQKvrCh73M6D4nngeHJmvogF9OluXs7Hw==", + "version": "4.30.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.30.2.tgz", + "integrity": "sha512-UJShLPYi1aWqCdq9HycOL/gwsuqda1OISdBO3t8RlXQC4QvtuIz4b5FCfe2dQIWEpmlRExKmcTBfP1r9bhY7ig==", "engines": { "node": ">=16" }, @@ -13183,30 +13207,30 @@ } }, "node_modules/typed-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", - "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", "dev": true, "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-typed-array": "^1.1.13" + "is-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" } }, "node_modules/typed-array-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", - "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", + "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", "dev": true, "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -13216,18 +13240,18 @@ } }, "node_modules/typed-array-byte-offset": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.3.tgz", - "integrity": "sha512-GsvTyUHTriq6o/bHcTd0vM7OQ9JEdlvluu9YISaA7+KzDzPaIzEeDFNkTfhdE3MYcNhNi0vq/LlegYgIs5yPAw==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", + "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", "dev": true, "dependencies": { "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13", - "reflect.getprototypeof": "^1.0.6" + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.15", + "reflect.getprototypeof": "^1.0.9" }, "engines": { "node": ">= 0.4" @@ -13283,15 +13307,18 @@ } }, "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", + "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", + "call-bound": "^1.0.3", "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" + "has-symbols": "^1.1.0", + "which-boxed-primitive": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -14321,16 +14348,16 @@ } }, "node_modules/which-boxed-primitive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.0.tgz", - "integrity": "sha512-Ei7Miu/AXe2JJ4iNF5j/UphAgRoma4trE6PtisM09bPygb3egMH3YLW/befsWb1A1AxvNSFidOFTB18XtnIIng==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", + "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", "dev": true, "dependencies": { "is-bigint": "^1.1.0", - "is-boolean-object": "^1.2.0", - "is-number-object": "^1.1.0", - "is-string": "^1.1.0", - "is-symbol": "^1.1.0" + "is-boolean-object": "^1.2.1", + "is-number-object": "^1.1.1", + "is-string": "^1.1.1", + "is-symbol": "^1.1.1" }, "engines": { "node": ">= 0.4" @@ -14391,15 +14418,16 @@ } }, "node_modules/which-typed-array": { - "version": "1.1.16", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.16.tgz", - "integrity": "sha512-g+N+GAWiRj66DngFwHvISJd+ITsyphZvD1vChfVg6cEdnzy53GzB3oy0fUNlvhz7H7+MiqhYr26qxQShCpKTTQ==", + "version": "1.1.18", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.18.tgz", + "integrity": "sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==", "dev": true, "dependencies": { "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "for-each": "^0.3.3", - "gopd": "^1.0.1", + "gopd": "^1.2.0", "has-tostringtag": "^1.0.2" }, "engines": { @@ -14573,7 +14601,6 @@ } }, "types/types/foundry": { - "name": "foundry-types", "version": "4.4.2", "dev": true, "license": "Apache-2.0", diff --git a/package.json b/package.json index 4517a8fa5..40c6cec94 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@semantic-release/exec": "^6.0.3", "@semantic-release/git": "^10.0.1", "@semantic-release/github": "^11.0.1", - "@semantic-release/release-notes-generator": "^14.0.1", + "@semantic-release/release-notes-generator": "^14.0.2", "@types/eslint__js": "^8.42.3", "@types/fs-extra": "^11.0.4", "@types/glob": "^8.1.0", @@ -51,8 +51,8 @@ "@types/tooltipster": "^0.0.35", "@types/uuid": "^10.0.0", "@types/yaireo__tagify": "^4.27.0", - "@typescript-eslint/eslint-plugin": "^8.18.0", - "@typescript-eslint/parser": "^8.18.0", + "@typescript-eslint/eslint-plugin": "^8.18.1", + "@typescript-eslint/parser": "^8.18.1", "classic-level": "^1.4.1", "es-jest": "^2.1.0", "eslint": "^9.17.0", @@ -88,14 +88,14 @@ "yargs": "^17.7.2" }, "dependencies": { - "@codemirror/autocomplete": "^6.18.3", + "@codemirror/autocomplete": "^6.18.4", "@codemirror/lang-json": "^6.0.1", "@yaireo/tagify": "^4.32.2", "codemirror": "^6.0.1", "luxon": "^3.5.0", "minisearch": "^7.1.1", "nouislider": "^15.8.1", - "remeda": "^2.17.4", + "remeda": "^2.18.0", "sortablejs": "^1.15.6", "uuid": "^11.0.3" }, diff --git a/static/module.json b/static/module.json index e865a620e..c38855512 100644 --- a/static/module.json +++ b/static/module.json @@ -15,8 +15,8 @@ "type": "system", "manifest": "https://github.com/foundryvtt/pf2e/releases/download/latest/system.json", "compatibility": { - "minimum": "6.5.0", - "verified": "6.5.0" + "minimum": "6.8.0", + "verified": "6.8.0" } } ] diff --git a/types/build/lib/compendium-pack.d.ts b/types/build/lib/compendium-pack.d.ts index e11ca8277..aceaec390 100644 --- a/types/build/lib/compendium-pack.d.ts +++ b/types/build/lib/compendium-pack.d.ts @@ -1,10 +1,11 @@ import type { ActorSourcePF2e } from "@actor/data/index.ts"; -import { ItemSourcePF2e } from "@item/base/data/index.ts"; -import { RuleElementSource } from "@module/rules/index.ts"; +import type { ItemSourcePF2e } from "@item/base/data/index.ts"; +import type { RuleElementSource } from "@module/rules/index.ts"; import "./foundry-utils.ts"; import { PackError } from "./helpers.ts"; import { DBFolder } from "./level-database.ts"; import { PackEntry } from "./types.ts"; + interface PackMetadata { system: string; name: string; diff --git a/types/src/global.d.ts b/types/src/global.d.ts index 8c4ad7878..63543518d 100644 --- a/types/src/global.d.ts +++ b/types/src/global.d.ts @@ -8,11 +8,20 @@ import type { ItemPF2e, PhysicalItemPF2e } from "@item"; import type { ConditionSource } from "@item/condition/data.ts"; import type { CoinsPF2e } from "@item/physical/helpers.ts"; import type { ActiveEffectPF2e } from "@module/active-effect.ts"; -import type { CompendiumBrowser, CompendiumBrowserSettings, CompendiumBrowserSources } from "@module/apps/compendium-browser/index.ts"; +import type { + CompendiumBrowser, + CompendiumBrowserSettings, + CompendiumBrowserSources, +} from "@module/apps/compendium-browser/browser.ts"; import type { EffectsPanel } from "@module/apps/effects-panel.ts"; import type { HotbarPF2e } from "@module/apps/hotbar.ts"; import type { LicenseViewer } from "@module/apps/license-viewer/app.ts"; -import type { ActorDirectoryPF2e, ChatLogPF2e, CompendiumDirectoryPF2e, EncounterTrackerPF2e } from "@module/apps/sidebar/index.ts"; +import type { + ActorDirectoryPF2e, + ChatLogPF2e, + CompendiumDirectoryPF2e, + EncounterTrackerPF2e, +} from "@module/apps/sidebar/index.ts"; import type { WorldClock } from "@module/apps/world-clock/app.ts"; import type { CanvasPF2e, EffectsCanvasGroupPF2e } from "@module/canvas/index.ts"; import type { StatusEffects } from "@module/canvas/status-effects.ts"; @@ -22,21 +31,45 @@ import type { CombatantPF2e, EncounterPF2e } from "@module/encounter/index.ts"; import type { MacroPF2e } from "@module/macro.ts"; import type { RuleElementPF2e, RuleElements } from "@module/rules/index.ts"; import type { UserPF2e } from "@module/user/index.ts"; -import type { AmbientLightDocumentPF2e, MeasuredTemplateDocumentPF2e, RegionBehaviorPF2e, RegionDocumentPF2e, ScenePF2e, TileDocumentPF2e, TokenDocumentPF2e } from "@scene"; +import type { + AmbientLightDocumentPF2e, + MeasuredTemplateDocumentPF2e, + RegionBehaviorPF2e, + RegionDocumentPF2e, + ScenePF2e, + TileDocumentPF2e, + TokenDocumentPF2e, +} from "@scene"; import type { ActorDeltaPF2e } from "@scene/token-document/actor-delta.ts"; import type { PF2ECONFIG, StatusEffectIconTheme } from "@scripts/config/index.ts"; import type { DicePF2e } from "@scripts/dice.ts"; -import type { calculateXP, checkPrompt, editPersistent, launchTravelSheet, perceptionForSelected, rollActionMacro, rollItemMacro, stealthForSelected, xpFromEncounter } from "@scripts/macros/index.ts"; +import type { + calculateXP, + checkPrompt, + editPersistent, + launchTravelSheet, + perceptionForSelected, + rollActionMacro, + rollItemMacro, + stealthForSelected, + xpFromEncounter, +} from "@scripts/macros/index.ts"; import type { remigrate } from "@scripts/system/remigrate.ts"; import type { CheckPF2e } from "@system/check/index.ts"; import type { ConditionManager } from "@system/conditions/manager.ts"; import type { EffectTracker } from "@system/effect-tracker.ts"; import type { ModuleArt } from "@system/module-art.ts"; import type { Predicate } from "@system/predication.ts"; -import type { CustomDamageData, HomebrewTag, HomebrewTraitSettingsKey, LanguageSettings } from "@system/settings/homebrew/index.ts"; +import type { + CustomDamageData, + HomebrewTag, + HomebrewTraitSettingsKey, + LanguageSettings, +} from "@system/settings/homebrew/index.ts"; import type { TextEditorPF2e } from "@system/text-editor.ts"; import type { sluggify } from "@util"; import type EnJSON from "static/lang/en.json"; + interface GamePF2e extends Game, ActorsPF2e>, ChatMessagePF2e, EncounterPF2e, ItemPF2e, MacroPF2e, ScenePF2e, UserPF2e> { pf2e: { actions: Record & Collection; @@ -94,6 +127,8 @@ interface GamePF2e extends Game, ActorsPF2e>, Ch sections: FeatGroupData[]; }; languages: LanguageSettings; + mythic: "disabled" | "enabled" | "variant-tiers"; + type: string | null; }; critFumble: { buttons: boolean; @@ -213,6 +248,7 @@ declare global { get(module: "pf2e", setting: "campaignFeats"): boolean; get(module: "pf2e", setting: "campaignFeatSections"): FeatGroupData[]; get(module: "pf2e", setting: "campaignType"): string; + get(module: "pf2e", setting: "mythic"): "disabled" | "enabled" | "variant-tiers"; get(module: "pf2e", setting: "activeParty"): string; get(module: "pf2e", setting: "activePartyFolderState"): boolean; get(module: "pf2e", setting: "createdFirstParty"): boolean; diff --git a/types/src/module/actor/army/data.d.ts b/types/src/module/actor/army/data.d.ts index 069c7a5db..03a3f715f 100644 --- a/types/src/module/actor/army/data.d.ts +++ b/types/src/module/actor/army/data.d.ts @@ -1,95 +1,110 @@ -import { - ActorAttributes, - ActorAttributesSource, - ActorDetails, - ActorDetailsSource, - ActorHitPoints, - ActorSystemData, - ActorSystemSource, - ActorTraitsData, - ActorTraitsSource, - BaseActorSourcePF2e, - BaseHitPointsSource, -} from "@actor/data/base.ts"; -import { ValueAndMax, ValueAndMaybeMax } from "@module/data.ts"; +import { ActorSystemSource, BaseActorSourcePF2e } from "@actor/data/base.ts"; +import { Immunity, ImmunitySource, Resistance, ResistanceSource, Weakness, WeaknessSource } from "@actor/data/iwr.ts"; +import { ActorSystemModel, ActorSystemSchema } from "@actor/data/model.ts"; +import { InitiativeTraceData } from "@actor/initiative.ts"; +import { ActorAlliance } from "@actor/types.ts"; +import { Rarity, ValueAndMax } from "@module/data.ts"; +import { AutoChangeEntry } from "@module/rules/rule-element/ae-like.ts"; import { PerceptionTraceData } from "@system/statistic/perception.ts"; -import { ARMY_TYPES } from "./values.ts"; +import { ArmyPF2e } from "./document.ts"; +import { ArmyType } from "./types.ts"; +import fields = foundry.data.fields; -type ArmySource = BaseActorSourcePF2e<"army", ArmySystemSource>; -interface ArmySystemSource extends ActorSystemSource { - ac: ArmyArmorClass; - attributes: ArmyAttributesSource; - details: ArmyDetailsSource; - traits: ArmyTraitsSource; - consumption: number; - scouting: number; - recruitmentDC: number; - resources: ArmyResourcesSource; - saves: { - maneuver: number; - morale: number; +declare class ArmySystemData extends ActorSystemModel { + static defineSchema(): ArmySystemSchema; +} +interface ArmySystemData extends ActorSystemModel, ModelPropsFromSchema { + attributes: ModelPropsFromSchema & { + hp: { + max: number; + negativeHealing: boolean; + unrecoverable: number; + details: string; + }; + immunities: Immunity[]; + weaknesses: Weakness[]; + resistances: Resistance[]; + flanking: never; }; - weapons: { - ranged: ArmyWeaponData | null; - melee: ArmyWeaponData | null; + initiative: InitiativeTraceData; + details: ModelPropsFromSchema & { + alliance: ActorAlliance; }; -} -interface ArmyWeaponData { - name: string; - potency: number; -} -interface ArmyArmorClass { - value: number; - potency: number; -} -interface ArmyTraitsSource extends Required> { - languages?: never; - type: (typeof ARMY_TYPES)[number]; -} -interface ArmyDetailsSource extends Required { - strongSave: string; - weakSave: string; - description: string; -} -interface ArmySystemData extends Omit, ActorSystemData { - attributes: ArmyAttributes; - traits: ArmyTraits; perception: Pick; - details: ArmyDetails; - resources: ArmyResourcesData; - saves: ArmySystemSource["saves"] & { - strongSave: "maneuver" | "morale"; + traits: ModelPropsFromSchema & { + size?: never; }; + resources: { + ammunition: ValueAndMax; + potions: ValueAndMax; + } & Record; + /** An audit log of automatic, non-modifier changes applied to various actor data nodes */ + autoChanges: Record; } -interface ArmyAttributesSource extends ActorAttributesSource { - immunities?: never; - weaknesses?: never; - resistances?: never; - hp: ArmyHitPointsSource; - ac: never; -} -interface ArmyAttributes extends Omit, ActorAttributes { - ac: never; - hp: ArmyHitPoints; -} -interface ArmyHitPointsSource extends Required { - /** Typically half the army's hit points, armies that can't be feared have a threshold of 0 instead */ - routThreshold: number; -} -interface ArmyHitPoints extends ArmyHitPointsSource, ActorHitPoints { - negativeHealing: boolean; - unrecoverable: number; -} -interface ArmyResourcesSource { - /** How often this army can use ranged attacks */ - ammunition: ValueAndMax; - potions: ValueAndMaybeMax; -} -interface ArmyResourcesData extends ArmyResourcesSource { - potions: ValueAndMax; -} -interface ArmyTraits extends Omit, Required> { -} -interface ArmyDetails extends ArmyDetailsSource, ActorDetails { -} -export type { ArmySource, ArmySystemData }; +type ArmySystemSchema = Omit & { + ac: fields.SchemaField<{ + value: fields.NumberField; + potency: fields.NumberField; + }>; + attributes: fields.SchemaField; + details: fields.SchemaField; + consumption: fields.NumberField; + scouting: fields.NumberField; + recruitmentDC: fields.NumberField; + saves: fields.SchemaField<{ + maneuver: fields.NumberField; + morale: fields.NumberField; + }>; + weapons: fields.SchemaField<{ + ranged: fields.SchemaField, ModelPropsFromSchema, true, true, true>; + melee: fields.SchemaField, ModelPropsFromSchema, true, true, true>; + }>; + resources: fields.SchemaField<{ + /** How often this army can use ranged attacks */ + ammunition: fields.SchemaField<{ + value: fields.NumberField; + }>; + potions: fields.SchemaField<{ + value: fields.NumberField; + }>; + }>; + traits: fields.SchemaField; +}; +type ArmyAttributesSchema = { + hp: fields.SchemaField<{ + value: fields.NumberField; + temp: fields.NumberField; + max: fields.NumberField; + routThreshold: fields.NumberField; + }>; +}; +type ArmyDetailsSchema = { + level: fields.SchemaField<{ + value: fields.NumberField; + }>; +}; +type ArmyTraitsSchema = { + value: fields.ArrayField>; + rarity: fields.StringField; + type: fields.StringField; +}; +type ArmyWeaponSchema = { + name: fields.StringField; + potency: fields.NumberField; +}; +type ArmySystemSource = SourceFromSchema & { + attributes: { + immunities?: ImmunitySource[]; + weaknesses?: WeaknessSource[]; + resistances?: ResistanceSource[]; + flanking: never; + hp: { + details: string; + }; + }; + /** Legacy location of `MigrationRecord` */ + schema?: ActorSystemSource["schema"]; +}; +type ArmySource = BaseActorSourcePF2e<"army", ArmySystemSource>; +export { ArmySystemData }; +export type { ArmySource }; diff --git a/types/src/module/actor/army/document.d.ts b/types/src/module/actor/army/document.d.ts index 94af98c69..f7ec2a0c9 100644 --- a/types/src/module/actor/army/document.d.ts +++ b/types/src/module/actor/army/document.d.ts @@ -21,6 +21,7 @@ declare class ArmyPF2e | null; /** Add effect icons from effect items and rule elements */ - get temporaryEffects(): ActiveEffect[]; + get temporaryEffects(): ActiveEffectPF2e[]; /** A means of checking this actor's type without risk of circular import references */ isOfType(...types: T[]): this is ActorInstances[T]; /** Whether this actor is an ally of the provided actor */ @@ -142,6 +142,8 @@ declare class ActorPF2e): boolean; /** Get (almost) any statistic by slug: handling expands in `ActorPF2e` subclasses */ getStatistic(slug: string): Statistic | null; + /** Returns a resource by slug or by key */ + getResource(_resource: string): ResourceData | null; /** Get roll options from this actor's effects, traits, and other properties */ getSelfRollOptions(prefix?: "self" | "target" | "origin"): string[]; /** The actor's reach: a meaningful implementation is found in `CreaturePF2e` and `HazardPF2e`. */ @@ -269,7 +271,7 @@ declare class ActorPF2e>; + }): Promise>; /** Assess and pre-process this JSON data, ensuring it's importable and fully migrated */ importFromJSON(json: string): Promise; protected _applyDefaultTokenSettings(data: this["_source"], options?: { diff --git a/types/src/module/actor/character/apps/attribute-builder.d.ts b/types/src/module/actor/character/apps/attribute-builder.d.ts index d147353f8..7011e9cc8 100644 --- a/types/src/module/actor/character/apps/attribute-builder.d.ts +++ b/types/src/module/actor/character/apps/attribute-builder.d.ts @@ -1,9 +1,9 @@ /// /// /// -import { CharacterPF2e } from "@actor"; -import { AttributeString } from "@actor/types.ts"; -import { AncestryPF2e, BackgroundPF2e, ClassPF2e } from "@item"; +import type { CharacterPF2e } from "@actor"; +import type { AttributeString } from "@actor/types.ts"; +import type { AncestryPF2e, BackgroundPF2e, ClassPF2e } from "@item"; declare class AttributeBuilder extends Application { #private; diff --git a/types/src/module/actor/character/crafting/ability.d.ts b/types/src/module/actor/character/crafting/ability.d.ts index a78f211f1..60edc044b 100644 --- a/types/src/module/actor/character/crafting/ability.d.ts +++ b/types/src/module/actor/character/crafting/ability.d.ts @@ -1,64 +1,54 @@ import type { CharacterPF2e } from "@actor"; -import { Predicate, RawPredicate } from "@system/predication.ts"; -import { CraftingFormula, PreparedFormula, PreparedFormulaData } from "./types.ts"; +import { ResourceData } from "@actor/creature/index.ts"; +import { PhysicalItemPF2e } from "@item"; +import { PhysicalItemSource } from "@item/base/data/index.ts"; +import { Predicate } from "@system/predication.ts"; +import type { + CraftableItemDefinition, + CraftingAbilityData, + CraftingFormula, + PreparedFormula, + PreparedFormulaData, +} from "./types.ts"; declare class CraftingAbility implements CraftingAbilityData { #private; - /** A label for this crafting entry to display on sheets */ - label: string; - slug: string; /** This crafting ability's parent actor */ actor: CharacterPF2e; + slug: string; + /** A label for this crafting entry to display on sheets */ + label: string; + resource: string | null; preparedFormulaData: PreparedFormulaData[]; isAlchemical: boolean; isDailyPrep: boolean; isPrepared: boolean; - craftableItems: Predicate; maxSlots: number; fieldDiscovery: Predicate | null; - batchSizes: { - default: number; - other: { - definition: Predicate; - quantity: number; - }[]; - }; fieldDiscoveryBatchSize: number; + batchSize: number; maxItemLevel: number; - constructor(actor: CharacterPF2e, data: CraftingAbilityData); + /** All craftable item definitions, sorted from biggest batch to smallest batch size */ + craftableItems: CraftableItemDefinition[]; + constructor(actor: CharacterPF2e); + /** Initializes this crafting ability with data. Call during actor data preparation. */ + initialize(data: CraftingAbilityData): void; getPreparedCraftingFormulas(): Promise; getSheetData(): Promise; - /** Computes reagent cost. Will go away once updated to PC2 */ - calculateReagentCost(): Promise; - prepareFormula(formula: CraftingFormula): Promise; - checkEntryRequirements(formula: CraftingFormula, { warn }?: { + calculateResourceCost(): Promise; + /** Returns true if the item can be created by this ability, which requires it to pass predication and be of sufficient level */ + canCraft(item: PhysicalItemPF2e, { warn }?: { warn?: boolean | undefined; }): boolean; - unprepareFormula(index: number, itemUUID: string): Promise; - setFormulaQuantity(index: number, itemUUID: string, value: "increase" | "decrease" | number): Promise; - toggleFormulaExpended(index: number, itemUUID: string): Promise; + prepareFormula(formula: CraftingFormula): Promise; + unprepareFormula(indexOrUuid: number | ItemUUID): Promise; + setFormulaQuantity(index: number, value: "increase" | "decrease" | number): Promise; + toggleFormulaExpended(index: number, value?: boolean): Promise; toggleSignatureItem(itemUUID: string): Promise; - updateFormulas(formulas: PreparedFormulaData[]): Promise; -} -interface CraftingAbilityData { - slug: string; - label: string; - isAlchemical: boolean; - isDailyPrep: boolean; - isPrepared: boolean; - maxSlots?: number; - craftableItems: RawPredicate; - fieldDiscovery?: RawPredicate | null; - batchSizes?: { - default: number; - other: { - definition: RawPredicate; - quantity: number; - }[]; - }; - fieldDiscoveryBatchSize?: number; - maxItemLevel?: number | null; - preparedFormulaData?: PreparedFormulaData[]; + updateFormulas(formulas: PreparedFormulaData[], operation?: Partial> | undefined): Promise; + craft(itemOrUUIDOrIndex: PhysicalItemPF2e | ItemUUID | number, { consume, destination }?: CraftParameters): Promise; + /** Returns what items should be created by this ability during daily preparation, and what the resource expenditure should be */ + calculateDailyCrafting(): Promise; } interface CraftingAbilitySheetData { slug: string; @@ -66,10 +56,28 @@ interface CraftingAbilitySheetData { isAlchemical: boolean; isPrepared: boolean; isDailyPrep: boolean; + /** This is true if we do not have sufficient slots or resources to craft this ability */ + insufficient: boolean; maxSlots: number; maxItemLevel: number; - reagentCost: number; - prepared: (PreparedFormula | null)[]; + resource: ResourceData | null; + resourceCost: number; + remainingSlots: number; + prepared: PreparedFormula[]; +} +interface DailyCraftingResult { + items: PreCreate[]; + resource: { + slug: string; + cost: number; + } | null; + /** True if this item is internally insufficient. It does not compare with other crafting abilties */ + insufficient: boolean; +} +interface CraftParameters { + /** If set to true, will craft by consuming the required resource */ + consume?: boolean; + destination?: "hand"; } export { CraftingAbility }; -export type { CraftingAbilityData, CraftingAbilitySheetData, PreparedFormulaData }; +export type { CraftingAbilitySheetData, PreparedFormulaData }; diff --git a/types/src/module/actor/character/crafting/crafting.d.ts b/types/src/module/actor/character/crafting/crafting.d.ts index a8cf59daa..1a790a548 100644 --- a/types/src/module/actor/character/crafting/crafting.d.ts +++ b/types/src/module/actor/character/crafting/crafting.d.ts @@ -1,6 +1,6 @@ import type { CharacterPF2e } from "../document.ts"; import { CraftingAbility } from "./ability.ts"; -import { CraftingFormula } from "./types.ts"; +import type { CraftingFormula } from "./types.ts"; /** Caches and performs operations on elements related to crafting */ declare class CharacterCrafting { @@ -8,11 +8,15 @@ declare class CharacterCrafting { actor: CharacterPF2e; abilities: Collection; constructor(actor: CharacterPF2e); + /** Initializes the crafting data. Must be called every data preparation */ + initialize(): void; /** * Retrieves all formulas this actor knows including their associated items. * The result is cached until next data prep. */ getFormulas(): Promise; + /** Removes all infused items and un-expends all prepared items */ + resetDailyCrafting(): Promise; performDailyCrafting(): Promise; } export { CharacterCrafting }; diff --git a/types/src/module/actor/character/crafting/index.d.ts b/types/src/module/actor/character/crafting/index.d.ts index 7095b9ad3..2b200c1d5 100644 --- a/types/src/module/actor/character/crafting/index.d.ts +++ b/types/src/module/actor/character/crafting/index.d.ts @@ -1,4 +1,4 @@ -export { CraftingAbility, type CraftingAbilityData, type CraftingAbilitySheetData } from "./ability.ts"; +export { CraftingAbility, type CraftingAbilitySheetData } from "./ability.ts"; export { CharacterCrafting } from "./crafting.ts"; export { craftItem, craftSpellConsumable } from "./helpers.ts"; export * from "./types.ts"; diff --git a/types/src/module/actor/character/crafting/types.d.ts b/types/src/module/actor/character/crafting/types.d.ts index 9afbb1b6c..468502d04 100644 --- a/types/src/module/actor/character/crafting/types.d.ts +++ b/types/src/module/actor/character/crafting/types.d.ts @@ -1,4 +1,5 @@ import { PhysicalItemPF2e } from "@item"; +import { Predicate, RawPredicate } from "@system/predication.ts"; interface CraftingFormulaData { uuid: ItemUUID; @@ -16,5 +17,27 @@ interface CraftingFormula extends CraftingFormulaData { dc: number; } /** A formula prepared in a crafting ability whose item has been loaded */ -type PreparedFormula = Required & CraftingFormula; -export type { CraftingFormula, CraftingFormulaData, PreparedFormula, PreparedFormulaData }; +interface PreparedFormula extends Required, CraftingFormula { + /** The number of batches of this item being created. This is quantity divided by batch size */ + batches: number; +} +interface CraftingAbilityData { + slug: string; + resource: string | null; + label: string; + isAlchemical: boolean; + isDailyPrep: boolean; + isPrepared: boolean; + maxSlots: number | null; + craftableItems: CraftableItemDefinition[]; + fieldDiscovery?: RawPredicate | null; + batchSize: number; + fieldDiscoveryBatchSize?: number; + maxItemLevel: number; + preparedFormulaData: PreparedFormulaData[]; +} +interface CraftableItemDefinition { + predicate: Predicate; + batchSize?: number; +} +export type { CraftableItemDefinition, CraftingAbilityData, CraftingFormula, CraftingFormulaData, PreparedFormula, PreparedFormulaData, }; diff --git a/types/src/module/actor/character/data.d.ts b/types/src/module/actor/character/data.d.ts index 168631ee4..be17ca7bc 100644 --- a/types/src/module/actor/character/data.d.ts +++ b/types/src/module/actor/character/data.d.ts @@ -43,6 +43,8 @@ type CharacterSource = BaseCreatureSource<"character", CharacterSystemSource> & }; type CharacterFlags = ActorFlagsPF2e & { pf2e: { + /** Has daily preparation crafting been completed for the day */ + dailyCraftingComplete?: boolean; /** If applicable, the character's proficiency rank in their deity's favored weapon */ favoredWeaponRank: number; /** The highest number of damage dice among the character's equipped weapons and available unarmed attacks */ @@ -57,6 +59,8 @@ type CharacterFlags = ActorFlagsPF2e & { sheetTabs: CharacterSheetTabVisibility; /** Whether the basic unarmed attack is shown on the Actions tab */ showBasicUnarmed: boolean; + /** The limit for each feat group that supports a custom limit. */ + featLimits: Record; }; }; interface CharacterSystemSource extends CreatureSystemSource { @@ -381,7 +385,7 @@ interface VersatileWeaponOption { } interface CharacterCraftingData { formulas: CraftingFormulaData[]; - entries: Record>; + entries: Record; } type CharacterResources = CreatureResources & { /** The current and maximum number of hero points */ @@ -396,6 +400,7 @@ type CharacterResources = CreatureResources & { infusedReagents: ValueAndMax; }; resolve?: ValueAndMax; + mythicPoints: ValueAndMax; }; interface CharacterPerceptionData extends CreaturePerceptionData { rank: ZeroToFour; diff --git a/types/src/module/actor/character/document.d.ts b/types/src/module/actor/character/document.d.ts index 71727ebf7..5c1b77df4 100644 --- a/types/src/module/actor/character/document.d.ts +++ b/types/src/module/actor/character/document.d.ts @@ -1,6 +1,6 @@ import { CreaturePF2e, type FamiliarPF2e } from "@actor"; import { CreatureSpeeds, LabeledSpeed } from "@actor/creature/data.ts"; -import { CreatureUpdateOperation } from "@actor/creature/types.ts"; +import { CreatureUpdateOperation, ResourceData } from "@actor/creature/types.ts"; import { ActorInitiative } from "@actor/initiative.ts"; import { StatisticModifier } from "@actor/modifiers.ts"; import { AttributeString, MovementType } from "@actor/types.ts"; @@ -12,7 +12,7 @@ import type { UserPF2e } from "@module/user/document.ts"; import { TokenDocumentPF2e } from "@scene/index.ts"; import { RollParameters } from "@system/rolls.ts"; import { Statistic } from "@system/statistic/index.ts"; -import { CharacterCrafting, CraftingFormula } from "./crafting/index.ts"; +import { CharacterCrafting } from "./crafting/index.ts"; import { BaseWeaponProficiencyKey, CharacterAbilities, @@ -36,7 +36,7 @@ declare class CharacterPF2e; pfsBoons: FeatPF2e[]; - deityBoonsCurses: FeatPF2e[]; + divineIntercessions: FeatPF2e[]; /** The primary class DC */ classDC: Statistic | null; /** All class DCs, including the primary */ @@ -60,10 +60,6 @@ declare class CharacterPF2e; getStatistic(slug: string): Statistic | null; - /** Will be deprecated/removed after PC2 alchemist is complete */ - getCraftingFormulas(): Promise; - /** Will be deprecated/removed after PC2 alchemist is complete */ - performDailyCrafting(): Promise; protected _initialize(options?: Record): void; /** If one exists, prepare this character's familiar */ prepareData(): void; @@ -99,7 +95,7 @@ declare class CharacterPF2e, params: RollParameters): boolean; + consumeAmmo(weapon: WeaponPF2e, params: RollParameters): boolean; /** Prepare stored and synthetic martial proficiencies */ prepareMartialProficiencies(): void; /** Toggle the invested state of an owned magical item */ @@ -112,5 +108,7 @@ interface CharacterPF2e extends Collection; constructor(actor: TActor); - createGroup(data: FeatGroupData): this; + createGroup(data: FeatGroupData): FeatGroup; /** Inserts a feat into the character. If groupId is empty string, it's a bonus feat. */ insertFeat(feat: FeatPF2e, slotData: { groupId: string; @@ -18,8 +18,4 @@ declare class CharacterFeats extends Collection extends Collection> { - get(key: "ancestry" | "ancestryfeature" | "class" | "classfeature" | "general" | "skill"): FeatGroup; - get(key: string): FeatGroup | undefined; -} export { CharacterFeats }; diff --git a/types/src/module/actor/character/feats/group.d.ts b/types/src/module/actor/character/feats/group.d.ts index 7770ae3da..8d3f8a0e0 100644 --- a/types/src/module/actor/character/feats/group.d.ts +++ b/types/src/module/actor/character/feats/group.d.ts @@ -1,7 +1,7 @@ import type { ActorPF2e } from "@actor"; import type { FeatPF2e, HeritagePF2e, ItemPF2e } from "@item"; -import type { FeatOrFeatureCategory } from "@item/feat/index.ts"; -import type { FeatGroupData, FeatLike, FeatSlot } from "./types.ts"; +import { FeatOrFeatureCategory } from "@item/feat/types.ts"; +import type { FeatBrowserFilterProps, FeatGroupData, FeatLike, FeatSlot } from "./types.ts"; declare class FeatGroup { #private; @@ -11,27 +11,40 @@ declare class FeatGroup | FeatNotSlot)[]; /** Whether the feats are slotted by level or free-form */ slotted: boolean; - /** Will move to sheet data later */ - featFilter: string[]; /** Feat Types that are supported */ supported: FeatOrFeatureCategory[]; + filter: FeatBrowserFilterProps; /** Lookup for the slots themselves */ slots: Record | undefined>; - /** This groups level for the purpose of showing feats. Usually equal to actor level */ + /** This groups display's limit. Usually equal to actor level */ + limit: number; + /** This group's level. If slotted, it is equal to the highest leveled slot. */ level: number; - constructor(actor: TActor, data: FeatGroupData, options?: { - level?: number; - }); + customLimit: { + label: string; + min: number; + max: number; + } | null; + constructor(actor: TActor, data: FeatGroupData, options?: FeatGroupOptions); /** Is this category slotted and without any empty slots */ get isFull(): boolean; /** Assigns a feat to its correct slot during data preparation, returning true if successful */ assignFeat(feat: TItem): boolean; + /** Returns true if this feat is a valid type for the group */ isFeatValid(feat: TItem): boolean; /** Adds a new feat to the actor, or reorders an existing one, into the correct slot */ insertFeat(feat: TItem, slotId?: Maybe): Promise[]>; + /** Handles any post assignment post-processing */ + postProcess(): void; +} +interface FeatGroupOptions { + /** The "rank" to limit visibility to. By default it is actor level */ + limit?: number; } interface FeatNotSlot { feat: T; + filter?: never; + level?: never; children: FeatSlot[]; } export { FeatGroup }; diff --git a/types/src/module/actor/character/feats/types.d.ts b/types/src/module/actor/character/feats/types.d.ts index 71d65e5a5..942d56fbc 100644 --- a/types/src/module/actor/character/feats/types.d.ts +++ b/types/src/module/actor/character/feats/types.d.ts @@ -6,6 +6,7 @@ import type { FeatGroup } from "./group.ts"; /** Any document that is similar enough to a feat/feature to be used as a feat for the purposes of feat groups */ interface FeatLike extends ItemPF2e { + readonly level: number | null; category: string; group: FeatGroup, this> | null; isFeat: boolean; @@ -13,23 +14,61 @@ interface FeatLike extends system: ItemSystemData & { location: string | null; }; + suppressed?: boolean; } /** Data that defines how a feat group is structured */ interface FeatGroupData { id: string; label: string; - featFilter?: string[]; supported?: FeatOrFeatureCategory[]; - slots?: (FeatSlotCreationData | string | number)[]; + filter?: FeatBrowserFilterProps; + slots?: (FeatSlotData | number)[]; + /** If true, all slots are sorted by their level. Only applies if slotless */ + sorted?: boolean; + /** If set to true, all slots except the first will be hidden unless its been assigned to */ + requiresInitial?: boolean; + /** Default placeholder text for empty slots */ + placeholder?: string; + /** If given, this is feat group has a configurable limit independent of level */ + customLimit?: { + label: string; + min: number; + max: number; + } | null; } -interface FeatSlot { - id: string; +/** Compendium browser filter properties when using the browse features. These do not perform validation */ +interface FeatBrowserFilterProps { + categories?: FeatOrFeatureCategory[]; + traits?: string[]; + omitTraits?: string[]; + conjunction?: "or" | "and"; +} +/** Data used to describe a feat slot when creating a new feat group */ +interface FeatSlotData { + /** + * A globally unique id. In future versions this may become locally unique instead. + * If omitted, it is -. + */ + id?: string; + /** Short label for the feat slot, displayeed on the left. By default it is the level */ label?: Maybe; + /** The level of the feat that should go in this slot */ + level?: Maybe; + /** + * The limit value the group needs in order to display this feat. + * This can be different from level if the group is based on tiers. + */ + tier?: Maybe; + /** The text to display when the feat slot is empty */ + placeholder?: Maybe; + /** If given, these filters will be prioritized over the group's filters */ + filter?: FeatBrowserFilterProps; +} +/** An active feat slot in a feat group, including any feats that it might be containing */ +interface FeatSlot extends FeatSlotData { + id: string; level: number | null; feat?: Maybe; children: FeatSlot[]; } -interface FeatSlotCreationData extends Omit { - level?: Maybe; -} -export type { FeatGroupData, FeatLike, FeatSlot, FeatSlotCreationData }; +export type { FeatBrowserFilterProps, FeatGroupData, FeatLike, FeatSlot, FeatSlotData }; diff --git a/types/src/module/actor/character/sheet.d.ts b/types/src/module/actor/character/sheet.d.ts index dc3f03648..22821c631 100644 --- a/types/src/module/actor/character/sheet.d.ts +++ b/types/src/module/actor/character/sheet.d.ts @@ -1,10 +1,10 @@ /// /// /// -import { CreatureSheetData, Language } from "@actor/creature/index.ts"; +import { CreatureSheetData, Language, ResourceData } from "@actor/creature/index.ts"; import type { Sense } from "@actor/creature/sense.ts"; import { SheetClickActionHandlers } from "@actor/sheet/base.ts"; -import { AbilityViewData, ActorSheetDataPF2e, InventoryItem } from "@actor/sheet/data-types.ts"; +import { AbilityViewData, InventoryItem, SheetInventory } from "@actor/sheet/data-types.ts"; import { AttributeString, SaveType } from "@actor/types.ts"; import type { AncestryPF2e, @@ -22,7 +22,7 @@ import { CoinsPF2e } from "@item/physical/coins.ts"; import { MagicTradition } from "@item/spell/types.ts"; import { SpellcastingSheetData } from "@item/spellcasting-entry/types.ts"; import { DropCanvasItemDataPF2e } from "@module/canvas/drop-canvas-data.ts"; -import { ZeroToFour } from "@module/data.ts"; +import { LabeledValueAndMax, ZeroToFour } from "@module/data.ts"; import { DamageType } from "@system/damage/types.ts"; import { CreatureSheetPF2e } from "../creature/sheet.ts"; import { CharacterConfig } from "./config.ts"; @@ -46,8 +46,8 @@ declare class CharacterSheetPF2e extends CreatureS static get defaultOptions(): ActorSheetOptions; get template(): string; getData(options?: ActorSheetOptions): Promise>; - /** Organize and classify Items for Character sheets */ - prepareItems(sheetData: ActorSheetDataPF2e): Promise; + protected _onSearchFilter(event: KeyboardEvent, query: string, rgx: RegExp, html: HTMLElement | null): void; + protected prepareInventory(): SheetInventory; protected prepareInventoryItem(item: PhysicalItemPF2e): InventoryItem; /** Overriden to open sub-tabs if requested */ protected openTab(name: string): void; @@ -72,12 +72,6 @@ type CharacterSystemSheetData = CharacterSystemData & { singleOption: boolean; }; }; - resources: { - heroPoints: { - icon: string; - hover: string; - }; - }; saves: Record; + dailyCraftingComplete: boolean; + knownFormulas: FormulaByLevel[]; abilities: { + spontaneous: CraftingAbilitySheetData[]; prepared: CraftingAbilitySheetData[]; alchemical: { entries: CraftingAbilitySheetData[]; - totalReagentCost: number; - infusedReagents: { - value: number; - max: number; - }; + resource: ResourceData; + resourceCost: number; }; }; } @@ -132,6 +129,11 @@ interface CharacterSheetData exten hasStamina: boolean; /** This actor has actual containers for stowing, rather than just containers serving as a UI convenience */ hasRealContainers: boolean; + /** The resource to display in the header, usually hero points */ + headerResource: LabeledValueAndMax & { + slug: string; + icon: string; + }; languages: LanguageSheetData[]; magicTraditions: Record; martialProficiencies: Record<"attacks" | "defenses", Record>; diff --git a/types/src/module/actor/character/tab-manager.d.ts b/types/src/module/actor/character/tab-manager.d.ts index 739d79d90..aa9dedaf9 100644 --- a/types/src/module/actor/character/tab-manager.d.ts +++ b/types/src/module/actor/character/tab-manager.d.ts @@ -1,13 +1,9 @@ import type { CharacterPF2e } from "./document.ts"; + export declare class PCSheetTabManager { + #private; actor: CharacterPF2e; - link: HTMLAnchorElement; + link: HTMLElement; constructor(actor: CharacterPF2e, link: HTMLAnchorElement); - static initialize(actor: CharacterPF2e, link: HTMLAnchorElement): void; - /** Set each checkbox to be checked according to its corresponding tab visibility */ - private onReady; - /** Save to the actor flag when a checkbox is checked or unchecked */ - private handleOnChange; - /** Hide all tab buttons selected requested be hidden */ - private onClose; + initialize(): Promise; } diff --git a/types/src/module/actor/character/values.d.ts b/types/src/module/actor/character/values.d.ts index 3d716c77e..16ea97278 100644 --- a/types/src/module/actor/character/values.d.ts +++ b/types/src/module/actor/character/values.d.ts @@ -1,2 +1,3 @@ declare const CHARACTER_SHEET_TABS: readonly ["character", "actions", "inventory", "spellcasting", "crafting", "proficiencies", "feats", "effects", "biography", "pfs"]; -export { CHARACTER_SHEET_TABS }; +declare const CORE_RESOURCES: readonly ["hero-points", "focus", "investiture", "resolve", "mythic-points"]; +export { CHARACTER_SHEET_TABS, CORE_RESOURCES }; diff --git a/types/src/module/actor/creature/data.d.ts b/types/src/module/actor/creature/data.d.ts index e061d83d0..ef950090d 100644 --- a/types/src/module/actor/creature/data.d.ts +++ b/types/src/module/actor/creature/data.d.ts @@ -12,7 +12,7 @@ import type { StrikeData, } from "@actor/data/base.ts"; import type { ActorSizePF2e } from "@actor/data/size.ts"; -import type { DamageDicePF2e, ModifierPF2e, RawModifier, StatisticModifier } from "@actor/modifiers.ts"; +import type { ModifierPF2e, RawModifier, StatisticModifier } from "@actor/modifiers.ts"; import type { AttributeString, MovementType, SaveType, SkillSlug } from "@actor/types.ts"; import type { LabeledNumber, Size, ValueAndMax, ValueAndMaybeMax, ZeroToThree } from "@module/data.ts"; import type { ArmorClassTraceData } from "@system/statistic/index.ts"; @@ -61,8 +61,6 @@ interface CreatureSystemData extends Omit, A perception: CreaturePerceptionData; /** Maps roll types -> a list of modifiers which should affect that roll type. */ customModifiers: Record; - /** Maps damage roll types -> a list of damage dice which should be added to that damage roll type. */ - damageDice: Record; /** Saving throw data */ saves: CreatureSaves; skills: Record; diff --git a/types/src/module/actor/creature/document.d.ts b/types/src/module/actor/creature/document.d.ts index 09d134198..b23b71dec 100644 --- a/types/src/module/actor/creature/document.d.ts +++ b/types/src/module/actor/creature/document.d.ts @@ -15,7 +15,7 @@ import type { CheckRoll } from "@system/check/index.ts"; import { type ArmorStatistic, Statistic, StatisticDifficultyClass } from "@system/statistic/index.ts"; import { PerceptionStatistic } from "@system/statistic/perception.ts"; import { CreatureSpeeds, CreatureSystemData, LabeledSpeed, VisionLevel } from "./data.ts"; -import { CreatureTrait, CreatureType, CreatureUpdateOperation, GetReachParameters } from "./types.ts"; +import { CreatureTrait, CreatureType, CreatureUpdateOperation, GetReachParameters, ResourceData } from "./types.ts"; /** An "actor" in a Pathfinder sense rather than a Foundry one: all should contain attributes and abilities */ declare abstract class CreaturePF2e extends ActorPF2e { @@ -82,8 +82,15 @@ declare abstract class CreaturePF2e | null>; - /** Updates a resource. Redirects to special resources if needed */ - updateResource(resource: string, value: number): Promise; + /** Returns a resource by slug or by key */ + getResource(resource: string): ResourceData | null; + /** + * Updates a resource. Redirects to special resources if needed. + * Accepts resource slugs in both kebab and dromedary, to handle token updates and direct ones. + */ + updateResource(resource: string, value: number, { render }?: { + render?: boolean; + }): Promise; prepareSpeed(movementType: "land"): this["system"]["attributes"]["speed"]; prepareSpeed(movementType: Exclude): (LabeledSpeed & StatisticModifier) | null; prepareSpeed(movementType: MovementType): CreatureSpeeds | (LabeledSpeed & StatisticModifier) | null; diff --git a/types/src/module/actor/creature/sheet.d.ts b/types/src/module/actor/creature/sheet.d.ts index 6de8c59e8..5d74f6df4 100644 --- a/types/src/module/actor/creature/sheet.d.ts +++ b/types/src/module/actor/creature/sheet.d.ts @@ -10,7 +10,7 @@ import { DropCanvasItemDataPF2e } from "@module/canvas/drop-canvas-data.ts"; import { ZeroToFour } from "@module/data.ts"; import { ActorSheetPF2e, SheetClickActionHandlers } from "../sheet/base.ts"; import { CreatureConfig } from "./config.ts"; -import { Language } from "./index.ts"; +import { Language, ResourceData } from "./index.ts"; /** * Base class for NPC and character sheets @@ -51,11 +51,6 @@ interface CreatureSheetData extends ActorSheetDataP remainingDying: number; remainingWounded: number; }; - specialResources: { - slug: string; - label: string; - value: number; - max: number; - }[]; + specialResources: ResourceData[]; } export { CreatureSheetPF2e, type CreatureSheetData }; diff --git a/types/src/module/actor/creature/types.d.ts b/types/src/module/actor/creature/types.d.ts index ab7c70153..09927f8c4 100644 --- a/types/src/module/actor/creature/types.d.ts +++ b/types/src/module/actor/creature/types.d.ts @@ -1,8 +1,10 @@ import type { ActorPF2e, ActorUpdateOperation } from "@actor/base.ts"; import type { CREATURE_ACTOR_TYPES } from "@actor/values.ts"; import type { AbilityItemPF2e, MeleePF2e, WeaponPF2e } from "@item"; +import { LabeledValueAndMax } from "@module/data.ts"; import type { TokenDocumentPF2e } from "@scene/index.ts"; import type { LANGUAGES_BY_RARITY, SENSE_TYPES } from "./values.ts"; + /** A `CreaturePF2e` subtype string */ type CreatureActorType = (typeof CREATURE_ACTOR_TYPES)[number]; type CreatureTrait = keyof typeof CONFIG.PF2E.creatureTraits; @@ -21,4 +23,7 @@ interface GetReachParameters { interface CreatureUpdateOperation extends ActorUpdateOperation { allowHPOverage?: boolean; } -export type { Attitude, CreatureActorType, CreatureTrait, CreatureType, CreatureUpdateOperation, GetReachParameters, Language, ModeOfBeing, SenseAcuity, SenseType, SpecialVisionType, }; +interface ResourceData extends LabeledValueAndMax { + slug: string; +} +export type { Attitude, CreatureActorType, CreatureTrait, CreatureType, CreatureUpdateOperation, GetReachParameters, Language, ModeOfBeing, ResourceData, SenseAcuity, SenseType, SpecialVisionType, }; diff --git a/types/src/module/actor/data/base.d.ts b/types/src/module/actor/data/base.d.ts index cb3616b06..214175a94 100644 --- a/types/src/module/actor/data/base.d.ts +++ b/types/src/module/actor/data/base.d.ts @@ -31,15 +31,12 @@ type ActorFlagsPF2e = DocumentFlags & { }; type ActorSystemSource = { details?: ActorDetailsSource; - attributes: ActorAttributesSource; + attributes?: ActorAttributesSource; traits?: ActorTraitsSource; /** A record of this actor's current world schema version as well a log of the last migration to occur */ _migration: MigrationRecord; /** Legacy location of `MigrationRecord` */ - schema?: Readonly<{ - version: number | null; - lastMigration: object | null; - }>; + schema?: object; }; interface ActorAttributesSource { hp?: ActorHitPointsSource; @@ -82,16 +79,17 @@ interface ActorAttributes extends ActorAttributesSource { broken: boolean; itemId: string | null; }; - flanking: { - /** Whether the actor can flank at all */ - canFlank: boolean; - /** Given the actor can flank, the conditions under which it can do so without an ally opposite the target */ - canGangUp: GangUpCircumstance[]; - /** Whether the actor can be flanked at all */ - flankable: boolean; - /** Given the actor is flankable, whether it is off-guard when flanked */ - offGuardable: OffGuardableCircumstance; - }; + flanking: FlankingData; +} +interface FlankingData { + /** Whether the actor can flank at all */ + canFlank: boolean; + /** Given the actor can flank, the conditions under which it can do so without an ally opposite the target */ + canGangUp: GangUpCircumstance[]; + /** Whether the actor can be flanked at all */ + flankable: boolean; + /** Given the actor is flankable, whether it is off-guard when flanked */ + offGuardable: OffGuardableCircumstance; } interface ActorHitPoints extends Required { unrecoverable: number; @@ -272,4 +270,4 @@ interface PrototypeTokenPF2e extends foundry.d }; }; } -export type { ActorAttributes, ActorAttributesSource, ActorDetails, ActorDetailsSource, ActorFlagsPF2e, ActorHitPoints, ActorHitPointsSource, ActorSystemData, ActorSystemSource, ActorTraitsData, ActorTraitsSource, ArmorClassData, AttributeBasedTraceData, BaseActorSourcePF2e, BaseHitPointsSource, DamageRollFunction, GangUpCircumstance, HitPointsStatistic, InitiativeData, PrototypeTokenPF2e, RollFunction, RollOptionFlags, Rollable, StrikeData, TraitViewData, }; +export type { ActorAttributes, ActorAttributesSource, ActorDetails, ActorDetailsSource, ActorFlagsPF2e, ActorHitPoints, ActorHitPointsSource, ActorSystemData, ActorSystemSource, ActorTraitsData, ActorTraitsSource, ArmorClassData, AttributeBasedTraceData, BaseActorSourcePF2e, BaseHitPointsSource, DamageRollFunction, FlankingData, GangUpCircumstance, HitPointsStatistic, InitiativeData, PrototypeTokenPF2e, Rollable, RollFunction, RollOptionFlags, StrikeData, TraitViewData, }; diff --git a/types/src/module/actor/data/iwr.d.ts b/types/src/module/actor/data/iwr.d.ts index a99c9d592..b62e582af 100644 --- a/types/src/module/actor/data/iwr.d.ts +++ b/types/src/module/actor/data/iwr.d.ts @@ -173,6 +173,7 @@ declare class Weakness extends IWR implements WeaknessSource { magical: string; mental: string; metal: string; + mythic: string; "non-magical": string; "nonlethal-attacks": string; "persistent-damage": string; @@ -253,6 +254,7 @@ declare class Resistance extends IWR implements ResistanceSource magical: string; mental: string; metal: string; + mythic: string; "non-magical": string; nonlethal: string; "nonlethal-attacks": string; @@ -267,7 +269,7 @@ declare class Resistance extends IWR implements ResistanceSource salt: string; "salt-water": string; slashing: string; - sonic: string; /** Construct an object argument for Localization#format (see also PF2E.Actor.IWR.CompositeLabel in en.json) */ + sonic: string; spells: string; spirit: string; "unarmed-attacks": string; diff --git a/types/src/module/actor/data/model.d.ts b/types/src/module/actor/data/model.d.ts new file mode 100644 index 000000000..a4dc8da74 --- /dev/null +++ b/types/src/module/actor/data/model.d.ts @@ -0,0 +1,13 @@ +import type { ActorPF2e } from "@actor"; +import type { MigrationDataField } from "@module/data.ts"; +import type { AutoChangeEntry } from "@module/rules/rule-element/ae-like.ts"; + +declare abstract class ActorSystemModel extends foundry.abstract + .TypeDataModel { + autoChanges: Record; + static defineSchema(): ActorSystemSchema; +} +type ActorSystemSchema = { + _migration: MigrationDataField; +}; +export { ActorSystemModel, type ActorSystemSchema }; diff --git a/types/src/module/actor/data/size.d.ts b/types/src/module/actor/data/size.d.ts index 4305f240c..aedf69ec2 100644 --- a/types/src/module/actor/data/size.d.ts +++ b/types/src/module/actor/data/size.d.ts @@ -1,4 +1,5 @@ import { Size } from "@module/data.ts"; + export declare class ActorSizePF2e { /** The size category of this category */ value: Size; @@ -27,7 +28,7 @@ export declare class ActorSizePF2e { * @param size The size to which this size is being compared * @param [smallIsMedium] Treat small as medium for both sizes */ - equals(size: ActorSizePF2e, { smallIsMedium }?: { + equals(size: ActorSizePF2e | Size, { smallIsMedium }?: { smallIsMedium?: boolean | undefined; }): boolean; /** diff --git a/types/src/module/actor/familiar/data.d.ts b/types/src/module/actor/familiar/data.d.ts index f4a8bb58a..502f95a42 100644 --- a/types/src/module/actor/familiar/data.d.ts +++ b/types/src/module/actor/familiar/data.d.ts @@ -1,62 +1,78 @@ -import { +import type { BaseCreatureSource, CreatureAttributes, CreatureDetails, - CreatureDetailsSource, - CreatureSystemData, - CreatureSystemSource, + CreatureLanguagesData, + CreaturePerceptionData, + CreatureResources, + CreatureSaves, + CreatureTraitsData, + SkillData, } from "@actor/creature/data.ts"; -import { AttributeString } from "@actor/types.ts"; -import { StatisticTraceData } from "@system/statistic/index.ts"; +import { ActorSystemModel, ActorSystemSchema } from "@actor/data/model.ts"; +import type { ModifierPF2e } from "@actor/modifiers.ts"; +import type { AttributeString } from "@actor/types.ts"; +import type { StatisticTraceData } from "@system/statistic/data.ts"; +import type { ModelPropFromDataField, SourcePropFromDataField } from "types/foundry/common/data/fields.d.ts"; +import type { FamiliarPF2e } from "./document.ts"; +import fields = foundry.data.fields; type FamiliarSource = BaseCreatureSource<"familiar", FamiliarSystemSource>; -interface FamiliarSystemSource extends CreatureSystemSource { - details: FamiliarDetailsSource; +declare class FamiliarSystemData extends ActorSystemModel { + traits: CreatureTraitsData; + perception: CreaturePerceptionData; + saves: CreatureSaves; + skills: Record; + attack: StatisticTraceData; + resources: CreatureResources; + static defineSchema(): FamiliarSystemSchema; +} +interface FamiliarSystemData extends foundry.abstract.TypeDataModel, ModelPropsFromSchema { + attributes: CreatureAttributes; + details: FamiliarDetails; + customModifiers: Record; +} +type FamiliarSystemSchema = ActorSystemSchema & { + master: fields.SchemaField<{ + id: fields.ForeignDocumentField; + ability: fields.StringField; + }>; + attributes: fields.SchemaField<{ + hp: fields.SchemaField<{ + value: fields.NumberField; + temp: fields.NumberField; + }>; + }>; + details: fields.SchemaField<{ + creature: fields.SchemaField<{ + value: fields.StringField; + }>; + }>; +}; +interface FamiliarSystemSource extends SourceFromSchema { attributes: FamiliarAttributesSource; - master: { - id: string | null; - ability: AttributeString | null; - }; + details: FamiliarDetailsSource; customModifiers?: never; perception?: never; resources?: never; saves?: never; skills?: never; traits?: never; + /** Legacy location of `MigrationRecord` */ + schema?: object; } -interface FamiliarAttributesSource { - hp: { - value: number; - temp: number; - }; +interface FamiliarAttributesSource extends SourcePropFromDataField { immunities?: never; weaknesses?: never; resistances?: never; } -interface FamiliarDetailsSource extends CreatureDetailsSource { - creature: { - value: string; - }; +interface FamiliarDetailsSource extends SourcePropFromDataField { alliance?: never; languages?: never; level?: never; } -/** The raw information contained within the actor data object for familiar actors. */ -interface FamiliarSystemData extends Omit, CreatureSystemData { - details: FamiliarDetails; - attack: StatisticTraceData; - attributes: CreatureAttributes; - master: { - id: string | null; - ability: AttributeString | null; - }; - actions?: never; - initiative?: never; -} -type SourceOmission = "attributes" | "customModifiers" | "details" | "perception" | "resources" | "saves" | "skills" | "traits"; -interface FamiliarDetails extends CreatureDetails { - creature: { - value: string; - }; +interface FamiliarDetails extends ModelPropFromDataField, CreatureDetails { + languages: CreatureLanguagesData; } -export type { FamiliarSource, FamiliarSystemData, FamiliarSystemSource }; +export { FamiliarSystemData }; +export type { FamiliarSource, FamiliarSystemSource }; diff --git a/types/src/module/actor/familiar/document.d.ts b/types/src/module/actor/familiar/document.d.ts index eefe962d3..5ca370999 100644 --- a/types/src/module/actor/familiar/document.d.ts +++ b/types/src/module/actor/familiar/document.d.ts @@ -1,4 +1,4 @@ -import { CreaturePF2e, type CharacterPF2e } from "@actor"; +import { type CharacterPF2e, CreaturePF2e } from "@actor"; import type { ActorUpdateOperation } from "@actor/base.ts"; import type { ItemType } from "@item/base/data/index.ts"; import type { CombatantPF2e, EncounterPF2e } from "@module/encounter/index.ts"; @@ -6,7 +6,8 @@ import type { RuleElementPF2e } from "@module/rules/index.ts"; import type { UserPF2e } from "@module/user/document.ts"; import type { TokenDocumentPF2e } from "@scene"; import { Statistic } from "@system/statistic/index.ts"; -import { FamiliarSource, FamiliarSystemData } from "./data.ts"; +import type { FamiliarSource, FamiliarSystemData } from "./data.ts"; + declare class FamiliarPF2e extends CreaturePF2e { /** The familiar's attack statistic, for the rare occasion it must make an attack roll */ attackStatistic: Statistic; diff --git a/types/src/module/actor/hazard/sheet.d.ts b/types/src/module/actor/hazard/sheet.d.ts index dd330fc3d..2d022a13c 100644 --- a/types/src/module/actor/hazard/sheet.d.ts +++ b/types/src/module/actor/hazard/sheet.d.ts @@ -4,10 +4,10 @@ import { ActorSheetPF2e, SheetClickActionHandlers } from "@actor/sheet/base.ts"; import type { HazardPF2e } from "./document.ts"; import { HazardSheetData } from "./types.ts"; + export declare class HazardSheetPF2e extends ActorSheetPF2e { #private; static get defaultOptions(): ActorSheetOptions; - get template(): string; get title(): string; get editing(): boolean; getData(options?: ActorSheetOptions): Promise; diff --git a/types/src/module/actor/helpers.d.ts b/types/src/module/actor/helpers.d.ts index 3c7735c20..d07b8dbd7 100644 --- a/types/src/module/actor/helpers.d.ts +++ b/types/src/module/actor/helpers.d.ts @@ -63,6 +63,8 @@ declare function iterateAllItems(document: T | PhysicalItem */ declare function transferItemsBetweenActors(source: ActorPF2e, dest: ActorPF2e, itemFilterFn?: (item: PhysicalItemPF2e) => boolean): Promise; /** Applies multiple batched updates to the actor, delaying rendering till the end */ -declare function applyActorUpdate(actor: T, data: ActorCommitData): Promise; +declare function applyActorUpdate(actor: T, data: Partial>, { render }?: { + render?: boolean; +}): Promise; export { applyActorUpdate, auraAffectsActor, calculateMAPs, calculateRangePenalty, checkAreaEffects, createEncounterRollOptions, createEnvironmentRollOptions, getRangeIncrement, getStrikeAttackDomains, getStrikeDamageDomains, isOffGuardFromFlanking, isReallyPC, iterateAllItems, migrateActorSource, resetActors, setHitPointsRollOptions, strikeFromMeleeItem, transferItemsBetweenActors, userColorForActor, }; export type { MultipleAttackPenaltyData }; diff --git a/types/src/module/actor/inventory/index.d.ts b/types/src/module/actor/inventory/index.d.ts index be1dbde20..35c974959 100644 --- a/types/src/module/actor/inventory/index.d.ts +++ b/types/src/module/actor/inventory/index.d.ts @@ -1,10 +1,11 @@ import { ActorPF2e } from "@actor"; import { KitPF2e, PhysicalItemPF2e } from "@item"; -import { ItemSourcePF2e } from "@item/base/data/index.ts"; +import { ItemSourcePF2e, KitSource, PhysicalItemSource } from "@item/base/data/index.ts"; import { Coins } from "@item/physical/data.ts"; import { CoinsPF2e } from "@item/physical/helpers.ts"; import { DelegatedCollection } from "@util"; import { InventoryBulk } from "./bulk.ts"; + declare class ActorInventory extends DelegatedCollection> { actor: TActor; bulk: InventoryBulk; @@ -24,8 +25,10 @@ declare class ActorInventory extends DelegatedCollecti byValue?: boolean; }): Promise; sellAllTreasure(): Promise; - /** Adds an item to this inventory without removing from its original location */ - add(item: PhysicalItemPF2e | KitPF2e, options?: AddItemOptions): Promise; + /** Deletes all temporary items, skipping those that are associated with a special resource */ + deleteTemporaryItems(operation?: Partial> | undefined): Promise[]>; + /** Adds one or more items to this inventory without removing from its original location */ + add(itemOrItems: PhysicalItemPF2e | KitPF2e | PreCreate | (PhysicalItemPF2e | KitPF2e | PreCreate)[], options?: AddItemOptions): Promise; } interface AddItemOptions { stack?: boolean; diff --git a/types/src/module/actor/loot/data.d.ts b/types/src/module/actor/loot/data.d.ts index 646b1b84c..d15faadcd 100644 --- a/types/src/module/actor/loot/data.d.ts +++ b/types/src/module/actor/loot/data.d.ts @@ -1,38 +1,43 @@ -import { ActorAttributes, ActorAttributesSource, ActorDetails, ActorSystemData, ActorSystemSource, BaseActorSourcePF2e } from "@actor/data/base.ts"; +import { BaseActorSourcePF2e, FlankingData } from "@actor/data/base.ts"; +import { ActorSystemModel, ActorSystemSchema } from "@actor/data/model.ts"; +import { ModelPropFromDataField } from "types/foundry/common/data/fields.js"; +import type { LootPF2e } from "./document.ts"; +import fields = foundry.data.fields; + /** The stored source data of a loot actor */ type LootSource = BaseActorSourcePF2e<"loot", LootSystemSource>; -/** The system-level data of loot actors. */ -interface LootSystemSource extends ActorSystemSource { - attributes: LootAttributesSource; - details: LootDetailsSource; - lootSheetType: "Merchant" | "Loot"; - hiddenWhenEmpty: boolean; - traits?: never; +declare class LootSystemData extends ActorSystemModel { + static defineSchema(): LootSystemSchema; } -interface LootSystemData extends Omit, ActorSystemData { - attributes: LootAttributes; +interface LootSystemData extends ActorSystemModel, ModelPropsFromSchema { details: LootDetails; traits?: never; + attributes: LootAttributes; } -interface LootAttributesSource extends ActorAttributesSource { - hp?: never; - ac?: never; - perception?: never; - immunities?: never; - weaknesses?: never; - resistances?: never; -} -interface LootAttributes extends Omit, Omit { - initiative?: never; -} -interface LootDetailsSource { - alliance?: never; - description: string; - level: { - value: number; - }; +type LootSystemSchema = ActorSystemSchema & { + details: fields.SchemaField<{ + description: fields.HTMLField; + level: fields.SchemaField<{ + value: fields.NumberField; + }>; + }>; + lootSheetType: fields.StringField<"Merchant" | "Loot", "Merchant" | "Loot", true, false, true>; + hiddenWhenEmpty: fields.BooleanField; +}; +/** The system-level data of loot actors. */ +interface LootSystemSource extends SourceFromSchema { + attributes?: never; + traits?: never; + schema?: never; } -interface LootDetails extends Omit, ActorDetails { +interface LootDetails extends ModelPropFromDataField { alliance: null; } -export type { LootSource, LootSystemData, LootSystemSource }; +interface LootAttributes { + immunities: never[]; + weaknesses: never[]; + resistances: never[]; + flanking: FlankingData; +} +export { LootSystemData }; +export type { LootSource, LootSystemSource }; diff --git a/types/src/module/actor/loot/document.d.ts b/types/src/module/actor/loot/document.d.ts index 929c1e365..c29a0261f 100644 --- a/types/src/module/actor/loot/document.d.ts +++ b/types/src/module/actor/loot/document.d.ts @@ -5,6 +5,7 @@ import { ActiveEffectPF2e } from "@module/active-effect.ts"; import { UserPF2e } from "@module/user/document.ts"; import type { TokenDocumentPF2e } from "@scene/index.ts"; import { LootSource, LootSystemData } from "./data.ts"; + declare class LootPF2e extends ActorPF2e { armorClass: null; get allowedItemTypes(): (ItemType | "physical")[]; @@ -24,6 +25,8 @@ declare class LootPF2e; + /** Set base emphemeral data for later updating by derived-data preparation. */ + prepareBaseData(): void; /** Never process rules elements on loot actors */ prepareDerivedData(): void; protected _onCreate(data: LootSource, options: DatabaseCreateOperation, userId: string): void; diff --git a/types/src/module/actor/modifiers.d.ts b/types/src/module/actor/modifiers.d.ts index 9a064e6d7..86e2b6381 100644 --- a/types/src/module/actor/modifiers.d.ts +++ b/types/src/module/actor/modifiers.d.ts @@ -10,7 +10,7 @@ import { Predicate, RawPredicate } from "@system/predication.ts"; declare const PROFICIENCY_RANK_OPTION: readonly ["proficiency:untrained", "proficiency:trained", "proficiency:expert", "proficiency:master", "proficiency:legendary"]; declare function ensureProficiencyOption(options: Set, rank: number): void; -declare const MODIFIER_TYPES: Set<"untyped" | "ability" | "circumstance" | "item" | "potency" | "proficiency" | "status">; +declare const MODIFIER_TYPES: Set<"untyped" | "item" | "ability" | "circumstance" | "potency" | "proficiency" | "status">; type ModifierType = SetElement; interface RawModifier { /** An identifier for this modifier; should generally be a localization key (see en.json). */ @@ -39,12 +39,12 @@ interface RawModifier { damageType?: DamageType | null; /** The damage category */ damageCategory?: DamageCategoryUnique | null; - /** A predicate which determines when this modifier is active. */ + /** A predicate that determines when this modifier is active */ predicate?: RawPredicate; /** If true, this modifier is only active on a critical hit. */ critical?: boolean | null; - /** The list of traits that this modifier gives to the underlying attack, if any. */ - traits?: string[]; + /** A list of tags associated with this modifier */ + tags?: string[]; /** Hide this modifier in UIs if it is disabled */ hideIfDisabled?: boolean; /** Whether to use this bonus/penalty/modifier even if it isn't the greatest magnitude */ @@ -99,7 +99,7 @@ declare class ModifierPF2e implements RawModifier { damageCategory: DamageCategoryUnique | null; predicate: Predicate; critical: boolean | null; - traits: string[]; + tags: string[]; hideIfDisabled: boolean; /** * The "category" of modifier (a misnomer since bonuses and penalties aren't modifiers): @@ -276,6 +276,8 @@ declare class DamageDicePF2e { /** The damage category of these dice. */ category: "persistent" | "precision" | "splash" | null; damageType: DamageType | null; + /** A list of tags associated with this damage */ + tags: string[]; /** If true, these dice overide the base damage dice of the weapon. */ override: DamageDiceOverride | null; ignored: boolean; @@ -304,5 +306,5 @@ declare class DamageDicePF2e { } interface RawDamageDice extends Required { } -export { adjustModifiers, applyStackingRules, CheckModifier, createAttributeModifier, createProficiencyModifier, DamageDicePF2e, ensureProficiencyOption, MODIFIER_TYPES, ModifierPF2e, PROFICIENCY_RANK_OPTION, StatisticModifier, }; +export { CheckModifier, DamageDicePF2e, MODIFIER_TYPES, ModifierPF2e, PROFICIENCY_RANK_OPTION, StatisticModifier, adjustModifiers, applyStackingRules, createAttributeModifier, createProficiencyModifier, ensureProficiencyOption, }; export type { DamageDiceOverride, DamageDiceParameters, DeferredDamageDiceOptions, DeferredPromise, DeferredValue, DeferredValueParams, ModifierAdjustment, ModifierObjectParams, ModifierType, RawDamageDice, RawModifier, TestableDeferredValueParams, }; diff --git a/types/src/module/actor/npc/data.d.ts b/types/src/module/actor/npc/data.d.ts index 7720a99ba..daf59d44e 100644 --- a/types/src/module/actor/npc/data.d.ts +++ b/types/src/module/actor/npc/data.d.ts @@ -237,5 +237,6 @@ interface NPCResources extends CreatureResources { focus: ValueAndMax & { cap: number; }; + mythicPoints: ValueAndMax; } export type { NPCAttributes, NPCAttributesSource, NPCFlags, NPCHitPoints, NPCPerceptionData, NPCPerceptionSource, NPCSaveData, NPCSkillData, NPCSkillSource, NPCSource, NPCSpecialSkillSource, NPCStrike, NPCSystemData, NPCSystemSource, NPCTraitsSource, }; diff --git a/types/src/module/actor/party/data.d.ts b/types/src/module/actor/party/data.d.ts index c40ea21eb..537d08f4c 100644 --- a/types/src/module/actor/party/data.d.ts +++ b/types/src/module/actor/party/data.d.ts @@ -1,34 +1,38 @@ -import { ActorAttributes, ActorAttributesSource, ActorDetails, ActorDetailsSource, ActorSystemData, ActorSystemSource, BaseActorSourcePF2e } from "@actor/data/base.ts"; -import { PartyCampaign } from "./types.ts"; +import type { ActorAttributes, ActorDetails, BaseActorSourcePF2e } from "@actor/data/base.ts"; +import { ActorSystemModel, ActorSystemSchema } from "@actor/data/model.ts"; +import type { ModelPropFromDataField, SourcePropFromDataField } from "types/foundry/common/data/fields.d.ts"; +import type { PartyPF2e } from "./document.ts"; +import type { KingdomSchema } from "./kingdom/schema.ts"; +import fields = foundry.data.fields; + type PartySource = BaseActorSourcePF2e<"party", PartySystemSource>; -interface PartySystemSource extends ActorSystemSource { - attributes: PartyAttributesSource; +declare class PartySystemData extends ActorSystemModel { + static defineSchema(): PartySystemSchema; +} +interface PartySystemData extends ActorSystemModel, ModelPropsFromSchema { + attributes: PartyAttributes; + details: PartyDetails; +} +type PartySystemSchema = ActorSystemSchema & { + details: fields.SchemaField<{ + description: fields.HTMLField; + members: fields.ArrayField; + }>>; + }>; + campaign: fields.SchemaField, ModelPropsFromSchema, false, true, true>; +}; +interface PartySystemSource extends SourceFromSchema { details: PartyDetailsSource; + attributes?: never; traits?: never; - campaign?: PartyCampaignSource; -} -interface PartyAttributesSource extends ActorAttributesSource { - hp?: never; - ac?: never; - immunities?: never; - weaknesses?: never; - resistances?: never; + schema?: never; } -interface PartyDetailsSource extends ActorDetailsSource { - description: string; - members: MemberData[]; +interface PartyDetailsSource extends SourcePropFromDataField { readonly alliance?: never; readonly level?: never; } -interface MemberData { - uuid: ActorUUID; -} -interface PartySystemData extends Omit, Omit { - attributes: PartyAttributes; - details: PartyDetails; - campaign: PartyCampaign; -} -interface PartyAttributes extends Omit, Omit { +interface PartyAttributes extends Omit { immunities: never[]; weaknesses: never[]; resistances: never[]; @@ -36,12 +40,10 @@ interface PartyAttributes extends Omit, ActorDetails { - level: { - value: number; - }; +interface PartyDetails extends ModelPropFromDataField, ActorDetails { } type PartyCampaignSource = { type: string; } & Record; -export type { MemberData, PartyCampaignSource, PartySource, PartySystemData }; +export { PartySystemData }; +export type { PartyCampaignSource, PartySource }; diff --git a/types/src/module/actor/party/document.d.ts b/types/src/module/actor/party/document.d.ts index c3960f205..1473fb603 100644 --- a/types/src/module/actor/party/document.d.ts +++ b/types/src/module/actor/party/document.d.ts @@ -8,6 +8,7 @@ import type { Statistic } from "@system/statistic/index.ts"; import type { DataModelValidationOptions } from "types/foundry/common/abstract/data.d.ts"; import { PartySource, PartySystemData } from "./data.ts"; import { PartyCampaign, PartyUpdateOperation } from "./types.ts"; + declare class PartyPF2e extends ActorPF2e { armorClass: null; members: CreaturePF2e[]; @@ -19,15 +20,13 @@ declare class PartyPF2e, options?: DocumentSourceUpdateContext): DeepPartial; /** Only prepare rule elements for non-physical items (in case campaign items exist) */ protected prepareRuleElements(): RuleElementPF2e[]; - /** Make `system.campaign` non-enumerable to prevent `TokenDocument.getTrackedAttributes` from recursing into it. */ - protected _initialize(options?: Record | undefined): void; prepareBaseData(): void; prepareDerivedData(): void; addMembers(...membersToAdd: CreaturePF2e[]): Promise; diff --git a/types/src/module/actor/party/invalid-campaign.d.ts b/types/src/module/actor/party/invalid-campaign.d.ts deleted file mode 100644 index 7084c68b4..000000000 --- a/types/src/module/actor/party/invalid-campaign.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { DataSchema } from "types/foundry/common/data/fields.d.ts"; -import { PartyPF2e } from "./document.ts"; -import { PartyCampaign } from "./types.ts"; - -declare const DataModel: typeof foundry.abstract.DataModel; -/** - * Exists if the party's campaign type does not match the configured setting. - * Creates a warning and deletion dialog to give one last chance to back out. - */ -declare class InvalidCampaign extends DataModel implements PartyCampaign { - type: string; - actor: PartyPF2e; - options: InvalidCampaignOptions; - constructor(actor: PartyPF2e, options: InvalidCampaignOptions); - static defineSchema(): DataSchema; - createSidebarButtons(): HTMLElement[]; -} -interface InvalidCampaignOptions { - campaignType?: string; - reason: "error" | "mismatch"; -} -export { InvalidCampaign }; diff --git a/types/src/module/actor/party/kingdom/builder.d.ts b/types/src/module/actor/party/kingdom/builder.d.ts index 3f2ceb252..bf5cb814b 100644 --- a/types/src/module/actor/party/kingdom/builder.d.ts +++ b/types/src/module/actor/party/kingdom/builder.d.ts @@ -4,7 +4,8 @@ import type { BoostFlawState } from "@actor/character/apps/attribute-builder.ts"; import type { PartyPF2e } from "../document.ts"; import type { Kingdom } from "./model.ts"; -import type { KingdomAbility, KingdomCHG } from "./types.ts"; +import { KingdomCHG } from "./schema.ts"; +import type { KingdomAbility } from "./types.ts"; import { KingdomCHGData } from "./values.ts"; declare const KINGDOM_BUILD_CATEGORIES: readonly ["charter", "heartland", "government"]; @@ -19,7 +20,6 @@ declare class KingdomBuilder extends FormApplication { uuid: string; tab?: string; }): void; - constructor(kingdom: Kingdom); get id(): string; get kingdom(): Kingdom; get actor(): PartyPF2e; diff --git a/types/src/module/actor/party/kingdom/helpers.d.ts b/types/src/module/actor/party/kingdom/helpers.d.ts index 8f5d30c6a..ced95b21e 100644 --- a/types/src/module/actor/party/kingdom/helpers.d.ts +++ b/types/src/module/actor/party/kingdom/helpers.d.ts @@ -1,7 +1,9 @@ import type { ActorPF2e } from "@actor"; import type { ItemPF2e } from "@item"; import type { Kingdom } from "./model.ts"; -import { KingdomAbility, KingdomCHG, KingdomCommodity } from "./types.ts"; +import type { KingdomCHG } from "./schema.ts"; +import type { KingdomAbility, KingdomCommodity } from "./types.ts"; + /** Resolves boosts using kingmaker rules. Free boosts cannot be the granted ability nor the flaw */ declare function resolveKingdomBoosts(entry: KingdomCHG, choices: KingdomAbility[]): KingdomAbility[]; /** Assemble what will be collected during the kingdom's upkeep phase */ diff --git a/types/src/module/actor/party/kingdom/model.d.ts b/types/src/module/actor/party/kingdom/model.d.ts index 7f1897f32..6e0ae231b 100644 --- a/types/src/module/actor/party/kingdom/model.d.ts +++ b/types/src/module/actor/party/kingdom/model.d.ts @@ -1,24 +1,17 @@ -import { type ArmyPF2e } from "@actor"; +import { type ArmyPF2e, type PartyPF2e } from "@actor"; import { FeatGroup } from "@actor/character/feats/index.ts"; import { RawModifier } from "@actor/modifiers.ts"; import { CampaignFeaturePF2e } from "@item"; -import { ItemType } from "@item/base/data/index.ts"; +import type { ItemType } from "@item/base/data/index.ts"; import { Statistic } from "@system/statistic/index.ts"; -import type { PartyPF2e } from "../document.ts"; +import { PartySystemData } from "../data.ts"; import { PartyCampaign } from "../types.ts"; -import { - KingdomCharter, - KingdomCHG, - KingdomGovernment, - KingdomNationType, - KingdomSchema, - KingdomSkill, - KingdomSource, -} from "./types.ts"; +import { KingdomCharter, KingdomCHG, KingdomData, KingdomGovernment, KingdomSchema, KingdomSource } from "./schema.ts"; +import type { KingdomNationType, KingdomSkill } from "./types.ts"; +import DataModel = foundry.abstract.DataModel; -declare const DataModel: typeof foundry.abstract.DataModel; /** Model for the Kingmaker campaign data type, which represents a Kingdom */ -declare class Kingdom extends DataModel implements PartyCampaign { +declare class Kingdom extends DataModel implements PartyCampaign { nationType: KingdomNationType; features: FeatGroup; feats: FeatGroup; @@ -67,6 +60,6 @@ declare class Kingdom extends DataModel implements Par }): void; _preUpdate(changed: DeepPartial): void; } -interface Kingdom extends ModelPropsFromSchema { +interface Kingdom extends DataModel, KingdomData { } export { Kingdom }; diff --git a/types/src/module/actor/party/kingdom/schema.d.ts b/types/src/module/actor/party/kingdom/schema.d.ts index 893beb797..a07d01640 100644 --- a/types/src/module/actor/party/kingdom/schema.d.ts +++ b/types/src/module/actor/party/kingdom/schema.d.ts @@ -1,883 +1,171 @@ import { RawModifier } from "@actor/modifiers.ts"; import { ZeroToFour } from "@module/data.ts"; import { DataUnionField, RecordField, StrictBooleanField, StrictStringField } from "@system/schema-data-fields.ts"; -import type { ArrayField, SchemaField, StringField } from "types/foundry/common/data/fields.d.ts"; -import { KingdomAbility } from "./types.ts"; +import type { + FameType, + KingdomAbility, + KingdomBoostCategory, + KingdomCommodity, + KingdomLeadershipRole, + KingdomSettlementType, + KingdomSkill, +} from "./types.ts"; +import fields = foundry.data.fields; -declare const KINGDOM_SETTLEMENT_SCHEMA: { - name: StringField; - type: StringField<"village" | "town" | "city" | "metropolis", "village" | "town" | "city" | "metropolis", false, false, true>; - level: foundry.data.fields.NumberField<1, 1, false, false, true>; - overcrowded: foundry.data.fields.BooleanField; - description: StringField; - sort: foundry.data.fields.IntegerSortField; - consumption: SchemaField<{ - base: foundry.data.fields.NumberField; - /** Some settlements reduce consumption, this is the number of reductions that may exist */ - reduction: foundry.data.fields.NumberField; - total: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - base: foundry.data.fields.NumberField; - /** Some settlements reduce consumption, this is the number of reductions that may exist */ - reduction: foundry.data.fields.NumberField; - total: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - base: foundry.data.fields.NumberField; +declare function defineKingdomSchema(): KingdomSchema; +type CHGSchema = { + id: fields.StringField; + name: fields.StringField; + img: fields.StringField; + description: fields.StringField; + boosts: fields.ArrayField>; +}; +type CharterSchema = CHGSchema & { + flaw: fields.StringField; +}; +type GovernmentSchema = CHGSchema & { + skills: fields.ArrayField>; + feat: fields.DocumentUUIDField; +}; +type NullableSchemaField = fields.SchemaField, ModelPropsFromSchema, true, true, true>; +type BuildSchema = { + /** Determines if the ability scores are manually set or automatically determined. */ + manual: fields.BooleanField; + charter: NullableSchemaField; + heartland: NullableSchemaField; + government: NullableSchemaField; + skills: fields.SchemaField; + }>>>; + /** Boost selections made by the user, both during the build process and levelling */ + boosts: fields.SchemaField>>>; +}; +type ResourceSchema = { + dice: fields.SchemaField<{ + number: fields.NumberField; + faces: fields.NumberField; + bonus: fields.NumberField; + penalty: fields.NumberField; + }>; + fame: fields.SchemaField<{ + value: fields.NumberField; + max: fields.NumberField; + }>; + commodities: fields.SchemaField; + max: fields.NumberField; + }>>>; + points: fields.NumberField; + /** Worksites by commodity type, for the commodities that can have work sites */ + workSites: fields.SchemaField; + /** The number of worksites that are on resource hexes (these grant double) */ + resource: fields.NumberField; + }>>>; +}; +type SettlementSchema = { + name: fields.StringField; + type: fields.StringField; + level: fields.NumberField; + overcrowded: fields.BooleanField; + description: fields.StringField; + sort: fields.IntegerSortField; + consumption: fields.SchemaField<{ + base: fields.NumberField; /** Some settlements reduce consumption, this is the number of reductions that may exist */ - reduction: foundry.data.fields.NumberField; - total: foundry.data.fields.NumberField; - }>, true, false, true>; - storage: SchemaField>, SourceFromSchema>>, ModelPropsFromSchema>>, true, false, true>; + reduction: fields.NumberField; + total: fields.NumberField; + }>; + storage: fields.SchemaField>>; +}; +type LeadershipSchema = { + uuid: fields.DocumentUUIDField; + vacant: fields.BooleanField; + invested: fields.BooleanField; +}; +type RuinSchema = { + value: fields.NumberField; + max: fields.NumberField; }; -declare const KINGDOM_SCHEMA: { - type: StringField<"kingmaker", "kingmaker", true, false, true>; +type KingdomSchema = { + type: fields.StringField<"kingmaker", "kingmaker", true, false, true>; active: DataUnionField | StrictBooleanField, false, false, boolean>; - name: StringField; - img: foundry.data.fields.FilePathField<`${string}.svg` | `${string}.apng` | `${string}.avif` | `${string}.bmp` | `${string}.gif` | `${string}.jpeg` | `${string}.jpg` | `${string}.png` | `${string}.tiff` | `${string}.webp`, `${string}.svg` | `${string}.apng` | `${string}.avif` | `${string}.bmp` | `${string}.gif` | `${string}.jpeg` | `${string}.jpg` | `${string}.png` | `${string}.tiff` | `${string}.webp`, true, false, true>; - capital: StringField<"", "", true, false, true>; - size: foundry.data.fields.NumberField; - level: foundry.data.fields.NumberField; - xp: SchemaField<{ - value: foundry.data.fields.NumberField, boolean, boolean, boolean>; - max: foundry.data.fields.NumberField, boolean, boolean, boolean>; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField, boolean, boolean, boolean>; - max: foundry.data.fields.NumberField, boolean, boolean, boolean>; - }>, ModelPropsFromSchema<{ - value: foundry.data.fields.NumberField, boolean, boolean, boolean>; - max: foundry.data.fields.NumberField, boolean, boolean, boolean>; - }>, true, false, true>; - aspiration: StringField<"fame" | "infamy", "fame" | "infamy", true, false, true>; - abilities: SchemaField; - mod: foundry.data.fields.NumberField; - ruin: SchemaField<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, NonNullable, boolean, boolean, boolean>; - penalty: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - mod: foundry.data.fields.NumberField; - ruin: SchemaField<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, NonNullable, boolean, boolean, boolean>; - penalty: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - value: foundry.data.fields.NumberField; - mod: foundry.data.fields.NumberField; - ruin: SchemaField<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, NonNullable, boolean, boolean, boolean>; - penalty: foundry.data.fields.NumberField; - }>, true, false, true>>, SourceFromSchema; - mod: foundry.data.fields.NumberField; - ruin: SchemaField<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, NonNullable, boolean, boolean, boolean>; - penalty: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - mod: foundry.data.fields.NumberField; - ruin: SchemaField<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, NonNullable, boolean, boolean, boolean>; - penalty: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - value: foundry.data.fields.NumberField; - mod: foundry.data.fields.NumberField; - ruin: SchemaField<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, NonNullable, boolean, boolean, boolean>; - penalty: foundry.data.fields.NumberField; - }>, true, false, true>>>, ModelPropsFromSchema; - mod: foundry.data.fields.NumberField; - ruin: SchemaField<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, NonNullable, boolean, boolean, boolean>; - penalty: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - mod: foundry.data.fields.NumberField; - ruin: SchemaField<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, NonNullable, boolean, boolean, boolean>; - penalty: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - value: foundry.data.fields.NumberField; - mod: foundry.data.fields.NumberField; - ruin: SchemaField<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, NonNullable, boolean, boolean, boolean>; - penalty: foundry.data.fields.NumberField; - }>, true, false, true>>>, true, false, true>; - build: SchemaField<{ - /** Determines if the ability scores are manually set or automatically determined. */ - manual: foundry.data.fields.BooleanField; - charter: SchemaField<{ - flaw: StringField<"culture" | "economy" | "loyalty" | "stability", "culture" | "economy" | "loyalty" | "stability", true, true, true>; - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }, SourceFromSchema<{ - flaw: StringField<"culture" | "economy" | "loyalty" | "stability", "culture" | "economy" | "loyalty" | "stability", true, true, true>; - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }>, ModelPropsFromSchema<{ - flaw: StringField<"culture" | "economy" | "loyalty" | "stability", "culture" | "economy" | "loyalty" | "stability", true, true, true>; - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }>, true, true, true>; - heartland: SchemaField<{ - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }, SourceFromSchema<{ - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }>, ModelPropsFromSchema<{ - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }>, true, true, true>; - government: SchemaField<{ - skills: ArrayField, ("magic" | "exploration" | "defense" | "agriculture" | "arts" | "boating" | "engineering" | "folklore" | "industry" | "intrigue" | "politics" | "scholarship" | "statecraft" | "trade" | "warfare" | "wilderness")[], ("magic" | "exploration" | "defense" | "agriculture" | "arts" | "boating" | "engineering" | "folklore" | "industry" | "intrigue" | "politics" | "scholarship" | "statecraft" | "trade" | "warfare" | "wilderness")[], false, false, true>; - feat: StringField<`Compendium.${string}.Item.${string}` | `Compendium.${string}.Actor.${string}` | `Compendium.${string}.Cards.${string}` | `Compendium.${string}.JournalEntry.${string}` | `Compendium.${string}.Macro.${string}` | `Compendium.${string}.Playlist.${string}` | `Compendium.${string}.RollTable.${string}` | `Compendium.${string}.Scene.${string}` | `Compendium.${string}.Adventure.${string}`, `Compendium.${string}.Item.${string}` | `Compendium.${string}.Actor.${string}` | `Compendium.${string}.Cards.${string}` | `Compendium.${string}.JournalEntry.${string}` | `Compendium.${string}.Macro.${string}` | `Compendium.${string}.Playlist.${string}` | `Compendium.${string}.RollTable.${string}` | `Compendium.${string}.Scene.${string}` | `Compendium.${string}.Adventure.${string}`, true, true, true>; - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }, SourceFromSchema<{ - skills: ArrayField, ("magic" | "exploration" | "defense" | "agriculture" | "arts" | "boating" | "engineering" | "folklore" | "industry" | "intrigue" | "politics" | "scholarship" | "statecraft" | "trade" | "warfare" | "wilderness")[], ("magic" | "exploration" | "defense" | "agriculture" | "arts" | "boating" | "engineering" | "folklore" | "industry" | "intrigue" | "politics" | "scholarship" | "statecraft" | "trade" | "warfare" | "wilderness")[], false, false, true>; - feat: StringField<`Compendium.${string}.Item.${string}` | `Compendium.${string}.Actor.${string}` | `Compendium.${string}.Cards.${string}` | `Compendium.${string}.JournalEntry.${string}` | `Compendium.${string}.Macro.${string}` | `Compendium.${string}.Playlist.${string}` | `Compendium.${string}.RollTable.${string}` | `Compendium.${string}.Scene.${string}` | `Compendium.${string}.Adventure.${string}`, `Compendium.${string}.Item.${string}` | `Compendium.${string}.Actor.${string}` | `Compendium.${string}.Cards.${string}` | `Compendium.${string}.JournalEntry.${string}` | `Compendium.${string}.Macro.${string}` | `Compendium.${string}.Playlist.${string}` | `Compendium.${string}.RollTable.${string}` | `Compendium.${string}.Scene.${string}` | `Compendium.${string}.Adventure.${string}`, true, true, true>; - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }>, ModelPropsFromSchema<{ - skills: ArrayField, ("magic" | "exploration" | "defense" | "agriculture" | "arts" | "boating" | "engineering" | "folklore" | "industry" | "intrigue" | "politics" | "scholarship" | "statecraft" | "trade" | "warfare" | "wilderness")[], ("magic" | "exploration" | "defense" | "agriculture" | "arts" | "boating" | "engineering" | "folklore" | "industry" | "intrigue" | "politics" | "scholarship" | "statecraft" | "trade" | "warfare" | "wilderness")[], false, false, true>; - feat: StringField<`Compendium.${string}.Item.${string}` | `Compendium.${string}.Actor.${string}` | `Compendium.${string}.Cards.${string}` | `Compendium.${string}.JournalEntry.${string}` | `Compendium.${string}.Macro.${string}` | `Compendium.${string}.Playlist.${string}` | `Compendium.${string}.RollTable.${string}` | `Compendium.${string}.Scene.${string}` | `Compendium.${string}.Adventure.${string}`, `Compendium.${string}.Item.${string}` | `Compendium.${string}.Actor.${string}` | `Compendium.${string}.Cards.${string}` | `Compendium.${string}.JournalEntry.${string}` | `Compendium.${string}.Macro.${string}` | `Compendium.${string}.Playlist.${string}` | `Compendium.${string}.RollTable.${string}` | `Compendium.${string}.Scene.${string}` | `Compendium.${string}.Adventure.${string}`, true, true, true>; - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }>, true, true, true>; - skills: SchemaField; - }, SourceFromSchema<{ - rank: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - rank: foundry.data.fields.NumberField; - }>, true, false, true>>, SourceFromSchema; - }, SourceFromSchema<{ - rank: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - rank: foundry.data.fields.NumberField; - }>, true, false, true>>>, ModelPropsFromSchema; - }, SourceFromSchema<{ - rank: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - rank: foundry.data.fields.NumberField; - }>, true, false, true>>>, true, false, true>; - /** Boost selections made by the user, both during the build process and levelling */ - boosts: SchemaField, ("culture" | "economy" | "loyalty" | "stability")[], ("culture" | "economy" | "loyalty" | "stability")[], false, false, true>>, SourceFromSchema, ("culture" | "economy" | "loyalty" | "stability")[], ("culture" | "economy" | "loyalty" | "stability")[], false, false, true>>>, ModelPropsFromSchema, ("culture" | "economy" | "loyalty" | "stability")[], ("culture" | "economy" | "loyalty" | "stability")[], false, false, true>>>, true, false, true>; - }, SourceFromSchema<{ - /** Determines if the ability scores are manually set or automatically determined. */ - manual: foundry.data.fields.BooleanField; - charter: SchemaField<{ - flaw: StringField<"culture" | "economy" | "loyalty" | "stability", "culture" | "economy" | "loyalty" | "stability", true, true, true>; - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }, SourceFromSchema<{ - flaw: StringField<"culture" | "economy" | "loyalty" | "stability", "culture" | "economy" | "loyalty" | "stability", true, true, true>; - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }>, ModelPropsFromSchema<{ - flaw: StringField<"culture" | "economy" | "loyalty" | "stability", "culture" | "economy" | "loyalty" | "stability", true, true, true>; - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }>, true, true, true>; - heartland: SchemaField<{ - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }, SourceFromSchema<{ - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }>, ModelPropsFromSchema<{ - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }>, true, true, true>; - government: SchemaField<{ - skills: ArrayField, ("magic" | "exploration" | "defense" | "agriculture" | "arts" | "boating" | "engineering" | "folklore" | "industry" | "intrigue" | "politics" | "scholarship" | "statecraft" | "trade" | "warfare" | "wilderness")[], ("magic" | "exploration" | "defense" | "agriculture" | "arts" | "boating" | "engineering" | "folklore" | "industry" | "intrigue" | "politics" | "scholarship" | "statecraft" | "trade" | "warfare" | "wilderness")[], false, false, true>; - feat: StringField<`Compendium.${string}.Item.${string}` | `Compendium.${string}.Actor.${string}` | `Compendium.${string}.Cards.${string}` | `Compendium.${string}.JournalEntry.${string}` | `Compendium.${string}.Macro.${string}` | `Compendium.${string}.Playlist.${string}` | `Compendium.${string}.RollTable.${string}` | `Compendium.${string}.Scene.${string}` | `Compendium.${string}.Adventure.${string}`, `Compendium.${string}.Item.${string}` | `Compendium.${string}.Actor.${string}` | `Compendium.${string}.Cards.${string}` | `Compendium.${string}.JournalEntry.${string}` | `Compendium.${string}.Macro.${string}` | `Compendium.${string}.Playlist.${string}` | `Compendium.${string}.RollTable.${string}` | `Compendium.${string}.Scene.${string}` | `Compendium.${string}.Adventure.${string}`, true, true, true>; - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }, SourceFromSchema<{ - skills: ArrayField, ("magic" | "exploration" | "defense" | "agriculture" | "arts" | "boating" | "engineering" | "folklore" | "industry" | "intrigue" | "politics" | "scholarship" | "statecraft" | "trade" | "warfare" | "wilderness")[], ("magic" | "exploration" | "defense" | "agriculture" | "arts" | "boating" | "engineering" | "folklore" | "industry" | "intrigue" | "politics" | "scholarship" | "statecraft" | "trade" | "warfare" | "wilderness")[], false, false, true>; - feat: StringField<`Compendium.${string}.Item.${string}` | `Compendium.${string}.Actor.${string}` | `Compendium.${string}.Cards.${string}` | `Compendium.${string}.JournalEntry.${string}` | `Compendium.${string}.Macro.${string}` | `Compendium.${string}.Playlist.${string}` | `Compendium.${string}.RollTable.${string}` | `Compendium.${string}.Scene.${string}` | `Compendium.${string}.Adventure.${string}`, `Compendium.${string}.Item.${string}` | `Compendium.${string}.Actor.${string}` | `Compendium.${string}.Cards.${string}` | `Compendium.${string}.JournalEntry.${string}` | `Compendium.${string}.Macro.${string}` | `Compendium.${string}.Playlist.${string}` | `Compendium.${string}.RollTable.${string}` | `Compendium.${string}.Scene.${string}` | `Compendium.${string}.Adventure.${string}`, true, true, true>; - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }>, ModelPropsFromSchema<{ - skills: ArrayField, ("magic" | "exploration" | "defense" | "agriculture" | "arts" | "boating" | "engineering" | "folklore" | "industry" | "intrigue" | "politics" | "scholarship" | "statecraft" | "trade" | "warfare" | "wilderness")[], ("magic" | "exploration" | "defense" | "agriculture" | "arts" | "boating" | "engineering" | "folklore" | "industry" | "intrigue" | "politics" | "scholarship" | "statecraft" | "trade" | "warfare" | "wilderness")[], false, false, true>; - feat: StringField<`Compendium.${string}.Item.${string}` | `Compendium.${string}.Actor.${string}` | `Compendium.${string}.Cards.${string}` | `Compendium.${string}.JournalEntry.${string}` | `Compendium.${string}.Macro.${string}` | `Compendium.${string}.Playlist.${string}` | `Compendium.${string}.RollTable.${string}` | `Compendium.${string}.Scene.${string}` | `Compendium.${string}.Adventure.${string}`, `Compendium.${string}.Item.${string}` | `Compendium.${string}.Actor.${string}` | `Compendium.${string}.Cards.${string}` | `Compendium.${string}.JournalEntry.${string}` | `Compendium.${string}.Macro.${string}` | `Compendium.${string}.Playlist.${string}` | `Compendium.${string}.RollTable.${string}` | `Compendium.${string}.Scene.${string}` | `Compendium.${string}.Adventure.${string}`, true, true, true>; - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }>, true, true, true>; - skills: SchemaField; - }, SourceFromSchema<{ - rank: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - rank: foundry.data.fields.NumberField; - }>, true, false, true>>, SourceFromSchema; - }, SourceFromSchema<{ - rank: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - rank: foundry.data.fields.NumberField; - }>, true, false, true>>>, ModelPropsFromSchema; - }, SourceFromSchema<{ - rank: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - rank: foundry.data.fields.NumberField; - }>, true, false, true>>>, true, false, true>; - /** Boost selections made by the user, both during the build process and levelling */ - boosts: SchemaField, ("culture" | "economy" | "loyalty" | "stability")[], ("culture" | "economy" | "loyalty" | "stability")[], false, false, true>>, SourceFromSchema, ("culture" | "economy" | "loyalty" | "stability")[], ("culture" | "economy" | "loyalty" | "stability")[], false, false, true>>>, ModelPropsFromSchema, ("culture" | "economy" | "loyalty" | "stability")[], ("culture" | "economy" | "loyalty" | "stability")[], false, false, true>>>, true, false, true>; - }>, ModelPropsFromSchema<{ - /** Determines if the ability scores are manually set or automatically determined. */ - manual: foundry.data.fields.BooleanField; - charter: SchemaField<{ - flaw: StringField<"culture" | "economy" | "loyalty" | "stability", "culture" | "economy" | "loyalty" | "stability", true, true, true>; - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }, SourceFromSchema<{ - flaw: StringField<"culture" | "economy" | "loyalty" | "stability", "culture" | "economy" | "loyalty" | "stability", true, true, true>; - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }>, ModelPropsFromSchema<{ - flaw: StringField<"culture" | "economy" | "loyalty" | "stability", "culture" | "economy" | "loyalty" | "stability", true, true, true>; - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }>, true, true, true>; - heartland: SchemaField<{ - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }, SourceFromSchema<{ - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }>, ModelPropsFromSchema<{ - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }>, true, true, true>; - government: SchemaField<{ - skills: ArrayField, ("magic" | "exploration" | "defense" | "agriculture" | "arts" | "boating" | "engineering" | "folklore" | "industry" | "intrigue" | "politics" | "scholarship" | "statecraft" | "trade" | "warfare" | "wilderness")[], ("magic" | "exploration" | "defense" | "agriculture" | "arts" | "boating" | "engineering" | "folklore" | "industry" | "intrigue" | "politics" | "scholarship" | "statecraft" | "trade" | "warfare" | "wilderness")[], false, false, true>; - feat: StringField<`Compendium.${string}.Item.${string}` | `Compendium.${string}.Actor.${string}` | `Compendium.${string}.Cards.${string}` | `Compendium.${string}.JournalEntry.${string}` | `Compendium.${string}.Macro.${string}` | `Compendium.${string}.Playlist.${string}` | `Compendium.${string}.RollTable.${string}` | `Compendium.${string}.Scene.${string}` | `Compendium.${string}.Adventure.${string}`, `Compendium.${string}.Item.${string}` | `Compendium.${string}.Actor.${string}` | `Compendium.${string}.Cards.${string}` | `Compendium.${string}.JournalEntry.${string}` | `Compendium.${string}.Macro.${string}` | `Compendium.${string}.Playlist.${string}` | `Compendium.${string}.RollTable.${string}` | `Compendium.${string}.Scene.${string}` | `Compendium.${string}.Adventure.${string}`, true, true, true>; - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }, SourceFromSchema<{ - skills: ArrayField, ("magic" | "exploration" | "defense" | "agriculture" | "arts" | "boating" | "engineering" | "folklore" | "industry" | "intrigue" | "politics" | "scholarship" | "statecraft" | "trade" | "warfare" | "wilderness")[], ("magic" | "exploration" | "defense" | "agriculture" | "arts" | "boating" | "engineering" | "folklore" | "industry" | "intrigue" | "politics" | "scholarship" | "statecraft" | "trade" | "warfare" | "wilderness")[], false, false, true>; - feat: StringField<`Compendium.${string}.Item.${string}` | `Compendium.${string}.Actor.${string}` | `Compendium.${string}.Cards.${string}` | `Compendium.${string}.JournalEntry.${string}` | `Compendium.${string}.Macro.${string}` | `Compendium.${string}.Playlist.${string}` | `Compendium.${string}.RollTable.${string}` | `Compendium.${string}.Scene.${string}` | `Compendium.${string}.Adventure.${string}`, `Compendium.${string}.Item.${string}` | `Compendium.${string}.Actor.${string}` | `Compendium.${string}.Cards.${string}` | `Compendium.${string}.JournalEntry.${string}` | `Compendium.${string}.Macro.${string}` | `Compendium.${string}.Playlist.${string}` | `Compendium.${string}.RollTable.${string}` | `Compendium.${string}.Scene.${string}` | `Compendium.${string}.Adventure.${string}`, true, true, true>; - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }>, ModelPropsFromSchema<{ - skills: ArrayField, ("magic" | "exploration" | "defense" | "agriculture" | "arts" | "boating" | "engineering" | "folklore" | "industry" | "intrigue" | "politics" | "scholarship" | "statecraft" | "trade" | "warfare" | "wilderness")[], ("magic" | "exploration" | "defense" | "agriculture" | "arts" | "boating" | "engineering" | "folklore" | "industry" | "intrigue" | "politics" | "scholarship" | "statecraft" | "trade" | "warfare" | "wilderness")[], false, false, true>; - feat: StringField<`Compendium.${string}.Item.${string}` | `Compendium.${string}.Actor.${string}` | `Compendium.${string}.Cards.${string}` | `Compendium.${string}.JournalEntry.${string}` | `Compendium.${string}.Macro.${string}` | `Compendium.${string}.Playlist.${string}` | `Compendium.${string}.RollTable.${string}` | `Compendium.${string}.Scene.${string}` | `Compendium.${string}.Adventure.${string}`, `Compendium.${string}.Item.${string}` | `Compendium.${string}.Actor.${string}` | `Compendium.${string}.Cards.${string}` | `Compendium.${string}.JournalEntry.${string}` | `Compendium.${string}.Macro.${string}` | `Compendium.${string}.Playlist.${string}` | `Compendium.${string}.RollTable.${string}` | `Compendium.${string}.Scene.${string}` | `Compendium.${string}.Adventure.${string}`, true, true, true>; - id: StringField; - name: StringField; - img: StringField; - description: StringField; - boosts: ArrayField>; - }>, true, true, true>; - skills: SchemaField; - }, SourceFromSchema<{ - rank: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - rank: foundry.data.fields.NumberField; - }>, true, false, true>>, SourceFromSchema; - }, SourceFromSchema<{ - rank: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - rank: foundry.data.fields.NumberField; - }>, true, false, true>>>, ModelPropsFromSchema; - }, SourceFromSchema<{ - rank: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - rank: foundry.data.fields.NumberField; - }>, true, false, true>>>, true, false, true>; - /** Boost selections made by the user, both during the build process and levelling */ - boosts: SchemaField, ("culture" | "economy" | "loyalty" | "stability")[], ("culture" | "economy" | "loyalty" | "stability")[], false, false, true>>, SourceFromSchema, ("culture" | "economy" | "loyalty" | "stability")[], ("culture" | "economy" | "loyalty" | "stability")[], false, false, true>>>, ModelPropsFromSchema, ("culture" | "economy" | "loyalty" | "stability")[], ("culture" | "economy" | "loyalty" | "stability")[], false, false, true>>>, true, false, true>; - }>, true, false, true>; - customModifiers: foundry.data.fields.ObjectField, Record, true, false, true>; - leadership: SchemaField; - vacant: foundry.data.fields.BooleanField; - invested: foundry.data.fields.BooleanField; - }, SourceFromSchema<{ - uuid: StringField; - vacant: foundry.data.fields.BooleanField; - invested: foundry.data.fields.BooleanField; - }>, ModelPropsFromSchema<{ - uuid: StringField; - vacant: foundry.data.fields.BooleanField; - invested: foundry.data.fields.BooleanField; - }>, true, false, true>>, SourceFromSchema; - vacant: foundry.data.fields.BooleanField; - invested: foundry.data.fields.BooleanField; - }, SourceFromSchema<{ - uuid: StringField; - vacant: foundry.data.fields.BooleanField; - invested: foundry.data.fields.BooleanField; - }>, ModelPropsFromSchema<{ - uuid: StringField; - vacant: foundry.data.fields.BooleanField; - invested: foundry.data.fields.BooleanField; - }>, true, false, true>>>, ModelPropsFromSchema; - vacant: foundry.data.fields.BooleanField; - invested: foundry.data.fields.BooleanField; - }, SourceFromSchema<{ - uuid: StringField; - vacant: foundry.data.fields.BooleanField; - invested: foundry.data.fields.BooleanField; - }>, ModelPropsFromSchema<{ - uuid: StringField; - vacant: foundry.data.fields.BooleanField; - invested: foundry.data.fields.BooleanField; - }>, true, false, true>>>, true, false, true>; - resources: SchemaField<{ - dice: SchemaField<{ - number: foundry.data.fields.NumberField; - faces: foundry.data.fields.NumberField; - bonus: foundry.data.fields.NumberField; - penalty: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - number: foundry.data.fields.NumberField; - faces: foundry.data.fields.NumberField; - bonus: foundry.data.fields.NumberField; - penalty: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - number: foundry.data.fields.NumberField; - faces: foundry.data.fields.NumberField; - bonus: foundry.data.fields.NumberField; - penalty: foundry.data.fields.NumberField; - }>, true, false, true>; - fame: SchemaField<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, true, false, true>; - commodities: SchemaField; - max: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, true, false, true>>, SourceFromSchema; - max: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, true, false, true>>>, ModelPropsFromSchema; - max: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, true, false, true>>>, true, false, true>; - points: foundry.data.fields.NumberField; - /** Worksites by commodity type, for the commodities that can have work sites */ - workSites: SchemaField; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - /** The number of regular non-resource work sites */ - value: foundry.data.fields.NumberField; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - /** The number of regular non-resource work sites */ - value: foundry.data.fields.NumberField; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }>, true, false, true>>, SourceFromSchema; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - /** The number of regular non-resource work sites */ - value: foundry.data.fields.NumberField; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - /** The number of regular non-resource work sites */ - value: foundry.data.fields.NumberField; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }>, true, false, true>>>, ModelPropsFromSchema; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - /** The number of regular non-resource work sites */ - value: foundry.data.fields.NumberField; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - /** The number of regular non-resource work sites */ - value: foundry.data.fields.NumberField; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }>, true, false, true>>>, true, false, true>; - }, SourceFromSchema<{ - dice: SchemaField<{ - number: foundry.data.fields.NumberField; - faces: foundry.data.fields.NumberField; - bonus: foundry.data.fields.NumberField; - penalty: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - number: foundry.data.fields.NumberField; - faces: foundry.data.fields.NumberField; - bonus: foundry.data.fields.NumberField; - penalty: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - number: foundry.data.fields.NumberField; - faces: foundry.data.fields.NumberField; - bonus: foundry.data.fields.NumberField; - penalty: foundry.data.fields.NumberField; - }>, true, false, true>; - fame: SchemaField<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, true, false, true>; - commodities: SchemaField; - max: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, true, false, true>>, SourceFromSchema; - max: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, true, false, true>>>, ModelPropsFromSchema; - max: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, true, false, true>>>, true, false, true>; - points: foundry.data.fields.NumberField; - /** Worksites by commodity type, for the commodities that can have work sites */ - workSites: SchemaField; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - /** The number of regular non-resource work sites */ - value: foundry.data.fields.NumberField; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - /** The number of regular non-resource work sites */ - value: foundry.data.fields.NumberField; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }>, true, false, true>>, SourceFromSchema; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - /** The number of regular non-resource work sites */ - value: foundry.data.fields.NumberField; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - /** The number of regular non-resource work sites */ - value: foundry.data.fields.NumberField; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }>, true, false, true>>>, ModelPropsFromSchema; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - /** The number of regular non-resource work sites */ - value: foundry.data.fields.NumberField; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - /** The number of regular non-resource work sites */ - value: foundry.data.fields.NumberField; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }>, true, false, true>>>, true, false, true>; - }>, ModelPropsFromSchema<{ - dice: SchemaField<{ - number: foundry.data.fields.NumberField; - faces: foundry.data.fields.NumberField; - bonus: foundry.data.fields.NumberField; - penalty: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - number: foundry.data.fields.NumberField; - faces: foundry.data.fields.NumberField; - bonus: foundry.data.fields.NumberField; - penalty: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - number: foundry.data.fields.NumberField; - faces: foundry.data.fields.NumberField; - bonus: foundry.data.fields.NumberField; - penalty: foundry.data.fields.NumberField; - }>, true, false, true>; - fame: SchemaField<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, true, false, true>; - commodities: SchemaField; - max: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, true, false, true>>, SourceFromSchema; - max: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, true, false, true>>>, ModelPropsFromSchema; - max: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - value: foundry.data.fields.NumberField; - max: foundry.data.fields.NumberField; - }>, true, false, true>>>, true, false, true>; - points: foundry.data.fields.NumberField; - /** Worksites by commodity type, for the commodities that can have work sites */ - workSites: SchemaField; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - /** The number of regular non-resource work sites */ - value: foundry.data.fields.NumberField; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - /** The number of regular non-resource work sites */ - value: foundry.data.fields.NumberField; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }>, true, false, true>>, SourceFromSchema; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - /** The number of regular non-resource work sites */ - value: foundry.data.fields.NumberField; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - /** The number of regular non-resource work sites */ - value: foundry.data.fields.NumberField; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }>, true, false, true>>>, ModelPropsFromSchema; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - /** The number of regular non-resource work sites */ - value: foundry.data.fields.NumberField; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - /** The number of regular non-resource work sites */ - value: foundry.data.fields.NumberField; - /** The number of worksites that are on resource hexes (these grant double) */ - resource: foundry.data.fields.NumberField; - }>, true, false, true>>>, true, false, true>; - }>, true, false, true>; + name: fields.StringField; + img: fields.FilePathField; + capital: fields.StringField; + size: fields.NumberField; + level: fields.NumberField; + xp: fields.SchemaField<{ + value: fields.NumberField; + max: fields.NumberField; + }, { + value: number; + max: number; + }, { + value: number; + max: number; + }, true, false, true>; + aspiration: fields.StringField; + abilities: fields.SchemaField<{ + [key in KingdomAbility]: fields.SchemaField<{ + value: fields.NumberField; + mod: fields.NumberField; + ruin: fields.SchemaField; + penalty: fields.NumberField; + }>; + }>; + build: fields.SchemaField; + customModifiers: fields.ObjectField>; + leadership: fields.SchemaField>>; + resources: fields.SchemaField; /** A collection of settlements controlled by this kingdom, and its related data */ - settlements: RecordField, SchemaField<{ - name: StringField; - type: StringField<"village" | "town" | "city" | "metropolis", "village" | "town" | "city" | "metropolis", false, false, true>; - level: foundry.data.fields.NumberField<1, 1, false, false, true>; - overcrowded: foundry.data.fields.BooleanField; - description: StringField; - sort: foundry.data.fields.IntegerSortField; - consumption: SchemaField<{ - base: foundry.data.fields.NumberField; - /** Some settlements reduce consumption, this is the number of reductions that may exist */ - reduction: foundry.data.fields.NumberField; - total: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - base: foundry.data.fields.NumberField; - /** Some settlements reduce consumption, this is the number of reductions that may exist */ - reduction: foundry.data.fields.NumberField; - total: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - base: foundry.data.fields.NumberField; - /** Some settlements reduce consumption, this is the number of reductions that may exist */ - reduction: foundry.data.fields.NumberField; - total: foundry.data.fields.NumberField; - }>, true, false, true>; - storage: SchemaField>, SourceFromSchema>>, ModelPropsFromSchema>>, true, false, true>; - }, SourceFromSchema<{ - name: StringField; - type: StringField<"village" | "town" | "city" | "metropolis", "village" | "town" | "city" | "metropolis", false, false, true>; - level: foundry.data.fields.NumberField<1, 1, false, false, true>; - overcrowded: foundry.data.fields.BooleanField; - description: StringField; - sort: foundry.data.fields.IntegerSortField; - consumption: SchemaField<{ - base: foundry.data.fields.NumberField; - /** Some settlements reduce consumption, this is the number of reductions that may exist */ - reduction: foundry.data.fields.NumberField; - total: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - base: foundry.data.fields.NumberField; - /** Some settlements reduce consumption, this is the number of reductions that may exist */ - reduction: foundry.data.fields.NumberField; - total: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - base: foundry.data.fields.NumberField; - /** Some settlements reduce consumption, this is the number of reductions that may exist */ - reduction: foundry.data.fields.NumberField; - total: foundry.data.fields.NumberField; - }>, true, false, true>; - storage: SchemaField>, SourceFromSchema>>, ModelPropsFromSchema>>, true, false, true>; - }>, ModelPropsFromSchema<{ - name: StringField; - type: StringField<"village" | "town" | "city" | "metropolis", "village" | "town" | "city" | "metropolis", false, false, true>; - level: foundry.data.fields.NumberField<1, 1, false, false, true>; - overcrowded: foundry.data.fields.BooleanField; - description: StringField; - sort: foundry.data.fields.IntegerSortField; - consumption: SchemaField<{ - base: foundry.data.fields.NumberField; - /** Some settlements reduce consumption, this is the number of reductions that may exist */ - reduction: foundry.data.fields.NumberField; - total: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - base: foundry.data.fields.NumberField; - /** Some settlements reduce consumption, this is the number of reductions that may exist */ - reduction: foundry.data.fields.NumberField; - total: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - base: foundry.data.fields.NumberField; - /** Some settlements reduce consumption, this is the number of reductions that may exist */ - reduction: foundry.data.fields.NumberField; - total: foundry.data.fields.NumberField; - }>, true, false, true>; - storage: SchemaField>, SourceFromSchema>>, ModelPropsFromSchema>>, true, false, true>; - }>, true, false, true>, false, false, true, false>; - consumption: SchemaField<{ - settlement: foundry.data.fields.NumberField; - army: foundry.data.fields.NumberField; - value: foundry.data.fields.NumberField; - breakdown: StringField, boolean, boolean, boolean>; - }, SourceFromSchema<{ - settlement: foundry.data.fields.NumberField; - army: foundry.data.fields.NumberField; - value: foundry.data.fields.NumberField; - breakdown: StringField, boolean, boolean, boolean>; - }>, ModelPropsFromSchema<{ - settlement: foundry.data.fields.NumberField; - army: foundry.data.fields.NumberField; - value: foundry.data.fields.NumberField; - breakdown: StringField, boolean, boolean, boolean>; - }>, true, false, true>; - unrest: SchemaField<{ - value: foundry.data.fields.NumberField; - anarchyThreshold: foundry.data.fields.NumberField; - }, SourceFromSchema<{ - value: foundry.data.fields.NumberField; - anarchyThreshold: foundry.data.fields.NumberField; - }>, ModelPropsFromSchema<{ - value: foundry.data.fields.NumberField; - anarchyThreshold: foundry.data.fields.NumberField; - }>, true, false, true>; - event: SchemaField<{ - dc: foundry.data.fields.NumberField; - text: StringField; - }, SourceFromSchema<{ - dc: foundry.data.fields.NumberField; - text: StringField; - }>, ModelPropsFromSchema<{ - dc: foundry.data.fields.NumberField; - text: StringField; - }>, true, false, true>; + settlements: RecordField, fields.SchemaField>; + consumption: fields.SchemaField<{ + settlement: fields.NumberField; + army: fields.NumberField; + value: fields.NumberField; + breakdown: fields.StringField; + }>; + unrest: fields.SchemaField<{ + value: fields.NumberField; + anarchyThreshold: fields.NumberField; + }>; + event: fields.SchemaField<{ + dc: fields.NumberField; + text: fields.StringField; + }>; /** Any kingmaker specific module configuration and tweaks. Not used otherwise */ - module: foundry.data.fields.ObjectField<{}, {}, false, false, true>; + module: fields.ObjectField; }; -export { KINGDOM_SCHEMA, KINGDOM_SETTLEMENT_SCHEMA }; +interface KingdomCHG extends ModelPropsFromSchema { + feat?: ItemUUID | null; + flaw?: KingdomAbility | null; +} +interface KingdomCharter extends KingdomCHG { + feat?: never; + flaw: KingdomAbility | null; +} +interface KingdomHeartland extends ModelPropsFromSchema { + feat?: never; + flaw?: never; +} +interface KingdomGovernment extends ModelPropsFromSchema { + skills: KingdomSkill[]; + feat: ItemUUID | null; + flaw?: never; +} +interface KingdomBuildData extends ModelPropsFromSchema { + charter: KingdomCharter | null; + heartland: KingdomHeartland | null; + government: KingdomGovernment | null; +} +interface KingdomData extends ModelPropsFromSchema { + build: KingdomBuildData; +} +type KingdomAbilityData = KingdomData["abilities"][KingdomAbility]; +type KingdomLeadershipData = KingdomData["leadership"][KingdomLeadershipRole]; +type KingdomSettlementData = ModelPropsFromSchema; +type KingdomSource = SourceFromSchema; +export { defineKingdomSchema }; +export type { KingdomAbilityData, KingdomBuildData, KingdomCHG, KingdomCharter, KingdomData, KingdomGovernment, KingdomHeartland, KingdomLeadershipData, KingdomSchema, KingdomSettlementData, KingdomSource, }; diff --git a/types/src/module/actor/party/kingdom/sheet.d.ts b/types/src/module/actor/party/kingdom/sheet.d.ts index aa2a3b2a9..183699791 100644 --- a/types/src/module/actor/party/kingdom/sheet.d.ts +++ b/types/src/module/actor/party/kingdom/sheet.d.ts @@ -12,7 +12,7 @@ import { ValueAndMax } from "@module/data.ts"; import { AdjustedValue, SheetOption, SheetOptions } from "@module/sheet/helpers.ts"; import { Statistic } from "@system/statistic/index.ts"; import { Kingdom } from "./model.ts"; -import { KingdomAbilityData, KingdomData, KingdomLeadershipData, KingdomSettlementData } from "./types.ts"; +import type { KingdomAbilityData, KingdomData, KingdomLeadershipData, KingdomSettlementData } from "./schema.ts"; declare class KingdomSheetPF2e extends ActorSheetPF2e { #private; diff --git a/types/src/module/actor/party/kingdom/types.d.ts b/types/src/module/actor/party/kingdom/types.d.ts index d53257a57..621a87556 100644 --- a/types/src/module/actor/party/kingdom/types.d.ts +++ b/types/src/module/actor/party/kingdom/types.d.ts @@ -1,31 +1,17 @@ -import type { KINGDOM_SCHEMA, KINGDOM_SETTLEMENT_SCHEMA } from "./schema.ts"; -import type { KINGDOM_ABILITIES, KINGDOM_COMMODITIES, KINGDOM_LEADERSHIP, KINGDOM_SETTLEMENT_TYPES, KINGDOM_SKILLS } from "./values.ts"; -interface KingdomCHG { - name: string; - img: ImageFilePath; - description: string; - boosts: (KingdomAbility | "free")[]; - flaw?: KingdomAbility | null; - feat?: CompendiumUUID | null; -} -interface KingdomCharter extends KingdomCHG { - flaw: KingdomAbility | null; -} -interface KingdomGovernment extends KingdomCHG { - skills: KingdomSkill[]; - feat: CompendiumUUID | null; -} +import type { + KINGDOM_ABILITIES, + KINGDOM_COMMODITIES, + KINGDOM_LEADERSHIP, + KINGDOM_SETTLEMENT_TYPES, + KINGDOM_SKILLS, +} from "./values.ts"; + type KingdomAbility = (typeof KINGDOM_ABILITIES)[number]; +type KingdomBoostCategory = "charter" | "heartland" | "government" | "1" | "5" | "10" | "15" | "20"; type KingdomSkill = (typeof KINGDOM_SKILLS)[number]; type KingdomLeadershipRole = (typeof KINGDOM_LEADERSHIP)[number]; type KingdomCommodity = (typeof KINGDOM_COMMODITIES)[number]; type KingdomNationType = "territory" | "province" | "state" | "country" | "dominion"; type KingdomSettlementType = (typeof KINGDOM_SETTLEMENT_TYPES)[number]; -type KingdomSchema = typeof KINGDOM_SCHEMA; -type KingdomSource = SourceFromSchema; -type KingdomData = ModelPropsFromSchema; -type KingdomAbilityData = KingdomData["abilities"][KingdomAbility]; -type KingdomLeadershipData = KingdomData["leadership"][KingdomLeadershipRole]; -type KingdomSettlementData = ModelPropsFromSchema; type FameType = "fame" | "infamy"; -export type { FameType, KingdomAbility, KingdomAbilityData, KingdomCHG, KingdomCharter, KingdomCommodity, KingdomData, KingdomGovernment, KingdomLeadershipData, KingdomLeadershipRole, KingdomNationType, KingdomSchema, KingdomSettlementData, KingdomSettlementType, KingdomSkill, KingdomSource, }; +export type { FameType, KingdomAbility, KingdomBoostCategory, KingdomCommodity, KingdomLeadershipRole, KingdomNationType, KingdomSettlementType, KingdomSkill, }; diff --git a/types/src/module/actor/party/kingdom/values.d.ts b/types/src/module/actor/party/kingdom/values.d.ts index 5fa6d8557..3b656260e 100644 --- a/types/src/module/actor/party/kingdom/values.d.ts +++ b/types/src/module/actor/party/kingdom/values.d.ts @@ -1,5 +1,7 @@ import { ModifierAdjustment, RawModifier } from "@actor/modifiers.ts"; -import { KingdomAbility, KingdomCHG, KingdomCharter, KingdomGovernment, KingdomLeadershipRole, KingdomSkill } from "./types.ts"; +import { KingdomCharter, KingdomGovernment, KingdomHeartland } from "./schema.ts"; +import { KingdomAbility, KingdomLeadershipRole, KingdomSkill } from "./types.ts"; + declare const KINGDOM_ABILITIES: readonly ["culture", "economy", "loyalty", "stability"]; declare const KINGDOM_LEADERSHIP: readonly ["ruler", "counselor", "general", "emissary", "magister", "treasurer", "viceroy", "warden"]; declare const KINGDOM_COMMODITIES: readonly ["food", "luxuries", "lumber", "ore", "stone"]; @@ -93,9 +95,9 @@ type VacancyPenalty = { }; declare const VACANCY_PENALTIES: Record VacancyPenalty>; interface KingdomCHGData { - charter: Record; - heartland: Record; - government: Record; + charter: Record | undefined>; + heartland: Record | undefined>; + government: Record | undefined>; } /** Returns every single possible charter, heartland, and government */ declare function getKingdomCHGData(): KingdomCHGData; diff --git a/types/src/module/actor/party/sheet.d.ts b/types/src/module/actor/party/sheet.d.ts index e86a19bb7..21e79a422 100644 --- a/types/src/module/actor/party/sheet.d.ts +++ b/types/src/module/actor/party/sheet.d.ts @@ -3,15 +3,17 @@ /// import { ActorPF2e } from "@actor"; import { HitPointsSummary } from "@actor/base.ts"; +import { ResourceData } from "@actor/creature/index.ts"; import { ActorSheetPF2e } from "@actor/sheet/base.ts"; import { ActorSheetDataPF2e, ActorSheetRenderOptionsPF2e } from "@actor/sheet/data-types.ts"; import { ItemPF2e } from "@item"; import { ItemSourcePF2e } from "@item/base/data/index.ts"; import { Bulk } from "@item/physical/index.ts"; import { DropCanvasItemDataPF2e } from "@module/canvas/drop-canvas-data.ts"; -import { ValueAndMax, ZeroToFour } from "@module/data.ts"; +import { ZeroToFour } from "@module/data.ts"; import { SheetOptions } from "@module/sheet/helpers.ts"; import { PartyPF2e } from "./document.ts"; + interface PartySheetRenderOptions extends ActorSheetRenderOptionsPF2e { actors?: boolean; } @@ -75,7 +77,7 @@ interface MemberBreakdown { actor: ActorPF2e; genderPronouns: string | null; blurb: string | null; - heroPoints: ValueAndMax | null; + resource: ResourceData | null; hasBulk: boolean; bestSkills: SkillData[]; /** If the actor is owned by the current user */ diff --git a/types/src/module/actor/party/types.d.ts b/types/src/module/actor/party/types.d.ts index 661826c43..dcf6672fa 100644 --- a/types/src/module/actor/party/types.d.ts +++ b/types/src/module/actor/party/types.d.ts @@ -4,13 +4,13 @@ import type { TokenDocumentPF2e } from "@scene"; import type { Statistic } from "@system/statistic/index.ts"; import type DataModel from "types/foundry/common/abstract/data.d.ts"; import type { DataSchema } from "types/foundry/common/data/fields.d.ts"; -import type { PartyPF2e } from "./document.ts"; +import type { PartySystemData } from "./data.ts"; interface PartyUpdateOperation extends ActorUpdateOperation { removedMembers?: string[]; } /** Interface for a party campaign implementation, alternative data preparation used by parties for special campaigns */ -interface PartyCampaign extends DataModel { +interface PartyCampaign extends DataModel { type: string; level?: number; /** Any additional item types supported by the campaign */ @@ -29,9 +29,9 @@ interface PartyCampaign extends DataModel { type?: string | null; }): void; /** Executed during the actor's prepareBaseData phase */ - prepareBaseData?(): void; + prepareBaseData(): void; /** Executed during the actor's prepareDerivedData phase */ - prepareDerivedData?(): void; + prepareDerivedData(): void; _preUpdate?(changed: Record): void; } export type { PartyCampaign, PartyUpdateOperation }; diff --git a/types/src/module/actor/sheet/base.d.ts b/types/src/module/actor/sheet/base.d.ts index 4355cc1d7..080756a7b 100644 --- a/types/src/module/actor/sheet/base.d.ts +++ b/types/src/module/actor/sheet/base.d.ts @@ -9,8 +9,15 @@ import type { ItemSourcePF2e } from "@item/base/data/index.ts"; import type { Coins } from "@item/physical/data.ts"; import { DropCanvasItemDataPF2e } from "@module/canvas/drop-canvas-data.ts"; import { BasicConstructorOptions, TagSelectorOptions, TagSelectorType } from "@system/tag-selector/index.ts"; -import type { ActorSheetDataPF2e, ActorSheetRenderOptionsPF2e, CoinageSummary, InventoryItem, SheetInventory } from "./data-types.ts"; +import type { + ActorSheetDataPF2e, + ActorSheetRenderOptionsPF2e, + CoinageSummary, + InventoryItem, + SheetInventory, +} from "./data-types.ts"; import { ItemSummaryRenderer } from "./item-summary-renderer.ts"; + /** * Extend the basic ActorSheet class to do all the PF2e things! * This sheet is an Abstract layer which is not used. @@ -19,6 +26,7 @@ import { ItemSummaryRenderer } from "./item-summary-renderer.ts"; declare abstract class ActorSheetPF2e extends ActorSheet { #private; static get defaultOptions(): ActorSheetOptions; + /** @todo fixme for V13 */ constructor(actor: TActor, options?: Partial); /** Implementation used to handle the toggling and rendering of item summaries */ itemRenderer: ItemSummaryRenderer>; diff --git a/types/src/module/actor/sheet/data-types.d.ts b/types/src/module/actor/sheet/data-types.d.ts index 5f065e6ed..2870c3131 100644 --- a/types/src/module/actor/sheet/data-types.d.ts +++ b/types/src/module/actor/sheet/data-types.d.ts @@ -19,7 +19,7 @@ interface InventoryItem { isInvestable: boolean; isSellable: boolean; hasCharges: boolean; - heldItems?: InventoryItem[]; + heldItems?: InventoryItem[] | null; notifyInvestment?: boolean; /** Whether the item should be hidden if the user isn't the owner */ hidden: boolean; diff --git a/types/src/module/actor/sheet/popups/identify-popup.d.ts b/types/src/module/actor/sheet/popups/identify-popup.d.ts index d3725b19a..91cdd9790 100644 --- a/types/src/module/actor/sheet/popups/identify-popup.d.ts +++ b/types/src/module/actor/sheet/popups/identify-popup.d.ts @@ -1,11 +1,12 @@ /// /// /// -import { GenericIdentifyDCs, IdentifyAlchemyDCs, IdentifyMagicDCs } from "@item/identification.ts"; +import { IdentifyAlchemyDCs, IdentifyMagicDCs } from "@item/identification.ts"; import type { PhysicalItemPF2e } from "@item/physical/index.ts"; + export declare class IdentifyItemPopup extends FormApplication { static get defaultOptions(): FormApplicationOptions; - dcs: IdentifyMagicDCs | IdentifyAlchemyDCs | GenericIdentifyDCs; + dcs: IdentifyMagicDCs | IdentifyAlchemyDCs; getData(): Promise; activateListeners($html: JQuery): void; protected _updateObject(_event: Event, formData: Record): Promise; @@ -13,6 +14,6 @@ export declare class IdentifyItemPopup extends FormApplication interface IdentifyPopupData extends FormApplicationData { isMagic: boolean; isAlchemical: boolean; - dcs: GenericIdentifyDCs | IdentifyMagicDCs | IdentifyAlchemyDCs; + dcs: IdentifyMagicDCs | IdentifyAlchemyDCs; } export {}; diff --git a/types/src/module/actor/spellcasting.d.ts b/types/src/module/actor/spellcasting.d.ts index ef0b9d677..9d5656d28 100644 --- a/types/src/module/actor/spellcasting.d.ts +++ b/types/src/module/actor/spellcasting.d.ts @@ -11,7 +11,7 @@ import { ActorCommitData } from "./types.ts"; export declare class ActorSpellcasting extends DelegatedCollection> { #private; - readonly actor: TActor; + actor: TActor; /** The base casting proficiency, off of which spellcasting builds */ base: Statistic; /** All available spell lists on this actor */ diff --git a/types/src/module/actor/types.d.ts b/types/src/module/actor/types.d.ts index 5508cd6d7..90a5bcb9b 100644 --- a/types/src/module/actor/types.d.ts +++ b/types/src/module/actor/types.d.ts @@ -57,6 +57,7 @@ interface AuraData { } interface AuraEffectData { uuid: string; + parent: ItemPF2e; affects: "allies" | "enemies" | "all"; events: ("enter" | "turn-start" | "turn-end")[]; save: { diff --git a/types/src/module/actor/values.d.ts b/types/src/module/actor/values.d.ts index e3cbd6d10..77da2476d 100644 --- a/types/src/module/actor/values.d.ts +++ b/types/src/module/actor/values.d.ts @@ -3,8 +3,8 @@ declare const CREATURE_ACTOR_TYPES: readonly ["character", "npc", "familiar"]; declare const ACTOR_TYPES: readonly ["army", "character", "familiar", "hazard", "loot", "npc", "party", "vehicle"]; declare const SAVE_TYPES: readonly ["fortitude", "reflex", "will"]; declare const IMMUNITY_TYPES: Set<"arcane" | "divine" | "occult" | "primal" | "abysium" | "adamantine" | "alchemical" | "auditory" | "blinded" | "clumsy" | "confused" | "controlled" | "curse" | "dawnsilver" | "dazzled" | "deafened" | "detection" | "disease" | "djezet" | "doomed" | "drained" | "duskwood" | "emotion" | "energy" | "enfeebled" | "fascinated" | "fatigued" | "fleeing" | "frightened" | "grabbed" | "healing" | "holy" | "illusion" | "immobilized" | "inhaled" | "inubrix" | "light" | "magic" | "metal" | "non-magical" | "noqual" | "off-guard" | "olfactory" | "orichalcum" | "paralyzed" | "petrified" | "physical" | "plant" | "polymorph" | "possession" | "prone" | "radiation" | "restrained" | "scrying" | "siccatite" | "sickened" | "silver" | "sleep" | "slowed" | "stunned" | "stupefied" | "trip" | "unconscious" | "unholy" | "visual" | "water" | "wood" | "wounded" | "acid" | "air" | "bleed" | "bludgeoning" | "cold" | "earth" | "electricity" | "fire" | "force" | "mental" | "piercing" | "poison" | "precision" | "slashing" | "sonic" | "spirit" | "vitality" | "void" | "cold-iron" | "persistent-damage" | "custom" | "area-damage" | "critical-hits" | "death-effects" | "fear-effects" | "fortune-effects" | "misfortune-effects" | "nonlethal-attacks" | "object-immunities" | "salt-water" | "spell-deflection" | "swarm-attacks" | "swarm-mind" | "unarmed-attacks">; -declare const WEAKNESS_TYPES: Set<"arcane" | "divine" | "occult" | "primal" | "abysium" | "adamantine" | "alchemical" | "dawnsilver" | "djezet" | "duskwood" | "emotion" | "energy" | "glass" | "holy" | "inubrix" | "light" | "magical" | "metal" | "non-magical" | "noqual" | "orichalcum" | "physical" | "plant" | "radiation" | "salt" | "siccatite" | "silver" | "spells" | "unholy" | "vorpal" | "water" | "weapons" | "wood" | "acid" | "air" | "bleed" | "bludgeoning" | "cold" | "earth" | "electricity" | "fire" | "force" | "mental" | "piercing" | "poison" | "precision" | "slashing" | "sonic" | "spirit" | "vitality" | "void" | "cold-iron" | "persistent-damage" | "custom" | "area-damage" | "critical-hits" | "nonlethal-attacks" | "salt-water" | "unarmed-attacks" | "all-damage" | "arrow-vulnerability" | "axe-vulnerability" | "ghost-touch" | "splash-damage" | "vampire-weaknesses" | "vorpal-fear" | "vulnerable-to-sunlight" | "weapons-shedding-bright-light">; -declare const RESISTANCE_TYPES: Set<"arcane" | "divine" | "occult" | "primal" | "abysium" | "adamantine" | "alchemical" | "axes" | "dawnsilver" | "djezet" | "duskwood" | "energy" | "holy" | "inubrix" | "light" | "magical" | "metal" | "non-magical" | "nonlethal" | "noqual" | "orichalcum" | "physical" | "plant" | "radiation" | "salt" | "siccatite" | "silver" | "spells" | "unholy" | "vorpal" | "water" | "weapons" | "wood" | "acid" | "air" | "bleed" | "bludgeoning" | "cold" | "earth" | "electricity" | "fire" | "force" | "mental" | "piercing" | "poison" | "precision" | "slashing" | "sonic" | "spirit" | "vitality" | "void" | "cold-iron" | "persistent-damage" | "custom" | "area-damage" | "critical-hits" | "nonlethal-attacks" | "salt-water" | "unarmed-attacks" | "all-damage" | "ghost-touch" | "weapons-shedding-bright-light" | "damage-from-spells" | "protean-anatomy" | "vorpal-adamantine">; +declare const WEAKNESS_TYPES: Set<"arcane" | "divine" | "occult" | "primal" | "abysium" | "adamantine" | "alchemical" | "dawnsilver" | "djezet" | "duskwood" | "emotion" | "energy" | "glass" | "holy" | "inubrix" | "light" | "magical" | "metal" | "mythic" | "non-magical" | "noqual" | "orichalcum" | "physical" | "plant" | "radiation" | "salt" | "siccatite" | "silver" | "spells" | "unholy" | "vorpal" | "water" | "weapons" | "wood" | "acid" | "air" | "bleed" | "bludgeoning" | "cold" | "earth" | "electricity" | "fire" | "force" | "mental" | "piercing" | "poison" | "precision" | "slashing" | "sonic" | "spirit" | "vitality" | "void" | "cold-iron" | "persistent-damage" | "custom" | "area-damage" | "critical-hits" | "nonlethal-attacks" | "salt-water" | "unarmed-attacks" | "all-damage" | "arrow-vulnerability" | "axe-vulnerability" | "ghost-touch" | "splash-damage" | "vampire-weaknesses" | "vorpal-fear" | "vulnerable-to-sunlight" | "weapons-shedding-bright-light">; +declare const RESISTANCE_TYPES: Set<"arcane" | "divine" | "occult" | "primal" | "abysium" | "adamantine" | "alchemical" | "axes" | "dawnsilver" | "djezet" | "duskwood" | "energy" | "holy" | "inubrix" | "light" | "magical" | "metal" | "mythic" | "non-magical" | "nonlethal" | "noqual" | "orichalcum" | "physical" | "plant" | "radiation" | "salt" | "siccatite" | "silver" | "spells" | "unholy" | "vorpal" | "water" | "weapons" | "wood" | "acid" | "air" | "bleed" | "bludgeoning" | "cold" | "earth" | "electricity" | "fire" | "force" | "mental" | "piercing" | "poison" | "precision" | "slashing" | "sonic" | "spirit" | "vitality" | "void" | "cold-iron" | "persistent-damage" | "custom" | "area-damage" | "critical-hits" | "nonlethal-attacks" | "salt-water" | "unarmed-attacks" | "all-damage" | "ghost-touch" | "weapons-shedding-bright-light" | "damage-from-spells" | "protean-anatomy" | "vorpal-adamantine">; declare const UNAFFECTED_TYPES: Set<"bleed" | "spirit" | "vitality" | "void" | "chaotic" | "evil" | "good" | "lawful">; /** All skill slugs that are part of the core system. Used for validation. */ declare const CORE_SKILL_SLUGS: Set<"athletics" | "deception" | "stealth" | "nature" | "acrobatics" | "arcana" | "crafting" | "diplomacy" | "intimidation" | "medicine" | "occultism" | "performance" | "religion" | "society" | "survival" | "thievery">; diff --git a/types/src/module/apps/compendium-browser/data.d.ts b/types/src/module/apps/compendium-browser/data.d.ts index ab2b3b777..de2093c86 100644 --- a/types/src/module/apps/compendium-browser/data.d.ts +++ b/types/src/module/apps/compendium-browser/data.d.ts @@ -1,8 +1,10 @@ import * as browserTabs from "./tabs/index.ts"; + interface PackInfo { load: boolean; name: string; package: string; + showFullId?: boolean; } interface SourceInfo { load: boolean; @@ -17,10 +19,10 @@ interface BrowserTabs { hazard: browserTabs.Hazards; spell: browserTabs.Spells; } -type TabName = "action" | "bestiary" | "campaignFeature" | "equipment" | "feat" | "hazard" | "spell" | "settings"; +type TabName = "action" | "bestiary" | "campaignFeature" | "equipment" | "feat" | "hazard" | "spell"; type ContentTabName = Exclude; type BrowserTab = InstanceType<(typeof browserTabs)[keyof typeof browserTabs]>; -type TabData = Record; +type TabData = Record; type CommonSortByOption = "name" | "level"; type SortByOption = CommonSortByOption | "price"; type SortDirection = "asc" | "desc"; diff --git a/types/src/module/apps/compendium-browser/index.d.ts b/types/src/module/apps/compendium-browser/index.d.ts index 1630a432b..89eee4cfc 100644 --- a/types/src/module/apps/compendium-browser/index.d.ts +++ b/types/src/module/apps/compendium-browser/index.d.ts @@ -1,78 +1 @@ -/// -/// -/// -import { AbilityTrait, ActionCategory } from "@item/ability/index.ts"; -import { ActionType } from "@item/base/data/index.ts"; -import { BaseSpellcastingEntry } from "@item/spellcasting-entry/index.ts"; -import type { UserPF2e } from "@module/user/document.ts"; -import { BrowserTabs, PackInfo, SourceInfo, TabData, TabName } from "./data.ts"; -import { PackLoader } from "./loader.ts"; -import { - ActionFilters, - BestiaryFilters, - EquipmentFilters, - FeatFilters, - HazardFilters, - SpellFilters, -} from "./tabs/data.ts"; - -declare class CompendiumBrowser extends Application { - #private; - settings: CompendiumBrowserSettings; - dataTabsList: readonly ["action", "bestiary", "campaignFeature", "equipment", "feat", "hazard", "spell"]; - navigationTab: Tabs; - tabs: BrowserTabs; - packLoader: PackLoader; - activeTab: TabName; - constructor(options?: {}); - get title(): string; - static get defaultOptions(): ApplicationOptions; - /** Reset initial filtering */ - close(options?: { - force?: boolean; - }): Promise; - hookTab(): Tabs; - initCompendiumList(): void; - openTab(name: "action", filter?: ActionFilters): Promise; - openTab(name: "bestiary", filter?: BestiaryFilters): Promise; - openTab(name: "equipment", filter?: EquipmentFilters): Promise; - openTab(name: "feat", filter?: FeatFilters): Promise; - openTab(name: "hazard", filter?: HazardFilters): Promise; - openTab(name: "spell", filter?: SpellFilters): Promise; - openTab(name: "settings"): Promise; - openActionTab(options: { - types?: ActionType[]; - categories?: ActionCategory[]; - traits?: AbilityTrait[]; - }): Promise; - openSpellTab(entry: BaseSpellcastingEntry, maxRank?: number, category?: string | null): Promise; - loadTab(tabName: TabName): Promise; - loadedPacks(tab: TabName): string[]; - loadedPacksAll(): string[]; - activateListeners($html: JQuery): void; - protected _canDragStart(): boolean; - protected _canDragDrop(): boolean; - /** Set drag data and lower opacity of the application window to reveal any tokens */ - protected _onDragStart(event: DragEvent): void; - protected _onDragOver(event: DragEvent): void; - getData(): CompendiumBrowserSheetData; -} -type CompendiumBrowserSettings = Omit>, "settings">; -type CompendiumBrowserSourcesList = Record; -interface CompendiumBrowserSources { - ignoreAsGM: boolean; - showEmptySources: boolean; - showUnknownSources: boolean; - sources: CompendiumBrowserSourcesList; -} -interface CompendiumBrowserSheetData { - user: Active; - settings?: { - settings: CompendiumBrowserSettings; - sources: CompendiumBrowserSources; - }; - scrollLimit?: number; - showCampaign: boolean; -} -export { CompendiumBrowser }; -export type { CompendiumBrowserSettings, CompendiumBrowserSources }; +export { CompendiumBrowser } from "./browser.ts"; diff --git a/types/src/module/apps/compendium-browser/loader.d.ts b/types/src/module/apps/compendium-browser/loader.d.ts index 84ca5a4d2..33320ac0a 100644 --- a/types/src/module/apps/compendium-browser/loader.d.ts +++ b/types/src/module/apps/compendium-browser/loader.d.ts @@ -1,4 +1,5 @@ -import { CompendiumBrowserSources } from "./index.ts"; +import type { CompendiumBrowserSources } from "./browser.ts"; + declare class PackLoader { #private; loadedSources: string[]; diff --git a/types/src/module/apps/compendium-browser/tabs/action.d.ts b/types/src/module/apps/compendium-browser/tabs/action.d.ts index b89e03ab1..2a2c2d344 100644 --- a/types/src/module/apps/compendium-browser/tabs/action.d.ts +++ b/types/src/module/apps/compendium-browser/tabs/action.d.ts @@ -1,11 +1,12 @@ +import { CompendiumBrowser } from "../browser.ts"; import { ContentTabName } from "../data.ts"; -import { CompendiumBrowser } from "../index.ts"; -import { CompendiumBrowserTab } from "./base.ts"; +import { CompendiumBrowserTab } from "./base.svelte.ts"; import { ActionFilters, CompendiumBrowserIndexData } from "./data.ts"; + export declare class CompendiumBrowserActionTab extends CompendiumBrowserTab { tabName: ContentTabName; + tabLabel: string; filterData: ActionFilters; - templatePath: string; searchFields: string[]; storeFields: string[]; constructor(browser: CompendiumBrowser); diff --git a/types/src/module/apps/compendium-browser/tabs/base.d.ts b/types/src/module/apps/compendium-browser/tabs/base.svelte.d.ts similarity index 76% rename from types/src/module/apps/compendium-browser/tabs/base.d.ts rename to types/src/module/apps/compendium-browser/tabs/base.svelte.d.ts index 2a2dda289..f6445ffa5 100644 --- a/types/src/module/apps/compendium-browser/tabs/base.d.ts +++ b/types/src/module/apps/compendium-browser/tabs/base.svelte.d.ts @@ -1,29 +1,32 @@ import MiniSearch from "minisearch"; +import { CompendiumBrowser, CompendiumBrowserOpenTabOptions } from "../browser.ts"; import { BrowserTabs, ContentTabName } from "../data.ts"; -import { CompendiumBrowser } from "../index.ts"; -import { BrowserFilter, CheckboxOptions, CompendiumBrowserIndexData, MultiselectData, RangesInputData } from "./data.ts"; +import type { BrowserFilter, CheckboxOptions, CompendiumBrowserIndexData, RangesInputData, TraitData } from "./data.ts"; + export declare abstract class CompendiumBrowserTab { #private; /** A reference to the parent CompendiumBrowser */ protected browser: CompendiumBrowser; /** The filter schema for this tab; The tabs filters are rendered based on this.*/ - abstract filterData: BrowserFilter; + filterData?: BrowserFilter; + /** Current results. These are automatically refreshed when the filter changes */ + results: CompendiumBrowserIndexData[]; + /** The maximum number of items shown in the result list element */ + resultLimit: number; /** An unmodified copy of this.filterData */ defaultFilterData: this["filterData"]; /** The full CompendiumIndex of this tab */ protected indexData: CompendiumBrowserIndexData[]; - /** The filtered CompendiumIndex */ - protected currentIndex: CompendiumBrowserIndexData[]; /** Is this tab initialized? */ isInitialized: boolean; /** The total count of items in the currently filtered index */ totalItemCount: number; - /** The initial display limit for this tab; Scrolling is currently hardcoded to +100 */ - scrollLimit: number; /** The name of this tab */ abstract tabName: ContentTabName; - /** The path to the result list template of this tab */ - abstract templatePath: string; + /** The label for this tab. Can be a translation string */ + protected abstract tabLabel: string; + /** Whether this tab is visible in the browser */ + visible: boolean; /** Minisearch */ searchEngine: MiniSearch; /** Names of the document fields to be indexed. */ @@ -31,15 +34,17 @@ export declare abstract class CompendiumBrowserTab { /** Names of fields to store, so that search results would include them. * By default none, so resuts would only contain the id field. */ storeFields: string[]; + /** The localized label for this tab */ + get label(): string; + /** Whether this tab is only visible to a GM */ + get isGMOnly(): boolean; constructor(browser: CompendiumBrowser); /** Initialize this tab */ - init(): Promise; + init(force?: boolean): Promise; /** Open this tab * @param filter An optional initial filter for this tab */ - open(filter?: BrowserFilter): Promise; - /** Filter indexData and return slice based on current scrollLimit */ - getIndexData(start: number): CompendiumBrowserIndexData[]; + open(options?: CompendiumBrowserOpenTabOptions): Promise; /** Returns a clean copy of the filterData for this tab. Initializes the tab if necessary. */ getFilterData(): Promise; /** Reset all filters */ @@ -52,8 +57,7 @@ export declare abstract class CompendiumBrowserTab { protected abstract prepareFilterData(): this["filterData"]; /** Filter indexData */ protected abstract filterIndexData(entry: CompendiumBrowserIndexData): boolean; - protected filterTraits(traits: string[], selected: MultiselectData["selected"], condition: MultiselectData["conjunction"]): boolean; - renderResults(start: number): Promise; + protected filterTraits(traits: string[], selected: TraitData["selected"], condition: TraitData["conjunction"]): boolean; /** Sort result array by name, level or price */ protected sortResult(result: CompendiumBrowserIndexData[]): CompendiumBrowserIndexData[]; /** Return new range filter values based on input */ diff --git a/types/src/module/apps/compendium-browser/tabs/bestiary.d.ts b/types/src/module/apps/compendium-browser/tabs/bestiary.d.ts index d170a7170..c4b7bc37a 100644 --- a/types/src/module/apps/compendium-browser/tabs/bestiary.d.ts +++ b/types/src/module/apps/compendium-browser/tabs/bestiary.d.ts @@ -1,15 +1,17 @@ +import { CompendiumBrowser } from "../browser.ts"; import { ContentTabName } from "../data.ts"; -import { CompendiumBrowser } from "../index.ts"; -import { CompendiumBrowserTab } from "./base.ts"; +import { CompendiumBrowserTab } from "./base.svelte.ts"; import { BestiaryFilters, CompendiumBrowserIndexData } from "./data.ts"; + export declare class CompendiumBrowserBestiaryTab extends CompendiumBrowserTab { tabName: ContentTabName; + tabLabel: string; filterData: BestiaryFilters; - templatePath: string; protected index: string[]; searchFields: string[]; storeFields: string[]; constructor(browser: CompendiumBrowser); + get isGMOnly(): boolean; protected loadData(): Promise; protected filterIndexData(entry: CompendiumBrowserIndexData): boolean; protected prepareFilterData(): BestiaryFilters; diff --git a/types/src/module/apps/compendium-browser/tabs/campaign-feature.d.ts b/types/src/module/apps/compendium-browser/tabs/campaign-feature.d.ts index 0628c1ea8..222ca11fa 100644 --- a/types/src/module/apps/compendium-browser/tabs/campaign-feature.d.ts +++ b/types/src/module/apps/compendium-browser/tabs/campaign-feature.d.ts @@ -1,11 +1,12 @@ +import { CompendiumBrowser } from "../browser.ts"; import { ContentTabName } from "../data.ts"; -import { CompendiumBrowser } from "../index.ts"; -import { CompendiumBrowserTab } from "./base.ts"; +import { CompendiumBrowserTab } from "./base.svelte.ts"; import { CampaignFeatureFilters, CompendiumBrowserIndexData } from "./data.ts"; + export declare class CompendiumBrowserCampaignFeaturesTab extends CompendiumBrowserTab { tabName: ContentTabName; + tabLabel: string; filterData: CampaignFeatureFilters; - templatePath: string; searchFields: string[]; storeFields: string[]; constructor(browser: CompendiumBrowser); diff --git a/types/src/module/apps/compendium-browser/tabs/data.d.ts b/types/src/module/apps/compendium-browser/tabs/data.d.ts index 4131aef48..d86515a5f 100644 --- a/types/src/module/apps/compendium-browser/tabs/data.d.ts +++ b/types/src/module/apps/compendium-browser/tabs/data.d.ts @@ -7,18 +7,18 @@ import { PhysicalItemTrait } from "@item/physical/data.ts"; import type { SearchResult } from "minisearch"; import { SortDirection } from "../data.ts"; -type CheckboxOptions = Record; +} +type CheckboxOptions = Record; interface CheckboxData { isExpanded: boolean; label: string; options: CheckboxOptions; selected: string[]; } -interface MultiselectData { - label: string; +interface TraitData { conjunction: "and" | "or"; options: { label: string; @@ -39,10 +39,16 @@ interface OrderData { by: string; direction: SortDirection; /** The key must be present as an index key in the database */ - options: Record; + options: Record; + type: "alpha" | "numeric"; } interface RangesInputData { changed: boolean; + defaultMin: string; + defaultMax: string; isExpanded: boolean; values: { min: number; @@ -52,115 +58,91 @@ interface RangesInputData { }; label: string; } -interface SliderData { +interface LevelData { + changed: boolean; isExpanded: boolean; - values: { - lowerLimit: number; - upperLimit: number; - min: number; - max: number; - step: number; - }; - label: string; + min: number; + max: number; + from: number; + to: number; } interface BaseFilterData { order: OrderData; search: { text: string; }; + traits: TraitData; } interface ActionFilters extends BaseFilterData { checkboxes: { types: CheckboxData; category: CheckboxData; - source: CheckboxData; - }; - multiselects: { - traits: MultiselectData; }; + source: CheckboxData; + traits: TraitData; } interface BestiaryFilters extends BaseFilterData { checkboxes: { rarity: CheckboxData; sizes: CheckboxData; - source: CheckboxData; - }; - multiselects: { - traits: MultiselectData; - }; - sliders: { - level: SliderData; }; + source: CheckboxData; + level: LevelData; + traits: TraitData; } interface CampaignFeatureFilters extends BaseFilterData { - checkboxes: Record<"category" | "rarity" | "source", CheckboxData>; - multiselects: { - traits: MultiselectData; - }; - sliders: { - level: SliderData; - }; + checkboxes: Record<"category" | "rarity", CheckboxData>; + level: LevelData; + source: CheckboxData; + traits: TraitData; } interface EquipmentFilters extends BaseFilterData { checkboxes: { armorTypes: CheckboxData; itemTypes: CheckboxData; rarity: CheckboxData; - source: CheckboxData; weaponTypes: CheckboxData; }; - multiselects: { - traits: MultiselectData; - }; ranges: { price: RangesInputData; }; - sliders: { - level: SliderData; - }; + level: LevelData; + source: CheckboxData; + traits: TraitData; } interface FeatFilters extends BaseFilterData { - checkboxes: Record<"category" | "skills" | "rarity" | "source", CheckboxData>; - multiselects: { - traits: MultiselectData; - }; - sliders: { - level: SliderData; - }; + checkboxes: Record<"category" | "skills" | "rarity", CheckboxData>; + level: LevelData; + source: CheckboxData; + traits: TraitData; } interface HazardFilters extends BaseFilterData { checkboxes: { complexity: CheckboxData; rarity: CheckboxData; - source: CheckboxData; - }; - multiselects: { - traits: MultiselectData; - }; - sliders: { - level: SliderData; }; + level: LevelData; + source: CheckboxData; + traits: TraitData; } interface SpellFilters extends BaseFilterData { checkboxes: { category: CheckboxData; rank: CheckboxData; rarity: CheckboxData; - source: CheckboxData; traditions: CheckboxData; }; - multiselects: { - traits: MultiselectData; - }; selects: { timefilter: SelectData; }; + source: CheckboxData; } type BrowserFilter = ActionFilters | BestiaryFilters | CampaignFeatureFilters | EquipmentFilters | FeatFilters | HazardFilters | SpellFilters; +type BrowserFilterData = CheckboxData | LevelData | SelectData | RangesInputData | TraitData; type CompendiumBrowserIndexData = Omit & Partial; interface RenderResultListOptions { list?: HTMLUListElement; start?: number; replace?: boolean; } -export type { ActionFilters, BaseFilterData, BestiaryFilters, BrowserFilter, CampaignFeatureFilters, CheckboxData, CheckboxOptions, CompendiumBrowserIndexData, EquipmentFilters, FeatFilters, HazardFilters, MultiselectData, RangesInputData, RenderResultListOptions, SliderData, SpellFilters, }; +export type { ActionFilters, BaseFilterData, BestiaryFilters, BrowserFilter, BrowserFilterData, CampaignFeatureFilters, CheckboxData, CheckboxOption, CheckboxOptions, CompendiumBrowserIndexData, EquipmentFilters, FeatFilters, HazardFilters, LevelData, RangesInputData, RenderResultListOptions, SelectData, SpellFilters, TraitData, }; diff --git a/types/src/module/apps/compendium-browser/tabs/equipment.d.ts b/types/src/module/apps/compendium-browser/tabs/equipment.d.ts index 3c5020757..aa6fe82c6 100644 --- a/types/src/module/apps/compendium-browser/tabs/equipment.d.ts +++ b/types/src/module/apps/compendium-browser/tabs/equipment.d.ts @@ -1,12 +1,13 @@ +import { CompendiumBrowser } from "../browser.ts"; import { ContentTabName } from "../data.ts"; -import { CompendiumBrowser } from "../index.ts"; -import { CompendiumBrowserTab } from "./base.ts"; +import { CompendiumBrowserTab } from "./base.svelte.ts"; import { CompendiumBrowserIndexData, EquipmentFilters, RangesInputData } from "./data.ts"; + export declare class CompendiumBrowserEquipmentTab extends CompendiumBrowserTab { #private; tabName: ContentTabName; + tabLabel: string; filterData: EquipmentFilters; - templatePath: string; searchFields: string[]; storeFields: string[]; constructor(browser: CompendiumBrowser); diff --git a/types/src/module/apps/compendium-browser/tabs/feat.d.ts b/types/src/module/apps/compendium-browser/tabs/feat.d.ts index 7ff4868ed..aba0f7691 100644 --- a/types/src/module/apps/compendium-browser/tabs/feat.d.ts +++ b/types/src/module/apps/compendium-browser/tabs/feat.d.ts @@ -1,17 +1,18 @@ +import { CompendiumBrowser } from "../browser.ts"; import { ContentTabName } from "../data.ts"; -import { CompendiumBrowser } from "../index.ts"; -import { CompendiumBrowserTab } from "./base.ts"; -import { CompendiumBrowserIndexData, FeatFilters, MultiselectData } from "./data.ts"; +import { CompendiumBrowserTab } from "./base.svelte.ts"; +import { CompendiumBrowserIndexData, FeatFilters, TraitData } from "./data.ts"; + export declare class CompendiumBrowserFeatTab extends CompendiumBrowserTab { #private; tabName: ContentTabName; + tabLabel: string; filterData: FeatFilters; - templatePath: string; searchFields: string[]; storeFields: string[]; constructor(browser: CompendiumBrowser); protected loadData(): Promise; - protected filterTraits(traits: string[], selected: MultiselectData["selected"], condition: MultiselectData["conjunction"]): boolean; + protected filterTraits(traits: string[], selected: TraitData["selected"], condition: TraitData["conjunction"]): boolean; protected filterIndexData(entry: CompendiumBrowserIndexData): boolean; protected prepareFilterData(): FeatFilters; } diff --git a/types/src/module/apps/compendium-browser/tabs/hazard.d.ts b/types/src/module/apps/compendium-browser/tabs/hazard.d.ts index ce009caec..d060e8e4d 100644 --- a/types/src/module/apps/compendium-browser/tabs/hazard.d.ts +++ b/types/src/module/apps/compendium-browser/tabs/hazard.d.ts @@ -1,15 +1,17 @@ +import { CompendiumBrowser } from "../browser.ts"; import { ContentTabName } from "../data.ts"; -import { CompendiumBrowser } from "../index.ts"; -import { CompendiumBrowserTab } from "./base.ts"; +import { CompendiumBrowserTab } from "./base.svelte.ts"; import { CompendiumBrowserIndexData, HazardFilters } from "./data.ts"; + export declare class CompendiumBrowserHazardTab extends CompendiumBrowserTab { tabName: ContentTabName; + tabLabel: string; filterData: HazardFilters; - templatePath: string; searchFields: string[]; storeFields: string[]; protected index: string[]; constructor(browser: CompendiumBrowser); + get isGMOnly(): boolean; protected loadData(): Promise; protected filterIndexData(entry: CompendiumBrowserIndexData): boolean; protected prepareFilterData(): HazardFilters; diff --git a/types/src/module/apps/compendium-browser/tabs/spell.d.ts b/types/src/module/apps/compendium-browser/tabs/spell.d.ts index afe67ff2d..dad5c4290 100644 --- a/types/src/module/apps/compendium-browser/tabs/spell.d.ts +++ b/types/src/module/apps/compendium-browser/tabs/spell.d.ts @@ -1,11 +1,12 @@ +import { CompendiumBrowser } from "../browser.ts"; import { ContentTabName } from "../data.ts"; -import { CompendiumBrowser } from "../index.ts"; -import { CompendiumBrowserTab } from "./base.ts"; +import { CompendiumBrowserTab } from "./base.svelte.ts"; import { CompendiumBrowserIndexData, SpellFilters } from "./data.ts"; + export declare class CompendiumBrowserSpellTab extends CompendiumBrowserTab { tabName: ContentTabName; + tabLabel: string; filterData: SpellFilters; - templatePath: string; searchFields: string[]; storeFields: string[]; constructor(browser: CompendiumBrowser); diff --git a/types/src/module/apps/sidebar/encounter-tracker.d.ts b/types/src/module/apps/sidebar/encounter-tracker.d.ts index c9c8d79fd..c859ccc24 100644 --- a/types/src/module/apps/sidebar/encounter-tracker.d.ts +++ b/types/src/module/apps/sidebar/encounter-tracker.d.ts @@ -3,11 +3,9 @@ /// import type { CombatantPF2e, EncounterPF2e } from "@module/encounter/index.ts"; import type { TokenDocumentPF2e } from "@scene/index.ts"; -import Sortable from "sortablejs"; export declare class EncounterTrackerPF2e extends CombatTracker { #private; - sortable: Sortable; /** Show encounter analysis data if obtainable */ protected _renderInner(data: object, options: RenderOptions): Promise; /** Make the combatants sortable */ @@ -20,12 +18,4 @@ export declare class EncounterTrackerPF2e): Promise; /** Replace parent method with system-specific procedure */ protected _onToggleDefeatedStatus(combatant: CombatantPF2e): Promise; - private setInitiativeFromDrop; - /** Save the new order, or reset the viewed order if no change was made */ - private saveNewOrder; - /** Adjust the final order of combatants if necessary, keeping unrolled combatants at the bottom */ - private adjustFinalOrder; - private validateDrop; - /** Retrieve the (rolled) combatants in the real-time order as seen in the DOM */ - private getCombatantsFromDOM; } diff --git a/types/src/module/canvas/ruler.d.ts b/types/src/module/canvas/ruler.d.ts index 1128b19a5..ce7708442 100644 --- a/types/src/module/canvas/ruler.d.ts +++ b/types/src/module/canvas/ruler.d.ts @@ -5,13 +5,16 @@ declare class RulerPF2e exte #private; static get canMeasure(): boolean; static get hasModuleConflict(): boolean; + /** Whether drag measurement is currently in progress */ + isDragMeasuring: boolean; + /** Whether drag measurement is enabled */ get dragMeasurement(): boolean; get isMeasuring(): boolean; /** Add a waypoint at the currently-drawn destination. */ saveWaypoint(): void; startDragMeasurement(event: TokenPointerEvent>): void; /** - * @param [exactDestination] The coordinates of the dragged token preview, if any + * @param exactDestination?: The coordinates of the dragged token preview, if any */ finishDragMeasurement(event: TokenPointerEvent>, exactDestination?: Point | null): Promise; /** Acquire the token's footprint for drag measurement. */ @@ -39,6 +42,7 @@ declare class RulerPF2e exte protected _animateSegment(token: TToken, segment: RulerMeasurementSegment, destination: Point): Promise; /** If measuring with a token, broadcast if the token is not hidden and only during encounters. */ protected _broadcastMeasurement(): void; + protected _endMeasurement(): void; /** Prevent behavior from keybind modifiers if token drag measurement is enabled. */ _onMouseUp(event: PlaceablesLayerPointerEvent>): void; /** Prevent behavior from movement keys (typically Space) if token drag measurement is enabled. */ diff --git a/types/src/module/chat-message/data.d.ts b/types/src/module/chat-message/data.d.ts index dffe76c89..de9f777d2 100644 --- a/types/src/module/chat-message/data.d.ts +++ b/types/src/module/chat-message/data.d.ts @@ -7,6 +7,7 @@ import { CheckCheckContext } from "@system/check/index.ts"; import { DamageDamageContext } from "@system/damage/types.ts"; import { DegreeAdjustmentsRecord, DegreeOfSuccessString } from "@system/degree-of-success.ts"; import type { ChatMessageFlags } from "types/foundry/common/documents/chat-message.d.ts"; + type ChatMessageSourcePF2e = foundry.documents.ChatMessageSource & { flags: ChatMessageFlagsPF2e; }; @@ -61,6 +62,9 @@ interface ActorTokenFlag { token?: TokenDocumentUUID; } type ContextFlagOmission = "actor" | "action" | "altUsage" | "createMessage" | "damaging" | "dosAdjustments" | "item" | "mapIncreases" | "notes" | "options" | "origin" | "range" | "target" | "token"; +interface ContextualRollOptions { + postRoll?: string[]; +} interface CheckContextChatFlag extends Required> { actor: string | null; token: string | null; @@ -72,6 +76,7 @@ interface CheckContextChatFlag extends Required> { actor: string | null; @@ -81,6 +86,7 @@ interface DamageDamageContextFlag extends Required import { RawDamageDice, RawModifier } from "@actor/modifiers.ts"; import type { ChatContextFlag, ChatMessagePF2e } from "./index.ts"; + declare class RollInspector extends Application { message: ChatMessagePF2e; constructor(message: ChatMessagePF2e, options?: Partial); @@ -20,6 +21,10 @@ interface ChatRollDetailsData { modifiers: PreparedModifier[]; dice: PreparedDice[]; rollOptions: string[]; + contextualOptions: { + header: string; + options: string[]; + }[]; } interface PreparedModifier extends Omit, "critical"> { value: string; diff --git a/types/src/module/data.d.ts b/types/src/module/data.d.ts index 23b01c67f..5e2da480b 100644 --- a/types/src/module/data.d.ts +++ b/types/src/module/data.d.ts @@ -1,5 +1,7 @@ import type { ActorPF2e } from "@actor"; import type { ItemPF2e } from "@item"; +import type * as fields from "types/foundry/common/data/fields.d.ts"; + /** The size property of creatures and equipment */ declare const SIZES: readonly ["tiny", "sm", "med", "lg", "huge", "grg"]; declare const SIZE_SLUGS: readonly ["tiny", "small", "medium", "large", "huge", "gargantuan"]; @@ -10,17 +12,13 @@ type Rarity = (typeof RARITIES)[number]; interface ValuesList { value: T[]; } -/** Generic { value, label, type } type used in various places in actor/items types. */ -interface LabeledValue { +interface LabeledValueAndMax extends ValueAndMax { label: string; - value: number | string; - type: string; -} -interface LabeledString extends LabeledValue { - value: string; } -interface LabeledNumber extends LabeledValue { +interface LabeledNumber { + label: string; value: number; + type: string; } interface TypeAndValue { type: TType; @@ -56,14 +54,23 @@ interface NewDocumentMigrationRecord { version: null; previous: null; } -interface MigratedDocumentMigrationRecord { - version: number | null; - previous: { - schema: number | null; +type MigrationDataField = fields.SchemaField<{ + version: fields.NumberField; + previous: fields.SchemaField<{ + foundry: fields.StringField; + system: fields.StringField; + schema: fields.NumberField; + }, { + foundry: string | null; system: string | null; + schema: number | null; + }, { foundry: string | null; - } | null; -} + system: string | null; + schema: number | null; + }, true, true, true>; +}>; +type MigratedDocumentMigrationRecord = fields.SourcePropFromDataField; type MigrationRecord = NewDocumentMigrationRecord | MigratedDocumentMigrationRecord; interface PublicationData { title: string; @@ -75,4 +82,4 @@ export declare const PROFICIENCY_RANKS: readonly ["untrained", "trained", "exper export declare const MATH_FUNCTION_NAMES: Set; type EnfolderableDocumentPF2e = ActorPF2e | ItemPF2e | Exclude | Item>; export { RARITIES, SIZES, SIZE_SLUGS, goesToEleven }; -export type { EnfolderableDocumentPF2e, LabeledNumber, LabeledString, LabeledValue, MigrationRecord, OneToFive, OneToFour, OneToSix, OneToTen, OneToThree, PublicationData, Rarity, Size, TraitsWithRarity, TwoToThree, TypeAndValue, ValueAndMax, ValueAndMaybeMax, ValuesList, ZeroToEleven, ZeroToFive, ZeroToFour, ZeroToSix, ZeroToTen, ZeroToThree, ZeroToTwo, }; +export type { EnfolderableDocumentPF2e, LabeledNumber, LabeledValueAndMax, MigrationDataField, MigrationRecord, OneToFive, OneToFour, OneToSix, OneToTen, OneToThree, PublicationData, Rarity, Size, TraitsWithRarity, TwoToThree, TypeAndValue, ValueAndMax, ValueAndMaybeMax, ValuesList, ZeroToEleven, ZeroToFive, ZeroToFour, ZeroToSix, ZeroToTen, ZeroToThree, ZeroToTwo, }; diff --git a/types/src/module/encounter/document.d.ts b/types/src/module/encounter/document.d.ts index 78db016cc..2cf96684e 100644 --- a/types/src/module/encounter/document.d.ts +++ b/types/src/module/encounter/document.d.ts @@ -41,11 +41,6 @@ declare class EncounterPF2e extends Combat { protected _onUpdate(changed: DeepPartial, operation: DatabaseUpdateOperation, userId: string): void; /** Disable the initiative link on PC sheets if this was the only encounter */ protected _onDelete(operation: DatabaseDeleteOperation, userId: string): void; - /** - * Work around upstream issue present throughout V11 - * https://github.com/foundryvtt/foundryvtt/issues/9718 - */ - protected _manageTurnEvents(adjustedTurn?: number): Promise; } interface EncounterPF2e extends Combat { readonly combatants: foundry.abstract.EmbeddedCollection>; diff --git a/types/src/module/item/ability/data.d.ts b/types/src/module/item/ability/data.d.ts index 837941e8c..40e63f83d 100644 --- a/types/src/module/item/ability/data.d.ts +++ b/types/src/module/item/ability/data.d.ts @@ -1,4 +1,4 @@ -import { ItemSystemModel, ItemSystemSchema } from "@item/base/data/schema.ts"; +import { ItemSystemModel, ItemSystemSchema } from "@item/base/data/model.ts"; import type { ActionType, BaseItemSourcePF2e, FrequencyInterval, ItemSystemSource } from "@item/base/data/system.ts"; import type { OneToThree } from "@module/data.ts"; import { SlugField } from "@system/schema-data-fields.ts"; diff --git a/types/src/module/item/ability/document.d.ts b/types/src/module/item/ability/document.d.ts index a13760cf9..29f7a93f4 100644 --- a/types/src/module/item/ability/document.d.ts +++ b/types/src/module/item/ability/document.d.ts @@ -1,4 +1,5 @@ import type { ActorPF2e } from "@actor"; +import type { CraftingAbility } from "@actor/character/crafting/ability.ts"; import { ItemPF2e } from "@item"; import type { ActionCost, Frequency, RawItemChatData } from "@item/base/data/index.ts"; import type { RangeData } from "@item/types.ts"; @@ -9,10 +10,13 @@ import type { AbilityTrait } from "./types.ts"; declare class AbilityItemPF2e extends ItemPF2e { range?: RangeData | null; isMelee?: boolean; + /** If this ability can craft, what is the crafting ability */ + crafting?: CraftingAbility | null; static get validTraits(): Record; get traits(): Set; get actionCost(): ActionCost | null; get frequency(): Frequency | null; + prepareBaseData(): void; prepareActorData(): void; onPrepareSynthetics(this: AbilityItemPF2e): void; getRollOptions(prefix?: string, options?: { diff --git a/types/src/module/item/ability/helpers.d.ts b/types/src/module/item/ability/helpers.d.ts index eeca2c8fe..2750b8714 100644 --- a/types/src/module/item/ability/helpers.d.ts +++ b/types/src/module/item/ability/helpers.d.ts @@ -31,8 +31,8 @@ interface SelfEffectSheetReference extends SelfEffectReference { type: string | null; pack: string | null; } -/** Save data from an effect item dropped on an ability or feat sheet. */ -declare function handleSelfEffectDrop(sheet: AbilitySheetPF2e | FeatSheetPF2e, event: DragEvent): Promise; +/** Save data from an effect item dropped on an ability or feat sheet. Returns true if handled */ +declare function handleSelfEffectDrop(sheet: AbilitySheetPF2e | FeatSheetPF2e, item: ItemPF2e): Promise; declare function createActionRangeLabel(range: Maybe): string | null; /** Add the holy/unholy trait to sanctified actions and spells if the owning actor is also holy/unholy */ declare function processSanctification(item: AbilityItemPF2e | FeatPF2e | SpellPF2e): void; diff --git a/types/src/module/item/armor/data.d.ts b/types/src/module/item/armor/data.d.ts index 703fe2ce2..c35f2530b 100644 --- a/types/src/module/item/armor/data.d.ts +++ b/types/src/module/item/armor/data.d.ts @@ -1,8 +1,16 @@ import { PhysicalItemSource } from "@item/base/data/index.ts"; -import { BasePhysicalItemSource, Investable, ItemMaterialSource, PhysicalItemTraits, PhysicalSystemData, PhysicalSystemSource } from "@item/physical/data.ts"; +import { + BasePhysicalItemSource, + Investable, + ItemMaterialSource, + PhysicalItemTraits, + PhysicalSystemData, + PhysicalSystemSource, +} from "@item/physical/data.ts"; import { WornUsage } from "@item/physical/usage.ts"; -import { ZeroToFour, ZeroToThree } from "@module/data.ts"; +import { ZeroToFour } from "@module/data.ts"; import { ArmorCategory, ArmorGroup, ArmorPropertyRuneType, ArmorTrait, BaseArmorType, OtherArmorTag } from "./index.ts"; + type ArmorSource = BasePhysicalItemSource<"armor", ArmorSystemSource>; interface ArmorSystemSource extends Investable { traits: ArmorTraits; @@ -24,7 +32,7 @@ interface ArmorSystemSource extends Investable { } type ArmorRuneSource = { potency: ZeroToFour; - resilient: ZeroToThree; + resilient: ZeroToFour; property: ArmorPropertyRuneType[]; }; /** A weapon can either be unspecific or specific along with baseline material and runes */ diff --git a/types/src/module/item/armor/types.d.ts b/types/src/module/item/armor/types.d.ts index 8d8846443..4044d7025 100644 --- a/types/src/module/item/armor/types.d.ts +++ b/types/src/module/item/armor/types.d.ts @@ -1,9 +1,10 @@ import type { ARMOR_CATEGORIES, ARMOR_GROUPS, ARMOR_PROPERTY_RUNE_TYPES } from "./values.ts"; + type ArmorCategory = (typeof ARMOR_CATEGORIES)[number]; type ArmorGroup = (typeof ARMOR_GROUPS)[number]; type ArmorPropertyRuneType = SetElement; type ArmorTrait = keyof typeof CONFIG.PF2E.armorTraits; type BaseArmorType = keyof typeof CONFIG.PF2E.baseArmorTypes; type OtherArmorTag = "shoddy"; -type ResilientRuneType = "" | "resilient" | "greaterResilient" | "majorResilient"; +type ResilientRuneType = "" | "resilient" | "greaterResilient" | "majorResilient" | "mythicResilient"; export type { ArmorCategory, ArmorGroup, ArmorPropertyRuneType, ArmorTrait, BaseArmorType, OtherArmorTag, ResilientRuneType, }; diff --git a/types/src/module/item/base/data/index.d.ts b/types/src/module/item/base/data/index.d.ts index 5709d2b70..64dc6697c 100644 --- a/types/src/module/item/base/data/index.d.ts +++ b/types/src/module/item/base/data/index.d.ts @@ -23,8 +23,9 @@ import type { SpellSource } from "@item/spell/data.ts"; import type { SpellcastingEntrySource } from "@item/spellcasting-entry/data.ts"; import type { TreasureSource } from "@item/treasure/data.ts"; import type { WeaponSource } from "@item/weapon/data.ts"; -import type { PROFICIENCY_RANKS } from "@module/data.ts"; +import type { PROFICIENCY_RANKS, Rarity } from "@module/data.ts"; import { ItemDescriptionData } from "./system.ts"; + type ProficiencyRank = (typeof PROFICIENCY_RANKS)[number]; type NonPhysicalItemType = "action" | "affliction" | "ancestry" | "background" | "campaignFeature" | "class" | "condition" | "deity" | "effect" | "feat" | "heritage" | "kit" | "lore" | "melee" | "spell" | "spellcastingEntry"; type ItemType = NonPhysicalItemType | PhysicalItemType; @@ -34,6 +35,11 @@ type MagicItemSource = Exclude extends foundry.abstract .TypeDataModel { @@ -35,21 +35,6 @@ type ItemSystemSchema = { traits: SchemaField<{ otherTags: ArrayField, string[], string[], true, false, true>; }>; - _migration: SchemaField<{ - version: NumberField; - previous: SchemaField<{ - foundry: StringField; - system: StringField; - schema: NumberField; - }, { - foundry: string | null; - system: string | null; - schema: number | null; - }, { - foundry: string | null; - system: string | null; - schema: number | null; - }, true, true, true>; - }>; + _migration: MigrationDataField; }; export { ItemSystemModel, type ItemSystemSchema }; diff --git a/types/src/module/item/base/data/system.d.ts b/types/src/module/item/base/data/system.d.ts index ae4f6d731..1513d50d0 100644 --- a/types/src/module/item/base/data/system.d.ts +++ b/types/src/module/item/base/data/system.d.ts @@ -34,7 +34,7 @@ interface OtherTagsOnly { interface ItemFlagsPF2e extends DocumentFlags { pf2e: { rulesSelections: Record; - itemGrants: Record; + itemGrants: Record; grantedBy: ItemGrantData | null; [key: string]: unknown; }; @@ -42,18 +42,24 @@ interface ItemFlagsPF2e extends DocumentFlags { interface ItemSourceFlagsPF2e extends DocumentFlags { pf2e?: { rulesSelections?: Record; - itemGrants?: Record; + itemGrants?: Record; grantedBy?: ItemGrantSource | null; [key: string]: unknown; }; } -type ItemGrantData = Required; interface ItemGrantSource { /** The ID of a granting or granted item */ id: string; /** The action taken when the user attempts to delete the item referenced by `id` */ onDelete?: ItemGrantDeleteAction; } +type ItemGrantData = Required; +interface ItemGranterSource extends ItemGrantSource { + /** Is this granted item visually nested under its granter: only applies to feats and features */ + nested?: boolean | null; +} +interface ItemGranterData extends Required { +} type ItemGrantDeleteAction = "cascade" | "detach" | "restrict"; type ItemSystemSource = { level?: { @@ -105,4 +111,4 @@ type ItemSchemaPF2e = Omit & { interface Frequency extends FrequencySource { value: number; } -export type { ActionCost, ActionType, BaseItemSourcePF2e, Frequency, FrequencyInterval, FrequencySource, ItemDescriptionData, ItemFlagsPF2e, ItemGrantData, ItemGrantDeleteAction, ItemGrantSource, ItemSchemaPF2e, ItemSystemData, ItemSystemSource, ItemTrait, ItemTraits, ItemTraitsNoRarity, OtherTagsOnly, RarityTraitAndOtherTags, }; +export type { ActionCost, ActionType, BaseItemSourcePF2e, Frequency, FrequencyInterval, FrequencySource, ItemDescriptionData, ItemFlagsPF2e, ItemGrantData, ItemGrantDeleteAction, ItemGrantSource, ItemSchemaPF2e, ItemSourceFlagsPF2e, ItemSystemData, ItemSystemSource, ItemTrait, ItemTraits, ItemTraitsNoRarity, OtherTagsOnly, RarityTraitAndOtherTags, }; diff --git a/types/src/module/item/base/document.d.ts b/types/src/module/item/base/document.d.ts index fb87b5a35..f2706cb4e 100644 --- a/types/src/module/item/base/document.d.ts +++ b/types/src/module/item/base/document.d.ts @@ -88,7 +88,7 @@ declare class ItemPF2e exte */ protected processChatData(htmlOptions: EnrichmentOptionsPF2e | undefined, chatData: RawItemChatData): Promise; getChatData(htmlOptions?: EnrichmentOptionsPF2e, _rollOptions?: Record): Promise; - protected traitChatData(dictionary?: Record, traits?: ItemTrait[]): TraitChatData[]; + traitChatData(dictionary?: Record, traits?: ItemTrait[]): TraitChatData[]; /** Don't allow the user to create a condition or spellcasting entry from the sidebar. */ static createDialog(this: ConstructorOf, data?: Record, context?: { parent?: TDocument["parent"]; diff --git a/types/src/module/item/base/sheet/rule-element-form/flat-modifier.d.ts b/types/src/module/item/base/sheet/rule-element-form/flat-modifier.d.ts index f19f85526..781173608 100644 --- a/types/src/module/item/base/sheet/rule-element-form/flat-modifier.d.ts +++ b/types/src/module/item/base/sheet/rule-element-form/flat-modifier.d.ts @@ -1,6 +1,8 @@ import { ModifierType } from "@actor/modifiers.ts"; import type { FlatModifierRuleElement, FlatModifierSource } from "@module/rules/rule-element/flat-modifier.ts"; +import type { DamageCategoryUnique } from "@system/damage/types.ts"; import { RuleElementForm, RuleElementFormSheetData } from "./base.ts"; + /** Form handler for the flat modifier rule element */ declare class FlatModifierForm extends RuleElementForm { template: string; @@ -11,9 +13,9 @@ declare class FlatModifierForm extends RuleElementForm { selectorIsArray: boolean; - abilities: ConfigPF2e["PF2E"]["abilities"]; + abilities: typeof CONFIG.PF2E.abilities; types: Record; - damageCategories: Pick; + damageCategories: Record; isDamage: boolean; criticalOptions: FormSelectOption[]; } diff --git a/types/src/module/item/base/sheet/sheet.d.ts b/types/src/module/item/base/sheet/sheet.d.ts index 27adb93ec..4c4955645 100644 --- a/types/src/module/item/base/sheet/sheet.d.ts +++ b/types/src/module/item/base/sheet/sheet.d.ts @@ -1,7 +1,7 @@ /// /// /// -import type { ItemPF2e } from "@item"; +import { ItemPF2e } from "@item"; import { Rarity } from "@module/data.ts"; import { RuleElementSource } from "@module/rules/index.ts"; import { SheetOptions, TagifyEntry } from "@module/sheet/helpers.ts"; diff --git a/types/src/module/item/class/document.d.ts b/types/src/module/item/class/document.d.ts index d85791da8..bbd55ec62 100644 --- a/types/src/module/item/class/document.d.ts +++ b/types/src/module/item/class/document.d.ts @@ -1,5 +1,5 @@ import type { ActorPF2e, CharacterPF2e } from "@actor"; -import type { FeatSlotCreationData } from "@actor/character/feats/index.ts"; +import type { FeatSlotData } from "@actor/character/feats/index.ts"; import { SaveType } from "@actor/types.ts"; import { ABCItemPF2e, FeatPF2e } from "@item"; import { ZeroToFour } from "@module/data.ts"; @@ -12,7 +12,7 @@ declare class ClassPF2e ext get hpPerLevel(): number; get perception(): ZeroToFour; get savingThrows(): Record; - get grantedFeatSlots(): Record<"ancestry" | "class" | "skill" | "general", (number | FeatSlotCreationData)[]>; + get grantedFeatSlots(): Record<"ancestry" | "class" | "skill" | "general", (number | FeatSlotData)[]>; /** Include all top-level class features in addition to any with the expected location ID */ getLinkedItems(): FeatPF2e[]; /** Pulls the features that should be granted by this class, sorted by level */ diff --git a/types/src/module/item/class/values.d.ts b/types/src/module/item/class/values.d.ts index 502d44f8d..7ddb2e13d 100644 --- a/types/src/module/item/class/values.d.ts +++ b/types/src/module/item/class/values.d.ts @@ -2,4 +2,4 @@ * Classes don't have traits other than rarities, but both feats, spells, and other items can have traits corresponding * with a class */ -export declare const CLASS_TRAITS: Set<"alchemist" | "barbarian" | "bard" | "champion" | "cleric" | "druid" | "fighter" | "gunslinger" | "kineticist" | "inventor" | "investigator" | "magus" | "monk" | "oracle" | "psychic" | "ranger" | "rogue" | "sorcerer" | "summoner" | "swashbuckler" | "thaumaturge" | "witch" | "wizard">; +export declare const CLASS_TRAITS: Set<"alchemist" | "animist" | "barbarian" | "bard" | "champion" | "cleric" | "druid" | "exemplar" | "fighter" | "gunslinger" | "kineticist" | "inventor" | "investigator" | "magus" | "monk" | "oracle" | "psychic" | "ranger" | "rogue" | "sorcerer" | "summoner" | "swashbuckler" | "thaumaturge" | "witch" | "wizard">; diff --git a/types/src/module/item/consumable/types.d.ts b/types/src/module/item/consumable/types.d.ts index 1c9c44bc6..a8f7a1777 100644 --- a/types/src/module/item/consumable/types.d.ts +++ b/types/src/module/item/consumable/types.d.ts @@ -1,6 +1,7 @@ import type { AMMO_STACK_GROUPS, CONSUMABLE_CATEGORIES } from "./values.ts"; + type AmmoStackGroup = SetElement; type ConsumableCategory = SetElement; type ConsumableTrait = keyof typeof CONFIG.PF2E.consumableTraits; -type OtherConsumableTag = "herbal"; +type OtherConsumableTag = "alchemical-food" | "alchemical-tool" | "herbal"; export type { AmmoStackGroup, ConsumableCategory, ConsumableTrait, OtherConsumableTag }; diff --git a/types/src/module/item/deity/data.d.ts b/types/src/module/item/deity/data.d.ts index 6329fe29c..6485aeb48 100644 --- a/types/src/module/item/deity/data.d.ts +++ b/types/src/module/item/deity/data.d.ts @@ -1,11 +1,11 @@ -import { SkillSlug } from "@actor/types.ts"; -import { AttributeString } from "@actor/types.ts"; +import { AttributeString, SkillSlug } from "@actor/types.ts"; import { BaseItemSourcePF2e, ItemSystemData, ItemSystemSource, OtherTagsOnly } from "@item/base/data/system.ts"; import { BaseWeaponType } from "@item/weapon/types.ts"; import { DeityDomain, Sanctification } from "./types.ts"; + type DeitySource = BaseItemSourcePF2e<"deity", DeitySystemSource>; type DeitySystemSource = ItemSystemSource & { - category: "deity" | "pantheon" | "philosophy"; + category: DeityCategory; sanctification: DeitySanctification | null; domains: { primary: DeityDomain[]; @@ -19,6 +19,7 @@ type DeitySystemSource = ItemSystemSource & { level?: never; traits: OtherTagsOnly; }; +type DeityCategory = "deity" | "pantheon" | "covenant" | "philosophy"; type DeitySanctification = { modal: "can" | "must"; what: Sanctification[]; @@ -26,4 +27,4 @@ type DeitySanctification = { type DivineFonts = ["harm"] | ["heal"] | ["harm", "heal"] | never[]; interface DeitySystemData extends Omit, Omit { } -export type { DeitySanctification, DeitySource, DeitySystemData, DeitySystemSource }; +export type { DeityCategory, DeitySanctification, DeitySource, DeitySystemData, DeitySystemSource }; diff --git a/types/src/module/item/deity/document.d.ts b/types/src/module/item/deity/document.d.ts index 8c36513a4..2f84846a8 100644 --- a/types/src/module/item/deity/document.d.ts +++ b/types/src/module/item/deity/document.d.ts @@ -1,9 +1,10 @@ import type { ActorPF2e } from "@actor"; import { ItemPF2e } from "@item"; import { BaseWeaponType } from "@item/weapon/types.ts"; -import { DeitySource, DeitySystemData } from "./data.ts"; +import { DeityCategory, DeitySource, DeitySystemData } from "./data.ts"; + declare class DeityPF2e extends ItemPF2e { - get category(): "deity" | "pantheon" | "philosophy"; + get category(): DeityCategory; get favoredWeapons(): BaseWeaponType[]; prepareBaseData(): void; prepareActorData(this: DeityPF2e): void; diff --git a/types/src/module/item/feat/data.d.ts b/types/src/module/item/feat/data.d.ts index 0cee95265..f09f7ce18 100644 --- a/types/src/module/item/feat/data.d.ts +++ b/types/src/module/item/feat/data.d.ts @@ -3,11 +3,20 @@ import type { AttributeString, SaveType } from "@actor/types.ts"; import type { SelfEffectReference, SelfEffectReferenceSource } from "@item/ability/index.ts"; import type { AbilityTraitToggles } from "@item/ability/trait-toggles.ts"; import type { ArmorCategory } from "@item/armor/types.ts"; -import type { ActionType, BaseItemSourcePF2e, Frequency, FrequencySource, ItemSystemData, ItemSystemSource, ItemTraits } from "@item/base/data/system.ts"; +import type { + ActionType, + BaseItemSourcePF2e, + Frequency, + FrequencySource, + ItemSystemData, + ItemSystemSource, + ItemTraits, +} from "@item/base/data/system.ts"; import type { ClassTrait } from "@item/class/types.ts"; import type { WeaponCategory } from "@item/weapon/types.ts"; import type { OneToFour, OneToThree } from "@module/data.ts"; import type { FeatOrFeatureCategory, FeatTrait } from "./types.ts"; + type FeatSource = BaseItemSourcePF2e<"feat", FeatSystemSource>; interface PrerequisiteTagData { value: string; @@ -74,6 +83,7 @@ interface FeatSubfeatures { senses: { [K in SenseType]?: SenseSubfeature; }; + suppressedFeatures: ItemUUID[]; } interface LanguagesSubfeature { /** A number of open slots fillable with any language */ diff --git a/types/src/module/item/feat/document.d.ts b/types/src/module/item/feat/document.d.ts index d49348a85..98c49541d 100644 --- a/types/src/module/item/feat/document.d.ts +++ b/types/src/module/item/feat/document.d.ts @@ -1,8 +1,10 @@ import type { ActorPF2e } from "@actor"; +import type { CraftingAbility } from "@actor/character/crafting/ability.ts"; import type { FeatGroup } from "@actor/character/feats/index.ts"; import { type HeritagePF2e, ItemPF2e } from "@item"; import { ActionCost, Frequency, RawItemChatData } from "@item/base/data/index.ts"; import { Rarity } from "@module/data.ts"; +import { RuleElementOptions, RuleElementPF2e } from "@module/rules/index.ts"; import type { UserPF2e } from "@module/user/index.ts"; import { FeatSource, FeatSystemData } from "./data.ts"; import { FeatOrFeatureCategory, FeatTrait } from "./types.ts"; @@ -10,6 +12,10 @@ import { FeatOrFeatureCategory, FeatTrait } from "./types.ts"; declare class FeatPF2e extends ItemPF2e { group: FeatGroup | null; grants: (FeatPF2e | HeritagePF2e)[]; + /** If this ability can craft, what is the crafting ability */ + crafting: CraftingAbility | null; + /** If suppressed, this feature should not be assigned to any feat category nor create rule elements */ + suppressed: boolean; static get validTraits(): Record; get category(): FeatOrFeatureCategory; get level(): number; @@ -23,20 +29,26 @@ declare class FeatPF2e exte get onlyLevel1(): boolean; /** The maximum number of times this feat can be taken */ get maxTakable(): number; + /** Returns the number of times this feat was taken, limited by maxTakable */ + get timesTaken(): number; prepareBaseData(): void; prepareActorData(): void; + /** Assigns the grants of this item based on the given item. */ + establishHierarchy(): void; prepareSiblingData(): void; onPrepareSynthetics(this: FeatPF2e): void; + /** Overriden to not create rule elements when suppressed */ + prepareRuleElements(options?: Omit): RuleElementPF2e[]; getChatData(this: FeatPF2e, htmlOptions?: EnrichmentOptions): Promise; /** Generate a list of strings for use in predication */ getRollOptions(prefix?: string, options?: { includeGranter?: boolean; }): string[]; + protected embedHTMLString(_config: DocumentHTMLEmbedConfig, _options: EnrichmentOptions): string; protected _preCreate(data: this["_source"], operation: DatabaseCreateOperation, user: UserPF2e): Promise; protected _preUpdate(changed: DeepPartial, operation: DatabaseUpdateOperation, user: UserPF2e): Promise; /** Warn the owning user(s) if this feat was taken despite some restriction */ protected _onCreate(data: FeatSource, operation: DatabaseCreateOperation, userId: string): void; - protected embedHTMLString(_config: DocumentHTMLEmbedConfig, _options: EnrichmentOptions): string; } interface FeatPF2e extends ItemPF2e { readonly _source: FeatSource; diff --git a/types/src/module/item/feat/helpers.d.ts b/types/src/module/item/feat/helpers.d.ts index ceb0528c3..09def32e8 100644 --- a/types/src/module/item/feat/helpers.d.ts +++ b/types/src/module/item/feat/helpers.d.ts @@ -1,8 +1,11 @@ import type { FeatPF2e } from "./document.ts"; + /** * Whether a feat item can have key ability options * The item must be a level-1 class feature that is either not (RE-)granted or is granted by another class feature. It * must also only have at most a single trait (assumed to be that of the class) */ declare function featCanHaveKeyOptions(feat: FeatPF2e): boolean; -export { featCanHaveKeyOptions }; +/** Recursively suppresses a feat and its granted feats */ +declare function suppressFeats(feats: FeatPF2e[]): void; +export { featCanHaveKeyOptions, suppressFeats }; diff --git a/types/src/module/item/feat/sheet.d.ts b/types/src/module/item/feat/sheet.d.ts index 96031c463..cf30eb81e 100644 --- a/types/src/module/item/feat/sheet.d.ts +++ b/types/src/module/item/feat/sheet.d.ts @@ -6,6 +6,7 @@ import { SelfEffectReference } from "@item/ability/index.ts"; import { ItemSheetDataPF2e, ItemSheetOptions, ItemSheetPF2e } from "@item/base/sheet/sheet.ts"; import type { FeatPF2e } from "@item/feat/document.ts"; import { OneToFour } from "@module/data.ts"; + declare class FeatSheetPF2e extends ItemSheetPF2e { #private; static get defaultOptions(): ItemSheetOptions; @@ -35,6 +36,11 @@ interface FeatSheetData extends ItemSheetDataPF2e { selfEffect: SelfEffectReference | null; senses: SenseOption[]; showPrerequisites: boolean; + suppressedFeatures: { + uuid: string; + name: string; + img: string; + }[]; } interface LanguageOptions { slots: number; diff --git a/types/src/module/item/feat/values.d.ts b/types/src/module/item/feat/values.d.ts index df144e0ec..ecdcc7def 100644 --- a/types/src/module/item/feat/values.d.ts +++ b/types/src/module/item/feat/values.d.ts @@ -1,4 +1,4 @@ declare const FEAT_CATEGORIES: Set<"class" | "general" | "skill" | "ancestry" | "bonus">; -declare const FEATURE_CATEGORIES: Set<"curse" | "ancestryfeature" | "classfeature" | "deityboon" | "pfsboon">; +declare const FEATURE_CATEGORIES: Set<"curse" | "calling" | "ancestryfeature" | "classfeature" | "deityboon" | "pfsboon">; declare const FEAT_OR_FEATURE_CATEGORIES: Set | SetElement>; -export { FEAT_OR_FEATURE_CATEGORIES, FEAT_CATEGORIES, FEATURE_CATEGORIES }; +export { FEATURE_CATEGORIES, FEAT_CATEGORIES, FEAT_OR_FEATURE_CATEGORIES }; diff --git a/types/src/module/item/identification.d.ts b/types/src/module/item/identification.d.ts index 845a35f54..3ad64f513 100644 --- a/types/src/module/item/identification.d.ts +++ b/types/src/module/item/identification.d.ts @@ -1,18 +1,16 @@ import { SkillSlug } from "@actor/types.ts"; import { DCOptions } from "../dc.ts"; import type { PhysicalItemPF2e } from "./physical/index.ts"; + type MagicSkill = Extract; type IdentifyMagicDCs = Record; type IdentifyAlchemyDCs = { crafting: number; }; -type GenericIdentifyDCs = { - dc: number; -}; interface IdentifyItemOptions extends DCOptions { notMatchingTraditionModifier: number; } -declare function getItemIdentificationDCs(item: PhysicalItemPF2e, { pwol, notMatchingTraditionModifier }: IdentifyItemOptions): GenericIdentifyDCs | IdentifyMagicDCs | IdentifyAlchemyDCs; +declare function getItemIdentificationDCs(item: PhysicalItemPF2e, { pwol, notMatchingTraditionModifier }: IdentifyItemOptions): IdentifyMagicDCs | IdentifyAlchemyDCs; declare function getUnidentifiedPlaceholderImage(item: PhysicalItemPF2e): string; export { getItemIdentificationDCs, getUnidentifiedPlaceholderImage }; -export type { GenericIdentifyDCs, IdentifyAlchemyDCs, IdentifyMagicDCs }; +export type { IdentifyAlchemyDCs, IdentifyMagicDCs }; diff --git a/types/src/module/item/kit/data.d.ts b/types/src/module/item/kit/data.d.ts index 25f07b0a5..fbdb3acd3 100644 --- a/types/src/module/item/kit/data.d.ts +++ b/types/src/module/item/kit/data.d.ts @@ -1,10 +1,11 @@ import type { KitPF2e } from "@item"; -import { ItemSystemModel, ItemSystemSchema } from "@item/base/data/schema.ts"; +import { ItemSystemModel, ItemSystemSchema } from "@item/base/data/model.ts"; import type { BaseItemSourcePF2e, ItemSystemSource } from "@item/base/data/system.ts"; import type { ClassTrait } from "@item/class/types.ts"; import { PriceField } from "@item/physical/schema.ts"; import { NullField, RecordField, SlugField } from "@system/schema-data-fields.ts"; import fields = foundry.data.fields; + declare class KitEntriesField extends RecordField, fields.SchemaField, true, false, true, true> { /** * @param depth The recursion depth of this field:must be between 0 and 2 diff --git a/types/src/module/item/melee/data.d.ts b/types/src/module/item/melee/data.d.ts index 64f24eb1c..355e69770 100644 --- a/types/src/module/item/melee/data.d.ts +++ b/types/src/module/item/melee/data.d.ts @@ -1,12 +1,18 @@ import type { MeleePF2e } from "@item"; -import { ItemSystemModel, ItemSystemSchema } from "@item/base/data/schema.ts"; -import type { BaseItemSourcePF2e, ItemFlagsPF2e, ItemSystemSource, ItemTraitsNoRarity } from "@item/base/data/system.ts"; +import { ItemSystemModel, ItemSystemSchema } from "@item/base/data/model.ts"; +import type { + BaseItemSourcePF2e, + ItemFlagsPF2e, + ItemSystemSource, + ItemTraitsNoRarity, +} from "@item/base/data/system.ts"; import type { WeaponMaterialData } from "@item/weapon/data.ts"; import type { WeaponPropertyRuneType } from "@item/weapon/types.ts"; import type { DamageCategoryUnique, DamageType } from "@system/damage/types.ts"; import { RecordField, SlugField } from "@system/schema-data-fields.ts"; import type { NPCAttackTrait } from "./types.ts"; import fields = foundry.data.fields; + type MeleeSource = BaseItemSourcePF2e<"melee", MeleeSystemSource> & { flags: DeepPartial; }; diff --git a/types/src/module/item/physical/data.d.ts b/types/src/module/item/physical/data.d.ts index f7753da77..228d8eb33 100644 --- a/types/src/module/item/physical/data.d.ts +++ b/types/src/module/item/physical/data.d.ts @@ -139,9 +139,10 @@ type Coins = { interface PartialPrice { value: Coins; per?: number; + /** Whether the price adjusts according to its size */ + sizeSensitive?: boolean; } -interface Price extends PartialPrice { +interface Price extends Required { value: CoinsPF2e; - per: number; } export type { BasePhysicalItemSource, BulkData, Coins, EquippedData, IdentificationData, IdentificationStatus, IdentifiedData, Investable, ItemActivation, ItemCarryType, ItemMaterialData, ItemMaterialSource, MystifiedData, PartialPrice, PhysicalItemHPSource, PhysicalItemHitPoints, PhysicalItemTrait, PhysicalItemTraits, PhysicalSystemData, PhysicalSystemSource, Price, }; diff --git a/types/src/module/item/physical/document.d.ts b/types/src/module/item/physical/document.d.ts index 34bab0c34..aab08b824 100644 --- a/types/src/module/item/physical/document.d.ts +++ b/types/src/module/item/physical/document.d.ts @@ -1,12 +1,23 @@ import type { ActorPF2e } from "@actor"; -import { ItemPF2e, type ContainerPF2e } from "@item"; +import { type ContainerPF2e, ItemPF2e } from "@item"; import type { ItemSourcePF2e, PhysicalItemSource, RawItemChatData, TraitChatData } from "@item/base/data/index.ts"; import type { Rarity, Size, ZeroToTwo } from "@module/data.ts"; import type { EffectSpinoff } from "@module/rules/rule-element/effect-spinoff/spinoff.ts"; import type { UserPF2e } from "@module/user/document.ts"; import { Bulk } from "./bulk.ts"; -import type { IdentificationStatus, ItemActivation, ItemCarryType, ItemMaterialData, MystifiedData, PhysicalItemHitPoints, PhysicalItemTrait, PhysicalSystemData, Price } from "./data.ts"; +import type { + IdentificationStatus, + ItemActivation, + ItemCarryType, + ItemMaterialData, + MystifiedData, + PhysicalItemHitPoints, + PhysicalItemTrait, + PhysicalSystemData, + Price, +} from "./data.ts"; import { CoinsPF2e } from "./helpers.ts"; + declare abstract class PhysicalItemPF2e extends ItemPF2e { /** The item in which this item is embedded */ parentItem: PhysicalItemPF2e | null; @@ -118,7 +129,7 @@ declare abstract class PhysicalItemPF2e): TraitChatData[]; + traitChatData(dictionary?: Record): TraitChatData[]; /** Redirect subitem updates to the parent item */ update(data: Record, operation?: Partial>): Promise; /** Redirect subitem deletes to parent-item updates */ diff --git a/types/src/module/item/physical/helpers.d.ts b/types/src/module/item/physical/helpers.d.ts index d15eede9c..a9007ba54 100644 --- a/types/src/module/item/physical/helpers.d.ts +++ b/types/src/module/item/physical/helpers.d.ts @@ -1,9 +1,11 @@ +import { ActorPF2e } from "@actor"; import type { ContainerPF2e, PhysicalItemPF2e } from "@item"; import { PhysicalItemSource } from "@item/base/data/index.ts"; import { ContainerBulkData } from "@item/container/data.ts"; import { Rarity } from "@module/data.ts"; import { CoinsPF2e } from "./coins.ts"; -import { BulkData } from "./data.ts"; +import { BulkData, EquippedData } from "./data.ts"; + declare function computeLevelRarityPrice(item: PhysicalItemPF2e): { level: number; rarity: Rarity; @@ -23,5 +25,9 @@ declare function prepareBulkData(item: TItem): T * quantity of aan existing stack. */ declare function detachSubitem(subitem: PhysicalItemPF2e, skipConfirm: boolean): Promise; +/** Clone an item, sizing it appropriately for the actor. For larger PCs, set the price's sensitity to false. */ +declare function sizeItemForActor(item: TItem, actor: ActorPF2e): TItem; +/** Returns the default equip status for this item, called in order to "reset" the equip status */ +declare function getDefaultEquipStatus(item: PhysicalItemPF2e): EquippedData; export { coinCompendiumIds } from "./coins.ts"; -export { CoinsPF2e, computeLevelRarityPrice, detachSubitem, generateItemName, handleHPChange, prepareBulkData }; +export { CoinsPF2e, computeLevelRarityPrice, detachSubitem, generateItemName, getDefaultEquipStatus, handleHPChange, prepareBulkData, sizeItemForActor, }; diff --git a/types/src/module/item/physical/materials.d.ts b/types/src/module/item/physical/materials.d.ts index 853cdad5f..a04d3f31e 100644 --- a/types/src/module/item/physical/materials.d.ts +++ b/types/src/module/item/physical/materials.d.ts @@ -1,6 +1,7 @@ import type { Rarity } from "@module/data.ts"; import type { PhysicalItemPF2e } from "./document.ts"; import type { PreciousMaterialGrade, PreciousMaterialType } from "./types.ts"; + interface MaterialGradeData { level: number; price: number; @@ -12,14 +13,14 @@ type MaterialValuationData = Partial>>; - object: Partial>>; + armor: Partial>>; + object: Partial>>; shield: { - shield: Partial>>; - buckler: Partial>>; - towerShield: Partial>>; + shield: Partial>>; + buckler: Partial>>; + towerShield: Partial>>; }; - weapon: Partial>>; + weapon: Partial>>; }; export { MATERIAL_DATA, OBJECT_MATERIAL_VALUATION_DATA, getMaterialValuationData }; export type { MaterialGradeData, MaterialValuationData }; diff --git a/types/src/module/item/physical/runes.d.ts b/types/src/module/item/physical/runes.d.ts index f0f9ff77a..87d726217 100644 --- a/types/src/module/item/physical/runes.d.ts +++ b/types/src/module/item/physical/runes.d.ts @@ -1,14 +1,21 @@ import type { CreatureTrait } from "@actor/creature/index.ts"; -import { DamageDicePF2e, DamageDiceParameters, ModifierAdjustment, ModifierObjectParams, ModifierPF2e } from "@actor/modifiers.ts"; +import { + DamageDiceParameters, + DamageDicePF2e, + ModifierAdjustment, + ModifierObjectParams, + ModifierPF2e, +} from "@actor/modifiers.ts"; import { ResistanceType } from "@actor/types.ts"; import type { ArmorPF2e, MeleePF2e, PhysicalItemPF2e, WeaponPF2e } from "@item"; import { ArmorPropertyRuneType, ResilientRuneType } from "@item/armor/types.ts"; import { SpellTrait } from "@item/spell/types.ts"; import { StrikingRuneType, WeaponPropertyRuneType } from "@item/weapon/types.ts"; -import { OneToFour, Rarity, ZeroToFour, ZeroToSix, ZeroToThree } from "@module/data.ts"; +import { OneToFour, Rarity, ZeroToFour, ZeroToSix } from "@module/data.ts"; import { RollNoteSource } from "@module/notes.ts"; import { StrikeAdjustment } from "@module/rules/synthetics.ts"; import { DegreeOfSuccessAdjustment } from "@system/degree-of-success.ts"; + declare function getPropertyRuneSlots(item: WeaponPF2e | ArmorPF2e): ZeroToFour; /** Remove duplicate and lesser versions from an array of property runes */ declare function prunePropertyRunes(runes: (string | null)[], validTypes: Record): T[]; @@ -148,7 +155,7 @@ declare const RUNE_DATA: { winged: ArmorPropertyRuneData<"winged">; }; potency: Record; - resilient: Record | null>; + resilient: Record | null>; }; shield: FundamentalShieldRuneData; weapon: { @@ -235,7 +242,7 @@ declare const RUNE_DATA: { wounding: WeaponPropertyRuneData<"wounding">; }; potency: Record; - striking: Record | null>; + striking: Record | null>; }; }; export { RUNE_DATA, getPropertyRuneDamage, getPropertyRuneDegreeAdjustments, getPropertyRuneModifierAdjustments, getPropertyRuneSlots, getPropertyRuneStrikeAdjustments, getRuneValuationData, prunePropertyRunes, }; diff --git a/types/src/module/item/physical/schema.d.ts b/types/src/module/item/physical/schema.d.ts index dfbec3443..197f699ea 100644 --- a/types/src/module/item/physical/schema.d.ts +++ b/types/src/module/item/physical/schema.d.ts @@ -1,23 +1,21 @@ -import type { NumberField, SchemaField } from "types/foundry/common/data/fields.d.ts"; import { CoinsPF2e } from "./coins.ts"; -declare const fields: typeof foundry.data.fields; -declare class PriceField extends fields.SchemaField { +import type { Price } from "./index.ts"; +import fields = foundry.data.fields; + +declare class PriceField extends fields.SchemaField, Price> { constructor(); - initialize(source: SourceFromSchema): PriceData; + initialize(source: SourceFromSchema): Price; } -type CoinsField = SchemaField, CoinsPF2e, true, false, true>; +type CoinsField = fields.SchemaField, CoinsPF2e, true, false, true>; type CoinsSchema = { - cp: NumberField; - sp: NumberField; - gp: NumberField; - pp: NumberField; + cp: fields.NumberField; + sp: fields.NumberField; + gp: fields.NumberField; + pp: fields.NumberField; }; type PriceSchema = { value: CoinsField; - per: NumberField; -}; -type PriceData = { - value: CoinsPF2e; - per: number; + per: fields.NumberField; + sizeSensitive: fields.BooleanField; }; export { PriceField }; diff --git a/types/src/module/item/physical/values.d.ts b/types/src/module/item/physical/values.d.ts index 2e04e35b7..05f8d80c1 100644 --- a/types/src/module/item/physical/values.d.ts +++ b/types/src/module/item/physical/values.d.ts @@ -1,5 +1,5 @@ -declare const PHYSICAL_ITEM_TYPES: Set<"armor" | "shield" | "consumable" | "book" | "backpack" | "equipment" | "treasure" | "weapon">; -declare const PRECIOUS_MATERIAL_TYPES: Set<"abysium" | "adamantine" | "dawnsilver" | "djezet" | "duskwood" | "inubrix" | "noqual" | "orichalcum" | "siccatite" | "silver" | "cold-iron" | "dragonhide" | "grisantian-pelt" | "keep-stone" | "peachwood" | "sisterstone" | "sisterstone-dusk" | "sisterstone-scarlet" | "sovereign-steel" | "warpglass">; +declare const PHYSICAL_ITEM_TYPES: Set<"armor" | "shield" | "consumable" | "backpack" | "book" | "equipment" | "treasure" | "weapon">; +declare const PRECIOUS_MATERIAL_TYPES: Set<"abysium" | "adamantine" | "dawnsilver" | "djezet" | "duskwood" | "inubrix" | "noqual" | "orichalcum" | "siccatite" | "silver" | "cold-iron" | "dragonhide" | "dreamweb" | "grisantian-pelt" | "keep-stone" | "peachwood" | "sisterstone" | "sisterstone-dusk" | "sisterstone-scarlet" | "sloughstone" | "sovereign-steel" | "warpglass">; declare const PRECIOUS_MATERIAL_GRADES: Set<"low" | "standard" | "high">; declare const DENOMINATIONS: readonly ["pp", "gp", "sp", "cp"]; export { DENOMINATIONS, PHYSICAL_ITEM_TYPES, PRECIOUS_MATERIAL_GRADES, PRECIOUS_MATERIAL_TYPES }; diff --git a/types/src/module/item/spell/data.d.ts b/types/src/module/item/spell/data.d.ts index f2d0f4aba..ed6303220 100644 --- a/types/src/module/item/spell/data.d.ts +++ b/types/src/module/item/spell/data.d.ts @@ -3,6 +3,7 @@ import type { BaseItemSourcePF2e, ItemSystemData, ItemSystemSource, ItemTraits } import type { OneToTen, ValueAndMax, ZeroToThree } from "@module/data.ts"; import type { DamageCategoryUnique, DamageKind, DamageType, MaterialDamageEffect } from "@system/damage/index.ts"; import type { EffectAreaShape, MagicTradition, SpellTrait } from "./types.ts"; + type SpellSource = BaseItemSourcePF2e<"spell", SpellSystemSource>; interface SpellSystemSource extends ItemSystemSource { traits: SpellTraits; @@ -76,6 +77,7 @@ type SpellPassiveDefense = "ac" | `${SaveType}-dc`; interface SpellHeighteningInterval { type: "interval"; interval: number; + area: number; damage: Record; } interface SpellHeighteningFixed { @@ -124,4 +126,4 @@ interface RitualData { casters: number; }; } -export type { SpellArea, SpellDamage, SpellDamageSource, SpellHeightenLayer, SpellHeighteningInterval, SpellOverlay, SpellOverlayOverride, SpellOverlayType, SpellPassiveDefense, SpellSource, SpellSystemData, SpellSystemSource, }; +export type { SpellArea, SpellDamage, SpellDamageSource, SpellHeighteningInterval, SpellHeightenLayer, SpellOverlay, SpellOverlayOverride, SpellOverlayType, SpellPassiveDefense, SpellSource, SpellSystemData, SpellSystemSource, }; diff --git a/types/src/module/item/spell/helpers.d.ts b/types/src/module/item/spell/helpers.d.ts index 170a92d45..c1d9801cc 100644 --- a/types/src/module/item/spell/helpers.d.ts +++ b/types/src/module/item/spell/helpers.d.ts @@ -1,9 +1,11 @@ -import type { SpellPF2e } from "./index.ts"; +import type { SpellArea, SpellPF2e } from "./index.ts"; + declare function createSpellRankLabel(spell: SpellPF2e, castRank?: number): string; +declare function createSpellAreaLabel(areaData: SpellArea): string; declare function createDescriptionPrepend(spell: SpellPF2e, { includeTraditions }: { includeTraditions: boolean; }): Promise; declare function getPassiveDefenseLabel(statistic: string, { localize }?: { localize?: boolean | undefined; }): string | null; -export { createDescriptionPrepend, createSpellRankLabel, getPassiveDefenseLabel }; +export { createDescriptionPrepend, createSpellAreaLabel, createSpellRankLabel, getPassiveDefenseLabel }; diff --git a/types/src/module/item/spellcasting-entry/document.d.ts b/types/src/module/item/spellcasting-entry/document.d.ts index b172f0dc3..ce31bb48c 100644 --- a/types/src/module/item/spellcasting-entry/document.d.ts +++ b/types/src/module/item/spellcasting-entry/document.d.ts @@ -8,6 +8,7 @@ import { Statistic } from "@system/statistic/index.ts"; import { SpellCollection, type SpellSlotGroupId } from "./collection.ts"; import { SpellcastingEntrySource, SpellcastingEntrySystemData } from "./data.ts"; import { CastOptions, SpellcastingCategory, SpellcastingEntry, SpellcastingSheetData } from "./types.ts"; + declare class SpellcastingEntryPF2e extends ItemPF2e implements SpellcastingEntry { spells: SpellCollection> | null; /** Spellcasting attack and dc data created during actor preparation */ @@ -33,8 +34,8 @@ declare class SpellcastingEntryPF2e>): void; - prepareActorData(this: SpellcastingEntryPF2e>): void; + prepareSiblingData(this: SpellcastingEntryPF2e): void; + prepareActorData(this: SpellcastingEntryPF2e): void; /** Prepares the statistic for this spellcasting entry */ prepareStatistic(): void; /** All spells associated with this spellcasting entry on the actor that should also be deleted */ @@ -66,7 +67,6 @@ declare class SpellcastingEntryPF2e, options: DatabaseUpdateOperation, user: UserPF2e): Promise; /** - * To prevent (or delay) console spam, will send out a deprecation notice in a later release * @deprecated */ getSpellData(): Promise; diff --git a/types/src/module/item/values.d.ts b/types/src/module/item/values.d.ts index ccda72d9e..badb92fbe 100644 --- a/types/src/module/item/values.d.ts +++ b/types/src/module/item/values.d.ts @@ -1,3 +1,3 @@ /** Item types representing the variant components of a PC actor type */ -declare const PC_ITEM_TYPES: Set<"class" | "ancestry" | "background" | "deity" | "feat" | "heritage">; +declare const PC_ITEM_TYPES: Set<"class" | "ancestry" | "feat" | "background" | "deity" | "heritage">; export { PC_ITEM_TYPES }; diff --git a/types/src/module/item/weapon/data.d.ts b/types/src/module/item/weapon/data.d.ts index 271bd3646..4dc10b3fe 100644 --- a/types/src/module/item/weapon/data.d.ts +++ b/types/src/module/item/weapon/data.d.ts @@ -1,11 +1,32 @@ import { AttributeString } from "@actor/types.ts"; import type { PhysicalItemSource } from "@item/base/data/index.ts"; import { ItemFlagsPF2e } from "@item/base/data/system.ts"; -import type { BasePhysicalItemSource, Investable, ItemMaterialData, ItemMaterialSource, PhysicalItemTraits, PhysicalSystemData, PhysicalSystemSource, UsageDetails } from "@item/physical/index.ts"; -import { ZeroToFour, ZeroToThree } from "@module/data.ts"; +import type { + BasePhysicalItemSource, + Investable, + ItemMaterialData, + ItemMaterialSource, + PhysicalItemTraits, + PhysicalSystemData, + PhysicalSystemSource, + UsageDetails, +} from "@item/physical/index.ts"; +import { ZeroToFour } from "@module/data.ts"; import { DamageDieSize, DamageType } from "@system/damage/index.ts"; import type { WeaponTraitToggles } from "./trait-toggles.ts"; -import type { BaseWeaponType, MeleeWeaponGroup, OtherWeaponTag, WeaponCategory, WeaponGroup, WeaponMaterialType, WeaponPropertyRuneType, WeaponRangeIncrement, WeaponReloadTime, WeaponTrait } from "./types.ts"; +import type { + BaseWeaponType, + MeleeWeaponGroup, + OtherWeaponTag, + WeaponCategory, + WeaponGroup, + WeaponMaterialType, + WeaponPropertyRuneType, + WeaponRangeIncrement, + WeaponReloadTime, + WeaponTrait, +} from "./types.ts"; + type WeaponSource = BasePhysicalItemSource<"weapon", WeaponSystemSource> & { flags: DeepPartial; }; @@ -117,7 +138,7 @@ interface WeaponMaterialSource extends ItemMaterialSource { } type WeaponRuneSource = { potency: ZeroToFour; - striking: ZeroToThree; + striking: ZeroToFour; property: WeaponPropertyRuneType[]; }; interface WeaponSystemData extends Omit, Omit, "material" | "subitems"> { diff --git a/types/src/module/item/weapon/document.d.ts b/types/src/module/item/weapon/document.d.ts index 1bfc219cb..bd2f6c461 100644 --- a/types/src/module/item/weapon/document.d.ts +++ b/types/src/module/item/weapon/document.d.ts @@ -10,7 +10,15 @@ import type { RangeData } from "@item/types.ts"; import type { StrikeRuleElement } from "@module/rules/rule-element/strike.ts"; import type { UserPF2e } from "@module/user/document.ts"; import type { WeaponDamage, WeaponFlags, WeaponSource, WeaponSystemData } from "./data.ts"; -import type { BaseWeaponType, OtherWeaponTag, WeaponCategory, WeaponGroup, WeaponReloadTime, WeaponTrait } from "./types.ts"; +import type { + BaseWeaponType, + OtherWeaponTag, + WeaponCategory, + WeaponGroup, + WeaponReloadTime, + WeaponTrait, +} from "./types.ts"; + declare class WeaponPF2e extends PhysicalItemPF2e { shield?: ShieldPF2e; /** The rule element that generated this weapon, if applicable */ @@ -50,7 +58,7 @@ declare class WeaponPF2e ex get ammo(): ConsumablePF2e | WeaponPF2e | null; get otherTags(): Set; acceptsSubitem(candidate: PhysicalItemPF2e): boolean; - isStackableWith(item: PhysicalItemPF2e): boolean; + isStackableWith(item: PhysicalItemPF2e): boolean; /** Whether this weapon can serve as ammunition for another weapon */ isAmmoFor(weapon: WeaponPF2e): boolean; /** Generate a list of strings for use in predication */ diff --git a/types/src/module/item/weapon/types.d.ts b/types/src/module/item/weapon/types.d.ts index 718393675..7faa6526b 100644 --- a/types/src/module/item/weapon/types.d.ts +++ b/types/src/module/item/weapon/types.d.ts @@ -16,6 +16,6 @@ type WeaponTrait = keyof typeof CONFIG.PF2E.weaponTraits; type OtherWeaponTag = "improvised" | "shoddy" | "handwraps-of-mighty-blows"; type WeaponRangeIncrement = SetElement; type WeaponReloadTime = "-" | "0" | "1" | "2" | "3" | "10"; -type StrikingRuneType = "striking" | "greaterStriking" | "majorStriking"; -type WeaponMaterialType = Exclude; +type StrikingRuneType = "striking" | "greaterStriking" | "majorStriking" | "mythicStriking"; +type WeaponMaterialType = Exclude; export type { BaseWeaponType, MeleeWeaponGroup, OtherWeaponTag, StrikingRuneType, WeaponCategory, WeaponGroup, WeaponMaterialType, WeaponPropertyRuneType, WeaponRangeIncrement, WeaponReloadTime, WeaponTrait, }; diff --git a/types/src/module/item/weapon/values.d.ts b/types/src/module/item/weapon/values.d.ts index 7c9fdccc8..d955d857b 100644 --- a/types/src/module/item/weapon/values.d.ts +++ b/types/src/module/item/weapon/values.d.ts @@ -6,8 +6,8 @@ declare const MELEE_WEAPON_GROUPS: Set<"axe" | "brawling" | "club" | "dart" | "f /** Groups that will be forced as ranged weapons */ declare const MANDATORY_RANGED_GROUPS: Set; declare const WEAPON_PROPERTY_RUNE_TYPES: Set<"holy" | "unholy" | "vorpal" | "astral" | "speed" | "ancestralEchoing" | "anchoring" | "ashen" | "authorized" | "bane" | "bloodbane" | "bloodthirsty" | "brilliant" | "called" | "coating" | "conducting" | "corrosive" | "crushing" | "cunning" | "dancing" | "deathdrinking" | "decaying" | "demolishing" | "disrupting" | "earthbinding" | "energizing" | "extending" | "fanged" | "fearsome" | "flaming" | "flickering" | "flurrying" | "frost" | "ghostTouch" | "giantKilling" | "greaterGiantKilling" | "greaterAnchoring" | "greaterAshen" | "greaterAstral" | "greaterBloodbane" | "greaterBrilliant" | "greaterCorrosive" | "greaterCrushing" | "greaterDecaying" | "greaterDisrupting" | "greaterExtending" | "greaterFanged" | "greaterFearsome" | "greaterFlaming" | "greaterFrost" | "greaterHauling" | "greaterImpactful" | "greaterRooting" | "greaterShock" | "greaterThundering" | "grievous" | "hauling" | "hopeful" | "hooked" | "impactful" | "impossible" | "keen" | "kinWarding" | "majorFanged" | "majorRooting" | "merciful" | "nightmare" | "pacifying" | "returning" | "rooting" | "serrating" | "shifting" | "shock" | "shockwave" | "spellStoring" | "swarming" | "thundering" | "trueRooting" | "underwater" | "wounding">; -declare const THROWN_RANGES: Set<10 | 15 | 20 | 100 | 40 | 30 | 60 | 80>; -declare const WEAPON_RANGES: Set<10 | 15 | 20 | 100 | 40 | 30 | 50 | 60 | 80 | 70 | 90 | 110 | 120 | 140 | 150 | 180 | 200 | 240 | 300>; +declare const THROWN_RANGES: Set<15 | 10 | 20 | 30 | 40 | 100 | 80 | 60>; +declare const WEAPON_RANGES: Set<15 | 10 | 20 | 200 | 30 | 40 | 50 | 100 | 80 | 60 | 70 | 90 | 110 | 120 | 140 | 150 | 180 | 240 | 300>; declare const RANGED_ONLY_TRAITS: Set; declare const MELEE_ONLY_TRAITS: Set; export { MANDATORY_RANGED_GROUPS, MELEE_ONLY_TRAITS, MELEE_WEAPON_GROUPS, RANGED_ONLY_TRAITS, THROWN_RANGES, WEAPON_CATEGORIES, WEAPON_GROUPS, WEAPON_PROPERTY_RUNE_TYPES, WEAPON_RANGES, }; diff --git a/types/src/module/migration/migrations/927-class-background-skill-longform.d.ts b/types/src/module/migration/migrations/927-class-background-skill-longform.d.ts index 83b5334f7..a6d3b9876 100644 --- a/types/src/module/migration/migrations/927-class-background-skill-longform.d.ts +++ b/types/src/module/migration/migrations/927-class-background-skill-longform.d.ts @@ -1,5 +1,6 @@ import { ItemSourcePF2e } from "@item/base/data/index.ts"; import { MigrationBase } from "../base.ts"; + export declare class Migration927ClassBackgroundBattleFormSkillLongform extends MigrationBase { #private; static version: number; @@ -24,4 +25,4 @@ export declare const SKILL_DICTIONARY: { readonly thi: "thievery"; }; export type SkillAbbreviation = keyof typeof SKILL_DICTIONARY; -export declare const SKILL_ABBREVIATIONS: ("med" | "soc" | "arc" | "acr" | "ath" | "cra" | "dec" | "dip" | "itm" | "nat" | "occ" | "prf" | "rel" | "ste" | "sur" | "thi")[]; +export declare const SKILL_ABBREVIATIONS: ("med" | "acr" | "arc" | "ath" | "cra" | "dec" | "dip" | "itm" | "nat" | "occ" | "prf" | "rel" | "soc" | "ste" | "sur" | "thi")[]; diff --git a/types/src/module/migration/migrations/934-mythic-calling-category.d.ts b/types/src/module/migration/migrations/934-mythic-calling-category.d.ts new file mode 100644 index 000000000..bfa836eb9 --- /dev/null +++ b/types/src/module/migration/migrations/934-mythic-calling-category.d.ts @@ -0,0 +1,8 @@ +import { ItemSourcePF2e } from "@item/base/data/index.ts"; +import { MigrationBase } from "../base.ts"; + +/** Clean up Calling items, setting a category and removing tags */ +export declare class Migration934MythicCallingCategory extends MigrationBase { + static version: number; + updateItem(source: ItemSourcePF2e): Promise; +} diff --git a/types/src/module/migration/migrations/935-deity-icon-paths.d.ts b/types/src/module/migration/migrations/935-deity-icon-paths.d.ts new file mode 100644 index 000000000..de59fae88 --- /dev/null +++ b/types/src/module/migration/migrations/935-deity-icon-paths.d.ts @@ -0,0 +1,13 @@ +import type { ActorSourcePF2e } from "@actor/data/index.ts"; +import type { ItemSourcePF2e } from "@item/base/data/index.ts"; +import type { TokenSource } from "types/foundry/common/documents/token.d.ts"; +import { MigrationBase } from "../base.ts"; + +/** Clean up Calling items, setting a category and removing tags */ +export declare class Migration935DeityIconPaths extends MigrationBase { + #private; + static version: number; + updateActor(source: ActorSourcePF2e): Promise; + updateItem(source: ItemSourcePF2e): Promise; + updateToken(source: TokenSource): Promise; +} diff --git a/types/src/module/migration/migrations/index.d.ts b/types/src/module/migration/migrations/index.d.ts index 462e1f16c..63cc07c3e 100644 --- a/types/src/module/migration/migrations/index.d.ts +++ b/types/src/module/migration/migrations/index.d.ts @@ -232,3 +232,5 @@ export { Migration930ChoiceSetMedium } from "./930-choice-set-medium.ts"; export { Migration931ExpandREPermissions } from "./931-expand-re-permissions.ts"; export { Migration932NPCSystemSkills } from "./932-npc-system-skills.ts"; export { Migration933CraftingAbility } from "./933-crafting-ability.ts"; +export { Migration934MythicCallingCategory } from "./934-mythic-calling-category.ts"; +export { Migration935DeityIconPaths } from "./935-deity-icon-paths.ts"; diff --git a/types/src/module/migration/runner/base.d.ts b/types/src/module/migration/runner/base.d.ts index 179cb427e..83d210617 100644 --- a/types/src/module/migration/runner/base.d.ts +++ b/types/src/module/migration/runner/base.d.ts @@ -1,7 +1,8 @@ -import { ActorSourcePF2e } from "@actor/data/index.ts"; -import { ItemSourcePF2e } from "@item/base/data/index.ts"; -import { MigrationBase } from "@module/migration/base.ts"; +import type { ActorSourcePF2e } from "@actor/data/index.ts"; +import type { ItemSourcePF2e } from "@item/base/data/index.ts"; +import type { MigrationBase } from "@module/migration/base.ts"; import type { ScenePF2e, TokenDocumentPF2e } from "@scene"; + interface CollectionDiff { inserted: T[]; deleted: string[]; diff --git a/types/src/module/rules/index.d.ts b/types/src/module/rules/index.d.ts index 66d8bcc5c..d45cda6d1 100644 --- a/types/src/module/rules/index.d.ts +++ b/types/src/module/rules/index.d.ts @@ -15,4 +15,4 @@ declare class RuleElements { type RuleElementConstructor = { schema: LaxSchemaField; } & (new (data: RuleElementSource, options: RuleElementOptions) => RuleElementPF2e); -export { RuleElementOptions, RuleElementPF2e, RuleElements, RuleElementSource }; +export { RuleElementOptions, RuleElementPF2e, RuleElementSource, RuleElements }; diff --git a/types/src/module/rules/rule-element/actor-traits.d.ts b/types/src/module/rules/rule-element/actor-traits.d.ts index 180bcd264..e8845fa09 100644 --- a/types/src/module/rules/rule-element/actor-traits.d.ts +++ b/types/src/module/rules/rule-element/actor-traits.d.ts @@ -1,7 +1,8 @@ import type { ActorType } from "@actor/types.ts"; -import type { ArrayField, StringField } from "types/foundry/common/data/fields.d.ts"; import { ModelPropsFromRESchema } from "./data.ts"; import { RuleElementPF2e, RuleElementSchema } from "./index.ts"; +import fields = foundry.data.fields; + declare class ActorTraitsRuleElement extends RuleElementPF2e { #private; protected static validActorTypes: ActorType[]; @@ -9,8 +10,8 @@ declare class ActorTraitsRuleElement extends RuleElementPF2e>; - remove: ArrayField>; + add: fields.ArrayField>; + remove: fields.ArrayField>; }; interface ActorTraitsRuleElement extends RuleElementPF2e, ModelPropsFromRESchema { } diff --git a/types/src/module/rules/rule-element/adjust-degree-of-success.d.ts b/types/src/module/rules/rule-element/adjust-degree-of-success.d.ts index 90fa3b423..ba1181fcf 100644 --- a/types/src/module/rules/rule-element/adjust-degree-of-success.d.ts +++ b/types/src/module/rules/rule-element/adjust-degree-of-success.d.ts @@ -1,9 +1,10 @@ import type { ActorType, CharacterPF2e, NPCPF2e } from "@actor"; import { DegreeOfSuccessString } from "@system/degree-of-success.ts"; import { RecordField } from "@system/schema-data-fields.ts"; -import type { StringField } from "types/foundry/common/data/fields.d.ts"; import { ModelPropsFromRESchema } from "./data.ts"; import { RuleElementPF2e, RuleElementSchema } from "./index.ts"; +import fields = foundry.data.fields; + /** * @category RuleElement */ @@ -18,7 +19,7 @@ interface AdjustDegreeOfSuccessRuleElement extends RuleElementPF2e; - adjustment: RecordField, StringField>; + selector: fields.StringField; + adjustment: RecordField, fields.StringField>; }; export { AdjustDegreeOfSuccessRuleElement }; diff --git a/types/src/module/rules/rule-element/adjust-modifier.d.ts b/types/src/module/rules/rule-element/adjust-modifier.d.ts index d3b697fd1..2fa0e1011 100644 --- a/types/src/module/rules/rule-element/adjust-modifier.d.ts +++ b/types/src/module/rules/rule-element/adjust-modifier.d.ts @@ -1,7 +1,8 @@ -import type { ArrayField, BooleanField, NumberField, StringField } from "types/foundry/common/data/fields.d.ts"; import { AELikeChangeMode } from "./ae-like.ts"; import { ModelPropsFromRESchema, ResolvableValueField } from "./data.ts"; import { RuleElementOptions, RuleElementPF2e, RuleElementSchema, RuleElementSource } from "./index.ts"; +import fields = foundry.data.fields; + /** Adjust the value of a modifier, change its damage type (in case of damage modifiers) or suppress it entirely */ declare class AdjustModifierRuleElement extends RuleElementPF2e { /** The number of times this adjustment has been applied */ @@ -17,16 +18,16 @@ interface AdjustModifierRuleElement extends RuleElementPF2e; + mode: fields.StringField; /** An optional relabeling of the adjusted modifier */ - relabel: StringField; - selector: StringField; - selectors: ArrayField>; - damageType: StringField; + relabel: fields.StringField; + selector: fields.StringField; + selectors: fields.ArrayField>; + damageType: fields.StringField; /** Rather than changing a modifier's value, ignore it entirely */ - suppress: BooleanField; + suppress: fields.BooleanField; /** The maximum number of times this adjustment can be applied */ - maxApplications: NumberField; + maxApplications: fields.NumberField; value: ResolvableValueField; }; interface AdjustModifierSource extends RuleElementSource { diff --git a/types/src/module/rules/rule-element/adjust-strike.d.ts b/types/src/module/rules/rule-element/adjust-strike.d.ts index b04aab526..83d5afd9e 100644 --- a/types/src/module/rules/rule-element/adjust-strike.d.ts +++ b/types/src/module/rules/rule-element/adjust-strike.d.ts @@ -1,9 +1,9 @@ import type { ActorType } from "@actor/types.ts"; import { PredicateField } from "@system/schema-data-fields.ts"; -import type { StringField } from "types/foundry/common/data/fields.d.ts"; import { AELikeChangeMode } from "./ae-like.ts"; import { RuleElementOptions, RuleElementPF2e } from "./base.ts"; import { ModelPropsFromRESchema, ResolvableValueField, RuleElementSchema, RuleElementSource } from "./data.ts"; +import fields = foundry.data.fields; declare class AdjustStrikeRuleElement extends RuleElementPF2e { protected static validActorTypes: ActorType[]; @@ -16,9 +16,9 @@ declare class AdjustStrikeRuleElement extends RuleElementPF2e, ModelPropsFromRESchema { } type AdjustStrikeSchema = RuleElementSchema & { - mode: StringField; + mode: fields.StringField; /** The property of the strike to adjust */ - property: StringField; + property: fields.StringField; /** The definition of the strike in terms of its item (weapon) roll options */ definition: PredicateField; value: ResolvableValueField; diff --git a/types/src/module/rules/rule-element/ae-like.d.ts b/types/src/module/rules/rule-element/ae-like.d.ts index 08557021b..e44f992f0 100644 --- a/types/src/module/rules/rule-element/ae-like.d.ts +++ b/types/src/module/rules/rule-element/ae-like.d.ts @@ -1,6 +1,8 @@ import type { DataModelValidationFailure } from "types/foundry/common/data/validation-failure.d.ts"; import { RuleElementPF2e } from "./base.ts"; import { ModelPropsFromRESchema, ResolvableValueField, RuleElementSchema, RuleElementSource } from "./data.ts"; +import fields = foundry.data.fields; + /** * Make a numeric modification to an arbitrary property in a similar way as `ActiveEffect`s * @category RuleElement @@ -40,7 +42,6 @@ interface AutoChangeEntry { value: boolean | number | string | null; mode: AELikeChangeMode; } -import fields = foundry.data.fields; type AELikeSchema = RuleElementSchema & { /** How to apply the `value` at the `path` */ mode: fields.StringField; diff --git a/types/src/module/rules/rule-element/aura.d.ts b/types/src/module/rules/rule-element/aura.d.ts index a406b62ed..cd33ca302 100644 --- a/types/src/module/rules/rule-element/aura.d.ts +++ b/types/src/module/rules/rule-element/aura.d.ts @@ -1,10 +1,17 @@ import type { SaveType } from "@actor/types.ts"; import type { EffectTrait } from "@item/abstract-effect/types.ts"; -import { DataUnionField, PredicateField, StrictArrayField, StrictBooleanField, StrictNumberField, StrictStringField } from "@system/schema-data-fields.ts"; -import type { AlphaField, ArrayField, BooleanField, ColorField, EmbeddedDataField, SchemaField } from "types/foundry/common/data/fields.d.ts"; +import { DataUnionField, PredicateField, StrictArrayField } from "@system/schema-data-fields.ts"; import { RuleElementOptions, RuleElementPF2e } from "./base.ts"; -import { ModelPropsFromRESchema, ResolvableValueField, RuleElementSchema, RuleElementSource, RuleValue } from "./data.ts"; +import { + ModelPropsFromRESchema, + ResolvableValueField, + RuleElementSchema, + RuleElementSource, + RuleValue, +} from "./data.ts"; import { ItemAlteration } from "./item-alteration/alteration.ts"; +import fields = foundry.data.fields; + /** A Pathfinder 2e aura, capable of transmitting effects and with a visual representation on the canvas */ declare class AuraRuleElement extends RuleElementPF2e { #private; @@ -22,26 +29,26 @@ type AuraSchema = RuleElementSchema & { /** An optional level for the aura, to be used to set the level of the effects it transmits */ level: ResolvableValueField; /** Associated traits, including ones that determine transmission through walls ("visual", "auditory") */ - traits: ArrayField, EffectTrait[], EffectTrait[], true, false, true>; + traits: fields.ArrayField, EffectTrait[], EffectTrait[], true, false, true>; /** References to effects included in this aura */ - effects: StrictArrayField, SourceFromSchema[], ModelPropsFromSchema[], true, false, true>; + effects: StrictArrayField, SourceFromSchema[], ModelPropsFromSchema[], true, false, true>; /** * Custom border, highlight, and texture for the aura: if omitted, the border color will be black, the fill * color the user's configured color, and no texture. */ - appearance: SchemaField, ModelPropsFromSchema, true, false, true>; + appearance: fields.SchemaField, ModelPropsFromSchema, true, false, true>; /** * If another aura with the same slug is already being emitted, merge this aura's data in with the other's, * combining traits and effects as well as merging `colors` data. */ - mergeExisting: BooleanField; + mergeExisting: fields.BooleanField; }; type AuraEffectSchema = { - uuid: StrictStringField; - affects: StrictStringField<"allies" | "enemies" | "all", "allies" | "enemies" | "all", true, false, true>; - events: ArrayField, ("enter" | "turn-start" | "turn-end")[], ("enter" | "turn-start" | "turn-end")[], true, false, true>; - save: SchemaField<{ - type: StrictStringField; + uuid: fields.DocumentUUIDField; + affects: fields.StringField<"allies" | "enemies" | "all", "allies" | "enemies" | "all", true, false, true>; + events: fields.ArrayField, ("enter" | "turn-start" | "turn-end")[], ("enter" | "turn-start" | "turn-end")[], true, false, true>; + save: fields.SchemaField<{ + type: fields.StringField; dc: ResolvableValueField; }, { type: SaveType; @@ -53,17 +60,17 @@ type AuraEffectSchema = { /** A predicating limiting whether the effect is transmitted to an actor */ predicate: PredicateField; /** Whether to remove the effect from an actor immediately after its token exits the area */ - removeOnExit: StrictBooleanField; + removeOnExit: fields.BooleanField; /** Whether the effect is applied to the actor emitting the aura */ - includesSelf: StrictBooleanField; + includesSelf: fields.BooleanField; /** An array of alterations to apply to the effect before transmitting it */ - alterations: StrictArrayField>; + alterations: StrictArrayField>; }; type AuraAppearanceSchema = { /** Configuration of the border's color and alpha */ - border: SchemaField<{ - color: DataUnionField | ColorField, true, false, true>; - alpha: AlphaField; + border: fields.SchemaField<{ + color: DataUnionField | fields.ColorField, true, false, true>; + alpha: fields.AlphaField; }, { color: "user-color" | HexColorString; alpha: number; @@ -72,9 +79,9 @@ type AuraAppearanceSchema = { alpha: number; }, false, true, true>; /** Configuration of the highlight's color and alpha */ - highlight: SchemaField<{ - color: DataUnionField | ColorField, true, false, true>; - alpha: AlphaField; + highlight: fields.SchemaField<{ + color: DataUnionField | fields.ColorField, true, false, true>; + alpha: fields.AlphaField; }, { color: "user-color" | HexColorString; alpha: number; @@ -83,24 +90,24 @@ type AuraAppearanceSchema = { alpha: number; }, false, false, true>; /** Configuration for a texture (image or video) drawn as part of the aura */ - texture: SchemaField, ModelPropsFromSchema, false, true, true>; + texture: fields.SchemaField, ModelPropsFromSchema, false, true, true>; }; type AuraTextureSchema = { /** The path to the texture file: can be injected */ - src: StrictStringField; - alpha: AlphaField; + src: fields.StringField; + alpha: fields.AlphaField; /** A manual rescaling of the texture resource */ - scale: StrictNumberField; + scale: fields.NumberField; /** A manual x/y translation of the texture resource */ - translation: SchemaField, ModelPropsFromSchema, false, true, true>; + translation: fields.SchemaField, ModelPropsFromSchema, false, true, true>; /** If the `src` is a video, whether to loop it */ - loop: StrictBooleanField; + loop: fields.BooleanField; /** If the `src` is a video, the playback rate of resulting `HTMLVideoElement` */ - playbackRate: StrictNumberField; + playbackRate: fields.NumberField; }; type XYPairSchema = { - x: StrictNumberField; - y: StrictNumberField; + x: fields.NumberField; + y: fields.NumberField; }; interface AuraEffectREData extends ModelPropsFromSchema { includesSelf: boolean; diff --git a/types/src/module/rules/rule-element/base-speed.d.ts b/types/src/module/rules/rule-element/base-speed.d.ts index 7a1c9a029..4a590bb65 100644 --- a/types/src/module/rules/rule-element/base-speed.d.ts +++ b/types/src/module/rules/rule-element/base-speed.d.ts @@ -1,7 +1,8 @@ import type { ActorType, CreaturePF2e } from "@actor"; -import type { StringField } from "types/foundry/common/data/fields.d.ts"; import { RuleElementOptions, RuleElementPF2e } from "./base.ts"; import { ModelPropsFromRESchema, ResolvableValueField, RuleElementSchema, RuleElementSource } from "./data.ts"; +import fields = foundry.data.fields; + /** * @category RuleElement */ @@ -16,7 +17,7 @@ interface BaseSpeedRuleElement extends RuleElementPF2e, Mod get actor(): CreaturePF2e; } type BaseSpeedRuleSchema = RuleElementSchema & { - selector: StringField; + selector: fields.StringField; value: ResolvableValueField; }; export { BaseSpeedRuleElement }; diff --git a/types/src/module/rules/rule-element/battle-form/schema.d.ts b/types/src/module/rules/rule-element/battle-form/schema.d.ts index 2134a0541..4ef6abd5e 100644 --- a/types/src/module/rules/rule-element/battle-form/schema.d.ts +++ b/types/src/module/rules/rule-element/battle-form/schema.d.ts @@ -1,40 +1,41 @@ import type { CreatureTrait } from "@actor/creature/index.ts"; import type { SenseAcuity, SenseType } from "@actor/creature/types.ts"; import type { RecordField } from "@system/schema-data-fields.ts"; -import type { ArrayField, BooleanField, NumberField, ObjectField, SchemaField, StringField } from "types/foundry/common/data/fields.d.ts"; +import type * as fields from "types/foundry/common/data/fields.d.ts"; import type { ResolvableValueField, RuleElementSchema } from "../data.ts"; import type { ImmunityRuleElement, ResistanceRuleElement, WeaknessRuleElement } from "../iwr/index.ts"; import type { BattleFormSkills, BattleFormSpeeds, BattleFormStrike } from "./types.ts"; + type OverrideACSchema = { modifier: ResolvableValueField; - ignoreCheckPenalty: BooleanField; - ignoreSpeedPenalty: BooleanField; - ownIfHigher: BooleanField; + ignoreCheckPenalty: fields.BooleanField; + ignoreSpeedPenalty: fields.BooleanField; + ownIfHigher: fields.BooleanField; }; type OverrideSenseSchema = { - acuity: StringField; - range: NumberField; + acuity: fields.StringField; + range: fields.NumberField; }; type BattleFormRuleOverrideSchema = { - traits: ArrayField>; - armorClass: SchemaField, ModelPropsFromSchema, false, false, true>; + traits: fields.ArrayField>; + armorClass: fields.SchemaField, ModelPropsFromSchema, false, false, true>; tempHP: ResolvableValueField; - senses: RecordField, SchemaField, false, false, true>; - size: StringField; - speeds: ObjectField; - skills: ObjectField; - strikes: ObjectField, Record, false, false, true>; - immunities: ArrayField>>; - weaknesses: ArrayField>>; - resistances: ArrayField>>; + senses: RecordField, fields.SchemaField, false, false, true>; + size: fields.StringField; + speeds: fields.ObjectField; + skills: fields.ObjectField; + strikes: fields.ObjectField, Record, false, false, true>; + immunities: fields.ArrayField>>; + weaknesses: fields.ArrayField>>; + resistances: fields.ArrayField>>; }; type BattleFormRuleSchema = RuleElementSchema & { value: ResolvableValueField; - overrides: SchemaField; - canCast: BooleanField; - canSpeak: BooleanField; - hasHands: BooleanField; + overrides: fields.SchemaField; + canCast: fields.BooleanField; + canSpeak: fields.BooleanField; + hasHands: fields.BooleanField; /** Whether the actor uses its own unarmed attacks while in battle form */ - ownUnarmed: BooleanField; + ownUnarmed: fields.BooleanField; }; export type { BattleFormRuleOverrideSchema, BattleFormRuleSchema }; diff --git a/types/src/module/rules/rule-element/battle-form/types.d.ts b/types/src/module/rules/rule-element/battle-form/types.d.ts index 528c14fd4..c196efc95 100644 --- a/types/src/module/rules/rule-element/battle-form/types.d.ts +++ b/types/src/module/rules/rule-element/battle-form/types.d.ts @@ -6,6 +6,7 @@ import type { Size } from "@module/data.ts"; import type { RawPredicate } from "@system/predication.ts"; import type { RuleElementSource } from "../index.ts"; import type { ImmunityRuleElement, ResistanceRuleElement, WeaknessRuleElement } from "../iwr/index.ts"; + interface BattleFormSource extends RuleElementSource { overrides?: BattleFormOverrides; canCast?: boolean; @@ -62,8 +63,10 @@ interface BattleFormStrike { modifier: string | number; damage: WeaponDamage; ownIfHigher?: boolean; - range?: number | null; - maxRange?: number | null; + range?: { + increment?: number | null; + max?: number | null; + }; } interface BattleFormStrikeQuery { pack: string; diff --git a/types/src/module/rules/rule-element/crafting-ability.d.ts b/types/src/module/rules/rule-element/crafting-ability.d.ts index 3ef69c453..a2f264adc 100644 --- a/types/src/module/rules/rule-element/crafting-ability.d.ts +++ b/types/src/module/rules/rule-element/crafting-ability.d.ts @@ -1,15 +1,9 @@ import type { ActorType, CharacterPF2e } from "@actor"; import { ItemPF2e } from "@item"; -import { PredicateField, SlugField } from "@system/schema-data-fields.ts"; -import type { - ArrayField, - BooleanField, - DocumentUUIDField, - NumberField, - SchemaField, -} from "types/foundry/common/data/fields.d.ts"; +import { PredicateField } from "@system/schema-data-fields.ts"; import { RuleElementOptions, RuleElementPF2e } from "./base.ts"; import { ModelPropsFromRESchema, ResolvableValueField, RuleElementSchema, RuleElementSource } from "./data.ts"; +import fields = foundry.data.fields; /** * @category RuleElement @@ -18,36 +12,37 @@ declare class CraftingAbilityRuleElement extends RuleElementPF2e, ModelPropsFromRESchema { readonly parent: ItemPF2e; slug: string; get actor(): CharacterPF2e; } -type CraftingAbilityRuleSchema = Omit & { - slug: SlugField; - isAlchemical: BooleanField; - isDailyPrep: BooleanField; - isPrepared: BooleanField; - batchSizes: SchemaField<{ - default: QuantityField; - other: ArrayField; + isAlchemical: fields.BooleanField; + isDailyPrep: fields.BooleanField; + isPrepared: fields.BooleanField; + batchSizes: fields.SchemaField<{ + default: fields.NumberField; + other: fields.ArrayField; definition: PredicateField; }>>; }>; maxItemLevel: ResolvableValueField; - maxSlots: NumberField; + maxSlots: ResolvableValueField; craftableItems: PredicateField; - prepared: ArrayField>; + prepared: fields.ArrayField>; }; -type QuantityField = NumberField; type PreparedFormulaSchema = { - uuid: DocumentUUIDField; - quantity: NumberField; - expended: BooleanField; - isSignatureItem: BooleanField; + uuid: fields.DocumentUUIDField; + quantity: fields.NumberField; + expended: fields.BooleanField; + isSignatureItem: fields.BooleanField; }; type CraftingAbilityRuleData = Omit, "preparedFormulas"> & { prepared: (Partial> & { @@ -55,6 +50,7 @@ type CraftingAbilityRuleData = Omit, })[]; }; interface CraftingAbilityRuleSource extends RuleElementSource { + resource?: unknown; batchSizes?: unknown; isAlchemical?: unknown; isDailyPrep?: unknown; diff --git a/types/src/module/rules/rule-element/creature-size.d.ts b/types/src/module/rules/rule-element/creature-size.d.ts index 7d7df0b43..93c80341e 100644 --- a/types/src/module/rules/rule-element/creature-size.d.ts +++ b/types/src/module/rules/rule-element/creature-size.d.ts @@ -1,9 +1,10 @@ import type { ActorType, CreaturePF2e } from "@actor"; import { Size } from "@module/data.ts"; import { RecordField } from "@system/schema-data-fields.ts"; -import type { BooleanField, StringField } from "types/foundry/common/data/fields.d.ts"; import { RuleElementOptions, RuleElementPF2e } from "./base.ts"; import { ModelPropsFromRESchema, ResolvableValueField, RuleElementSchema, RuleElementSource } from "./data.ts"; +import fields = foundry.data.fields; + /** * @category RuleElement * Change a creature's size @@ -25,9 +26,9 @@ interface CreatureSizeRuleElement extends RuleElementPF2e; - reach: RecordField, ResolvableValueField, false, false, false>; - resizeEquipment: BooleanField; - minimumSize: StringField; - maximumSize: StringField; + reach: RecordField, ResolvableValueField, false, false, false>; + resizeEquipment: fields.BooleanField; + minimumSize: fields.StringField; + maximumSize: fields.StringField; }; export { CreatureSizeRuleElement }; diff --git a/types/src/module/rules/rule-element/crit-spec.d.ts b/types/src/module/rules/rule-element/crit-spec.d.ts index a293da989..75b757681 100644 --- a/types/src/module/rules/rule-element/crit-spec.d.ts +++ b/types/src/module/rules/rule-element/crit-spec.d.ts @@ -1,9 +1,11 @@ import { ModifierType } from "@actor/modifiers.ts"; import type { ActorType } from "@actor/types.ts"; import { DamageCategoryUnique, DamageType } from "@system/damage/types.ts"; -import type { BooleanField, NumberField, SchemaField, StringField } from "types/foundry/common/data/fields.d.ts"; +import type { SchemaField } from "types/foundry/common/data/fields.d.ts"; import { RuleElementPF2e } from "./base.ts"; import { ModelPropsFromRESchema, ResolvableValueField, RuleElementSchema, RuleValue } from "./data.ts"; +import fields = foundry.data.fields; + /** Substitute a pre-determined result for a check's D20 roll */ declare class CritSpecRuleElement extends RuleElementPF2e { #private; @@ -17,15 +19,15 @@ interface CritSpecRuleElement extends RuleElementPF2e, Model type DamageDieFaces = 4 | 6 | 8 | 10 | 12; type CritSpecRuleSchema = RuleElementSchema & { /** Whether this critical specialization note substitutes for the standard one of a given weapon group */ - alternate: BooleanField; + alternate: fields.BooleanField; /** Alternative note text: if not provided, the standard one for a given weapon group is used */ - text: StringField; + text: fields.StringField; /** Alternative damage dice */ damageDice: SchemaField<{ number: ResolvableValueField; - faces: NumberField; - damageType: StringField; - category: StringField; + faces: fields.NumberField; + damageType: fields.StringField; + category: fields.StringField; }, { number: RuleValue; faces: DamageDieFaces; @@ -38,10 +40,10 @@ type CritSpecRuleSchema = RuleElementSchema & { category: DamageCategoryUnique | null; }, false, true, true>; /** Alternative modifier */ - modifier: SchemaField<{ - type: StringField; - damageType: StringField; - category: StringField; + modifier: fields.SchemaField<{ + type: fields.StringField; + damageType: fields.StringField; + category: fields.StringField; value: ResolvableValueField; }, { type: ModifierType; diff --git a/types/src/module/rules/rule-element/damage-alteration/rule-element.d.ts b/types/src/module/rules/rule-element/damage-alteration/rule-element.d.ts index 167b13603..6e404b7f4 100644 --- a/types/src/module/rules/rule-element/damage-alteration/rule-element.d.ts +++ b/types/src/module/rules/rule-element/damage-alteration/rule-element.d.ts @@ -1,9 +1,10 @@ import type { DamageType } from "@system/damage/types.ts"; import { StrictArrayField } from "@system/schema-data-fields.ts"; -import type { StringField } from "types/foundry/common/data/fields.d.ts"; import { type AELikeChangeMode } from "../ae-like.ts"; import type { ModelPropsFromRESchema, RuleElementSchema } from "../data.ts"; import { ResolvableValueField, RuleElementPF2e } from "../index.ts"; +import fields = foundry.data.fields; + /** Alter certain aspects of individual components (modifiers and dice) of a damage roll. */ declare class DamageAlterationRuleElement extends RuleElementPF2e { static defineSchema(): DamageAlterationSchema; @@ -14,15 +15,15 @@ declare class DamageAlterationRuleElement extends RuleElementPF2e, ModelPropsFromRESchema { } -type DamageAlterationProperty = "dice-faces" | "dice-number" | "damage-type"; +type DamageAlterationProperty = "dice-faces" | "dice-number" | "damage-type" | "tags"; type DamageAlterationSchema = RuleElementSchema & { - selectors: StrictArrayField>; - mode: StringField; - property: StringField; + selectors: StrictArrayField>; + mode: fields.StringField; + property: fields.StringField; value: ResolvableValueField; /** An optional relabeling of the altered unit of damage */ - relabel: StringField; + relabel: fields.StringField; }; -type DamageAlterationValue = DamageType | number; +type DamageAlterationValue = DamageType | number | string[]; export { DamageAlterationRuleElement }; export type { DamageAlterationProperty, DamageAlterationValue }; diff --git a/types/src/module/rules/rule-element/damage-dice.d.ts b/types/src/module/rules/rule-element/damage-dice.d.ts index 92d15d41d..79a362681 100644 --- a/types/src/module/rules/rule-element/damage-dice.d.ts +++ b/types/src/module/rules/rule-element/damage-dice.d.ts @@ -1,7 +1,9 @@ import { DamageDiceOverride } from "@actor/modifiers.ts"; -import type { ArrayField, BooleanField, ObjectField, StringField } from "types/foundry/common/data/fields.d.ts"; +import { SlugField } from "@system/schema-data-fields.ts"; import { RuleElementOptions, RuleElementPF2e } from "./base.ts"; import { ModelPropsFromRESchema, ResolvableValueField, RuleElementSchema, RuleElementSource } from "./data.ts"; +import fields = foundry.data.fields; + declare class DamageDiceRuleElement extends RuleElementPF2e { #private; constructor(data: DamageDiceSource, options: RuleElementOptions); @@ -25,24 +27,26 @@ interface DamageDiceRuleElement extends RuleElementPF2e, M } type DamageDiceRuleSchema = RuleElementSchema & { /** All domains to add a modifier to */ - selector: ArrayField>; + selector: fields.ArrayField>; /** The number of dice to add */ diceNumber: ResolvableValueField; /** The damage die size */ - dieSize: StringField; + dieSize: fields.StringField; /** The damage type */ - damageType: StringField; + damageType: fields.StringField; /** True means the dice are added to critical without doubling; false means the dice are never added to * critical damage; omitted means add to normal damage and double on critical damage. */ - critical: BooleanField; + critical: fields.BooleanField; /** The damage category */ - category: StringField<"persistent" | "precision" | "splash", "persistent" | "precision" | "splash", false, false, false>; + category: fields.StringField<"persistent" | "precision" | "splash", "persistent" | "precision" | "splash", false, false, false>; + /** A list of tags associated with this damage */ + tags: fields.ArrayField, string[], string[], false, false, true>; /** Resolvable bracket data */ brackets: ResolvableValueField; /** Damage dice override data */ - override: ObjectField; + override: fields.ObjectField; /** Hide this dice change from breakdown tooltips if it is disabled */ - hideIfDisabled: BooleanField; + hideIfDisabled: fields.BooleanField; }; export { DamageDiceRuleElement }; diff --git a/types/src/module/rules/rule-element/effect-spinoff/rule-element.d.ts b/types/src/module/rules/rule-element/effect-spinoff/rule-element.d.ts index cefe3c29f..f76cdff23 100644 --- a/types/src/module/rules/rule-element/effect-spinoff/rule-element.d.ts +++ b/types/src/module/rules/rule-element/effect-spinoff/rule-element.d.ts @@ -1,9 +1,10 @@ import type { ActorPF2e } from "@actor"; import type { PhysicalItemPF2e } from "@item"; import { SlugField } from "@system/schema-data-fields.ts"; -import type { ArrayField, NumberField, SchemaField, StringField } from "types/foundry/common/data/fields.d.ts"; import { RuleElementOptions, RuleElementPF2e } from "../base.ts"; import type { ModelPropsFromRESchema, RuleElementSchema, RuleElementSource } from "../data.ts"; +import fields = foundry.data.fields; + declare class EffectSpinoffRuleElement extends RuleElementPF2e { constructor(source: RuleElementSource, options: RuleElementOptions); static defineSchema(): EffectSpinoffSchema; @@ -17,14 +18,14 @@ interface EffectSpinoffRuleElement extends RuleElementPF2e, } type ActivateTimeUnit = "actions" | "reaction" | "minutes" | "hours"; type ActivationTrait = "concentrate" | "manipulate"; -type ActivationSchema = SchemaField<{ - label: StringField; - time: SchemaField<{ - value: NumberField; - unit: StringField; +type ActivationSchema = fields.SchemaField<{ + label: fields.StringField; + time: fields.SchemaField<{ + value: fields.NumberField; + unit: fields.StringField; }>; - traits: ArrayField>; - details: StringField; + traits: fields.ArrayField>; + details: fields.StringField; }, { label: string | null; time: { @@ -45,6 +46,6 @@ type ActivationSchema = SchemaField<{ type EffectSpinoffSchema = Omit & { slug: SlugField; activation: ActivationSchema; - description: StringField; + description: fields.StringField; }; export { EffectSpinoffRuleElement }; diff --git a/types/src/module/rules/rule-element/ephemeral-effect.d.ts b/types/src/module/rules/rule-element/ephemeral-effect.d.ts index 54976d3bb..080dde17d 100644 --- a/types/src/module/rules/rule-element/ephemeral-effect.d.ts +++ b/types/src/module/rules/rule-element/ephemeral-effect.d.ts @@ -1,7 +1,8 @@ -import type { ArrayField, BooleanField, EmbeddedDataField, StringField } from "types/foundry/common/data/fields.d.ts"; import { RuleElementPF2e } from "./base.ts"; import { ModelPropsFromRESchema, RuleElementSchema } from "./data.ts"; import { ItemAlteration } from "./item-alteration/alteration.ts"; +import fields = foundry.data.fields; + /** An effect that applies ephemerally during a single action, such as a strike */ declare class EphemeralEffectRuleElement extends RuleElementPF2e { #private; @@ -12,10 +13,10 @@ declare class EphemeralEffectRuleElement extends RuleElementPF2e, ModelPropsFromRESchema { } type EphemeralEffectSchema = RuleElementSchema & { - affects: StringField<"target" | "origin", "target" | "origin", true, false, true>; - selectors: ArrayField>; - uuid: StringField; - adjustName: BooleanField; - alterations: ArrayField>; + affects: fields.StringField<"target" | "origin", "target" | "origin", true, false, true>; + selectors: fields.ArrayField>; + uuid: fields.StringField; + adjustName: fields.BooleanField; + alterations: fields.ArrayField>; }; export { EphemeralEffectRuleElement }; diff --git a/types/src/module/rules/rule-element/fast-healing.d.ts b/types/src/module/rules/rule-element/fast-healing.d.ts index 4c9e7a9b4..36e8f0dee 100644 --- a/types/src/module/rules/rule-element/fast-healing.d.ts +++ b/types/src/module/rules/rule-element/fast-healing.d.ts @@ -1,7 +1,8 @@ import type { ActorType } from "@actor/types.ts"; -import type { ArrayField, StringField } from "types/foundry/common/data/fields.d.ts"; import { RuleElementPF2e } from "./base.ts"; import { ModelPropsFromRESchema, ResolvableValueField, RuleElementSchema } from "./data.ts"; +import fields = foundry.data.fields; + /** * Rule element to implement fast healing and regeneration. * Creates a chat card every round of combat. @@ -18,9 +19,9 @@ declare class FastHealingRuleElement extends RuleElementPF2e; - type: StringField; - details: StringField; - deactivatedBy: ArrayField, string[], string[], false, false, false>; + type: fields.StringField; + details: fields.StringField; + deactivatedBy: fields.ArrayField, string[], string[], false, false, false>; }; interface FastHealingRuleElement extends RuleElementPF2e, ModelPropsFromRESchema { } diff --git a/types/src/module/rules/rule-element/fixed-proficiency.d.ts b/types/src/module/rules/rule-element/fixed-proficiency.d.ts deleted file mode 100644 index ba0c136f0..000000000 --- a/types/src/module/rules/rule-element/fixed-proficiency.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { ActorType, CharacterPF2e } from "@actor"; -import { AttributeString } from "@actor/types.ts"; -import type { StringField } from "types/foundry/common/data/fields.d.ts"; -import { RuleElementPF2e } from "./base.ts"; -import { ModelPropsFromRESchema, ResolvableValueField, RuleElementSchema } from "./data.ts"; -/** - * @category RuleElement - */ -declare class FixedProficiencyRuleElement extends RuleElementPF2e { - protected static validActorTypes: ActorType[]; - static defineSchema(): FixedProficiencyRuleSchema; - static validateJoint(data: SourceFromSchema): void; - beforePrepareData(): void; - afterPrepareData(): void; -} -interface FixedProficiencyRuleElement extends RuleElementPF2e, ModelPropsFromRESchema { - get actor(): CharacterPF2e; -} -type FixedProficiencyRuleSchema = RuleElementSchema & { - selector: StringField; - value: ResolvableValueField; - ability: StringField; -}; -export { FixedProficiencyRuleElement }; diff --git a/types/src/module/rules/rule-element/flat-modifier.d.ts b/types/src/module/rules/rule-element/flat-modifier.d.ts index b6dfbddd1..b42023d1b 100644 --- a/types/src/module/rules/rule-element/flat-modifier.d.ts +++ b/types/src/module/rules/rule-element/flat-modifier.d.ts @@ -1,10 +1,23 @@ import { ModifierType } from "@actor/modifiers.ts"; import { AttributeString } from "@actor/types.ts"; import { DamageCategoryUnique } from "@system/damage/types.ts"; -import { DataUnionField, PredicateField, StrictBooleanField, StrictStringField } from "@system/schema-data-fields.ts"; -import type { ArrayField, BooleanField, NumberField, StringField } from "types/foundry/common/data/fields.d.ts"; +import { + DataUnionField, + PredicateField, + SlugField, + StrictBooleanField, + StrictStringField, +} from "@system/schema-data-fields.ts"; import { RuleElementOptions, RuleElementPF2e } from "./base.ts"; -import { ModelPropsFromRESchema, ResolvableValueField, RuleElementSchema, RuleElementSource, RuleValue } from "./data.ts"; +import { + ModelPropsFromRESchema, + ResolvableValueField, + RuleElementSchema, + RuleElementSource, + RuleValue, +} from "./data.ts"; +import fields = foundry.data.fields; + /** * Apply a constant modifier (or penalty/bonus) to a statistic or usage thereof * @category RuleElement @@ -23,27 +36,29 @@ interface FlatModifierRuleElement extends RuleElementPF2e, M } type FlatModifierSchema = RuleElementSchema & { /** All domains to add a modifier to */ - selector: ArrayField, string[], string[], true, false, false>; + selector: fields.ArrayField, string[], string[], true, false, false>; /** The modifier (or bonus/penalty) type */ - type: StringField; + type: fields.StringField; /** If this is an ability modifier, the ability score it modifies */ - ability: StringField; + ability: fields.StringField; /** Hide this modifier from breakdown tooltips if it is disabled */ - min: NumberField; - max: NumberField; - hideIfDisabled: BooleanField; + min: fields.NumberField; + max: fields.NumberField; + hideIfDisabled: fields.BooleanField; /** Whether to use this bonus/penalty/modifier even if it isn't the greatest magnitude */ - force: BooleanField; + force: fields.BooleanField; /** Whether this modifier comes from equipment or an equipment effect */ - fromEquipment: BooleanField; + fromEquipment: fields.BooleanField; /** If a damage modifier, a damage type */ - damageType: StringField; + damageType: fields.StringField; /** If a damage modifier, a special category */ - damageCategory: StringField; + damageCategory: fields.StringField; /** If a damage modifier, whether it applies given the presence or absence of a critically successful attack roll */ - critical: BooleanField; + critical: fields.BooleanField; /** The numeric value of the modifier */ value: ResolvableValueField; + /** A list of tags associated with this modifier */ + tags: fields.ArrayField, string[], string[], false, false, true>; /** * Remove the parent item (must be an effect) after a roll: * The value may be a boolean, "if-enabled", or a predicate to be tested against the roll options from the roll. diff --git a/types/src/module/rules/rule-element/grant-item/rule-element.d.ts b/types/src/module/rules/rule-element/grant-item/rule-element.d.ts index 4ef6ff855..a8b6d77f9 100644 --- a/types/src/module/rules/rule-element/grant-item/rule-element.d.ts +++ b/types/src/module/rules/rule-element/grant-item/rule-element.d.ts @@ -1,9 +1,10 @@ import type { ActorType } from "@actor"; -import { ItemSourcePF2e } from "@item/base/data/index.ts"; +import type { ItemSourcePF2e } from "@item/base/data/index.ts"; import { ItemGrantDeleteAction } from "@item/base/data/system.ts"; import { RuleElementOptions, RuleElementPF2e } from "../base.ts"; import { ModelPropsFromRESchema, RuleElementSource } from "../data.ts"; import { GrantItemSchema } from "./schema.ts"; + declare class GrantItemRuleElement extends RuleElementPF2e { #private; static validActorTypes: ActorType[]; diff --git a/types/src/module/rules/rule-element/grant-item/schema.d.ts b/types/src/module/rules/rule-element/grant-item/schema.d.ts index e62a83bcf..b02fc61c4 100644 --- a/types/src/module/rules/rule-element/grant-item/schema.d.ts +++ b/types/src/module/rules/rule-element/grant-item/schema.d.ts @@ -1,27 +1,30 @@ import type { SlugField, StrictArrayField } from "@system/schema-data-fields.ts"; -import type { BooleanField, EmbeddedDataField, StringField } from "types/foundry/common/data/fields.d.ts"; +import type * as fields from "types/foundry/common/data/fields.d.ts"; import type { RuleElementSchema } from "../data.ts"; import type { ItemAlteration } from "../item-alteration/alteration.ts"; + type GrantItemSchema = RuleElementSchema & { /** The UUID of the item to grant: must be a compendium or world item */ - uuid: StringField; + uuid: fields.StringField; /** A flag for referencing the granted item ID in other rule elements */ flag: SlugField; /** Permit this grant to be applied during an actor update--if it isn't already granted and the predicate passes */ - reevaluateOnUpdate: BooleanField; + reevaluateOnUpdate: fields.BooleanField; /** * Instead of creating a new item in the actor's embedded collection, add a "virtual" one. Usable only with * conditions */ - inMemoryOnly: BooleanField; + inMemoryOnly: fields.BooleanField; /** Allow multiple of the same item (as determined by source ID) to be granted */ - allowDuplicate: BooleanField; + allowDuplicate: fields.BooleanField; + /** Visually nest this granted item under its granter: only applies to feats and features */ + nestUnderGranter: fields.BooleanField; /** A list of alterations to make on the item before granting it */ - alterations: StrictArrayField>; + alterations: StrictArrayField>; /** * Track a granted physical item from roll options: the sluggified `flag` will serve as a prefix for item roll * options, which are added to the `all` domain. */ - track: BooleanField; + track: fields.BooleanField; }; export type { GrantItemSchema }; diff --git a/types/src/module/rules/rule-element/item-alteration/rule-element.d.ts b/types/src/module/rules/rule-element/item-alteration/rule-element.d.ts index 2881def5e..cf66e5260 100644 --- a/types/src/module/rules/rule-element/item-alteration/rule-element.d.ts +++ b/types/src/module/rules/rule-element/item-alteration/rule-element.d.ts @@ -1,10 +1,10 @@ import type { ActorPF2e } from "@actor"; import type { ItemPF2e } from "@item"; import type { ItemType } from "@item/base/data/index.ts"; -import type { StringField } from "types/foundry/common/data/fields.d.ts"; import { RuleElementPF2e } from "../base.ts"; import type { ModelPropsFromRESchema, RuleElementSchema } from "../data.ts"; import { ItemAlterationSchema } from "./alteration.ts"; +import fields = foundry.data.fields; declare class ItemAlterationRuleElement extends RuleElementPF2e { #private; @@ -20,9 +20,9 @@ interface ItemAlterationRuleElement extends RuleElementPF2e; + itemType: fields.StringField; /** As an alternative to specifying item types, an exact item ID can be provided */ - itemId: StringField; + itemId: fields.StringField; }; interface ApplyAlterationOptions { /** A single item to on which to run alterations instead of all qualifying items owned by the actor */ diff --git a/types/src/module/rules/rule-element/item-alteration/schemas.d.ts b/types/src/module/rules/rule-element/item-alteration/schemas.d.ts index 731262d8c..619c084bd 100644 --- a/types/src/module/rules/rule-element/item-alteration/schemas.d.ts +++ b/types/src/module/rules/rule-element/item-alteration/schemas.d.ts @@ -3,9 +3,18 @@ import type { ItemSourcePF2e, ItemType } from "@item/base/data/index.ts"; import type { ItemTrait } from "@item/base/types.ts"; import { type DamageType } from "@system/damage/types.ts"; import { PredicateField, SlugField, StrictNumberField } from "@system/schema-data-fields.ts"; -import type { ArrayField, BooleanField, DataField, DataFieldOptions, NumberField, SchemaField, StringField } from "types/foundry/common/data/fields.d.ts"; +import type { + ArrayField, + BooleanField, + DataField, + DataFieldOptions, + NumberField, + SchemaField, + StringField, +} from "types/foundry/common/data/fields.d.ts"; import type { DataModelValidationFailure } from "types/foundry/common/data/validation-failure.d.ts"; import type { AELikeChangeMode } from "../ae-like.ts"; + declare const fields: typeof foundry.data.fields; /** A `SchemaField` reappropriated for validation of specific item alterations */ declare class ItemAlterationValidator extends fields.SchemaField { @@ -34,58 +43,58 @@ type MaybeAlterationData = { declare const ITEM_ALTERATION_VALIDATORS: { "ac-bonus": ItemAlterationValidator<{ itemType: StringField<"armor" | "shield", ItemType, true, false, false>; - mode: StringField<"override" | "upgrade" | "downgrade" | "add" | "subtract" | "remove", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; + mode: StringField<"add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; value: NumberField, true, false, boolean>; }>; "area-size": ItemAlterationValidator<{ itemType: StringField<"spell", ItemType, true, false, false>; - mode: StringField<"override" | "upgrade" | "downgrade" | "add" | "subtract", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; + mode: StringField<"add" | "subtract" | "downgrade" | "upgrade" | "override", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; value: NumberField, true, false, boolean>; }>; "badge-max": ItemAlterationValidator<{ itemType: StringField<"effect", ItemType, true, false, false>; - mode: StringField<"override" | "downgrade", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; + mode: StringField<"downgrade" | "override", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; value: NumberField, true, false, boolean>; }>; "badge-value": ItemAlterationValidator<{ itemType: StringField<"condition" | "effect", ItemType, true, false, false>; - mode: StringField<"override" | "upgrade" | "downgrade" | "add" | "subtract" | "remove", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; + mode: StringField<"add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; value: NumberField, true, false, boolean>; }>; bulk: ItemAlterationValidator<{ - itemType: StringField<"armor" | "shield" | "consumable" | "book" | "backpack" | "equipment" | "treasure" | "weapon", ItemType, true, false, false>; - mode: StringField<"override", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; + itemType: StringField<"armor" | "shield" | "consumable" | "backpack" | "book" | "equipment" | "treasure" | "weapon", ItemType, true, false, false>; + mode: StringField<"override", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; value: StrictNumberField; }>; category: ItemAlterationValidator<{ itemType: StringField<"armor", ItemType, true, false, false>; - mode: StringField<"override", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; + mode: StringField<"override", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; value: StringField<"light" | "medium" | "heavy", NonNullable, true, false, boolean>; }>; "check-penalty": ItemAlterationValidator<{ itemType: StringField<"armor", ItemType, true, false, false>; - mode: StringField<"override" | "upgrade" | "downgrade" | "add" | "subtract" | "remove", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; + mode: StringField<"add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; value: StrictNumberField, true, false, boolean>; }>; "damage-dice-faces": ItemAlterationValidator<{ itemType: StringField<"weapon", ItemType, true, false, false>; - mode: StringField<"override" | "upgrade" | "downgrade", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; - value: StrictNumberField<4 | 6 | 8 | 10 | 12, 4 | 6 | 8 | 10 | 12, true, true, true>; + mode: StringField<"downgrade" | "upgrade" | "override", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; + value: StrictNumberField<4 | 6 | 8 | 12 | 10, 4 | 6 | 8 | 12 | 10, true, true, true>; }>; "damage-type": ItemAlterationValidator<{ itemType: StringField<"weapon", ItemType, true, false, false>; - mode: StringField<"override", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; + mode: StringField<"override", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; value: StringField<"acid" | "bleed" | "bludgeoning" | "cold" | "electricity" | "fire" | "force" | "mental" | "piercing" | "poison" | "slashing" | "sonic" | "spirit" | "vitality" | "void" | "untyped", NonNullable, true, false, boolean>; }>; /** The passive defense targeted by an attack spell */ "defense-passive": ItemAlterationValidator<{ itemType: StringField<"spell", ItemType, true, false, false>; - mode: StringField<"override", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; + mode: StringField<"override", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; value: StringField<"ac" | "fortitude-dc" | "reflex-dc" | "will-dc", NonNullable, true, false, boolean>; }>; description: ItemAlterationValidator<{ - itemType: StringField<"armor" | "shield" | "consumable" | "class" | "ancestry" | "book" | "backpack" | "equipment" | "treasure" | "weapon" | "action" | "affliction" | "background" | "campaignFeature" | "condition" | "deity" | "effect" | "feat" | "heritage" | "kit" | "lore" | "melee" | "spell" | "spellcastingEntry", ItemType, true, false, false>; - mode: StringField<"override" | "add", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; + itemType: StringField<"armor" | "shield" | "consumable" | "class" | "ancestry" | "action" | "feat" | "affliction" | "background" | "campaignFeature" | "condition" | "deity" | "effect" | "heritage" | "kit" | "lore" | "melee" | "spell" | "spellcastingEntry" | "backpack" | "book" | "equipment" | "treasure" | "weapon", ItemType, true, false, false>; + mode: StringField<"add" | "override", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; value: ArrayField; text: StringField; @@ -100,72 +109,72 @@ declare const ITEM_ALTERATION_VALIDATORS: { }>; "dex-cap": ItemAlterationValidator<{ itemType: StringField<"armor", ItemType, true, false, false>; - mode: StringField<"override" | "upgrade" | "downgrade" | "add" | "subtract" | "remove", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; + mode: StringField<"add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; value: StrictNumberField, true, false, boolean>; }>; "focus-point-cost": ItemAlterationValidator<{ itemType: StringField<"spell", ItemType, true, false, false>; - mode: StringField<"override" | "upgrade" | "add", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; + mode: StringField<"add" | "upgrade" | "override", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; value: StrictNumberField, true, false, boolean>; }>; hardness: ItemAlterationValidator<{ - itemType: StringField<"armor" | "shield" | "consumable" | "book" | "backpack" | "equipment" | "treasure" | "weapon", ItemType, true, false, false>; - mode: StringField<"override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; + itemType: StringField<"armor" | "shield" | "consumable" | "backpack" | "book" | "equipment" | "treasure" | "weapon", ItemType, true, false, false>; + mode: StringField<"multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; value: NumberField, true, false, boolean>; }>; "hp-max": ItemAlterationValidator<{ - itemType: StringField<"armor" | "shield" | "consumable" | "book" | "backpack" | "equipment" | "treasure" | "weapon", ItemType, true, false, false>; - mode: StringField<"override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; + itemType: StringField<"armor" | "shield" | "consumable" | "backpack" | "book" | "equipment" | "treasure" | "weapon", ItemType, true, false, false>; + mode: StringField<"multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; value: NumberField, true, false, boolean>; }>; "material-type": ItemAlterationValidator<{ - itemType: StringField<"armor" | "shield" | "consumable" | "book" | "backpack" | "equipment" | "treasure" | "weapon", ItemType, true, false, false>; - mode: StringField<"override", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; - value: StringField<"abysium" | "adamantine" | "dawnsilver" | "djezet" | "duskwood" | "inubrix" | "noqual" | "orichalcum" | "siccatite" | "silver" | "cold-iron" | "dragonhide" | "grisantian-pelt" | "keep-stone" | "peachwood" | "sisterstone" | "sisterstone-dusk" | "sisterstone-scarlet" | "sovereign-steel" | "warpglass", NonNullable, true, false, boolean>; + itemType: StringField<"armor" | "shield" | "consumable" | "backpack" | "book" | "equipment" | "treasure" | "weapon", ItemType, true, false, false>; + mode: StringField<"override", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; + value: StringField<"abysium" | "adamantine" | "dawnsilver" | "djezet" | "duskwood" | "inubrix" | "noqual" | "orichalcum" | "siccatite" | "silver" | "cold-iron" | "dragonhide" | "dreamweb" | "grisantian-pelt" | "keep-stone" | "peachwood" | "sisterstone" | "sisterstone-dusk" | "sisterstone-scarlet" | "sloughstone" | "sovereign-steel" | "warpglass", NonNullable, true, false, boolean>; }>; "pd-recovery-dc": ItemAlterationValidator<{ itemType: StringField<"condition", ItemType, true, false, false>; - mode: StringField<"override" | "upgrade" | "downgrade" | "add" | "subtract" | "remove", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; + mode: StringField<"add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; value: NumberField, true, false, boolean>; }>; "persistent-damage": ItemAlterationValidator<{ itemType: StringField<"condition", ItemType, true, false, false>; - mode: StringField<"override", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; + mode: StringField<"override", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; value: SchemaField, ModelPropsFromSchema, true, false, true>; }>; rarity: ItemAlterationValidator<{ - itemType: StringField<"armor" | "shield" | "consumable" | "book" | "backpack" | "equipment" | "treasure" | "weapon", ItemType, true, false, false>; - mode: StringField<"override", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; - value: StringField<"common" | "uncommon" | "rare" | "unique", NonNullable, true, false, boolean>; + itemType: StringField<"armor" | "shield" | "consumable" | "backpack" | "book" | "equipment" | "treasure" | "weapon", ItemType, true, false, false>; + mode: StringField<"override", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; + value: StringField<"common" | "unique" | "uncommon" | "rare", NonNullable, true, false, boolean>; }>; "frequency-max": ItemAlterationValidator<{ itemType: StringField<"action" | "feat", ItemType, true, false, false>; - mode: StringField<"override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; + mode: StringField<"multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; value: NumberField, true, false, boolean>; }>; "frequency-per": ItemAlterationValidator<{ itemType: StringField<"action" | "feat", ItemType, true, false, false>; - mode: StringField<"override" | "upgrade" | "downgrade", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; + mode: StringField<"downgrade" | "upgrade" | "override", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; value: StringField, true, false, boolean>; }>; "other-tags": ItemAlterationValidator<{ - itemType: StringField<"armor" | "shield" | "consumable" | "class" | "ancestry" | "book" | "backpack" | "equipment" | "treasure" | "weapon" | "action" | "affliction" | "background" | "campaignFeature" | "condition" | "deity" | "effect" | "feat" | "heritage" | "kit" | "lore" | "melee" | "spell" | "spellcastingEntry", ItemType, true, false, false>; - mode: StringField<"add" | "subtract" | "remove", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; + itemType: StringField<"armor" | "shield" | "consumable" | "class" | "ancestry" | "action" | "feat" | "affliction" | "background" | "campaignFeature" | "condition" | "deity" | "effect" | "heritage" | "kit" | "lore" | "melee" | "spell" | "spellcastingEntry" | "backpack" | "book" | "equipment" | "treasure" | "weapon", ItemType, true, false, false>; + mode: StringField<"add" | "subtract" | "remove", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; value: SlugField; }>; "speed-penalty": ItemAlterationValidator<{ itemType: StringField<"armor" | "shield", ItemType, true, false, false>; - mode: StringField<"override" | "upgrade" | "downgrade" | "add" | "subtract" | "remove", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; + mode: StringField<"add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; value: StrictNumberField, true, false, boolean>; }>; strength: ItemAlterationValidator<{ itemType: StringField<"armor", ItemType, true, false, false>; - mode: StringField<"override" | "upgrade" | "downgrade" | "add" | "subtract" | "remove", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; + mode: StringField<"add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; value: StrictNumberField, true, false, boolean>; }>; traits: ItemAlterationValidator<{ - itemType: StringField<"armor" | "shield" | "consumable" | "class" | "ancestry" | "book" | "backpack" | "equipment" | "treasure" | "weapon" | "action" | "affliction" | "background" | "campaignFeature" | "condition" | "effect" | "feat" | "heritage" | "kit" | "melee" | "spell", ItemType, true, false, false>; - mode: StringField<"add" | "subtract" | "remove", "override" | "upgrade" | "downgrade" | "multiply" | "add" | "subtract" | "remove", true, false, false>; + itemType: StringField<"armor" | "shield" | "consumable" | "class" | "ancestry" | "action" | "feat" | "affliction" | "background" | "campaignFeature" | "condition" | "effect" | "heritage" | "kit" | "melee" | "spell" | "backpack" | "book" | "equipment" | "treasure" | "weapon", ItemType, true, false, false>; + mode: StringField<"add" | "subtract" | "remove", "multiply" | "add" | "subtract" | "remove" | "downgrade" | "upgrade" | "override", true, false, false>; value: StringField; }>; }; diff --git a/types/src/module/rules/rule-element/iwr/base.d.ts b/types/src/module/rules/rule-element/iwr/base.d.ts index 6a9367623..c525505c5 100644 --- a/types/src/module/rules/rule-element/iwr/base.d.ts +++ b/types/src/module/rules/rule-element/iwr/base.d.ts @@ -1,11 +1,12 @@ -import { IWRSource, Immunity, Resistance, Weakness } from "@actor/data/iwr.ts"; +import { Immunity, IWRSource, Resistance, Weakness } from "@actor/data/iwr.ts"; import { IWRType } from "@actor/types.ts"; import type { Predicate } from "@system/predication.ts"; import { DataUnionField, PredicateField, StrictArrayField, StrictStringField } from "@system/schema-data-fields.ts"; -import type { ArrayField, BooleanField, SchemaField, StringField } from "types/foundry/common/data/fields.d.ts"; import { AELikeChangeMode } from "../ae-like.ts"; import { RuleElementPF2e } from "../base.ts"; import { ModelPropsFromRESchema, RuleElementSchema, RuleElementSource, RuleValue } from "../data.ts"; +import fields = foundry.data.fields; + /** @category RuleElement */ declare abstract class IWRRuleElement extends RuleElementPF2e { #private; @@ -24,9 +25,9 @@ interface IWRRuleElement extends RuleElementPF2e< } type IWRRuleSchema = RuleElementSchema & { /** Whether to add or remove an immunity, weakness, or resistance (default is "add") */ - mode: StringField; + mode: fields.StringField; /** One or more IWR types: "custom" is also an acceptable value, but it must be used in isolation. */ - type: ArrayField>; + type: fields.ArrayField>; /** * A list of exceptions, which may include string values corresponding with the IWR type or objects defining custom * exceptions @@ -35,9 +36,9 @@ type IWRRuleSchema = RuleElementSchema & { /** A definition for a "custom"-type IWR */ definition: PredicateField; /** Whether to override an existing IWR of the same type, even if it's higher */ - override: BooleanField; + override: fields.BooleanField; }; -type IWRExceptionField = DataUnionField | SchemaField<{ +type IWRExceptionField = DataUnionField | fields.SchemaField<{ definition: PredicateField; label: StrictStringField; }>, true, false, false>; diff --git a/types/src/module/rules/rule-element/lose-hit-points.d.ts b/types/src/module/rules/rule-element/lose-hit-points.d.ts index 67c615ae0..d43c0def9 100644 --- a/types/src/module/rules/rule-element/lose-hit-points.d.ts +++ b/types/src/module/rules/rule-element/lose-hit-points.d.ts @@ -3,6 +3,8 @@ import { ItemSourcePF2e } from "@item/base/data/index.ts"; import type { BooleanField } from "types/foundry/common/data/fields.d.ts"; import { RuleElementPF2e } from "./base.ts"; import { ModelPropsFromRESchema, ResolvableValueField, RuleElementSchema } from "./data.ts"; +import fields = foundry.data.fields; + /** Reduce current hit points without applying damage */ declare class LoseHitPointsRuleElement extends RuleElementPF2e { static validActorTypes: ActorType[]; @@ -17,7 +19,7 @@ interface LoseHitPointsRuleElement extends RuleElementPF2e; /** Whether the lost hit points are recoverable while the parent item is present on the actor */ - recoverable: BooleanField; + recoverable: fields.BooleanField; /** * Lost hitpoints should reevaluate on item update, with the parent actor losing the difference in HP between the * new and old values. diff --git a/types/src/module/rules/rule-element/martial-proficiency.d.ts b/types/src/module/rules/rule-element/martial-proficiency.d.ts index 3ded55d6d..cb36825a3 100644 --- a/types/src/module/rules/rule-element/martial-proficiency.d.ts +++ b/types/src/module/rules/rule-element/martial-proficiency.d.ts @@ -2,9 +2,11 @@ import type { ActorType, CharacterPF2e } from "@actor"; import { ArmorCategory } from "@item/armor/types.ts"; import { ProficiencyRank } from "@item/base/data/index.ts"; import { WeaponCategory } from "@item/weapon/types.ts"; -import { PredicateField, StrictStringField } from "@system/schema-data-fields.ts"; +import { PredicateField } from "@system/schema-data-fields.ts"; import { RuleElementOptions, RuleElementPF2e } from "./base.ts"; import { ModelPropsFromRESchema, ResolvableValueField, RuleElementSchema, RuleElementSource } from "./data.ts"; +import fields = foundry.data.fields; + declare class MartialProficiencyRuleElement extends RuleElementPF2e { protected static validActorTypes: ActorType[]; slug: string; @@ -17,13 +19,13 @@ interface MartialProficiencyRuleElement extends RuleElementPF2e; + kind: fields.StringField<"attack" | "defense", "attack" | "defense", true, false, true>; /** The criteria for matching qualifying weapons and other attacks */ definition: PredicateField; /** The attack category to which this proficiency's rank is linked */ - sameAs: StrictStringField; + sameAs: fields.StringField; /** The maximum rank this proficiency can reach, if any */ - maxRank: StrictStringField, Exclude, false, false, false>; + maxRank: fields.StringField, Exclude, false, false, false>; /** Initially a number indicating rank, changed into a `MartialProficiency` object for overriding as an AE-like */ value: ResolvableValueField; }; diff --git a/types/src/module/rules/rule-element/multiple-attack-penalty.d.ts b/types/src/module/rules/rule-element/multiple-attack-penalty.d.ts index c39e659ff..632493f43 100644 --- a/types/src/module/rules/rule-element/multiple-attack-penalty.d.ts +++ b/types/src/module/rules/rule-element/multiple-attack-penalty.d.ts @@ -1,6 +1,7 @@ -import type { StringField } from "types/foundry/common/data/fields.d.ts"; import { RuleElementPF2e } from "./base.ts"; import { ModelPropsFromRESchema, ResolvableValueField, RuleElementSchema } from "./data.ts"; +import fields = foundry.data.fields; + /** * @category RuleElement */ @@ -11,7 +12,7 @@ declare class MultipleAttackPenaltyRuleElement extends RuleElementPF2e, ModelPropsFromRESchema { } type MAPRuleSchema = RuleElementSchema & { - selector: StringField; + selector: fields.StringField; value: ResolvableValueField; }; export { MultipleAttackPenaltyRuleElement }; diff --git a/types/src/module/rules/rule-element/roll-note.d.ts b/types/src/module/rules/rule-element/roll-note.d.ts index 7b1a66197..7ac972605 100644 --- a/types/src/module/rules/rule-element/roll-note.d.ts +++ b/types/src/module/rules/rule-element/roll-note.d.ts @@ -1,9 +1,11 @@ import { UserVisibility } from "@scripts/ui/user-visibility.ts"; import { DegreeOfSuccessString } from "@system/degree-of-success.ts"; import { DataUnionField, StrictStringField } from "@system/schema-data-fields.ts"; -import type { ArrayField, StringField } from "types/foundry/common/data/fields.d.ts"; +import type { StringField } from "types/foundry/common/data/fields.d.ts"; import { RuleElementPF2e } from "./base.ts"; import { ModelPropsFromRESchema, ResolvableValueField, RuleElementSchema, RuleElementSource } from "./data.ts"; +import fields = foundry.data.fields; + declare class RollNoteRuleElement extends RuleElementPF2e { static defineSchema(): RollNoteSchema; beforePrepareData(): void; @@ -12,13 +14,13 @@ interface RollNoteRuleElement extends RuleElementPF2e, ModelProp } type RollNoteSchema = RuleElementSchema & { /** The statistic(s) slugs of the rolls for which this note will be appended */ - selector: ArrayField, string[], string[], true, false, true>; + selector: fields.ArrayField, string[], string[], true, false, true>; /** An optional title prepended to the note */ - title: StringField; + title: fields.StringField; /** An optional limitation of the notes visibility to GMs */ - visibility: StringField; + visibility: fields.StringField; /** Applicable degree-of-success outcomes for the note */ - outcome: ArrayField>; + outcome: fields.ArrayField>; /** The main text of the note */ text: DataUnionField | ResolvableValueField>; }; diff --git a/types/src/module/rules/rule-element/roll-option/data.d.ts b/types/src/module/rules/rule-element/roll-option/data.d.ts index 65f2a63a9..069635ca9 100644 --- a/types/src/module/rules/rule-element/roll-option/data.d.ts +++ b/types/src/module/rules/rule-element/roll-option/data.d.ts @@ -1,54 +1,55 @@ import { DataUnionField, PredicateField, StrictBooleanField, StrictStringField } from "@system/schema-data-fields.ts"; -import type { ArrayField, BooleanField, DataSchema, EmbeddedDataField, StringField } from "types/foundry/common/data/fields.d.ts"; +import type * as fields from "types/foundry/common/data/fields.d.ts"; import type { AELikeDataPrepPhase } from "../ae-like.ts"; import type { ResolvableValueField, RuleElementSchema } from "../data.ts"; import type { RollOptionRuleElement } from "./rule-element.ts"; + declare class Suboption extends foundry.abstract.DataModel { - static defineSchema(): DataSchema; + static defineSchema(): fields.DataSchema; get rule(): RollOptionRuleElement; get selected(): boolean; } interface Suboption extends foundry.abstract.DataModel, ModelPropsFromSchema { } type RollOptionSchema = RuleElementSchema & { - domain: StringField; - phase: StringField; - option: StringField; + domain: fields.StringField; + phase: fields.StringField; + option: fields.StringField; /** Suboptions for a toggle, appended to the option string */ - suboptions: ArrayField; + suboptions: fields.ArrayField; /** * The value of the roll option: either a boolean or a string resolves to a boolean If omitted, it defaults to * `true` unless also `togglable`, in which case to `false`. */ value: ResolvableValueField; /** Whether this instance's suboptions are mergeable with an already-present, toggleable `RollOption` */ - mergeable: BooleanField; + mergeable: fields.BooleanField; /** A suboption selection */ - selection: StringField; + selection: fields.StringField; /** Whether the roll option is toggleable: a checkbox will appear in interfaces (usually actor sheets) */ toggleable: DataUnionField | StrictBooleanField, false, false, true>; /** If toggleable, the location to be found in an interface */ - placement: StringField; + placement: fields.StringField; /** An optional predicate to determine whether the toggle is interactable by the user */ disabledIf: PredicateField; /** The value of the roll option if its toggle is disabled: null indicates the pre-disabled value is preserved */ - disabledValue: BooleanField; + disabledValue: fields.BooleanField; /** * Whether this (toggleable and suboptions-containing) roll option always has a `value` of `true`, allowing only * suboptions to be changed */ - alwaysActive: BooleanField; + alwaysActive: fields.BooleanField; /** Whether this roll option is countable: it will have a numeric value counting how many rules added this option */ - count: BooleanField; + count: fields.BooleanField; /** If the hosting item is an effect, remove or expire it after a matching roll is made */ - removeAfterRoll: BooleanField; + removeAfterRoll: fields.BooleanField; }; type SuboptionSchema = { - label: StringField; - value: StringField; + label: fields.StringField; + value: fields.StringField; predicate: PredicateField; }; type SuboptionSource = SourceFromSchema; -type SuboptionField = EmbeddedDataField; +type SuboptionField = fields.EmbeddedDataField; export { Suboption }; export type { RollOptionSchema, SuboptionField, SuboptionSource }; diff --git a/types/src/module/rules/rule-element/roll-twice.d.ts b/types/src/module/rules/rule-element/roll-twice.d.ts index a23df39d3..212b8d1e2 100644 --- a/types/src/module/rules/rule-element/roll-twice.d.ts +++ b/types/src/module/rules/rule-element/roll-twice.d.ts @@ -1,5 +1,7 @@ import { RuleElementPF2e } from "./base.ts"; import { ModelPropsFromRESchema, RuleElementSchema } from "./data.ts"; +import fields = foundry.data.fields; + /** Roll Twice and keep either the higher or lower result */ declare class RollTwiceRuleElement extends RuleElementPF2e { static defineSchema(): RollTwiceRuleSchema; @@ -8,7 +10,6 @@ declare class RollTwiceRuleElement extends RuleElementPF2e } interface RollTwiceRuleElement extends RuleElementPF2e, ModelPropsFromRESchema { } -import fields = foundry.data.fields; type RollTwiceRuleSchema = RuleElementSchema & { selector: fields.ArrayField, string[], string[], true, false, true>; keep: fields.StringField<"higher" | "lower", "higher" | "lower", true, false, false>; diff --git a/types/src/module/rules/rule-element/sense.d.ts b/types/src/module/rules/rule-element/sense.d.ts index 294dde4b8..fb24a0b84 100644 --- a/types/src/module/rules/rule-element/sense.d.ts +++ b/types/src/module/rules/rule-element/sense.d.ts @@ -1,8 +1,9 @@ import type { ActorType, CharacterPF2e, FamiliarPF2e } from "@actor"; import type { SenseAcuity, SenseType } from "@actor/creature/types.ts"; -import type { BooleanField, StringField } from "types/foundry/common/data/fields.d.ts"; import { RuleElementPF2e } from "./base.ts"; import { ModelPropsFromRESchema, ResolvableValueField, RuleElementSchema } from "./data.ts"; +import fields = foundry.data.fields; + /** * @category RuleElement */ @@ -15,9 +16,9 @@ interface SenseRuleElement extends RuleElementPF2e, ModelPropsF get actor(): CharacterPF2e | FamiliarPF2e; } type SenseRuleSchema = RuleElementSchema & { - selector: StringField; - force: BooleanField; - acuity: StringField; + selector: fields.StringField; + force: fields.BooleanField; + acuity: fields.StringField; range: ResolvableValueField; }; export { SenseRuleElement }; diff --git a/types/src/module/rules/rule-element/special-resource.d.ts b/types/src/module/rules/rule-element/special-resource.d.ts index 89887e14e..51d30545b 100644 --- a/types/src/module/rules/rule-element/special-resource.d.ts +++ b/types/src/module/rules/rule-element/special-resource.d.ts @@ -1,8 +1,8 @@ import type { ActorType, CreaturePF2e } from "@actor"; import type { ActorCommitData } from "@actor/types.ts"; -import type { NumberField, StringField } from "types/foundry/common/data/fields.js"; import { type RuleElementOptions, RuleElementPF2e } from "./base.ts"; import { ResolvableValueField, type RuleElementSchema, type RuleElementSource } from "./data.ts"; +import fields = foundry.data.fields; declare class SpecialResourceRuleElement extends RuleElementPF2e { #private; @@ -12,15 +12,18 @@ declare class SpecialResourceRuleElement extends RuleElementPF2e; update(value: number, options?: { save?: true; + render?: boolean; + checkLevel?: boolean; }): Promise; /** If an item uuid is specified, create it when this resource is first attached */ preCreate(args: RuleElementPF2e.PreCreateParams): Promise; /** Treat special resources as upgrades during the AELike phase */ onApplyActiveEffects(): void; - /** Finish initializing the special resource, flooring values and assigning the value */ + /** Finish initializing the special resource, flooring values and assigning the value. If its from an item, use as the source of truth */ beforePrepareData(): void; } interface SpecialResourceRuleElement extends RuleElementPF2e, Omit, "label"> { @@ -31,16 +34,18 @@ interface SpecialResourceRuleElement extends RuleElementPF2e; /** Current value. If not set, defaults to null */ - value: NumberField; + value: fields.NumberField; /** The maximum value attainable for this resource. */ max: ResolvableValueField; /** If this represents a physical resource, the UUID of the item to create */ - itemUUID: StringField; + itemUUID: fields.DocumentUUIDField; + /** If itemUUID exists, determines the level of the granted item */ + level: ResolvableValueField; }; export { SpecialResourceRuleElement }; export type { SpecialResourceSource }; diff --git a/types/src/module/rules/rule-element/special-statistic.d.ts b/types/src/module/rules/rule-element/special-statistic.d.ts index 16044140c..8db5f8c48 100644 --- a/types/src/module/rules/rule-element/special-statistic.d.ts +++ b/types/src/module/rules/rule-element/special-statistic.d.ts @@ -3,9 +3,10 @@ import { AttributeString } from "@actor/types.ts"; import { MagicTradition } from "@item/spell/types.ts"; import { Predicate, RawPredicate } from "@system/predication.ts"; import { PredicateField } from "@system/schema-data-fields.ts"; -import type { NumberField, SchemaField, StringField } from "types/foundry/common/data/fields.d.ts"; import { RuleElementPF2e } from "../index.ts"; import type { RuleElementSchema } from "./data.ts"; +import fields = foundry.data.fields; + /** Create a special-purpose statistic for use in checks and as a DC */ declare class SpecialStatisticRuleElement extends RuleElementPF2e { static validActorTypes: ("character" | "npc")[]; @@ -17,16 +18,16 @@ interface SpecialStatisticRuleElement extends RuleElementPF2e; + type: fields.StringField; /** A base statistic from which to extend */ - extends: StringField; + extends: fields.StringField; /** An attribute to associate with the statistic */ - attribute: StringField; + attribute: fields.StringField; /** A base modifier for use with NPC special statistics: separate check and DC values may also be specified. */ - baseModifier: SchemaField<{ - mod: NumberField; - check: NumberField; - dc: NumberField; + baseModifier: fields.SchemaField<{ + mod: fields.NumberField; + check: fields.NumberField; + dc: fields.NumberField; }, { mod: number | null; check: number | null; @@ -36,7 +37,7 @@ type SpecialStatisticSchema = RuleElementSchema & { check: number | null; dc: number | null; }, false, true, true>; - itemCasting: SchemaField; - tradition: StringField; + tradition: fields.StringField; }; type StatisticType = "simple" | "check" | "attack-roll"; export { SpecialStatisticRuleElement }; diff --git a/types/src/module/rules/rule-element/strike.d.ts b/types/src/module/rules/rule-element/strike.d.ts index 9704f0193..ce6c9f0f5 100644 --- a/types/src/module/rules/rule-element/strike.d.ts +++ b/types/src/module/rules/rule-element/strike.d.ts @@ -3,10 +3,10 @@ import type { NPCAttackTrait } from "@item/melee/types.ts"; import { BaseShieldType } from "@item/shield/types.ts"; import type { BaseWeaponType, OtherWeaponTag, WeaponCategory } from "@item/weapon/types.ts"; import type { DamageDieSize, DamageType } from "@system/damage/index.ts"; -import { StrictBooleanField } from "@system/schema-data-fields.ts"; -import type { ArrayField, BooleanField, FilePathField, NumberField, SchemaField, StringField } from "types/foundry/common/data/fields.d.ts"; import { RuleElementOptions, RuleElementPF2e } from "./base.ts"; import { ModelPropsFromRESchema, ResolvableValueField, RuleElementSchema, RuleElementSource } from "./data.ts"; +import fields = foundry.data.fields; + /** * Create an ephemeral strike on an actor * @category RuleElement @@ -33,16 +33,16 @@ interface StrikeRuleElement extends RuleElementPF2e, ModelPropsFro type NonShieldWeaponType = Exclude; type StrikeSchema = RuleElementSchema & { /** A weapon category */ - category: StringField; + category: fields.StringField; /** A weapon group */ - group: StringField; + group: fields.StringField; /** A weapon base type */ - baseType: StringField; + baseType: fields.StringField; /** Permit NPC attack traits to sneak in for battle forms */ - traits: ArrayField>; - traitToggles: SchemaField<{ - modular: StringField; - versatile: StringField; + traits: fields.ArrayField>; + traitToggles: fields.SchemaField<{ + modular: fields.StringField; + versatile: fields.StringField; }, { modular: DamageType | null; versatile: DamageType | null; @@ -50,15 +50,15 @@ type StrikeSchema = RuleElementSchema & { modular: DamageType | null; versatile: DamageType | null; }, true, false, true>; - otherTags: ArrayField, OtherWeaponTag[], OtherWeaponTag[], false, false, true>; + otherTags: fields.ArrayField, OtherWeaponTag[], OtherWeaponTag[], false, false, true>; /** * A fixed attack modifier: usable only if the strike is generated for an NPC * Also causes the damage to not be recalculated when converting the resulting weapon to an NPC attack */ - attackModifier: NumberField; - range: SchemaField<{ - increment: NumberField; - max: NumberField; + attackModifier: fields.NumberField; + range: fields.SchemaField<{ + increment: fields.NumberField; + max: fields.NumberField; }, { increment: number | null; max: number | null; @@ -66,28 +66,28 @@ type StrikeSchema = RuleElementSchema & { increment: number | null; max: number | null; }, false, true, true>; - damage: SchemaField<{ - base: SchemaField<{ - damageType: StringField; + damage: fields.SchemaField<{ + base: fields.SchemaField<{ + damageType: fields.StringField; dice: ResolvableValueField; - die: StringField; - modifier: NumberField; + die: fields.StringField; + modifier: fields.NumberField; }>; }>; - ability: StringField; + ability: fields.StringField; /** A representative icon for the strike */ - img: FilePathField; + img: fields.FilePathField; /** Whether to replace all other strike actions */ - replaceAll: BooleanField; + replaceAll: fields.BooleanField; /** Whether to replace the "basic unarmed" strike action */ - replaceBasicUnarmed: BooleanField; + replaceBasicUnarmed: fields.BooleanField; /** Whether this attack is from a battle form */ - battleForm: BooleanField; - options: ArrayField, string[], string[], false, false, false>; + battleForm: fields.BooleanField; + options: fields.ArrayField, string[], string[], false, false, false>; /** Whether this was a request for a standard fist attack */ - fist: BooleanField; + fist: fields.BooleanField; /** Whether the unarmed attack is a grasping appendage */ - graspingAppendage: StrictBooleanField; + graspingAppendage: fields.BooleanField; }; interface StrikeSource extends RuleElementSource { img?: unknown; diff --git a/types/src/module/rules/rule-element/striking.d.ts b/types/src/module/rules/rule-element/striking.d.ts index d8ee97627..5458feb4f 100644 --- a/types/src/module/rules/rule-element/striking.d.ts +++ b/types/src/module/rules/rule-element/striking.d.ts @@ -1,7 +1,8 @@ import type { ActorType } from "@actor/types.ts"; -import type { StringField } from "types/foundry/common/data/fields.d.ts"; import { RuleElementPF2e } from "./base.ts"; import { ModelPropsFromRESchema, ResolvableValueField, RuleElementSchema } from "./data.ts"; +import fields = foundry.data.fields; + declare class StrikingRuleElement extends RuleElementPF2e { protected static validActorTypes: ActorType[]; static defineSchema(): StrikingRuleSchema; @@ -10,7 +11,7 @@ declare class StrikingRuleElement extends RuleElementPF2e { interface StrikingRuleElement extends RuleElementPF2e, ModelPropsFromRESchema { } type StrikingRuleSchema = RuleElementSchema & { - selector: StringField; + selector: fields.StringField; value: ResolvableValueField; }; export { StrikingRuleElement }; diff --git a/types/src/module/rules/rule-element/substitute-roll.d.ts b/types/src/module/rules/rule-element/substitute-roll.d.ts index 194ca3049..e8dbc3a6f 100644 --- a/types/src/module/rules/rule-element/substitute-roll.d.ts +++ b/types/src/module/rules/rule-element/substitute-roll.d.ts @@ -1,7 +1,8 @@ -import { DataUnionField, PredicateField, StrictBooleanField, StrictStringField } from "@system/schema-data-fields.ts"; -import type { BooleanField, StringField } from "types/foundry/common/data/fields.d.ts"; +import { DataUnionField, PredicateField, StrictBooleanField } from "@system/schema-data-fields.ts"; import { RuleElementOptions, RuleElementPF2e } from "./base.ts"; import { ModelPropsFromRESchema, ResolvableValueField, RuleElementSchema, RuleElementSource } from "./data.ts"; +import fields = foundry.data.fields; + /** Substitute a pre-determined result for a check's D20 roll */ declare class SubstituteRollRuleElement extends RuleElementPF2e { constructor(source: RuleElementSource, options: RuleElementOptions); @@ -12,14 +13,14 @@ declare class SubstituteRollRuleElement extends RuleElementPF2e, ModelPropsFromRESchema { } type SubstituteRollSchema = RuleElementSchema & { - selector: StringField; + selector: fields.StringField; value: ResolvableValueField; - required: BooleanField; - effectType: StringField<"fortune" | "misfortune", "fortune" | "misfortune", true, false, true>; + required: fields.BooleanField; + effectType: fields.StringField<"fortune" | "misfortune", "fortune" | "misfortune", true, false, true>; /** * Remove the parent item (must be an effect) after a roll: * The value may be a boolean, "if-enabled", or a predicate to be tested against the roll options from the roll. */ - removeAfterRoll: DataUnionField | StrictBooleanField | PredicateField, false, false, true>; + removeAfterRoll: DataUnionField | StrictBooleanField | PredicateField, false, false, true>; }; export { SubstituteRollRuleElement }; diff --git a/types/src/module/rules/rule-element/temp-hp.d.ts b/types/src/module/rules/rule-element/temp-hp.d.ts index b409e14e9..bf1e95992 100644 --- a/types/src/module/rules/rule-element/temp-hp.d.ts +++ b/types/src/module/rules/rule-element/temp-hp.d.ts @@ -1,7 +1,8 @@ import type { ActorType } from "@actor/types.ts"; -import type { BooleanField, SchemaField } from "types/foundry/common/data/fields.d.ts"; import { RuleElementPF2e } from "./base.ts"; import { ModelPropsFromRESchema, ResolvableValueField, RuleElementSchema } from "./data.ts"; +import fields = foundry.data.fields; + /** * @category RuleElement */ @@ -22,14 +23,14 @@ interface TempHPRuleElement extends RuleElementPF2e, ModelProp } type TempHPEventsSchema = { /** Whether the temporary hit points are immediately applied */ - onCreate: BooleanField; + onCreate: fields.BooleanField; /** Whether the temporary hit points renew each round */ - onTurnStart: BooleanField; + onTurnStart: fields.BooleanField; }; type TempHPRuleSchema = RuleElementSchema & { /** The quantity of temporary hit points to add */ value: ResolvableValueField; /** World events in which temporary HP is added or renewed */ - events: SchemaField, ModelPropsFromSchema, true, false, true>; + events: fields.SchemaField, ModelPropsFromSchema, true, false, true>; }; export { TempHPRuleElement }; diff --git a/types/src/module/rules/rule-element/token-light.d.ts b/types/src/module/rules/rule-element/token-light.d.ts index c018a8bb3..f0dd7c800 100644 --- a/types/src/module/rules/rule-element/token-light.d.ts +++ b/types/src/module/rules/rule-element/token-light.d.ts @@ -1,7 +1,9 @@ import type { LightDataSchema } from "types/foundry/common/data/data.d.ts"; -import type { SchemaField, StringField } from "types/foundry/common/data/fields.d.ts"; +import type { SchemaField } from "types/foundry/common/data/fields.d.ts"; import { RuleElementPF2e } from "./base.ts"; import { ModelPropsFromRESchema, ResolvableValueField, RuleElementSchema } from "./data.ts"; +import fields = foundry.data.fields; + /** * Add or change the light emitted by a token * @category RuleElement @@ -16,7 +18,7 @@ interface TokenLightRuleElement extends RuleElementPF2e, M type TokenLightValueSchema = Omit & { bright: ResolvableValueField; /** `LightData#color` as an injectable property */ - color: StringField; + color: fields.StringField; dim: ResolvableValueField; }; type TokenLightRuleSchema = RuleElementSchema & { diff --git a/types/src/module/rules/rule-element/token-mark/rule-element.d.ts b/types/src/module/rules/rule-element/token-mark/rule-element.d.ts index 9d91e1f76..a62bcdc00 100644 --- a/types/src/module/rules/rule-element/token-mark/rule-element.d.ts +++ b/types/src/module/rules/rule-element/token-mark/rule-element.d.ts @@ -1,7 +1,8 @@ import { SlugField } from "@system/schema-data-fields.ts"; -import type { StringField } from "types/foundry/common/data/fields.d.ts"; import { RuleElementPF2e } from "../base.ts"; import { ModelPropsFromRESchema, RuleElementSchema } from "../data.ts"; +import fields = foundry.data.fields; + /** Remember a token for later referencing */ declare class TokenMarkRuleElement extends RuleElementPF2e { #private; @@ -11,7 +12,7 @@ declare class TokenMarkRuleElement extends RuleElementPF2e { } type TokenMarkSchema = Omit & { slug: SlugField; - uuid: StringField; + uuid: fields.StringField; }; interface TokenMarkRuleElement extends RuleElementPF2e, ModelPropsFromRESchema { slug: string; diff --git a/types/src/module/rules/rule-element/token-name.d.ts b/types/src/module/rules/rule-element/token-name.d.ts index 82c59eb3a..aa02a4bae 100644 --- a/types/src/module/rules/rule-element/token-name.d.ts +++ b/types/src/module/rules/rule-element/token-name.d.ts @@ -1,5 +1,7 @@ import { RuleElementPF2e } from "./base.ts"; -import { ModelPropsFromRESchema, ResolvableValueField, RuleElementSchema } from "./data.ts"; +import { ModelPropsFromRESchema, RuleElementSchema } from "./data.ts"; +import fields = foundry.data.fields; + /** * Change the name representing an actor's token * @category RuleElement @@ -11,6 +13,6 @@ declare class TokenNameRuleElement extends RuleElementPF2e interface TokenNameRuleElement extends RuleElementPF2e, ModelPropsFromRESchema { } type TokenNameRuleSchema = RuleElementSchema & { - value: ResolvableValueField; + value: fields.StringField; }; export { TokenNameRuleElement }; diff --git a/types/src/module/rules/rule-element/weapon-potency.d.ts b/types/src/module/rules/rule-element/weapon-potency.d.ts index b4dbf809e..2484475e5 100644 --- a/types/src/module/rules/rule-element/weapon-potency.d.ts +++ b/types/src/module/rules/rule-element/weapon-potency.d.ts @@ -1,7 +1,8 @@ import type { ActorType } from "@actor/types.ts"; -import type { StringField } from "types/foundry/common/data/fields.d.ts"; import { RuleElementPF2e } from "./base.ts"; import { ModelPropsFromRESchema, ResolvableValueField, RuleElementSchema } from "./data.ts"; +import fields = foundry.data.fields; + /** * Copies potency runes from the weapon its attached to, to another weapon based on a predicate. * @category RuleElement @@ -14,7 +15,7 @@ declare class WeaponPotencyRuleElement extends RuleElementPF2e, ModelPropsFromRESchema { } type WeaponPotencyRuleSchema = RuleElementSchema & { - selector: StringField; + selector: fields.StringField; value: ResolvableValueField; }; export { WeaponPotencyRuleElement }; diff --git a/types/src/module/sheet/helpers.d.ts b/types/src/module/sheet/helpers.d.ts index d971122b4..20fcaed21 100644 --- a/types/src/module/sheet/helpers.d.ts +++ b/types/src/module/sheet/helpers.d.ts @@ -1,3 +1,7 @@ +/// +import { ActorPF2e } from "@actor"; +import { ItemPF2e } from "@item"; + /** Prepare form options on an item or actor sheet */ declare function createSheetOptions(options: Record Promise): Promise; +declare function getItemFromDragEvent(event: DragEvent): Promise; +/** Returns statistic dialog roll parameters based on held keys */ +type ParamsFromEvent = { + skipDialog: boolean; + rollMode?: RollMode | "roll"; +}; +/** Set roll mode and dialog skipping from a user's input */ +declare function eventToRollParams(event: Maybe, rollType: { + type: "check" | "damage"; +}): ParamsFromEvent; +/** Set roll mode from a user's input: used for messages that are not actually rolls. */ +declare function eventToRollMode(event: Maybe): RollMode | "roll"; +/** Given a uuid, loads the item and sends it to chat, potentially recontextualizing it with a given actor */ +declare function sendItemToChat(itemUuid: ItemUUID, options: { + event?: Event; + actor?: ActorPF2e; +}): Promise; +/** Creates a listener that can be used to create tooltips with dynamic content */ +declare function createTooltipListener(element: HTMLElement, options: { + /** Controls if the top edge of this tooltip aligns with the top edge of the target */ + align?: "top"; + /** If given, the tooltip will spawn on elements that match this selector */ + selector?: string; + locked?: boolean; + direction?: TooltipActivationOptions["direction"]; + cssClass?: string; + render: (element: HTMLElement) => Promise; +}): void; interface SheetOption { value: string; label: string; @@ -54,5 +86,5 @@ interface TagifyEntry { */ hidden?: true; } -export { createSheetOptions, createSheetTags, createTagifyTraits, getAdjustedValue, getAdjustment, maintainFocusInRender, }; +export { createSheetOptions, createSheetTags, createTagifyTraits, createTooltipListener, eventToRollMode, eventToRollParams, getAdjustedValue, getAdjustment, getItemFromDragEvent, maintainFocusInRender, sendItemToChat, }; export type { AdjustedValue, SheetOption, SheetOptions, TagifyEntry }; diff --git a/types/src/module/system/damage/roll.d.ts b/types/src/module/system/damage/roll.d.ts index f33ced594..66981db2a 100644 --- a/types/src/module/system/damage/roll.d.ts +++ b/types/src/module/system/damage/roll.d.ts @@ -3,9 +3,11 @@ import type { UserPF2e } from "@module/user/index.ts"; import { DegreeOfSuccessIndex } from "@system/degree-of-success.ts"; import { RollDataPF2e } from "@system/rolls.ts"; import type Peggy from "peggy"; +import type { RollParseNode } from "types/foundry/client-esm/dice/_types.d.mts"; import type { DiceTerm, RollTerm } from "types/foundry/client-esm/dice/terms/module.d.ts"; import { InstancePool } from "./terms.ts"; import { DamageCategory, DamageIRBypassData, DamageTemplate, DamageType, MaterialDamageEffect } from "./types.ts"; + declare abstract class AbstractDamageRoll extends Roll { static parser: Peggy.Parser; /** Strip out parentheses enclosing constants */ @@ -46,7 +48,7 @@ declare class DamageRoll extends AbstractDamageRoll { get maximumValue(): number; static fromData(this: AbstractConstructorOf, data: RollJSON): TRoll; /** Increase total to 1 if evaluating to 0 or less */ - protected _evaluateTotal(): number; + protected _evaluateASTAsync(node: RollParseNode | RollTerm, options?: EvaluateRollParams): Promise; getTooltip(): Promise; /** Work around upstream issue in which display base formula is used for chat messages instead of display formula */ render({ flavor, template, isPrivate, }?: RollRenderOptions): Promise; diff --git a/types/src/module/system/damage/types.d.ts b/types/src/module/system/damage/types.d.ts index 8a2fbf33e..8b49f72a6 100644 --- a/types/src/module/system/damage/types.d.ts +++ b/types/src/module/system/damage/types.d.ts @@ -6,7 +6,8 @@ import type { DegreeOfSuccessString } from "@system/degree-of-success.ts"; import type { BaseRollContext } from "@system/rolls.ts"; import type { DamageRoll } from "./roll.ts"; import type { DAMAGE_CATEGORIES_UNIQUE, DAMAGE_DICE_FACES, DAMAGE_DIE_SIZES, DAMAGE_TYPES } from "./values.ts"; -type DamageCategoryUnique = SetElement; + +type DamageCategoryUnique = (typeof DAMAGE_CATEGORIES_UNIQUE)[number]; type DamageCategory = keyof typeof CONFIG.PF2E.damageCategories; type DamageDiceFaces = (typeof DAMAGE_DICE_FACES)[number]; type DamageDieSize = (typeof DAMAGE_DIE_SIZES)[number]; @@ -111,6 +112,7 @@ interface BaseDamageData { modifier?: number; category: DamageCategoryUnique | null; materials?: MaterialDamageEffect[]; + tags?: string[]; } interface WeaponBaseDamageData extends BaseDamageData { terms?: never; diff --git a/types/src/module/system/damage/values.d.ts b/types/src/module/system/damage/values.d.ts index 6aae150c4..e494081e2 100644 --- a/types/src/module/system/damage/values.d.ts +++ b/types/src/module/system/damage/values.d.ts @@ -1,8 +1,9 @@ import { DamageCategory, DamageType } from "./types.ts"; + declare const PHYSICAL_DAMAGE_TYPES: readonly ["bludgeoning", "piercing", "slashing", "bleed"]; declare const ENERGY_DAMAGE_TYPES: readonly ["acid", "cold", "electricity", "fire", "sonic", "force", "vitality", "void"]; /** A set of mutually exclusive damage categories */ -declare const DAMAGE_CATEGORIES_UNIQUE: Set<"precision" | "splash" | "persistent">; +declare const DAMAGE_CATEGORIES_UNIQUE: readonly ["persistent", "precision", "splash"]; /** All damage modifications that only affect IWR (like materials) */ declare const MATERIAL_DAMAGE_EFFECTS: Set<"adamantine" | "dawnsilver" | "duskwood" | "orichalcum" | "silver" | "cold-iron" | "sisterstone-dusk" | "sisterstone-scarlet" | "warpglass">; declare const DAMAGE_CATEGORIES: Set<"adamantine" | "dawnsilver" | "duskwood" | "energy" | "orichalcum" | "physical" | "silver" | "precision" | "splash" | "cold-iron" | "sisterstone-dusk" | "sisterstone-scarlet" | "warpglass" | "persistent">; diff --git a/types/src/module/system/html-elements/tagify-tags.d.ts b/types/src/module/system/html-elements/tagify-tags.d.ts index f171412d5..a5a3921ce 100644 --- a/types/src/module/system/html-elements/tagify-tags.d.ts +++ b/types/src/module/system/html-elements/tagify-tags.d.ts @@ -6,9 +6,9 @@ import { TagifyEntry } from "@module/sheet/helpers.ts"; */ declare class HTMLTagifyTagsElement extends foundry.applications.elements.AbstractFormInputElement { static tagName: string; - /** The input elmement that the `Tagify` instance is bound to */ - input: HTMLInputElement; constructor(); + protected _primaryInput: HTMLInputElement; + get input(): HTMLInputElement; protected _buildElements(): HTMLElement[]; /** Overwritten so that submit data receives a string array */ protected _getValue(): string[]; diff --git a/types/src/module/system/settings/menu.d.ts b/types/src/module/system/settings/menu.d.ts index 1c28666f2..352a98b9f 100644 --- a/types/src/module/system/settings/menu.d.ts +++ b/types/src/module/system/settings/menu.d.ts @@ -41,6 +41,6 @@ interface MenuTemplateData extends FormApplicationData { interface SettingsMenuOptions extends FormApplicationOptions { highlightSetting?: string; } -declare function settingsToSheetData(settings: Record, cache: Record): Record; +declare function settingsToSheetData(settings: Record, cache?: Record): Record; export { SettingsMenuPF2e, settingsToSheetData }; export type { MenuTemplateData, PartialSettingsData, SettingsMenuOptions, SettingsTemplateData }; diff --git a/types/src/module/system/settings/variant-rules.d.ts b/types/src/module/system/settings/variant-rules.d.ts index 621baa0be..9a6cf7274 100644 --- a/types/src/module/system/settings/variant-rules.d.ts +++ b/types/src/module/system/settings/variant-rules.d.ts @@ -1,12 +1,11 @@ /// /// /// +import { SettingsTemplateData } from "./menu.ts"; + export declare class VariantRulesSettings extends FormApplication { static get defaultOptions(): FormApplicationOptions; - getData(): Promise>; + getData(): Promise>; static registerSettings(): void; activateListeners($html: JQuery): void; protected _updateObject(_event: Event, data: Record): Promise; diff --git a/types/src/module/user/document.d.ts b/types/src/module/user/document.d.ts index 1d85effd6..a54e05a06 100644 --- a/types/src/module/user/document.d.ts +++ b/types/src/module/user/document.d.ts @@ -2,6 +2,7 @@ import type { ActorPF2e } from "@actor"; import type { TokenPF2e } from "@module/canvas/index.ts"; import type { ScenePF2e, TokenDocumentPF2e } from "@scene"; import { UserFlagsPF2e, UserSourcePF2e } from "./data.ts"; + declare class UserPF2e extends User> { prepareData(): void; /** Set user settings defaults */ @@ -14,7 +15,7 @@ declare class UserPF2e extends User> { protected _onUpdate(changed: DeepPartial, operation: DatabaseUpdateOperation, userId: string): void; } interface UserPF2e extends User> { - targets: Set>>; + targets: UserTargets>>; flags: UserFlagsPF2e; readonly _source: UserSourcePF2e; } diff --git a/types/src/scripts/config/damage.d.ts b/types/src/scripts/config/damage.d.ts index bb62fe71e..5e237ec54 100644 --- a/types/src/scripts/config/damage.d.ts +++ b/types/src/scripts/config/damage.d.ts @@ -1,7 +1,26 @@ import { DamageCategoryUnique, DamageType } from "@system/damage/types.ts"; import { energyDamageTypes } from "./traits.ts"; + declare const damageCategoriesUnique: Record; -declare const materialDamageEffects: Pick, "abysium" | "adamantine" | "dawnsilver" | "djezet" | "duskwood" | "inubrix" | "noqual" | "orichalcum" | "siccatite" | "silver" | "cold-iron" | "keep-stone" | "peachwood" | "sisterstone-dusk" | "sisterstone-scarlet" | "sovereign-steel" | "warpglass">; +declare const materialDamageEffects: { + abysium: string; + adamantine: string; + dawnsilver: string; + djezet: string; + duskwood: string; + inubrix: string; + noqual: string; + orichalcum: string; + siccatite: string; + silver: string; + "cold-iron": string; + "keep-stone": string; + peachwood: string; + "sisterstone-dusk": string; + "sisterstone-scarlet": string; + "sovereign-steel": string; + warpglass: string; +}; declare const damageCategories: { energy: string; physical: string; diff --git a/types/src/scripts/config/index.d.ts b/types/src/scripts/config/index.d.ts index cfdc0a958..1ec7737c0 100644 --- a/types/src/scripts/config/index.d.ts +++ b/types/src/scripts/config/index.d.ts @@ -1,8 +1,34 @@ import { ArmyPF2e, CharacterPF2e, FamiliarPF2e, HazardPF2e, LootPF2e, NPCPF2e, PartyPF2e, VehiclePF2e } from "@actor"; import { SenseAcuity } from "@actor/creature/types.ts"; -import { AbilityItemPF2e, AfflictionPF2e, AncestryPF2e, ArmorPF2e, BackgroundPF2e, BookPF2e, CampaignFeaturePF2e, ClassPF2e, ConditionPF2e, ConsumablePF2e, ContainerPF2e, DeityPF2e, EffectPF2e, EquipmentPF2e, FeatPF2e, HeritagePF2e, KitPF2e, LorePF2e, MeleePF2e, ShieldPF2e, SpellPF2e, SpellcastingEntryPF2e, TreasurePF2e, WeaponPF2e } from "@item"; +import { + AbilityItemPF2e, + AfflictionPF2e, + AncestryPF2e, + ArmorPF2e, + BackgroundPF2e, + BookPF2e, + CampaignFeaturePF2e, + ClassPF2e, + ConditionPF2e, + ConsumablePF2e, + ContainerPF2e, + DeityPF2e, + EffectPF2e, + EquipmentPF2e, + FeatPF2e, + HeritagePF2e, + KitPF2e, + LorePF2e, + MeleePF2e, + ShieldPF2e, + SpellcastingEntryPF2e, + SpellPF2e, + TreasurePF2e, + WeaponPF2e, +} from "@item"; import { WeaponReloadTime } from "@item/weapon/types.ts"; import { JournalSheetPF2e } from "@module/journal-entry/sheet.ts"; + export type StatusEffectIconTheme = "default" | "blackWhite"; export declare const PF2ECONFIG: { defaultPartyId: string; @@ -117,7 +143,7 @@ export declare const PF2ECONFIG: { cp: string; }; preciousMaterialGrades: Record<"low" | "standard" | "high", string>; - preciousMaterials: Record<"abysium" | "adamantine" | "dawnsilver" | "djezet" | "duskwood" | "inubrix" | "noqual" | "orichalcum" | "siccatite" | "silver" | "cold-iron" | "dragonhide" | "grisantian-pelt" | "keep-stone" | "peachwood" | "sisterstone" | "sisterstone-dusk" | "sisterstone-scarlet" | "sovereign-steel" | "warpglass", string>; + preciousMaterials: Record<"abysium" | "adamantine" | "dawnsilver" | "djezet" | "duskwood" | "inubrix" | "noqual" | "orichalcum" | "siccatite" | "silver" | "cold-iron" | "dragonhide" | "dreamweb" | "grisantian-pelt" | "keep-stone" | "peachwood" | "sisterstone" | "sisterstone-dusk" | "sisterstone-scarlet" | "sloughstone" | "sovereign-steel" | "warpglass", string>; accessoryPropertyRunes: { called: string; dragonsBreath: string; @@ -191,7 +217,25 @@ export declare const PF2ECONFIG: { vitality: string; void: string; }; - materialDamageEffects: Pick, "abysium" | "adamantine" | "dawnsilver" | "djezet" | "duskwood" | "inubrix" | "noqual" | "orichalcum" | "siccatite" | "silver" | "cold-iron" | "keep-stone" | "peachwood" | "sisterstone-dusk" | "sisterstone-scarlet" | "sovereign-steel" | "warpglass">; + materialDamageEffects: { + abysium: string; + adamantine: string; + dawnsilver: string; + djezet: string; + duskwood: string; + inubrix: string; + noqual: string; + orichalcum: string; + siccatite: string; + silver: string; + "cold-iron": string; + "keep-stone": string; + peachwood: string; + "sisterstone-dusk": string; + "sisterstone-scarlet": string; + "sovereign-steel": string; + warpglass: string; + }; physicalDamageTypes: { bleed: string; bludgeoning: string; @@ -221,6 +265,7 @@ export declare const PF2ECONFIG: { magical: string; mental: string; metal: string; + mythic: string; "non-magical": string; nonlethal: string; "nonlethal-attacks": string; @@ -302,6 +347,7 @@ export declare const PF2ECONFIG: { magical: string; mental: string; metal: string; + mythic: string; "non-magical": string; "nonlethal-attacks": string; "persistent-damage": string; @@ -309,6 +355,7 @@ export declare const PF2ECONFIG: { piercing: string; plant: string; poison: string; + /** Base weapon types that are considered equivalent for all rules purposes */ precision: string; radiation: string; salt: string; @@ -369,6 +416,7 @@ export declare const PF2ECONFIG: { "hellknight-half-plate": string; "hellknight-plate": string; "hide-armor": string; + "kilted-breastplate": string; "lamellar-breastplate": string; "lattice-armor": string; "leaf-weave": string; @@ -380,6 +428,7 @@ export declare const PF2ECONFIG: { "padded-armor": string; "power-suit": string; "quilted-armor": string; + "rattan-armor": string; sankeit: string; "scale-mail": string; "scroll-robes": string; @@ -455,6 +504,7 @@ export declare const PF2ECONFIG: { "claw-blade": string; club: string; "coat-pistol": string; + "combat-fishing-pole": string; "combat-grapnel": string; "combat-lure": string; "composite-longbow": string; @@ -486,10 +536,12 @@ export declare const PF2ECONFIG: { "exquisite-sword-cane-sheath": string; falcata: string; falchion: string; + fangs: string; fangwire: string; fauchard: string; "feng-huo-lun": string; "fighting-fan": string; + "fighting-oar": string; "fighting-stick": string; "filchers-fork": string; "fire-lance": string; @@ -509,6 +561,7 @@ export declare const PF2ECONFIG: { gauntlet: string; "gauntlet-bow": string; "gill-hook": string; + gladius: string; glaive: string; "gnome-amalgam-musket": string; "gnome-flickmace": string; @@ -544,6 +597,7 @@ export declare const PF2ECONFIG: { karambit: string; katana: string; katar: string; + kestros: string; khakkhara: string; khopesh: string; "knuckle-duster": string; @@ -566,6 +620,7 @@ export declare const PF2ECONFIG: { mace: string; "mace-multipistol": string; machete: string; + macuahuitl: string; "main-gauche": string; mambele: string; maul: string; @@ -582,6 +637,7 @@ export declare const PF2ECONFIG: { "orc-knuckle-dagger": string; "orc-necksplitter": string; "orc-skewermaul": string; + palstave: string; panabas: string; pepperbox: string; "phalanx-piercer": string; @@ -665,6 +721,8 @@ export declare const PF2ECONFIG: { visap: string; wakizashi: string; "war-flail": string; + "war-gavel": string; + "war-javelin": string; "war-lance": string; "war-razor": string; warhammer: string; @@ -831,12 +889,12 @@ export declare const PF2ECONFIG: { "worn-under-armor": string; }; magicTraditions: Record<"arcane" | "divine" | "occult" | "primal", string>; - deityDomains: Record<"time" | "healing" | "magic" | "metal" | "water" | "wood" | "air" | "cold" | "earth" | "fire" | "void" | "wealth" | "abomination" | "ambition" | "change" | "cities" | "confidence" | "creation" | "darkness" | "death" | "decay" | "delirium" | "destruction" | "dreams" | "dust" | "duty" | "family" | "fate" | "freedom" | "glyph" | "indulgence" | "introspection" | "knowledge" | "lightning" | "luck" | "might" | "moon" | "naga" | "nature" | "nightmares" | "pain" | "passion" | "perfection" | "plague" | "protection" | "repose" | "secrecy" | "sorrow" | "soul" | "star" | "sun" | "swarm" | "toil" | "travel" | "trickery" | "truth" | "tyranny" | "undeath" | "vigil" | "wyrmkin" | "zeal" | "airapocryphal" | "ambitionapocryphal" | "confidenceapocryphal" | "darknessapocryphal" | "deathapocryphal" | "fateapocryphal" | "fireapocryphal" | "indulgenceapocryphal" | "knowledgeapocryphal" | "mightapocryphal" | "secrecyapocryphal" | "travelapocryphal" | "waterapocryphal", { + deityDomains: Record<"healing" | "magic" | "metal" | "water" | "wood" | "air" | "cold" | "earth" | "fire" | "void" | "wealth" | "abomination" | "ambition" | "change" | "cities" | "confidence" | "creation" | "darkness" | "death" | "decay" | "destruction" | "dreams" | "dust" | "duty" | "family" | "fate" | "freedom" | "glyph" | "indulgence" | "introspection" | "knowledge" | "lightning" | "luck" | "might" | "moon" | "naga" | "nature" | "nightmares" | "pain" | "passion" | "perfection" | "plague" | "protection" | "repose" | "secrecy" | "sorrow" | "soul" | "star" | "sun" | "swarm" | "time" | "toil" | "travel" | "trickery" | "truth" | "tyranny" | "undeath" | "vigil" | "zeal" | "airapocryphal" | "ambitionapocryphal" | "confidenceapocryphal" | "darknessapocryphal" | "deathapocryphal" | "delirium" | "fateapocryphal" | "fireapocryphal" | "indulgenceapocryphal" | "knowledgeapocryphal" | "mightapocryphal" | "secrecyapocryphal" | "travelapocryphal" | "waterapocryphal" | "wyrmkin", { label: string; description: string; }>; otherArmorTags: Record<"shoddy", string>; - otherConsumableTags: Record<"herbal", string>; + otherConsumableTags: Record; otherWeaponTags: Record; actionTraits: { "certain-kill": string; @@ -891,6 +949,7 @@ export declare const PF2ECONFIG: { misfortune: string; morph: string; move: string; + mythic: string; nonlethal: string; olfactory: string; plant: string; @@ -899,6 +958,7 @@ export declare const PF2ECONFIG: { possession: string; prediction: string; psyche: string; + rage: string; revelation: string; sanctified: string; scrying: string; @@ -937,11 +997,13 @@ export declare const PF2ECONFIG: { force: string; sonic: string; alchemist: string; + animist: string; barbarian: string; bard: string; champion: string; cleric: string; druid: string; + exemplar: string; fighter: string; gunslinger: string; kineticist: string; @@ -999,13 +1061,16 @@ export declare const PF2ECONFIG: { virulent: string; wand: string; aftermath: string; + apparition: string; archetype: string; artifact: string; bravado: string; + calling: string; circus: string; class: string; composite: string; dedication: string; + destiny: string; deviant: string; downtime: string; evolution: string; @@ -1013,6 +1078,7 @@ export declare const PF2ECONFIG: { finisher: string; flourish: string; general: string; + ikon: string; impulse: string; infusion: string; lineage: string; @@ -1023,7 +1089,6 @@ export declare const PF2ECONFIG: { overflow: string; "pervasive-magic": string; press: string; - rage: string; reckless: string; reincarnated: string; reflection: string; @@ -1034,8 +1099,10 @@ export declare const PF2ECONFIG: { stamina: string; tandem: string; time: string; + transcendence: string; unstable: string; vigilante: string; + wandering: string; aiuvarin: string; anadi: string; android: string; @@ -1197,12 +1264,14 @@ export declare const PF2ECONFIG: { flexible: string; healing: string; hindering: string; + illusion: string; inscribed: string; intelligent: string; invested: string; laminar: string; light: string; magical: string; + mythic: string; noisy: string; plant: string; ponderous: string; @@ -1230,7 +1299,7 @@ export declare const PF2ECONFIG: { water: string; wood: string; }; - classTraits: Record<"alchemist" | "barbarian" | "bard" | "champion" | "cleric" | "druid" | "fighter" | "gunslinger" | "kineticist" | "inventor" | "investigator" | "magus" | "monk" | "oracle" | "psychic" | "ranger" | "rogue" | "sorcerer" | "summoner" | "swashbuckler" | "thaumaturge" | "witch" | "wizard", string>; + classTraits: Record<"alchemist" | "animist" | "barbarian" | "bard" | "champion" | "cleric" | "druid" | "exemplar" | "fighter" | "gunslinger" | "kineticist" | "inventor" | "investigator" | "magus" | "monk" | "oracle" | "psychic" | "ranger" | "rogue" | "sorcerer" | "summoner" | "swashbuckler" | "thaumaturge" | "witch" | "wizard", string>; consumableTraits: { additive: string; additive1: string; @@ -1321,10 +1390,12 @@ export declare const PF2ECONFIG: { litany: string; manipulate: string; move: string; + mythic: string; nonlethal: string; plant: string; prediction: string; psyche: string; + rage: string; revelation: string; sanctified: string; shadow: string; @@ -1357,11 +1428,13 @@ export declare const PF2ECONFIG: { force: string; sonic: string; alchemist: string; + animist: string; barbarian: string; bard: string; champion: string; cleric: string; druid: string; + exemplar: string; fighter: string; gunslinger: string; kineticist: string; @@ -1444,6 +1517,7 @@ export declare const PF2ECONFIG: { incorporeal: string; inevitable: string; kami: string; + kaiju: string; kovintus: string; light: string; lilu: string; @@ -1458,6 +1532,7 @@ export declare const PF2ECONFIG: { mummy: string; munavri: string; mutant: string; + mythic: string; nindoru: string; nymph: string; oni: string; @@ -1654,6 +1729,7 @@ export declare const PF2ECONFIG: { misfortune: string; morph: string; move: string; + mythic: string; nonlethal: string; olfactory: string; plant: string; @@ -1662,6 +1738,7 @@ export declare const PF2ECONFIG: { possession: string; prediction: string; psyche: string; + rage: string; revelation: string; sanctified: string; scrying: string; @@ -1700,11 +1777,13 @@ export declare const PF2ECONFIG: { force: string; sonic: string; alchemist: string; + animist: string; barbarian: string; bard: string; champion: string; cleric: string; druid: string; + exemplar: string; fighter: string; gunslinger: string; kineticist: string; @@ -1762,13 +1841,16 @@ export declare const PF2ECONFIG: { virulent: string; wand: string; aftermath: string; + apparition: string; archetype: string; artifact: string; bravado: string; + calling: string; circus: string; class: string; composite: string; dedication: string; + destiny: string; deviant: string; downtime: string; evolution: string; @@ -1776,6 +1858,7 @@ export declare const PF2ECONFIG: { finisher: string; flourish: string; general: string; + ikon: string; impulse: string; infusion: string; lineage: string; @@ -1786,7 +1869,6 @@ export declare const PF2ECONFIG: { overflow: string; "pervasive-magic": string; press: string; - rage: string; reckless: string; reincarnated: string; reflection: string; @@ -1797,8 +1879,10 @@ export declare const PF2ECONFIG: { stamina: string; tandem: string; time: string; + transcendence: string; unstable: string; vigilante: string; + wandering: string; aiuvarin: string; anadi: string; android: string; @@ -1866,7 +1950,7 @@ export declare const PF2ECONFIG: { wayang: string; yaksha: string; yaoguai: string; - }, "splash" | "alchemist" | "barbarian" | "bard" | "champion" | "cleric" | "druid" | "fighter" | "gunslinger" | "kineticist" | "inventor" | "investigator" | "magus" | "monk" | "oracle" | "psychic" | "ranger" | "rogue" | "sorcerer" | "summoner" | "swashbuckler" | "thaumaturge" | "witch" | "wizard" | "agile" | "propulsive" | "backswing" | "forceful" | "reach" | "sweep" | "thrown" | "volley-20" | "volley-30" | "volley-50" | "volley-60" | "clockwork" | "consumable" | "infused" | "aiuvarin" | "anadi" | "android" | "aphorite" | "ardande" | "athamaru" | "automaton" | "awakened-animal" | "azarketi" | "beastkin" | "bugbear" | "catfolk" | "centaur" | "changeling" | "conrasu" | "dhampir" | "dragonblood" | "dromaar" | "duskwalker" | "dwarf" | "elf" | "fetchling" | "fleshwarp" | "ganzi" | "geniekin" | "ghoran" | "gnoll" | "gnome" | "goblin" | "goloma" | "grippli" | "halfling" | "hobgoblin" | "human" | "hungerseed" | "kashrishi" | "kitsune" | "kobold" | "leshy" | "lizardfolk" | "merfolk" | "minotaur" | "nagaji" | "naari" | "nephilim" | "orc" | "oread" | "poppet" | "ratfolk" | "reflection" | "samsaran" | "sarangay" | "shisk" | "shoony" | "skeleton" | "sprite" | "strix" | "suli" | "surki" | "sylph" | "tanuki" | "talos" | "tengu" | "undine" | "vanara" | "vishkanya" | "wayang" | "yaksha" | "yaoguai" | "additive" | "additive1" | "additive2" | "additive3" | "aftermath" | "amp" | "archetype" | "attack" | "beast" | "bottled-breath" | "cantrip" | "catalyst" | "circus" | "class" | "coagulant" | "composite" | "composition" | "concentrate" | "dedication" | "deviant" | "eidolon" | "elixir" | "esoterica" | "expandable" | "exploration" | "finisher" | "flourish" | "focus" | "fulu" | "gadget" | "general" | "lineage" | "litany" | "lozenge" | "manipulate" | "missive" | "modification" | "multiclass" | "mutagen" | "oath" | "oil" | "overflow" | "pervasive-magic" | "potion" | "precious" | "press" | "processed" | "reckless" | "reincarnated" | "revelation" | "sanctified" | "scroll" | "secret" | "skill" | "snare" | "spellgun" | "structure" | "subtle" | "talisman" | "tandem" | "tea" | "trap" | "unstable" | "vigilante" | "wand">; + }, "splash" | "alchemist" | "animist" | "barbarian" | "bard" | "champion" | "cleric" | "druid" | "exemplar" | "fighter" | "gunslinger" | "kineticist" | "inventor" | "investigator" | "magus" | "monk" | "oracle" | "psychic" | "ranger" | "rogue" | "sorcerer" | "summoner" | "swashbuckler" | "thaumaturge" | "witch" | "wizard" | "agile" | "propulsive" | "backswing" | "forceful" | "reach" | "sweep" | "thrown" | "volley-20" | "volley-30" | "volley-50" | "volley-60" | "clockwork" | "consumable" | "infused" | "aiuvarin" | "anadi" | "android" | "aphorite" | "ardande" | "athamaru" | "automaton" | "awakened-animal" | "azarketi" | "beastkin" | "bugbear" | "catfolk" | "centaur" | "changeling" | "conrasu" | "dhampir" | "dragonblood" | "dromaar" | "duskwalker" | "dwarf" | "elf" | "fetchling" | "fleshwarp" | "ganzi" | "geniekin" | "ghoran" | "gnoll" | "gnome" | "goblin" | "goloma" | "grippli" | "halfling" | "hobgoblin" | "human" | "hungerseed" | "kashrishi" | "kitsune" | "kobold" | "leshy" | "lizardfolk" | "merfolk" | "minotaur" | "nagaji" | "naari" | "nephilim" | "orc" | "oread" | "poppet" | "ratfolk" | "reflection" | "samsaran" | "sarangay" | "shisk" | "shoony" | "skeleton" | "sprite" | "strix" | "suli" | "surki" | "sylph" | "tanuki" | "talos" | "tengu" | "undine" | "vanara" | "vishkanya" | "wayang" | "yaksha" | "yaoguai" | "additive" | "additive1" | "additive2" | "additive3" | "aftermath" | "amp" | "archetype" | "attack" | "beast" | "bottled-breath" | "cantrip" | "catalyst" | "circus" | "class" | "coagulant" | "composite" | "composition" | "concentrate" | "dedication" | "deviant" | "eidolon" | "elixir" | "esoterica" | "expandable" | "exploration" | "finisher" | "flourish" | "focus" | "fulu" | "gadget" | "general" | "lineage" | "litany" | "lozenge" | "manipulate" | "missive" | "modification" | "multiclass" | "mutagen" | "oath" | "oil" | "overflow" | "pervasive-magic" | "potion" | "precious" | "press" | "processed" | "reckless" | "reincarnated" | "revelation" | "sanctified" | "scroll" | "secret" | "skill" | "snare" | "spellgun" | "structure" | "subtle" | "talisman" | "tandem" | "tea" | "trap" | "unstable" | "vigilante" | "wand">; elementTraits: { air: string; earth: string; @@ -1925,6 +2009,7 @@ export declare const PF2ECONFIG: { misfortune: string; morph: string; mounted: string; + mythic: string; nonlethal: string; plant: string; poison: string; @@ -2044,17 +2129,20 @@ export declare const PF2ECONFIG: { additive3: string; aftermath: string; alchemical: string; + apparition: string; archetype: string; artifact: string; auditory: string; aura: string; bravado: string; + calling: string; circus: string; class: string; coagulant: string; composite: string; concentrate: string; dedication: string; + destiny: string; detection: string; deviant: string; downtime: string; @@ -2067,6 +2155,7 @@ export declare const PF2ECONFIG: { flourish: string; fortune: string; general: string; + ikon: string; impulse: string; infusion: string; injury: string; @@ -2095,12 +2184,14 @@ export declare const PF2ECONFIG: { talisman: string; tandem: string; time: string; + transcendence: string; "true-name": string; unstable: string; vigilante: string; virulent: string; vitality: string; void: string; + wandering: string; amp: string; attack: string; beast: string; @@ -2130,6 +2221,7 @@ export declare const PF2ECONFIG: { litany: string; misfortune: string; morph: string; + mythic: string; nonlethal: string; plant: string; polymorph: string; @@ -2171,11 +2263,13 @@ export declare const PF2ECONFIG: { force: string; sonic: string; alchemist: string; + animist: string; barbarian: string; bard: string; champion: string; cleric: string; druid: string; + exemplar: string; fighter: string; gunslinger: string; kineticist: string; @@ -2380,6 +2474,7 @@ export declare const PF2ECONFIG: { mummy: string; munavri: string; mutant: string; + mythic: string; nindoru: string; nymph: string; oni: string; @@ -2567,6 +2662,7 @@ export declare const PF2ECONFIG: { misfortune: string; morph: string; move: string; + mythic: string; nonlethal: string; olfactory: string; plant: string; @@ -2575,6 +2671,7 @@ export declare const PF2ECONFIG: { possession: string; prediction: string; psyche: string; + rage: string; revelation: string; sanctified: string; scrying: string; @@ -2613,11 +2710,13 @@ export declare const PF2ECONFIG: { force: string; sonic: string; alchemist: string; + animist: string; barbarian: string; bard: string; champion: string; cleric: string; druid: string; + exemplar: string; fighter: string; gunslinger: string; kineticist: string; @@ -2675,13 +2774,16 @@ export declare const PF2ECONFIG: { virulent: string; wand: string; aftermath: string; + apparition: string; archetype: string; artifact: string; bravado: string; + calling: string; circus: string; class: string; composite: string; dedication: string; + destiny: string; deviant: string; downtime: string; evolution: string; @@ -2689,6 +2791,7 @@ export declare const PF2ECONFIG: { finisher: string; flourish: string; general: string; + ikon: string; impulse: string; infusion: string; lineage: string; @@ -2699,7 +2802,6 @@ export declare const PF2ECONFIG: { overflow: string; "pervasive-magic": string; press: string; - rage: string; reckless: string; reincarnated: string; reflection: string; @@ -2710,8 +2812,10 @@ export declare const PF2ECONFIG: { stamina: string; tandem: string; time: string; + transcendence: string; unstable: string; vigilante: string; + wandering: string; aiuvarin: string; anadi: string; android: string; @@ -2896,12 +3000,14 @@ export declare const PF2ECONFIG: { silver: string; "cold-iron": string; dragonhide: string; + dreamweb: string; "grisantian-pelt": string; "keep-stone": string; peachwood: string; sisterstone: string; "sisterstone-dusk": string; "sisterstone-scarlet": string; + sloughstone: string; "sovereign-steel": string; warpglass: string; adjusted: string; @@ -2961,13 +3067,17 @@ export declare const PF2ECONFIG: { injection: string; intelligent: string; invested: string; + "jousting-d4": string; "jousting-d6": string; + "jousting-d8": string; + "jousting-d10": string; kickback: string; light: string; magical: string; mental: string; modular: string; monk: string; + mythic: string; nonlethal: string; olfactory: string; parry: string; @@ -2993,6 +3103,7 @@ export declare const PF2ECONFIG: { splash: string; staff: string; sweep: string; + tearing: string; tech: string; teleportation: string; tethered: string; @@ -3209,6 +3320,7 @@ export declare const PF2ECONFIG: { misfortune: string; morph: string; move: string; + mythic: string; nonlethal: string; olfactory: string; plant: string; @@ -3217,6 +3329,7 @@ export declare const PF2ECONFIG: { possession: string; prediction: string; psyche: string; + rage: string; revelation: string; sanctified: string; scrying: string; @@ -3256,11 +3369,13 @@ export declare const PF2ECONFIG: { force: string; sonic: string; alchemist: string; + animist: string; barbarian: string; bard: string; champion: string; cleric: string; druid: string; + exemplar: string; fighter: string; gunslinger: string; kineticist: string; @@ -3344,13 +3459,17 @@ export declare const PF2ECONFIG: { injection: string; intelligent: string; invested: string; + "jousting-d4": string; "jousting-d6": string; + "jousting-d8": string; + "jousting-d10": string; kickback: string; light: string; magical: string; mental: string; modular: string; monk: string; + mythic: string; nonlethal: string; olfactory: string; parry: string; @@ -3376,6 +3495,7 @@ export declare const PF2ECONFIG: { splash: string; staff: string; sweep: string; + tearing: string; tech: string; teleportation: string; tethered: string; @@ -3519,6 +3639,7 @@ export declare const PF2ECONFIG: { duskwood: string; djezet: string; dragonhide: string; + dreamweb: string; "grisantian-pelt": string; inubrix: string; dawnsilver: string; @@ -3529,6 +3650,7 @@ export declare const PF2ECONFIG: { sisterstone: string; "sisterstone-dusk": string; "sisterstone-scarlet": string; + sloughstone: string; "sovereign-steel": string; warpglass: string; "ranged-trip": string; @@ -3616,6 +3738,7 @@ export declare const PF2ECONFIG: { tane: string; tattoo: string; tea: string; + tearing: string; tech: string; telepathy: string; teleportation: string; @@ -3637,6 +3760,7 @@ export declare const PF2ECONFIG: { tiefling: string; time: string; training: string; + transcendence: string; trap: string; trip: string; troll: string; @@ -3680,6 +3804,7 @@ export declare const PF2ECONFIG: { "volley-50": string; "volley-60": string; wand: string; + wandering: string; water: string; werecreature: string; wight: string; @@ -3786,8 +3911,10 @@ export declare const PF2ECONFIG: { android: string; angel: string; animal: string; + animist: string; apex: string; aphorite: string; + apparition: string; aquadynamic: string; aquatic: string; arcane: string; @@ -3821,6 +3948,7 @@ export declare const PF2ECONFIG: { bugbear: string; bulwark: string; caligni: string; + calling: string; cantrip: string; "capacity-2": string; "capacity-3": string; @@ -3888,6 +4016,7 @@ export declare const PF2ECONFIG: { dedication: string; demon: string; dero: string; + destiny: string; detection: string; deviant: string; devil: string; @@ -3919,6 +4048,7 @@ export declare const PF2ECONFIG: { esoterica: string; ethereal: string; evolution: string; + exemplar: string; expandable: string; experiment: string; exploration: string; @@ -3971,7 +4101,10 @@ export declare const PF2ECONFIG: { gunslinger: string; hag: string; halfling: string; + "jousting-d4": string; "jousting-d6": string; + "jousting-d8": string; + "jousting-d10": string; hampering: string; harnessed: string; haunt: string; @@ -3985,6 +4118,7 @@ export declare const PF2ECONFIG: { human: string; humanoid: string; naari: string; + ikon: string; illusion: string; impulse: string; incapacitation: string; @@ -4044,6 +4178,7 @@ export declare const PF2ECONFIG: { mummy: string; mutagen: string; mutant: string; + mythic: string; nagaji: string; nephilim: string; nindoru: string; @@ -4100,227 +4235,33 @@ export declare const PF2ECONFIG: { siege: string; skirmisher: string; }; - creatureTypes: Pick<{ + creatureTypes: { + plant: string; + spirit: string; + vitality: string; + void: string; + time: string; + fungus: string; + shadow: string; + beast: string; + dream: string; + fey: string; aberration: string; - aeon: string; - aesir: string; - agathion: string; - alchemical: string; - amphibious: string; - angel: string; animal: string; - anugobu: string; - aquatic: string; - archon: string; astral: string; - asura: string; - azata: string; - beast: string; - boggard: string; - bugbear: string; - caligni: string; celestial: string; - centaur: string; - "charau-ka": string; - clockwork: string; construct: string; - couatl: string; - daemon: string; - darvakka: string; - demon: string; - dero: string; - devil: string; - dinosaur: string; - div: string; dragon: string; - dream: string; - drow: string; - duergar: string; - eidolon: string; elemental: string; ethereal: string; - experiment: string; - fey: string; fiend: string; - formian: string; - fungus: string; - genie: string; - ghoran: string; - ghost: string; - ghoul: string; - ghul: string; giant: string; - golem: string; - graveknight: string; - gremlin: string; - grioth: string; - hag: string; - hantu: string; - herald: string; - hryngar: string; humanoid: string; - ikeshti: string; - illusion: string; - incorporeal: string; - inevitable: string; - kami: string; - kovintus: string; - light: string; - lilu: string; - locathah: string; - mental: string; - merfolk: string; - mindless: string; - minion: string; monitor: string; - morlock: string; - mortic: string; - mummy: string; - munavri: string; - mutant: string; - nindoru: string; - nymph: string; - oni: string; ooze: string; - oread: string; - paaridar: string; - palinthanos: string; - "persona-flirt": string; - "persona-guardian": string; - "persona-leader": string; - "persona-scholar": string; - "persona-scoundrel": string; - "persona-underdog": string; - "persona-warrior": string; - "persona-wildcard": string; petitioner: string; - phantom: string; - plant: string; - poison: string; - protean: string; - psychopomp: string; - qlippoth: string; - rakshasa: string; - reflection: string; - sahkil: string; - "sea-devil": string; - sedacthy: string; - serpentfolk: string; - seugathi: string; - shabti: string; - shadow: string; - shobhad: string; - siktempora: string; - skelm: string; - skulk: string; - soulbound: string; - spirit: string; - sporeborn: string; - spriggan: string; - stheno: string; - summoned: string; - swarm: string; - tane: string; - tanggal: string; - time: string; - titan: string; - troll: string; - troop: string; undead: string; - urdefhan: string; - vampire: string; - vanara: string; - velstrac: string; - wayang: string; - werecreature: string; - wight: string; - "wild-hunt": string; - wraith: string; - wraithvine: string; - wyrwood: string; - xulgath: string; - zombie: string; - holy: string; - unholy: string; - arcane: string; - divine: string; - occult: string; - primal: string; - acid: string; - cold: string; - electricity: string; - fire: string; - force: string; - sonic: string; - vitality: string; - void: string; - air: string; - earth: string; - metal: string; - water: string; - wood: string; - aiuvarin: string; - anadi: string; - android: string; - aphorite: string; - ardande: string; - athamaru: string; - automaton: string; - "awakened-animal": string; - azarketi: string; - beastkin: string; - catfolk: string; - changeling: string; - conrasu: string; - dhampir: string; - dragonblood: string; - dromaar: string; - duskwalker: string; - dwarf: string; - elf: string; - fetchling: string; - fleshwarp: string; - ganzi: string; - geniekin: string; - gnoll: string; - gnome: string; - goblin: string; - goloma: string; - grippli: string; - halfling: string; - hobgoblin: string; - human: string; - hungerseed: string; - kashrishi: string; - kitsune: string; - kobold: string; - leshy: string; - lizardfolk: string; - minotaur: string; - nagaji: string; - naari: string; - nephilim: string; - orc: string; - poppet: string; - ratfolk: string; - samsaran: string; - sarangay: string; - shisk: string; - shoony: string; - skeleton: string; - sprite: string; - strix: string; - suli: string; - surki: string; - sylph: string; - tanuki: string; - talos: string; - tengu: string; - undine: string; - vishkanya: string; - yaksha: string; - yaoguai: string; - }, "time" | "plant" | "spirit" | "vitality" | "void" | "fungus" | "shadow" | "beast" | "dream" | "fey" | "aberration" | "animal" | "astral" | "celestial" | "construct" | "dragon" | "elemental" | "ethereal" | "fiend" | "giant" | "humanoid" | "monitor" | "ooze" | "petitioner" | "undead">; + }; weaponHands: { 1: string; "1+": string; @@ -4486,7 +4427,7 @@ export declare const PF2ECONFIG: { attribute: "dex"; }; }>; - featCategories: Record<"curse" | "class" | "general" | "skill" | "ancestry" | "bonus" | "ancestryfeature" | "classfeature" | "deityboon" | "pfsboon", string>; + featCategories: Record<"curse" | "class" | "general" | "skill" | "calling" | "ancestry" | "bonus" | "ancestryfeature" | "classfeature" | "deityboon" | "pfsboon", string>; actionTypes: { action: string; reaction: string; diff --git a/types/src/scripts/config/iwr.d.ts b/types/src/scripts/config/iwr.d.ts index ed633fc20..f98e30383 100644 --- a/types/src/scripts/config/iwr.d.ts +++ b/types/src/scripts/config/iwr.d.ts @@ -127,6 +127,7 @@ declare const weaknessTypes: { magical: string; mental: string; metal: string; + mythic: string; "non-magical": string; "nonlethal-attacks": string; "persistent-damage": string; @@ -195,6 +196,7 @@ declare const resistanceTypes: { magical: string; mental: string; metal: string; + mythic: string; "non-magical": string; nonlethal: string; "nonlethal-attacks": string; diff --git a/types/src/scripts/config/traits.d.ts b/types/src/scripts/config/traits.d.ts index a69029a34..7d3f2271e 100644 --- a/types/src/scripts/config/traits.d.ts +++ b/types/src/scripts/config/traits.d.ts @@ -5,6 +5,7 @@ import { OtherConsumableTag } from "@item/consumable/types.ts"; import { PreciousMaterialType } from "@item/physical/types.ts"; import { MagicTradition } from "@item/spell/types.ts"; import { OtherWeaponTag } from "@item/weapon/types.ts"; + declare const ancestryTraits: { aiuvarin: string; anadi: string; @@ -160,6 +161,7 @@ declare const creatureTraits: { incorporeal: string; inevitable: string; kami: string; + kaiju: string; kovintus: string; light: string; lilu: string; @@ -174,6 +176,7 @@ declare const creatureTraits: { mummy: string; munavri: string; mutant: string; + mythic: string; nindoru: string; nymph: string; oni: string; @@ -383,6 +386,7 @@ declare const spellTraits: { misfortune: string; morph: string; move: string; + mythic: string; nonlethal: string; olfactory: string; plant: string; @@ -391,6 +395,7 @@ declare const spellTraits: { possession: string; prediction: string; psyche: string; + rage: string; revelation: string; sanctified: string; scrying: string; @@ -430,11 +435,13 @@ declare const spellTraits: { force: string; sonic: string; alchemist: string; + animist: string; barbarian: string; bard: string; champion: string; cleric: string; druid: string; + exemplar: string; fighter: string; gunslinger: string; kineticist: string; @@ -512,13 +519,17 @@ declare const weaponTraits: { injection: string; intelligent: string; invested: string; + "jousting-d4": string; "jousting-d6": string; + "jousting-d8": string; + "jousting-d10": string; kickback: string; light: string; magical: string; mental: string; modular: string; monk: string; + mythic: string; nonlethal: string; olfactory: string; parry: string; @@ -544,6 +555,7 @@ declare const weaponTraits: { splash: string; staff: string; sweep: string; + tearing: string; tech: string; teleportation: string; tethered: string; @@ -794,12 +806,14 @@ declare const npcAttackTraits: { silver: string; "cold-iron": string; dragonhide: string; + dreamweb: string; "grisantian-pelt": string; "keep-stone": string; peachwood: string; sisterstone: string; "sisterstone-dusk": string; "sisterstone-scarlet": string; + sloughstone: string; "sovereign-steel": string; warpglass: string; adjusted: string; @@ -859,13 +873,17 @@ declare const npcAttackTraits: { injection: string; intelligent: string; invested: string; + "jousting-d4": string; "jousting-d6": string; + "jousting-d8": string; + "jousting-d10": string; kickback: string; light: string; magical: string; mental: string; modular: string; monk: string; + mythic: string; nonlethal: string; olfactory: string; parry: string; @@ -891,6 +909,7 @@ declare const npcAttackTraits: { splash: string; staff: string; sweep: string; + tearing: string; tech: string; teleportation: string; tethered: string; @@ -1028,17 +1047,20 @@ declare const featTraits: { additive3: string; aftermath: string; alchemical: string; + apparition: string; archetype: string; artifact: string; auditory: string; aura: string; bravado: string; + calling: string; circus: string; class: string; coagulant: string; composite: string; concentrate: string; dedication: string; + destiny: string; detection: string; deviant: string; downtime: string; @@ -1051,6 +1073,7 @@ declare const featTraits: { flourish: string; fortune: string; general: string; + ikon: string; impulse: string; infusion: string; injury: string; @@ -1079,12 +1102,14 @@ declare const featTraits: { talisman: string; tandem: string; time: string; + transcendence: string; "true-name": string; unstable: string; vigilante: string; virulent: string; vitality: string; void: string; + wandering: string; amp: string; attack: string; beast: string; @@ -1114,6 +1139,7 @@ declare const featTraits: { litany: string; misfortune: string; morph: string; + mythic: string; nonlethal: string; plant: string; polymorph: string; @@ -1155,11 +1181,13 @@ declare const featTraits: { force: string; sonic: string; alchemist: string; + animist: string; barbarian: string; bard: string; champion: string; cleric: string; druid: string; + exemplar: string; fighter: string; gunslinger: string; kineticist: string; @@ -1336,10 +1364,12 @@ declare const consumableTraits: { litany: string; manipulate: string; move: string; + mythic: string; nonlethal: string; plant: string; prediction: string; psyche: string; + rage: string; revelation: string; sanctified: string; shadow: string; @@ -1372,11 +1402,13 @@ declare const consumableTraits: { force: string; sonic: string; alchemist: string; + animist: string; barbarian: string; bard: string; champion: string; cleric: string; druid: string; + exemplar: string; fighter: string; gunslinger: string; kineticist: string; @@ -1448,6 +1480,7 @@ declare const actionTraits: { misfortune: string; morph: string; move: string; + mythic: string; nonlethal: string; olfactory: string; plant: string; @@ -1456,6 +1489,7 @@ declare const actionTraits: { possession: string; prediction: string; psyche: string; + rage: string; revelation: string; sanctified: string; scrying: string; @@ -1494,11 +1528,13 @@ declare const actionTraits: { force: string; sonic: string; alchemist: string; + animist: string; barbarian: string; bard: string; champion: string; cleric: string; druid: string; + exemplar: string; fighter: string; gunslinger: string; kineticist: string; @@ -1556,13 +1592,16 @@ declare const actionTraits: { virulent: string; wand: string; aftermath: string; + apparition: string; archetype: string; artifact: string; bravado: string; + calling: string; circus: string; class: string; composite: string; dedication: string; + destiny: string; deviant: string; downtime: string; evolution: string; @@ -1570,6 +1609,7 @@ declare const actionTraits: { finisher: string; flourish: string; general: string; + ikon: string; impulse: string; infusion: string; lineage: string; @@ -1580,7 +1620,6 @@ declare const actionTraits: { overflow: string; "pervasive-magic": string; press: string; - rage: string; reckless: string; reincarnated: string; reflection: string; @@ -1591,8 +1630,10 @@ declare const actionTraits: { stamina: string; tandem: string; time: string; + transcendence: string; unstable: string; vigilante: string; + wandering: string; aiuvarin: string; anadi: string; android: string; @@ -1714,6 +1755,7 @@ declare const effectTraits: Omit<{ misfortune: string; morph: string; move: string; + mythic: string; nonlethal: string; olfactory: string; plant: string; @@ -1722,6 +1764,7 @@ declare const effectTraits: Omit<{ possession: string; prediction: string; psyche: string; + rage: string; revelation: string; sanctified: string; scrying: string; @@ -1760,11 +1803,13 @@ declare const effectTraits: Omit<{ force: string; sonic: string; alchemist: string; + animist: string; barbarian: string; bard: string; champion: string; cleric: string; druid: string; + exemplar: string; fighter: string; gunslinger: string; kineticist: string; @@ -1822,13 +1867,16 @@ declare const effectTraits: Omit<{ virulent: string; wand: string; aftermath: string; + apparition: string; archetype: string; artifact: string; bravado: string; + calling: string; circus: string; class: string; composite: string; dedication: string; + destiny: string; deviant: string; downtime: string; evolution: string; @@ -1836,6 +1884,7 @@ declare const effectTraits: Omit<{ finisher: string; flourish: string; general: string; + ikon: string; impulse: string; infusion: string; lineage: string; @@ -1846,7 +1895,6 @@ declare const effectTraits: Omit<{ overflow: string; "pervasive-magic": string; press: string; - rage: string; reckless: string; reincarnated: string; reflection: string; @@ -1857,8 +1905,10 @@ declare const effectTraits: Omit<{ stamina: string; tandem: string; time: string; + transcendence: string; unstable: string; vigilante: string; + wandering: string; aiuvarin: string; anadi: string; android: string; @@ -1926,7 +1976,7 @@ declare const effectTraits: Omit<{ wayang: string; yaksha: string; yaoguai: string; -}, "splash" | "alchemist" | "barbarian" | "bard" | "champion" | "cleric" | "druid" | "fighter" | "gunslinger" | "kineticist" | "inventor" | "investigator" | "magus" | "monk" | "oracle" | "psychic" | "ranger" | "rogue" | "sorcerer" | "summoner" | "swashbuckler" | "thaumaturge" | "witch" | "wizard" | "agile" | "propulsive" | "backswing" | "forceful" | "reach" | "sweep" | "thrown" | "volley-20" | "volley-30" | "volley-50" | "volley-60" | "clockwork" | "consumable" | "infused" | "aiuvarin" | "anadi" | "android" | "aphorite" | "ardande" | "athamaru" | "automaton" | "awakened-animal" | "azarketi" | "beastkin" | "bugbear" | "catfolk" | "centaur" | "changeling" | "conrasu" | "dhampir" | "dragonblood" | "dromaar" | "duskwalker" | "dwarf" | "elf" | "fetchling" | "fleshwarp" | "ganzi" | "geniekin" | "ghoran" | "gnoll" | "gnome" | "goblin" | "goloma" | "grippli" | "halfling" | "hobgoblin" | "human" | "hungerseed" | "kashrishi" | "kitsune" | "kobold" | "leshy" | "lizardfolk" | "merfolk" | "minotaur" | "nagaji" | "naari" | "nephilim" | "orc" | "oread" | "poppet" | "ratfolk" | "reflection" | "samsaran" | "sarangay" | "shisk" | "shoony" | "skeleton" | "sprite" | "strix" | "suli" | "surki" | "sylph" | "tanuki" | "talos" | "tengu" | "undine" | "vanara" | "vishkanya" | "wayang" | "yaksha" | "yaoguai" | "additive" | "additive1" | "additive2" | "additive3" | "aftermath" | "amp" | "archetype" | "attack" | "beast" | "bottled-breath" | "cantrip" | "catalyst" | "circus" | "class" | "coagulant" | "composite" | "composition" | "concentrate" | "dedication" | "deviant" | "eidolon" | "elixir" | "esoterica" | "expandable" | "exploration" | "finisher" | "flourish" | "focus" | "fulu" | "gadget" | "general" | "lineage" | "litany" | "lozenge" | "manipulate" | "missive" | "modification" | "multiclass" | "mutagen" | "oath" | "oil" | "overflow" | "pervasive-magic" | "potion" | "precious" | "press" | "processed" | "reckless" | "reincarnated" | "revelation" | "sanctified" | "scroll" | "secret" | "skill" | "snare" | "spellgun" | "structure" | "subtle" | "talisman" | "tandem" | "tea" | "trap" | "unstable" | "vigilante" | "wand">; +}, "splash" | "alchemist" | "animist" | "barbarian" | "bard" | "champion" | "cleric" | "druid" | "exemplar" | "fighter" | "gunslinger" | "kineticist" | "inventor" | "investigator" | "magus" | "monk" | "oracle" | "psychic" | "ranger" | "rogue" | "sorcerer" | "summoner" | "swashbuckler" | "thaumaturge" | "witch" | "wizard" | "agile" | "propulsive" | "backswing" | "forceful" | "reach" | "sweep" | "thrown" | "volley-20" | "volley-30" | "volley-50" | "volley-60" | "clockwork" | "consumable" | "infused" | "aiuvarin" | "anadi" | "android" | "aphorite" | "ardande" | "athamaru" | "automaton" | "awakened-animal" | "azarketi" | "beastkin" | "bugbear" | "catfolk" | "centaur" | "changeling" | "conrasu" | "dhampir" | "dragonblood" | "dromaar" | "duskwalker" | "dwarf" | "elf" | "fetchling" | "fleshwarp" | "ganzi" | "geniekin" | "ghoran" | "gnoll" | "gnome" | "goblin" | "goloma" | "grippli" | "halfling" | "hobgoblin" | "human" | "hungerseed" | "kashrishi" | "kitsune" | "kobold" | "leshy" | "lizardfolk" | "merfolk" | "minotaur" | "nagaji" | "naari" | "nephilim" | "orc" | "oread" | "poppet" | "ratfolk" | "reflection" | "samsaran" | "sarangay" | "shisk" | "shoony" | "skeleton" | "sprite" | "strix" | "suli" | "surki" | "sylph" | "tanuki" | "talos" | "tengu" | "undine" | "vanara" | "vishkanya" | "wayang" | "yaksha" | "yaoguai" | "additive" | "additive1" | "additive2" | "additive3" | "aftermath" | "amp" | "archetype" | "attack" | "beast" | "bottled-breath" | "cantrip" | "catalyst" | "circus" | "class" | "coagulant" | "composite" | "composition" | "concentrate" | "dedication" | "deviant" | "eidolon" | "elixir" | "esoterica" | "expandable" | "exploration" | "finisher" | "flourish" | "focus" | "fulu" | "gadget" | "general" | "lineage" | "litany" | "lozenge" | "manipulate" | "missive" | "modification" | "multiclass" | "mutagen" | "oath" | "oil" | "overflow" | "pervasive-magic" | "potion" | "precious" | "press" | "processed" | "reckless" | "reincarnated" | "revelation" | "sanctified" | "scroll" | "secret" | "skill" | "snare" | "spellgun" | "structure" | "subtle" | "talisman" | "tandem" | "tea" | "trap" | "unstable" | "vigilante" | "wand">; declare const hazardTraits: { alchemical: string; auditory: string; @@ -2045,6 +2095,7 @@ declare const hazardTraits: { mummy: string; munavri: string; mutant: string; + mythic: string; nindoru: string; nymph: string; oni: string; @@ -2222,6 +2273,7 @@ declare const equipmentTraits: { misfortune: string; morph: string; mounted: string; + mythic: string; nonlethal: string; plant: string; poison: string; @@ -2402,12 +2454,14 @@ declare const armorTraits: { flexible: string; healing: string; hindering: string; + illusion: string; inscribed: string; intelligent: string; invested: string; laminar: string; light: string; magical: string; + mythic: string; noisy: string; plant: string; ponderous: string; @@ -2501,6 +2555,7 @@ declare const kingmakerTraits: { misfortune: string; morph: string; move: string; + mythic: string; nonlethal: string; olfactory: string; plant: string; @@ -2509,6 +2564,7 @@ declare const kingmakerTraits: { possession: string; prediction: string; psyche: string; + rage: string; revelation: string; sanctified: string; scrying: string; @@ -2547,11 +2603,13 @@ declare const kingmakerTraits: { force: string; sonic: string; alchemist: string; + animist: string; barbarian: string; bard: string; champion: string; cleric: string; druid: string; + exemplar: string; fighter: string; gunslinger: string; kineticist: string; @@ -2609,13 +2667,16 @@ declare const kingmakerTraits: { virulent: string; wand: string; aftermath: string; + apparition: string; archetype: string; artifact: string; bravado: string; + calling: string; circus: string; class: string; composite: string; dedication: string; + destiny: string; deviant: string; downtime: string; evolution: string; @@ -2623,6 +2684,7 @@ declare const kingmakerTraits: { finisher: string; flourish: string; general: string; + ikon: string; impulse: string; infusion: string; lineage: string; @@ -2633,7 +2695,6 @@ declare const kingmakerTraits: { overflow: string; "pervasive-magic": string; press: string; - rage: string; reckless: string; reincarnated: string; reflection: string; @@ -2644,8 +2705,10 @@ declare const kingmakerTraits: { stamina: string; tandem: string; time: string; + transcendence: string; unstable: string; vigilante: string; + wandering: string; aiuvarin: string; anadi: string; android: string; @@ -2721,6 +2784,7 @@ declare const traitDescriptions: { duskwood: string; djezet: string; dragonhide: string; + dreamweb: string; "grisantian-pelt": string; inubrix: string; dawnsilver: string; @@ -2731,6 +2795,7 @@ declare const traitDescriptions: { sisterstone: string; "sisterstone-dusk": string; "sisterstone-scarlet": string; + sloughstone: string; "sovereign-steel": string; warpglass: string; "ranged-trip": string; @@ -2818,6 +2883,7 @@ declare const traitDescriptions: { tane: string; tattoo: string; tea: string; + tearing: string; tech: string; telepathy: string; teleportation: string; @@ -2839,6 +2905,7 @@ declare const traitDescriptions: { tiefling: string; time: string; training: string; + transcendence: string; trap: string; trip: string; troll: string; @@ -2882,6 +2949,7 @@ declare const traitDescriptions: { "volley-50": string; "volley-60": string; wand: string; + wandering: string; water: string; werecreature: string; wight: string; @@ -2988,8 +3056,10 @@ declare const traitDescriptions: { android: string; angel: string; animal: string; + animist: string; apex: string; aphorite: string; + apparition: string; aquadynamic: string; aquatic: string; arcane: string; @@ -3023,6 +3093,7 @@ declare const traitDescriptions: { bugbear: string; bulwark: string; caligni: string; + calling: string; cantrip: string; "capacity-2": string; "capacity-3": string; @@ -3090,6 +3161,7 @@ declare const traitDescriptions: { dedication: string; demon: string; dero: string; + destiny: string; detection: string; deviant: string; devil: string; @@ -3121,6 +3193,7 @@ declare const traitDescriptions: { esoterica: string; ethereal: string; evolution: string; + exemplar: string; expandable: string; experiment: string; exploration: string; @@ -3173,7 +3246,10 @@ declare const traitDescriptions: { gunslinger: string; hag: string; halfling: string; + "jousting-d4": string; "jousting-d6": string; + "jousting-d8": string; + "jousting-d10": string; hampering: string; harnessed: string; haunt: string; @@ -3187,6 +3263,7 @@ declare const traitDescriptions: { human: string; humanoid: string; naari: string; + ikon: string; illusion: string; impulse: string; incapacitation: string; @@ -3246,6 +3323,7 @@ declare const traitDescriptions: { mummy: string; mutagen: string; mutant: string; + mythic: string; nagaji: string; nephilim: string; nindoru: string; diff --git a/types/src/scripts/macros/hotbar.d.ts b/types/src/scripts/macros/hotbar.d.ts index ffd64c138..ac96db76b 100644 --- a/types/src/scripts/macros/hotbar.d.ts +++ b/types/src/scripts/macros/hotbar.d.ts @@ -1,12 +1,9 @@ -import type { ConditionPF2e, EffectPF2e } from "@item"; +import { type ConditionPF2e, type EffectPF2e } from "@item"; import { EffectTrait } from "@item/abstract-effect/types.ts"; import { ChatMessagePF2e } from "@module/chat-message/document.ts"; -/** - * Create a Macro from an Item drop. - * Get an existing item macro if one exists, otherwise create a new one. - * @param itemId - */ -export declare function rollItemMacro(itemId: string, event?: Event | null): Promise; + +/** Given an item's id or uuid, retrieves the item and uses it. */ +export declare function rollItemMacro(itemIdOrUuid: string, event?: Event | null): Promise; export declare function createActionMacro({ actorUUID, actionIndex, elementTrait, slot, }: { actorUUID?: ActorUUID; elementTrait?: string; diff --git a/types/src/scripts/ui/user-visibility.d.ts b/types/src/scripts/ui/user-visibility.d.ts index dcdcde7ef..48e80693a 100644 --- a/types/src/scripts/ui/user-visibility.d.ts +++ b/types/src/scripts/ui/user-visibility.d.ts @@ -1,10 +1,11 @@ import { ChatMessagePF2e } from "@module/chat-message/index.ts"; + declare class UserVisibilityPF2e { /** Edits HTML live based on permission settings. Used to hide certain blocks and values */ static process(html: HTMLElement, options?: ProcessOptions): void; static processMessageSender(message: ChatMessagePF2e, html: HTMLElement): void; } -declare const USER_VISIBILITIES: Set<"none" | "owner" | "all" | "gm">; +declare const USER_VISIBILITIES: Set<"none" | "all" | "gm" | "owner">; type UserVisibility = SetElement; interface ProcessOptions { document?: ClientDocument | null; diff --git a/types/src/util/destroyables.d.ts b/types/src/util/destroyables.d.ts new file mode 100644 index 000000000..5ab80eded --- /dev/null +++ b/types/src/util/destroyables.d.ts @@ -0,0 +1,20 @@ +/// +/// +/// +import Sortable from "sortablejs"; + +declare class DestroyableManager { + #private; + static instance: DestroyableManager; + /** Start observing the document body. */ + static initialize(): void; + constructor(); + observe(destroyable: Destroyable): void; +} +type Destroyable = Tagify<{ + id: string; + value: string; +}> | Tagify | Sortable | JQueryTooltipster.ITooltipsterInstance; +declare function createSortable(list: HTMLElement, options: Sortable.Options): Sortable; +declare function createTooltipster(target: HTMLElement, options: JQueryTooltipster.ITooltipsterOptions): JQuery; +export { DestroyableManager, createSortable, createTooltipster }; diff --git a/types/src/util/index.d.ts b/types/src/util/index.d.ts index 9f2b5e591..3e0a0f058 100644 --- a/types/src/util/index.d.ts +++ b/types/src/util/index.d.ts @@ -1,4 +1,3 @@ export * from "./delegated-collection.ts"; export * from "./dom.ts"; export * from "./misc.ts"; -export * from "./tags.ts"; diff --git a/types/src/util/misc.d.ts b/types/src/util/misc.d.ts index e6cca4aa4..c5ed9fc5b 100644 --- a/types/src/util/misc.d.ts +++ b/types/src/util/misc.d.ts @@ -1,5 +1,6 @@ -import { ActionCost } from "@item/base/data/system.ts"; -import Sortable from "sortablejs"; +import type { ActionCost } from "@item/base/data/system.ts"; +import type Sortable from "sortablejs"; + /** * Given an array and a key function, create a map where the key is the value that * gets returned when each item is pushed into the function. Accumulate @@ -110,7 +111,7 @@ declare function configFromLocalization -/** Returns statistic dialog roll parameters based on held keys */ -type ParamsFromEvent = { - skipDialog: boolean; - rollMode?: RollMode | "roll"; -}; -/** Set roll mode and dialog skipping from a user's input */ -declare function eventToRollParams(event: Maybe, rollType: { - type: "check" | "damage"; -}): ParamsFromEvent; -/** Set roll mode from a user's input: used for messages that are not actually rolls. */ -declare function eventToRollMode(event: Maybe): RollMode | "roll"; -/** Creates a listener that can be used to create tooltips with dynamic content */ -declare function createTooltipListener(element: HTMLElement, options: { - /** Controls if the top edge of this tooltip aligns with the top edge of the target */ - align?: "top"; - /** If given, the tooltip will spawn on elements that match this selector */ - selector?: string; - locked?: boolean; - direction?: TooltipActivationOptions["direction"]; - cssClass?: string; - render: (element: HTMLElement) => Promise; -}): void; -export { createTooltipListener, eventToRollMode, eventToRollParams }; diff --git a/types/src/util/tags.d.ts b/types/src/util/tags.d.ts index bf5afea3e..86b087aa1 100644 --- a/types/src/util/tags.d.ts +++ b/types/src/util/tags.d.ts @@ -1,6 +1,7 @@ import { TraitViewData } from "@actor/data/base.ts"; -import type { HTMLTagifyTagsElement } from "@system/html-elements/tagify-tags.ts"; +import { HTMLTagifyTagsElement } from "@system/html-elements/tagify-tags.ts"; import Tagify, { TagifySettings } from "@yaireo/tagify"; + declare function traitSlugToObject(trait: string, dictionary: Record): TraitViewData; /** Create a tagify select menu out of a JSON input element */ declare function tagify(element: HTMLInputElement, options?: TagifyOptions): Tagify; diff --git a/types/types/foundry/build/generate-client-base-mixes.d.ts b/types/types/foundry/build/generate-client-base-mixes.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/types/types/foundry/build/generate-client-base-mixes.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/types/types/foundry/build/generate-client-base-mixes.ts b/types/types/foundry/build/generate-client-base-mixes.ts deleted file mode 100644 index 46bb4a20b..000000000 --- a/types/types/foundry/build/generate-client-base-mixes.ts +++ /dev/null @@ -1,502 +0,0 @@ -type ParentData = { name: string; hasParents: boolean }; - -const genClientBase = ( - className: string, - { - hasSheet = true, - isCanvasDoc = false, - parents = isCanvasDoc ? [{ name: "Scene", hasParents: false }] : [], - }: { hasSheet?: boolean; isCanvasDoc?: boolean; parents?: ParentData[] }, -) => { - const declareOrExportClientBase = isCanvasDoc ? "declare" : "export"; - const clientBaseName = `ClientBase${className}`; - const typeParamName = parents - .map((p) => (p.hasParents ? `ClientBase${p.name}` : `ClientBase${p.name}`)) - .join(" | "); - const typeParams = typeParamName ? `` : ""; - const tParentOrBlank = typeParamName ? "" : ""; - const tParentOrNull = typeParamName ? "TParent" : "null"; - console.log(String.raw`${declareOrExportClientBase} class ${clientBaseName}${typeParams} extends foundry.documents.Base${className}${tParentOrBlank} { - protected _sheet: DocumentSheet | null; - - /** - * A collection of Application instances which should be re-rendered whenever this document is updated. - * The keys of this object are the application ids and the values are Application instances. Each - * Application in this object will have its render method called by {@link Document#render}. - * @see {@link Document#render} - */ - apps: { [K in number]?: Application | ApplicationV2 }; - - constructor(data: object, context?: DocumentConstructionContext<${tParentOrNull}>); - - static override name: string; - - - protected override _initialize(options?: Record): void; - - /* -------------------------------------------- */ - /* Properties */ - /* -------------------------------------------- */ - - /** Return a reference to the parent Collection instance which contains this Document. */ - get collection(): Collection; - - /** A reference to the Compendium Collection which contains this Document, if any, otherwise undefined. */ - get compendium(): CompendiumCollection | undefined; - - /** - * A boolean indicator for whether or not the current game User has ownership rights for this Document. - * Different Document types may have more specialized rules for what constitutes ownership. - */ - get isOwner(): boolean; - - /** Test whether this Document is owned by any non-Gamemaster User. */ - get hasPlayerOwner(): boolean; - - /** A boolean indicator for whether the current game User has exactly LIMITED visibility (and no greater). */ - get limited(): boolean; - - /** Return a string which creates a dynamic link to this Document instance. */ - get link(): string; - - /** - * Return the permission level that the current game User has over this Document. - * See the CONST.DOCUMENT_OWNERSHIP_LEVELS object for an enumeration of these levels. - * - * @example Get the permission level the current user has for a document - * \`\`\`js - * game.user.id; // "dkasjkkj23kjf" - * actor.data.permission; // {default: 1, "dkasjkkj23kjf": 2}; - * actor.permission; // 2 - * \`\`\` - */ - get permission(): DocumentOwnershipLevel; - - /** Lazily obtain a FormApplication instance used to configure this Document, or null if no sheet is available. */ - get sheet(): ${hasSheet ? "DocumentSheet | DocumentSheetV2>" : "null"}; - - /** - * A boolean indicator for whether the current game User has at least limited visibility for this Document. - * Different Document types may have more specialized rules for what determines visibility. - */ - get visible(): boolean; - - /* -------------------------------------------- */ - /* Methods */ - /* -------------------------------------------- */ - - /** Obtain the FormApplication class constructor which should be used to configure this Document. */ - protected _getSheetClass(): Maybe; - - /** - * Prepare data for the Document. This method is called automatically by the DataModel#_initialize workflow. - * This method provides an opportunity for Document classes to define special data preparation logic. - * The work done by this method should be idempotent. There are situations in which prepareData may be called more - * than once. - */ - prepareData(): void; - - /** Prepare data related to this Document itself, before any embedded Documents or derived data is computed. */ - prepareBaseData(): void; - - /** - * Prepare all embedded Document instances which exist within this primary Document. - * @memberof ClientDocumentMixin# - */ - prepareEmbeddedDocuments(): void; - - /** - * Apply transformations or derivations to the values of the source data object. - * Compute data fields whose values are not stored to the database. - */ - prepareDerivedData(): void; - - /** - * Render all of the Application instances which are connected to this document by calling their respective - * @see Application#render - * @param [force=false] Force rendering - * @param [context={}] Optional context - */ - render(force?: boolean, context?: RenderOptions): void; - - /** - * Determine the sort order for this Document by positioning it relative a target sibling. - * See SortingHelper.performIntegerSort for more details - * @param [options] Sorting options provided to SortingHelper.performIntegerSort - * @param [options.updateData] Additional data changes which are applied to each sorted document - * @param [sortOptions] Options which are passed to the SortingHelpers.performIntegerSort method - * @returns The Document after it has been re-sorted - */ - sortRelative({ updateData, ...sortOptions }: { updateData?: object } & SortingOptions): Promise; - - /** - * Construct a UUID relative to another document. - * @param doc The document to compare against. - */ - getRelativeUUID(doc: foundry.abstract.Document): string; - - /** - * Handle clicking on a content link for this document. - * @param event The triggering click event. - */ - protected _onClickDocumentLink(event: MouseEvent): Promise; - - /* -------------------------------------------- */ - /* Event Handlers */ - /* -------------------------------------------- */ - - protected override _onCreate( - data: this["_source"], - operation: DatabaseCreateOperation<${tParentOrNull}>, - userId: string - ): void; - - protected override _onUpdate( - data: DeepPartial, - operation: DatabaseUpdateOperation<${tParentOrNull}>, - userId: string - ): void; - - protected override _onDelete(options: DatabaseDeleteOperation<${tParentOrNull}>, userId: string): void; - - /* -------------------------------------------- */ - /* Descendant Document Events */ - /* -------------------------------------------- */ - - /** - * Orchestrate dispatching descendant document events to parent documents when embedded children are modified. - * @param event The event name, preCreate, onCreate, etc... - * @param collection The collection name being modified within this parent document - * @param args Arguments passed to each dispatched function - * @param [_parent] The document with directly modified embedded documents. Either this document or a descendant - * of this one. - * @internal - */ - protected _dispatchDescendantDocumentEvents( - event: string, - collection: string, - args: unknown[], - _parent?: foundry.abstract.Document, - ): void; - - /** - * Actions taken after descendant documents have been created, but before changes are applied to the client data. - * @param parent The direct parent of the created Documents, may be this Document or a child - * @param collection The collection within which documents are being created - * @param data The source data for new documents that are being created - * @param operation Options which modified the creation operation - * @param userId The ID of the User who triggered the operation - */ - protected _preCreateDescendantDocuments( - parent: this, - collection: string, - data: object[], - operation: DatabaseCreateOperation, - userId: string - ): void; - - /** - * Actions taken after descendant documents have been created and changes have been applied to client data. - * @param parent The direct parent of the created Documents, may be this Document or a child - * @param collection The collection within which documents were created - * @param documents The array of created Documents - * @param data The source data for new documents that were created - * @param operation Options which modified the creation operation - * @param userId The ID of the User who triggered the operation - */ - protected _onCreateDescendantDocuments( - parent: this, - collection: string, - documents: foundry.abstract.Document[], - data: object[], - operation: DatabaseCreateOperation, - userId: string - ): void; - - /** - * Actions taken after descendant documents have been updated, but before changes are applied to the client data. - * @param parent The direct parent of the updated Documents, may be this Document or a child - * @param collection The collection within which documents are being updated - * @param changes The array of differential Document updates to be applied - * @param operation Options which modified the update operation - * @param userId The ID of the User who triggered the operation - */ - protected _preUpdateDescendantDocuments( - parent: this, - collection: string, - changes: object[], - operation: DatabaseUpdateOperation, - userId: string - ): void; - - /** - * Actions taken after descendant documents have been updated and changes have been applied to client data. - * @param parent The direct parent of the updated Documents, may be this Document or a child - * @param collection The collection within which documents were updated - * @param documents The array of updated Documents - * @param changes The array of differential Document updates which were applied - * @param operation Options which modified the update operation - * @param userId The ID of the User who triggered the operation - */ - protected _onUpdateDescendantDocuments( - parent: this, - collection: string, - documents: ClientDocument[], - changes: object[], - operation: DatabaseUpdateOperation, - userId: string - ): void; - - /** - * Actions taken after descendant documents have been deleted, but before deletions are applied to the client data. - * @param parent The direct parent of the deleted Documents, may be this Document or a child - * @param collection The collection within which documents were deleted - * @param ids The array of document IDs which were deleted - * @param operation Options which modified the deletion operation - * @param userId The ID of the User who triggered the operation - */ - protected _preDeleteDescendantDocuments( - parent: this, - collection: string, - ids: string[], - operation: DatabaseDeleteOperation, - userId: string - ): void; - - /** - * Actions taken after descendant documents have been deleted and those deletions have been applied to client data. - * @param parent The direct parent of the deleted Documents, may be this Document or a child - * @param collection The collection within which documents were deleted - * @param documents The array of Documents which were deleted - * @param ids The array of document IDs which were deleted - * @param operation Options which modified the deletion operation - * @param userId The ID of the User who triggered the operation - */ - protected _onDeleteDescendantDocuments( - parent: this, - collection: string, - documents: foundry.abstract.Document[], - ids: string[], - operation: DatabaseDeleteOperation, - userId: string - ): void; - - /** Gets the default new name for a Document */ - static defaultName(): string; - - /* -------------------------------------------- */ - /* Importing and Exporting */ - /* -------------------------------------------- */ - - /** - * Present a Dialog form to create a new Document of this type. - * Choose a name and a type from a select menu of types. - * @param [data] Initial data with which to populate the creation form - * @param [context={}] Additional context options or dialog positioning options - * @returns A Promise which resolves to the created Document, or null if the dialog was closed. - */ - static createDialog( - this: ConstructorOf, - data?: Record, - context?: { - parent?: TDocument["parent"]; - pack?: Collection | null; - } & Partial - ): Promise; - - /** - * Present a Dialog form to confirm deletion of this Document. - * @param [options] Positioning and sizing options for the resulting dialog - * @return A Promise which resolves to the deleted Document - */ - deleteDialog(options?: ConfirmDialogParameters): Promise; - - /** - * Export document data to a JSON file which can be saved by the client and later imported into a different session. - * @param [options] Additional options passed to the {@link ClientDocumentMixin#toCompendium} method - */ - exportToJSON(options?: Record): void; - - /** - * Create a content link for this Document. - * @param [options] Additional options to configure how the link is constructed. - * @param [options.attrs] Attributes to set on the link. - * @param [options.dataset] Custom data- attributes to set on the link. - * @param [options.classes] Classes to add to the link. - * @param [options.name] A name to use for the Document, if different from the Document's name. - * @param [options.icon] A font-awesome icon class to use as the icon, if different to the Document's configured sidebarIcon. - */ - toAnchor(options?: { - attrs?: Record; - dataset?: Record; - classes?: string[]; - name?: string; - icon?: string; - }): HTMLAnchorElement; - - /** - * Serialize salient information about this Document when dragging it. - * @returns An object of drag data. - */ - toDragData(): { type: string; [key: string]: unknown }; - - /** - * A helper function to handle obtaining the relevant Document from dropped data provided via a DataTransfer event. - * The dropped data could have: - * 1. A data object explicitly provided - * 2. A UUID - * - * @param data The data object extracted from a DataTransfer event - * @param options Additional options which affect drop data behavior - * @returns The resolved Document - * @throws If a Document could not be retrieved from the provided data. - */ - static fromDropData( - this: ConstructorOf, - data: object, - options?: Record - ): Promise; - - /** - * Update this Document using a provided JSON string. - * @param json Raw JSON data to import - * @returns The updated Document instance - */ - importFromJSON(json: string): Promise; - - /** Render an import dialog for updating the data related to this Document through an exported JSON file */ - importFromJSONDialog(): Promise; - - /** - * Transform the Document data to be stored in a Compendium pack. - * Remove any features of the data which are world-specific. - * @param [pack] A specific pack being exported to - * @param [options] Additional options which modify how the document is converted - * @param [options.clearFlags=false] Clear the flags object - * @param [options.clearSort=true] Clear the currently assigned folder and sort order - * @param [options.clearOwnership=true] Clear document ownership - * @param [options.clearState=true] Clear fields which store document state - * @param [options.keepId=false] Retain the current Document id - * @returns A data object of cleaned data suitable for compendium import - */ - toCompendium( - pack?: CompendiumCollection, - options?: { - clearSort?: boolean; - clearFlags?: boolean; - clearOwnership?: boolean; - clearState?: boolean; - keepId?: boolean; - } - ): this["_source"]; -} -`); - - if (isCanvasDoc) { - const canvasBaseName = `CanvasBase${className}`; - - console.log(String.raw`/** - * A specialized sub-class of the ClientDocumentMixin which is used for document types that are intended to be - * represented upon the game Canvas. - * @category - Mixins - */ -export class ${canvasBaseName}< - TParent extends ClientBaseScene | null -> extends ${clientBaseName} { - /** A reference to the PlaceableObject instance which represents this Embedded Document. */ - _object: PlaceableObject | null; - - /** Has this object been deliberately destroyed as part of the deletion workflow? */ - protected _destroyed: boolean; - - constructor(data: object, context: DocumentConstructionContext); - - /* -------------------------------------------- */ - /* Properties */ - /* -------------------------------------------- */ - - /** A lazily constructed PlaceableObject instance which can represent this Document on the game canvas. */ - get object(): this["_object"]; - - /** A reference to the CanvasLayer which contains Document objects of this type. */ - get layer(): NonNullable["layer"] | null; - - /** An indicator for whether this document is currently rendered on the game canvas. */ - get rendered(): boolean; - - /* -------------------------------------------- */ - /* Event Handlers */ - /* -------------------------------------------- */ - - /** - * @see abstract.Document#_onCreate - */ - protected override _onCreate(data: this["_source"], operation: DatabaseCreateOperation, userId: string): void; - - /** - * @see abstract.Document#_onUpdate - */ - protected override _onUpdate( - changed: DeepPartial, - operation: DatabaseUpdateOperation, - userId: string - ): void; - - /** - * @see abstract.Document#_onDelete - */ - protected _onDelete(operation: DatabaseDeleteOperation, userId: string): void; -} -`); - } -}; - -const clientDocs: Record = { - AmbientLight: { isCanvasDoc: true }, - AmbientSound: { isCanvasDoc: true }, - ActiveEffect: { - parents: [ - { name: "Actor", hasParents: true }, - { name: "Item", hasParents: true }, - ], - }, - Actor: { parents: [{ name: "Token", hasParents: true }] }, - ActorDelta: { parents: [{ name: "Token", hasParents: true }] }, - Adventure: {}, - Card: { parents: [{ name: "Cards", hasParents: false }] }, - Cards: {}, - ChatMessage: {}, - Combat: {}, - Combatant: { parents: [{ name: "Combat", hasParents: false }] }, - Drawing: { isCanvasDoc: true }, - FogExploration: { hasSheet: false }, - Folder: {}, - Item: { parents: [{ name: "Actor", hasParents: true }] }, - JournalEntry: {}, - JournalEntryPage: { parents: [{ name: "JournalEntry", hasParents: false }] }, - Macro: {}, - MeasuredTemplate: { isCanvasDoc: true }, - Note: { isCanvasDoc: true }, - Playlist: {}, - PlaylistSound: { parents: [{ name: "Playlist", hasParents: false }] }, - Region: { isCanvasDoc: true }, - RegionBehavior: { parents: [{ name: "Region", hasParents: true }] }, - RollTable: {}, - Scene: {}, - Setting: {}, - TableResult: { parents: [{ name: "RollTable", hasParents: false }] }, - Tile: { isCanvasDoc: true }, - Token: { isCanvasDoc: true }, - User: {}, - Wall: { isCanvasDoc: true }, -}; - -// imports -console.log( - String.raw`import type { ApplicationV2, DocumentSheetV2 } from "../../../client-esm/applications/api/module.d.ts"; - -`, -); -for (const [className, data] of Object.entries(clientDocs)) { - genClientBase(className, data); -} diff --git a/types/types/foundry/client-esm/applications/api/application.d.ts b/types/types/foundry/client-esm/applications/api/application.d.ts index 50633fdbb..7cf4e3558 100644 --- a/types/types/foundry/client-esm/applications/api/application.d.ts +++ b/types/types/foundry/client-esm/applications/api/application.d.ts @@ -12,7 +12,7 @@ export default abstract class ApplicationV2< TConfig extends ApplicationConfiguration = ApplicationConfiguration, TRenderOptions extends ApplicationRenderOptions = ApplicationRenderOptions, > { - constructor(options: DeepPartial); + constructor(options?: DeepPartial); /** * Designates which upstream Application class in this class' inheritance chain is the base application. diff --git a/types/types/foundry/client-esm/applications/api/handlebars-application.ts b/types/types/foundry/client-esm/applications/api/handlebars-application.ts index 6278dca5d..03150feb4 100644 --- a/types/types/foundry/client-esm/applications/api/handlebars-application.ts +++ b/types/types/foundry/client-esm/applications/api/handlebars-application.ts @@ -1,5 +1,5 @@ -import type { ApplicationFormConfiguration, ApplicationRenderOptions } from "../_types.js"; -import type ApplicationV2 from "./application.js"; +import type { ApplicationFormConfiguration, ApplicationRenderOptions } from "../_types.d.ts"; +import type ApplicationV2 from "./application.d.ts"; /** Augment an Application class with [Handlebars](https://handlebarsjs.com) template rendering behavior. */ /* eslint-disable @typescript-eslint/no-unused-expressions, no-unused-expressions */ @@ -149,7 +149,7 @@ export interface HandlebarsTemplatePart { * be persisted during a re-render operation. A blank string is used * to denote that the root level of the part is scrollable. */ - scrollable?: boolean[]; + scrollable?: string[]; /** A registry of forms selectors and submission handlers. */ forms?: Record; diff --git a/types/types/foundry/client-esm/applications/elements/form-element.d.ts b/types/types/foundry/client-esm/applications/elements/form-element.d.ts index c68309c06..91afe4a7a 100644 --- a/types/types/foundry/client-esm/applications/elements/form-element.d.ts +++ b/types/types/foundry/client-esm/applications/elements/form-element.d.ts @@ -14,6 +14,12 @@ export abstract class AbstractFormInputElement extends DocumentSheetV2 { +export default abstract class ItemSheetV2 extends DocumentSheetV2< + DocumentSheetConfiguration +> { static override DEFAULT_OPTIONS: Partial; /** The Item document managed by this sheet. */ diff --git a/types/types/foundry/client-esm/canvas/sources/module.d.ts b/types/types/foundry/client-esm/canvas/sources/module.d.ts deleted file mode 100644 index 3d8cf8bb5..000000000 --- a/types/types/foundry/client-esm/canvas/sources/module.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export { default as BaseEffectSource } from "./base-effect-source.ts"; -export { default as BaseLightSource } from "./base-light-source.ts"; -export { default as GlobalLightSource } from "./global-light-source.ts"; -export { default as PointDarknessSource } from "./point-darkness-source.ts"; -export { default as PointLightSource } from "./point-light-source.ts"; -export { default as PointMovementSource } from "./point-movement-source.ts"; -export { default as PointSoundSource } from "./point-sound-source.ts"; -export { default as PointVisionSource } from "./point-vision-source.ts"; -export { default as RenderedEffectSource } from "./rendered-effect-source.ts"; diff --git a/types/types/foundry/client-esm/canvas/tokens/module.d.ts b/types/types/foundry/client-esm/canvas/tokens/module.d.ts deleted file mode 100644 index cf63b6a07..000000000 --- a/types/types/foundry/client-esm/canvas/tokens/module.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { TokenRingConfig } from "./ring-config.js"; diff --git a/types/types/foundry/client-esm/dice/_types.d.mts b/types/types/foundry/client-esm/dice/_types.d.mts new file mode 100644 index 000000000..a73c00541 --- /dev/null +++ b/types/types/foundry/client-esm/dice/_types.d.mts @@ -0,0 +1,84 @@ +export interface DiceTermResult { + /** The numeric result */ + result: number; + /** Is this result active, contributing to the total? */ + active?: boolean; + /** A value that the result counts as, otherwise the result is not used directly as */ + count?: number; + /** Does this result denote a success? */ + success?: boolean; + /** Does this result denote a failure? */ + failure?: boolean; + /** Was this result discarded? */ + discarded?: boolean; + /** Was this result rerolled? */ + rerolled?: boolean; + /** Was this result exploded? */ + exploded?: boolean; +} + +/* -------------------------------------------- */ +/* Roll Parsing Types */ +/* -------------------------------------------- */ + +export interface RollParseNode { + /** The class name for this node. */ + class: string; + /** The original matched text for this node. */ + formula: string; +} + +export interface RollParseTreeNode extends RollParseNode { + /** The binary operator */ + operator: string; + /** The two operands. */ + operands: [RollParseNode, RollParseNode]; +} + +export interface FlavorRollParseNode extends RollParseNode { + options: { + /** Flavor text associated with the node. */ + flavor: string; + }; +} + +export interface ModifiersRollParseNode extends FlavorRollParseNode { + /** The matched modifiers string. */ + modifiers: string; +} + +export interface NumericRollParseNode extends FlavorRollParseNode { + /** The number. */ + number: number; +} + +export interface FunctionRollParseNode { + /** The function name. */ + fn: string; + /** The arguments to the function. */ + terms: RollParseNode[]; +} + +export interface PoolRollParseNode extends ModifiersRollParseNode { + /** The pool terms. */ + terms: RollParseNode[]; +} + +export interface ParentheticalRollParseNode extends FlavorRollParseNode { + /** The inner parenthetical term. */ + term: string; +} + +export interface StringParseNode extends FlavorRollParseNode { + /** The unclassified string term. */ + term: string; +} + +export interface DiceRollParseNode extends ModifiersRollParseNode { + /** The number of dice. */ + number: number | ParentheticalRollParseNode; + /** The number of faces or a string denomination like "c" or "f". */ + faces: string | number | ParentheticalRollParseNode; +} + +export type RollParseArg = null | number | string | RollParseNode | RollParseArg[]; diff --git a/types/types/foundry/client-esm/dice/module.d.ts b/types/types/foundry/client-esm/dice/module.d.ts index 28304e072..3f5b9fe72 100644 --- a/types/types/foundry/client-esm/dice/module.d.ts +++ b/types/types/foundry/client-esm/dice/module.d.ts @@ -1 +1,2 @@ +export * from "./_types.mts"; export * as terms from "./terms/module.ts"; diff --git a/types/types/foundry/client/apps/forms/sheet-config.d.ts b/types/types/foundry/client/apps/forms/sheet-config.d.ts index b351d516b..4d776d938 100644 --- a/types/types/foundry/client/apps/forms/sheet-config.d.ts +++ b/types/types/foundry/client/apps/forms/sheet-config.d.ts @@ -1,4 +1,6 @@ -import type DocumentSheetV2 from "../../../client-esm/applications/api/document-sheet.d.ts"; +import type DocumentSheetV2, { + DocumentSheetConfiguration, +} from "../../../client-esm/applications/api/document-sheet.d.ts"; declare global { interface DocumentSheetConfigData @@ -59,7 +61,9 @@ declare global { * @param [options.makeDefault] Whether to make this sheet the default for provided types */ static registerSheet< - T extends foundry.abstract.Document & { get sheet(): FormApplication | DocumentSheetV2 }, + T extends foundry.abstract.Document & { + get sheet(): FormApplication | DocumentSheetV2>; + }, >( documentClass: ConstructorOf, scope: string, @@ -78,7 +82,9 @@ declare global { * @param types An Array of types for which this sheet should be removed */ static unregisterSheet< - T extends foundry.abstract.Document & { get sheet(): FormApplication | DocumentSheetV2 }, + T extends foundry.abstract.Document & { + get sheet(): FormApplication | DocumentSheetV2>; + }, >( documentClass: ConstructorOf, scope: string, diff --git a/types/types/foundry/client/config.d.ts b/types/types/foundry/client/config.d.ts index d65af172c..ea931d04c 100644 --- a/types/types/foundry/client/config.d.ts +++ b/types/types/foundry/client/config.d.ts @@ -79,6 +79,13 @@ declare global { ): TActor; }; collection: ConstructorOf>>; + compendiumIndexFields: string[]; + compendiumBanner: ImageFilePath; + sidebarIcon: string; + dataModels: Record>>; + typeLabels: Record; + typeIcons: Record; + trackableAttributes: object; sheetClasses: Record< string, Record< @@ -93,8 +100,6 @@ declare global { } > >; - typeIcons: Record; - typeLabels: Record; }; /** Configuration for the Cards primary Document type */ diff --git a/types/types/foundry/client/data/abstract/directory-collection.ts b/types/types/foundry/client/data/abstract/directory-collection.ts new file mode 100644 index 000000000..ae5f703b3 --- /dev/null +++ b/types/types/foundry/client/data/abstract/directory-collection.ts @@ -0,0 +1,81 @@ +/** + * A mixin which adds directory functionality to a DocumentCollection, such as folders, tree structures, and sorting. + * @param BaseCollection The base collection class to extend + * @returns A Collection mixed with DirectoryCollection functionality + */ +// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types +export function DirectoryCollectionMixin(BaseCollection: ConstructorOf>) { + /** + * An extension of the Collection class which adds behaviors specific to tree-based collections of entries and + * folders. + */ + abstract class DirectoryCollection extends BaseCollection { + /** Reference the set of Folders which contain documents in this collection */ + abstract get folders(): Collection; + + /** The built tree structure of the DocumentCollection */ + get tree(): object { + return {}; + } + + /** The current search mode for this collection */ + get searchMode(): "full" | "name" { + return "full"; + } + + /** Toggle the search mode for this collection between "name" and "full" text search */ + toggleSearchMode(): void {} + + /** The current sort mode used to order the top level entries in this collection */ + get sortingMode(): "a" | "m" { + return "m"; + } + + /** Toggle the sorting mode for this collection between "a" (Alphabetical) and "m" (Manual by sort property) */ + toggleSortingMode(): void {} + + /** The maximum depth of folder nesting which is allowed in this collection */ + get maxFolderDepth(): number { + return 3; + } + + /** Initialize the tree by categorizing folders and entries into a hierarchical tree structure. */ + initializeTree(): void {} + + /** + * Creates the list of Folder options in this Collection in hierarchical order + * for populating the options of a select tag. + * @internal + */ + _formatFolderSelectOptions(): { id: string; name: string }[] { + return [{ id: "", name: "" }]; + } + + /** + * Sort two Entries by name, alphabetically. + * @param a Some Entry + * @param b Some other Entry + * @returns The sort order between entries a and b + */ + protected static _sortAlphabetical(a: { name: string }, b: { name: string }): number { + return a.name.localeCompare(b.name); + } + + /** + * Sort two Entries using their numeric sort fields. + * @param a Some Entry + * @param b Some other Entry + * @returns The sort order between Entries a and b + */ + protected static _sortStandard(a: { sort: number }, b: { sort: number }): number { + return a.sort - b.sort; + } + } + return DirectoryCollection; +} + +declare global { + namespace globalThis { + type DirectionCollection = InstanceType>; + } +} diff --git a/types/types/foundry/client/data/abstract/index.d.ts b/types/types/foundry/client/data/abstract/index.d.ts index 6f0bed1ac..6c148edc0 100644 --- a/types/types/foundry/client/data/abstract/index.d.ts +++ b/types/types/foundry/client/data/abstract/index.d.ts @@ -1,3 +1,4 @@ import "./client-backend.d.ts"; +import "./directory-collection.ts"; import "./document-collection.d.ts"; import "./world-collection.d.ts"; diff --git a/types/types/foundry/client/data/documents/client-base-mixes.d.ts b/types/types/foundry/client/data/documents/client-base-mixes.d.ts index 6044cd3c5..e43ee4be9 100644 --- a/types/types/foundry/client/data/documents/client-base-mixes.d.ts +++ b/types/types/foundry/client/data/documents/client-base-mixes.d.ts @@ -1255,7 +1255,7 @@ export class ClientBaseActor); diff --git a/types/types/foundry/client/data/documents/user.d.ts b/types/types/foundry/client/data/documents/user.d.ts index 5f24aeea9..badd3c18f 100644 --- a/types/types/foundry/client/data/documents/user.d.ts +++ b/types/types/foundry/client/data/documents/user.d.ts @@ -15,7 +15,7 @@ declare global { active: boolean; /** Track references to the current set of Tokens which are targeted by the User */ - targets: Set; + targets: UserTargets; /** Track the ID of the Scene that is currently being viewed by the User */ viewedScene: string | null; diff --git a/types/types/foundry/client/pixi/core/containers/index.d.ts b/types/types/foundry/client/pixi/core/containers/index.d.ts index dfd95196f..bc37ada4e 100644 --- a/types/types/foundry/client/pixi/core/containers/index.d.ts +++ b/types/types/foundry/client/pixi/core/containers/index.d.ts @@ -1,2 +1,3 @@ import "./point-source-mesh.d.ts"; +import "./quadtree.d.ts"; import "./sprite-mesh.d.ts"; diff --git a/types/types/foundry/client/pixi/helpers/quadtree.d.ts b/types/types/foundry/client/pixi/core/containers/quadtree.d.ts similarity index 84% rename from types/types/foundry/client/pixi/helpers/quadtree.d.ts rename to types/types/foundry/client/pixi/core/containers/quadtree.d.ts index 2d364aa9a..25b24ebb7 100644 --- a/types/types/foundry/client/pixi/helpers/quadtree.d.ts +++ b/types/types/foundry/client/pixi/core/containers/quadtree.d.ts @@ -1,15 +1,19 @@ export {}; declare global { - interface QuadtreeObject< - TPlaceableObject extends PlaceableObject = PlaceableObject, - TQuadtree extends Quadtree = Quadtree, - > { + interface QuadtreeObject = Quadtree> { r: Rectangle; - t: TPlaceableObject; + t: TObject; n: Set; } + interface QuadtreeOptions { + maxObjects?: number; + maxDepth?: number; + _depth?: number; + _root?: Quadtree; + } + /** * A Quadtree implementation that supports collision detection for rectangles. * @@ -20,7 +24,7 @@ declare global { * @param [options._depth=0] The depth level of the sub-tree. For internal use * @param [options._root] The root of the quadtree. For internal use */ - class Quadtree { + class Quadtree { /** The bounding rectangle of the region */ bounds: Rectangle; @@ -34,7 +38,7 @@ declare global { depth: number; /** The objects contained at this level of the tree */ - objects: QuadtreeObject[]; + objects: QuadtreeObject[]; /** Children of this node */ nodes: this[]; @@ -42,10 +46,7 @@ declare global { /** The root Quadtree */ root: this; - constructor( - bounds: Rectangle, - options?: { maxObjects?: number; maxDepth?: number; _depth?: number; _root?: Quadtree }, - ); + constructor(bounds: Rectangle, options?: QuadtreeOptions); /** * A constant that enumerates the index order of the quadtree nodes from top-left to bottom-right. @@ -56,7 +57,7 @@ declare global { /** * Return an array of all the objects in the Quadtree (recursive) */ - get all(): QuadtreeObject[]; + get all(): QuadtreeObject[]; /* -------------------------------------------- */ /* Tree Management */ @@ -83,21 +84,21 @@ declare global { * @param obj The object being inserted * @returns The Quadtree nodes the object was added to. */ - insert(obj: QuadtreeObject): this[]; + insert(obj: QuadtreeObject): this[]; /** * Remove an object from the quadtree * @param target The quadtree target being removed * @returns The Quadtree for method chaining */ - remove(target: TPlaceableObject): this; + remove(target: TObject): this; /** * Remove an existing object from the quadtree and re-insert it with a new position * @param obj The object being inserted * @returns The Quadtree nodes the object was added to */ - update(obj: QuadtreeObject): this[]; + update(obj: QuadtreeObject): this[]; /* -------------------------------------------- */ /* Target Identification */ @@ -117,9 +118,9 @@ declare global { rect: Rectangle, options?: { collisionTest?: (obj: QuadtreeObject, rect: Rectangle) => boolean; - _s: Set; + _s: Set; }, - ): Set; + ): Set; /** * Obtain the leaf nodes to which a target rectangle belongs. @@ -151,5 +152,7 @@ declare global { /** * A subclass of Quadtree specifically intended for classifying the location of objects on the game canvas. */ - class CanvasQuadtree extends Quadtree {} + class CanvasQuadtree extends Quadtree { + constructor(options?: QuadtreeOptions); + } } diff --git a/types/types/foundry/client/pixi/core/interaction/index.d.ts b/types/types/foundry/client/pixi/core/interaction/index.d.ts index 77600e0a2..e247f2d69 100644 --- a/types/types/foundry/client/pixi/core/interaction/index.d.ts +++ b/types/types/foundry/client/pixi/core/interaction/index.d.ts @@ -1,3 +1,4 @@ import "./canvas-animation.d.ts"; import "./mouse-handler.d.ts"; import "./render-flags.d.ts"; +import "./targets.d.ts"; diff --git a/types/types/foundry/client/pixi/core/interaction/targets.d.ts b/types/types/foundry/client/pixi/core/interaction/targets.d.ts new file mode 100644 index 000000000..2cc1a19c1 --- /dev/null +++ b/types/types/foundry/client/pixi/core/interaction/targets.d.ts @@ -0,0 +1,22 @@ +export {}; + +declare global { + /** + * A subclass of Set which manages the Token ids which the User has targeted. + * @see User#targets + */ + class UserTargets extends Set { + constructor(user: User); + + /** + * Return the Token IDs which are user targets + */ + get ids(): string[]; + + override add(token: TToken): this; + + override clear(): void; + + override delete(token: TToken): boolean; + } +} diff --git a/types/types/foundry/client/pixi/groups/rendered.d.ts b/types/types/foundry/client/pixi/groups/rendered.d.ts deleted file mode 100644 index 716726ff2..000000000 --- a/types/types/foundry/client/pixi/groups/rendered.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export {}; -declare global { - class RenderedCanvasGroup extends CanvasGroup { - static groupName: "rendered"; - } -} diff --git a/types/types/foundry/client/pixi/helpers/index.d.ts b/types/types/foundry/client/pixi/helpers/index.d.ts index 799f09f95..96a6c9a96 100644 --- a/types/types/foundry/client/pixi/helpers/index.d.ts +++ b/types/types/foundry/client/pixi/helpers/index.d.ts @@ -5,6 +5,5 @@ import "./grid-highlight.d.ts"; import "./object-hud.d.ts"; import "./point-source/index.d.ts"; import "./precise-text.d.ts"; -import "./quadtree.d.ts"; import "./ray/index.d.ts"; import "./resize-handle.d.ts"; diff --git a/types/types/foundry/client/pixi/placeables/primary-canvas-objects/primary-sprite-mesh.ts b/types/types/foundry/client/pixi/placeables/primary-canvas-objects/primary-sprite-mesh.d.ts similarity index 81% rename from types/types/foundry/client/pixi/placeables/primary-canvas-objects/primary-sprite-mesh.ts rename to types/types/foundry/client/pixi/placeables/primary-canvas-objects/primary-sprite-mesh.d.ts index 95250af64..231b09911 100644 --- a/types/types/foundry/client/pixi/placeables/primary-canvas-objects/primary-sprite-mesh.ts +++ b/types/types/foundry/client/pixi/placeables/primary-canvas-objects/primary-sprite-mesh.d.ts @@ -1,4 +1,4 @@ -import { PrimaryOccludableObjectMixin } from "./primary-occludable-object.ts"; +import type { PrimaryOccludableObjectMixin } from "./primary-occludable-object.d.ts"; /** * A basic PCO sprite mesh which is handling occlusion and depth. @@ -8,16 +8,11 @@ import { PrimaryOccludableObjectMixin } from "./primary-occludable-object.ts"; * @param [options.name] The name of this sprite. * @param [options.object] Any object that owns this sprite. */ -/* eslint-disable @typescript-eslint/no-unused-expressions, no-unused-expressions */ export class PrimarySpriteMesh extends PrimaryOccludableObjectMixin(SpriteMesh) { constructor( options: { texture?: PIXI.Texture; name?: string | null; object?: object }, shaderClass: typeof PrimaryBaseSamplerShader, - ) { - options; - shaderClass; - super(options.texture, shaderClass); - } + ); declare object: object | null; @@ -37,17 +32,13 @@ export class PrimarySpriteMesh extends PrimaryOccludableObjectMixin(SpriteMesh) /* PIXI Events */ /* -------------------------------------------- */ - protected override _onTextureUpdate(): void {} + protected override _onTextureUpdate(): void; /* -------------------------------------------- */ /* Helper Methods */ /* -------------------------------------------- */ - override setShaderClass(shaderClass: typeof PrimaryBaseSamplerShader): void { - shaderClass; - } - - /* -------------------------------------------- */ + override setShaderClass(shaderClass: typeof PrimaryBaseSamplerShader): void; /** * An all-in-one helper method: Resizing the PCO according to desired dimensions and options. @@ -85,49 +76,35 @@ export class PrimarySpriteMesh extends PrimaryOccludableObjectMixin(SpriteMesh) scaleX?: number; scaleY?: number; }, - ): void { - baseWidth; - baseHeight; - options; - } + ): void; /* -------------------------------------------- */ /* Methods */ /* -------------------------------------------- */ - protected override _updateBatchData(): void {} + protected override _updateBatchData(): void; - protected override _calculateCanvasBounds(): void {} + protected override _calculateCanvasBounds(): void; /** * Is the given point in canvas space contained in this object? * @param point The point in canvas space * @param [textureAlphaThreshold] The minimum texture alpha required for containment */ - override containsCanvasPoint(point: PIXI.IPointData, textureAlphaThreshold?: number): boolean { - point; - textureAlphaThreshold; - return true; - } + override containsCanvasPoint(point: PIXI.IPointData, textureAlphaThreshold?: number): boolean; /** * Is the given point in world space contained in this object? * @param point The point in world space * @param [textureAlphaThreshold] The minimum texture alpha required for containment */ - override containsPoint(point: PIXI.IPointData, textureAlphaThreshold?: number): boolean { - point; - textureAlphaThreshold; - return true; - } + override containsPoint(point: PIXI.IPointData, textureAlphaThreshold?: number): boolean; /* -------------------------------------------- */ /* Rendering Methods */ /* -------------------------------------------- */ - override renderDepthData(renderer: PIXI.Renderer): void { - renderer; - } + override renderDepthData(renderer: PIXI.Renderer): void; /* -------------------------------------------- */ @@ -137,7 +114,5 @@ export class PrimarySpriteMesh extends PrimaryOccludableObjectMixin(SpriteMesh) * @param renderer The renderer * @internal */ - _renderVoid(renderer: PIXI.Renderer): void { - renderer; - } + _renderVoid(renderer: PIXI.Renderer): void; } diff --git a/types/types/foundry/client/roll.d.ts b/types/types/foundry/client/roll.d.ts index 914a09132..4861e9dde 100644 --- a/types/types/foundry/client/roll.d.ts +++ b/types/types/foundry/client/roll.d.ts @@ -1,7 +1,6 @@ +import type { RollParseNode } from "../client-esm/dice/_types.d.mts"; import type { DiceTerm, FunctionTerm, OperatorTerm, PoolTerm, RollTerm } from "../client-esm/dice/terms/module.d.ts"; -export {}; - declare global { /** * An interface and API for constructing and evaluating dice rolls. @@ -121,17 +120,64 @@ declare global { */ evaluate(options?: EvaluateRollParams): Promise>; + /** + * Execute the Roll synchronously, replacing dice and evaluating the total result. + * @param [options={}] + * @param [options.minimize=false] Minimize the result, obtaining the smallest possible value. + * @param [options.maximize=false] Maximize the result, obtaining the largest possible value. + * @param [options.strict=true] Throw an Error if the Roll contains non-deterministic terms that cannot be + * evaluated synchronously. If this is set to false, non-deterministic terms will + * be ignored. + * @param [options.allowStrings=false] If true, string terms will not cause an error to be thrown during evaluation. + * @returns The evaluated Roll instance. + */ + evaluateSync(options?: EvaluateRollParams): Rolled; + /** * Evaluate the roll asynchronously. - * A temporary helper method used to migrate behavior from 0.7.x (sync by default) to 0.9.x (async by default). + * @param [options] Options which inform how evaluation is performed + * @param [options.minimize] Force the result to be minimized + * @param [options.maximize] Force the result to be maximized + * @param [options.allowStrings] If true, string terms will not cause an error to be thrown during + * evaluation. + * @param [options.allowInteractive] If false, force the use of digital rolls and do not prompt the user to make + * manual rolls. + */ + protected _evaluate({ minimize, maximize, allowStrings }?: EvaluateRollParams): Promise>; + + /** + * Evaluate an AST asynchronously. + * @param node The root node or term. + * @param [options] Options which inform how evaluation is performed + * @param [options.minimize] Force the result to be minimized + * @param [options.maximize] Force the result to be maximized + * @param [options.allowStrings] If true, string terms will not cause an error to be thrown during evaluation. */ - protected _evaluate({ minimize, maximize }?: EvaluateRollParams): Promise>; + protected _evaluateASTAsync( + node: RollParseNode | RollTerm, + options?: EvaluateRollParams, + ): Promise; /** * Evaluate the roll synchronously. - * A temporary helper method used to migrate behavior from 0.7.x (sync by default) to 0.9.x (async by default). + * @param [options] Options which inform how evaluation is performed + * @param [options.minimize] Force the result to be minimized + * @param [options.maximize] Force the result to be maximized + * @param [options.strict] Throw an error if encountering a term that cannot be synchronously evaluated. + * @param [options.allowStrings] If true, string terms will not cause an error to be thrown during evaluation. + */ + protected _evaluateSync(options?: EvaluateRollSyncParams): Rolled; + + /** + * Evaluate an AST synchronously. + * @param node The root node or term. + * @param [options] Options which inform how evaluation is performed + * @param [options.minimize] Force the result to be minimized + * @param [options.maximize] Force the result to be maximized + * @param [options.strict] Throw an error if encountering a term that cannot be synchronously evaluated. + * @param [options.allowStrings] If true, string terms will not cause an error to be thrown during evaluation. */ - protected _evaluateSync({ minimize, maximize }?: EvaluateRollParams): Rolled; + protected _evaluateASTSync(node: RollParseNode | RollTerm, options?: EvaluateRollSyncParams): string | number; /** * Safely evaluate the final total result for the Roll using its component terms. @@ -468,6 +514,10 @@ declare global { allowInteractive?: boolean; } + interface EvaluateRollSyncParams extends EvaluateRollParams { + strict?: boolean; + } + // Empty extended interface that can be expanded by the system without polluting Math itself interface RollMathProxy extends Math {} } diff --git a/types/types/foundry/common/abstract/type-data.d.ts b/types/types/foundry/common/abstract/type-data.d.ts index 3bfa8bd50..de684fb6d 100644 --- a/types/types/foundry/common/abstract/type-data.d.ts +++ b/types/types/foundry/common/abstract/type-data.d.ts @@ -1,6 +1,7 @@ import type { DataSchema } from "../data/fields.d.ts"; import type * as packages from "../packages/module.d.ts"; import type * as abstract from "./module.d.ts"; + /** * A specialized subclass of DataModel, intended to represent a Document's type-specific data. * Systems or Modules that provide DataModel implementations for sub-types of Documents (such as Actors or Items) @@ -60,7 +61,7 @@ import type * as abstract from "./module.d.ts"; * } * ``` */ -export default class TypeDataModel< +export default abstract class TypeDataModel< TParent extends abstract.DataModel | null, TSchema extends DataSchema, > extends abstract.DataModel { diff --git a/types/types/foundry/common/data/fields.d.ts b/types/types/foundry/common/data/fields.d.ts index f2c34169c..f9d71a06e 100644 --- a/types/types/foundry/common/data/fields.d.ts +++ b/types/types/foundry/common/data/fields.d.ts @@ -805,7 +805,7 @@ export class EmbeddedDataField< THasInitial extends boolean = true, > extends SchemaField< TModelProp["schema"]["fields"], - SourceFromSchema, + TModelProp["_source"], TModelProp, TRequired, TNullable, @@ -1009,6 +1009,15 @@ export class DocumentUUIDField< protected override _cast(value: unknown): string; } +interface ForeignDocumentFieldOptions< + TSourceProp extends string, + TRequired extends boolean, + TNullable extends boolean, + THasInitial extends boolean, +> extends StringFieldOptions { + idOnly?: boolean; +} + /** * A special class of [StringField]{@link StringField} field which references another DataModel by its id. * This field may also be null to indicate that no foreign model is linked. @@ -1026,7 +1035,7 @@ export class ForeignDocumentField< */ constructor( model: ConstructorOf, - options?: StringFieldOptions, + options?: ForeignDocumentFieldOptions, context?: DataFieldContext, );