Repository: League-of-Foundry-Developers/foundry-vtt-types
Pull request #2779 (2024-08-13 16:00:42)

Replaced all instances of Document<any, any, any> with Document.Any
Simple find and replace, left out the handful of uses in prosemirror since those are handled in #2739 


Patch:
diff --git a/src/foundry/client-esm/applications/api/document-sheet.d.mts b/src/foundry/client-esm/applications/api/document-sheet.d.mts
index d461bcdff..731fd5689 100644
--- a/src/foundry/client-esm/applications/api/document-sheet.d.mts
+++ b/src/foundry/client-esm/applications/api/document-sheet.d.mts
@@ -2,9 +2,8 @@ import type { AnyObject, DeepPartial, EmptyObject } from "../../../../types/util
 import type ApplicationV2 from "./application.d.mts";
 
 declare namespace DocumentSheetV2 {
-  export interface Configuration<
-    Document extends foundry.abstract.Document<any, any, any> = foundry.abstract.Document<any, any, any>,
-  > extends ApplicationV2.Configuration {
+  export interface Configuration<Document extends foundry.abstract.Document.Any = foundry.abstract.Document.Any>
+    extends ApplicationV2.Configuration {
     /**
      * The Document instance associated with this sheet
      */
@@ -39,7 +38,7 @@ declare namespace DocumentSheetV2 {
  * The Application class is responsible for rendering an HTMLElement into the Foundry Virtual Tabletop user interface.
  */
 declare class DocumentSheetV2<
-  Document extends foundry.abstract.Document<any, any, any>,
+  Document extends foundry.abstract.Document.Any,
   RenderContext extends AnyObject = EmptyObject,
   Configuration extends DocumentSheetV2.Configuration<Document> = DocumentSheetV2.Configuration<Document>,
   RenderOptions extends DocumentSheetV2.RenderOptions = DocumentSheetV2.RenderOptions,
diff --git a/src/foundry/client-esm/applications/elements/prosemirror-editor.d.mts b/src/foundry/client-esm/applications/elements/prosemirror-editor.d.mts
index 70b44172d..aef24446b 100644
--- a/src/foundry/client-esm/applications/elements/prosemirror-editor.d.mts
+++ b/src/foundry/client-esm/applications/elements/prosemirror-editor.d.mts
@@ -1,4 +1,4 @@
-import type ProseMirrorPlugin from "../../../prosemirror/plugin.d.mts";
+import type ProseMirrorPlugin from "../../../common/prosemirror/plugin.d.mts";
 import type { FormInputConfig } from "../forms/fields.d.mts";
 import type AbstractFormInputElement from "./form-element.d.mts";
 
diff --git a/src/foundry/client-esm/client.d.mts b/src/foundry/client-esm/client.d.mts
index ea5fa4147..3ace05e95 100644
--- a/src/foundry/client-esm/client.d.mts
+++ b/src/foundry/client-esm/client.d.mts
@@ -10,7 +10,7 @@ import * as _documents from "../common/documents/_module.mjs";
 import * as _packages from "../common/packages/module.mjs";
 import * as _utils from "../common/utils/module.mjs";
 import * as _config from "../common/config.mjs";
-// import * as _prosemirror from "../common/prosemirror/_module.mjs";
+import * as _prosemirror from "../common/prosemirror/_module.mjs";
 // import * as _grid from "../common/grid/_module.mjs";
 // import * as _types from "../common/types.mjs";
 
@@ -133,7 +133,7 @@ declare global {
     /**
      * A library for providing rich text editing using ProseMirror within the Foundry Virtual Tabletop game client.
      */
-    // export import prosemirror = _prosemirror;
+    export import prosemirror = _prosemirror;
 
     /**
      * Grid classes.
diff --git a/src/foundry/client/apps/form.d.mts b/src/foundry/client/apps/form.d.mts
index dc87502a1..f3c89b3d5 100644
--- a/src/foundry/client/apps/form.d.mts
+++ b/src/foundry/client/apps/form.d.mts
@@ -1,7 +1,7 @@
 import type { EditorView } from "prosemirror-view";
 import type { Editor } from "tinymce";
 import type { GetDataReturnType, MaybePromise } from "../../../types/utils.d.mts";
-import type { ProseMirrorKeyMaps, ProseMirrorMenu } from "../../prosemirror/prosemirror.d.mts";
+import type { ProseMirrorKeyMaps, ProseMirrorMenu } from "../../common/prosemirror/_module.d.mts";
 
 declare global {
   interface FormApplicationOptions extends ApplicationOptions {
@@ -320,9 +320,8 @@ declare global {
     }
   }
 
-  interface DocumentSheetOptions<
-    ConcreteDocument extends foundry.abstract.Document<any, any, any> = foundry.abstract.Document<any, any, any>,
-  > extends FormApplicationOptions {
+  interface DocumentSheetOptions<ConcreteDocument extends foundry.abstract.Document.Any = foundry.abstract.Document.Any>
+    extends FormApplicationOptions {
     /**
      * The default permissions required to view this Document sheet.
      * @defaultValue {@link CONST.DOCUMENT_OWNERSHIP_LEVELS.LIMITED}
@@ -342,7 +341,7 @@ declare global {
    */
   abstract class DocumentSheet<
     Options extends DocumentSheetOptions<ConcreteDocument>,
-    ConcreteDocument extends foundry.abstract.Document<any, any, any> = foundry.abstract.Document<any, any, any>,
+    ConcreteDocument extends foundry.abstract.Document.Any = foundry.abstract.Document.Any,
   > extends FormApplication<Options, ConcreteDocument> {
     /**
      * @param object  - A Document instance which should be managed by this form.
@@ -449,7 +448,7 @@ declare global {
   namespace DocumentSheet {
     interface DocumentSheetData<
       Options extends DocumentSheetOptions<ConcreteDocument>,
-      ConcreteDocument extends foundry.abstract.Document<any, any, any> = foundry.abstract.Document<any, any, any>,
+      ConcreteDocument extends foundry.abstract.Document.Any = foundry.abstract.Document.Any,
     > extends FormApplication.FormApplicationData {
       cssClass: string;
       editable: boolean;
diff --git a/src/foundry/client/apps/forms/image-popout.d.mts b/src/foundry/client/apps/forms/image-popout.d.mts
index 55f0556b3..cc6db4bf0 100644
--- a/src/foundry/client/apps/forms/image-popout.d.mts
+++ b/src/foundry/client/apps/forms/image-popout.d.mts
@@ -78,7 +78,7 @@ declare global {
     /**
      * Provide a reference to the Document referenced by this popout, if one exists
      */
-    getRelatedObject(): Promise<foundry.abstract.Document<any, any, any> | null>;
+    getRelatedObject(): Promise<foundry.abstract.Document.Any | null>;
 
     protected override _render(force?: boolean, options?: Application.RenderOptions<Options>): Promise<void>;
 
diff --git a/src/foundry/client/apps/forms/ownership.d.mts b/src/foundry/client/apps/forms/ownership.d.mts
index fbf704a0f..8b4654910 100644
--- a/src/foundry/client/apps/forms/ownership.d.mts
+++ b/src/foundry/client/apps/forms/ownership.d.mts
@@ -8,7 +8,7 @@ declare global {
    */
   class DocumentOwnershipConfig<
     Options extends DocumentSheetOptions<ConcreteDocument>,
-    ConcreteDocument extends foundry.abstract.Document<any, any, any> = foundry.abstract.Document<any, any, any>,
+    ConcreteDocument extends foundry.abstract.Document.Any = foundry.abstract.Document.Any,
   > extends DocumentSheet<Options, ConcreteDocument> {
     /**
      * @defaultValue
diff --git a/src/foundry/client/apps/forms/sheet-config.d.mts b/src/foundry/client/apps/forms/sheet-config.d.mts
index 9853f2b4d..bdc7e33b9 100644
--- a/src/foundry/client/apps/forms/sheet-config.d.mts
+++ b/src/foundry/client/apps/forms/sheet-config.d.mts
@@ -9,7 +9,7 @@ declare global {
    */
   class DocumentSheetConfig<
     Options extends FormApplicationOptions = FormApplicationOptions,
-    ConcreteDocument extends foundry.abstract.Document<any, any, any> = foundry.abstract.Document<any, any, any>,
+    ConcreteDocument extends foundry.abstract.Document.Any = foundry.abstract.Document.Any,
   > extends FormApplication<Options, ConcreteDocument> {
     /**
      * @defaultValue
diff --git a/src/foundry/client/core/document-index.d.mts b/src/foundry/client/core/document-index.d.mts
index f9f638a79..f01c04c1a 100644
--- a/src/foundry/client/core/document-index.d.mts
+++ b/src/foundry/client/core/document-index.d.mts
@@ -66,19 +66,19 @@ declare global {
      * Add an entry to the index.
      * @param doc - The document entry.
      */
-    addDocument(doc: foundry.abstract.Document<any, any, any>): void;
+    addDocument(doc: foundry.abstract.Document.Any): void;
 
     /**
      * Remove an entry from the index.
      * @param doc - The document entry.
      */
-    removeDocument(doc: foundry.abstract.Document<any, any, any>): void;
+    removeDocument(doc: foundry.abstract.Document.Any): void;
 
     /**
      * Replace an entry in the index with an updated one.
      * @param doc - The document entry.
      */
-    replaceDocument(doc: foundry.abstract.Document<any, any, any>): void;
+    replaceDocument(doc: foundry.abstract.Document.Any): void;
 
     /**
      * Add a leaf node to the word tree index.
@@ -87,7 +87,7 @@ declare global {
      * @internal
      */
     protected _addLeaf(
-      doc: foundry.abstract.Document<any, any, any>,
+      doc: foundry.abstract.Document.Any,
       options?: {
         /** The compendium that the index belongs to. */
         pack?: CompendiumCollection<any>;
@@ -106,7 +106,7 @@ declare global {
      * @param parent - The parent document.
      * @internal
      */
-    protected _indexEmbeddedDocuments(parent: foundry.abstract.Document<any, any, any>): void;
+    protected _indexEmbeddedDocuments(parent: foundry.abstract.Document.Any): void;
 
     /**
      * Aggregate all documents and embedded documents in a world collection and add them to the index.
diff --git a/src/foundry/client/core/utils.d.mts b/src/foundry/client/core/utils.d.mts
index 5d8194736..0f71e7b4f 100644
--- a/src/foundry/client/core/utils.d.mts
+++ b/src/foundry/client/core/utils.d.mts
@@ -29,7 +29,7 @@ declare global {
       /** Allow retrieving an invalid Document. (default: `false`) */
       invalid?: boolean;
     },
-  ): Promise<foundry.abstract.Document<any, any, any> | null>;
+  ): Promise<foundry.abstract.Document.Any | null>;
 
   /**
    * Retrieve a Document by its Universally Unique Identifier (uuid) synchronously. If the uuid resolves to a compendium
@@ -49,7 +49,7 @@ declare global {
       /** Throw an error if the UUID cannot be resolved synchronously. (default: `true`) */
       strict?: boolean;
     },
-  ): foundry.abstract.Document<any, any, any> | Record<string, unknown> | null;
+  ): foundry.abstract.Document.Any | Record<string, unknown> | null;
 
   /**
    * Resolve a series of embedded document UUID parts against a parent Document.
@@ -58,10 +58,7 @@ declare global {
    * @returns The resolved Embedded Document.
    * @internal
    */
-  function _resolveEmbedded(
-    parent: foundry.abstract.Document<any, any, any>,
-    parts: string[],
-  ): foundry.abstract.Document<any, any, any>;
+  function _resolveEmbedded(parent: foundry.abstract.Document.Any, parts: string[]): foundry.abstract.Document.Any;
 
   /**
    * Return a reference to the Document class implementation which is configured for use.
diff --git a/src/foundry/client/data/abstract/client-document.d.mts b/src/foundry/client/data/abstract/client-document.d.mts
index 233ebc2be..cdcccca5a 100644
--- a/src/foundry/client/data/abstract/client-document.d.mts
+++ b/src/foundry/client/data/abstract/client-document.d.mts
@@ -5,15 +5,9 @@ import type {
 } from "../../../../types/helperTypes.d.mts";
 import type { ConstructorOf, DeepPartial, InexactPartial, Mixin, ValueOf } from "../../../../types/utils.d.mts";
 import type Document from "../../../common/abstract/document.d.mts";
-import type { AnyMetadata, DocumentModificationOptions } from "../../../common/abstract/document.d.mts";
-
-declare class ClientDocument<
-  BaseDocument extends foundry.abstract.Document<any, AnyMetadata, any> = foundry.abstract.Document<
-    any,
-    AnyMetadata,
-    any
-  >,
-> {
+import type { DocumentModificationOptions } from "../../../common/abstract/document.d.mts";
+
+declare class ClientDocument<BaseDocument extends foundry.abstract.Document.Any = foundry.abstract.Document.Any> {
   /** @privateRemarks All mixin classses should accept anything for its constructor. */
   constructor(...args: any[]);
 
@@ -536,7 +530,7 @@ declare class ClientDocument<
    */
   protected _onCreateEmbeddedDocuments(
     embeddedName: string,
-    documents: foundry.abstract.Document<any, any, any>[],
+    documents: foundry.abstract.Document.Any[],
     result: Record<string, unknown>[],
     options: DocumentModificationOptions,
     userId: string,
@@ -568,7 +562,7 @@ declare class ClientDocument<
    */
   protected _onUpdateEmbeddedDocuments(
     embeddedName: string,
-    documents: foundry.abstract.Document<any, any, any>[],
+    documents: foundry.abstract.Document.Any[],
     result: Record<string, unknown>[],
     options: DocumentModificationContext,
     userId: string,
@@ -600,7 +594,7 @@ declare class ClientDocument<
    */
   protected _onDeleteEmbeddedDocuments(
     embeddedName: string,
-    documents: foundry.abstract.Document<any, any, any>[],
+    documents: foundry.abstract.Document.Any[],
     result: string[],
     options: DocumentModificationContext,
     userId: string,
@@ -688,12 +682,12 @@ declare global {
   }
 }
 
-export type DropData<T extends foundry.abstract.Document<any, any, any>> = T extends { id: string | undefined }
+export type DropData<T extends foundry.abstract.Document.Any> = T extends { id: string | undefined }
   ? DropData.Data<T> & DropData.UUID
   : DropData.Data<T>;
 
 declare namespace DropData {
-  interface Data<T extends foundry.abstract.Document<any, any, any>> {
+  interface Data<T extends foundry.abstract.Document.Any> {
     type: T["documentName"];
     data: T["_source"];
   }
diff --git a/src/foundry/client/hooks.d.mts b/src/foundry/client/hooks.d.mts
index 58308a0aa..aa7f02a25 100644
--- a/src/foundry/client/hooks.d.mts
+++ b/src/foundry/client/hooks.d.mts
@@ -10,8 +10,8 @@ import type { DeepPartial, ValueOf } from "../../types/utils.d.mts";
 import type { DropData } from "./data/abstract/client-document.d.mts";
 import type { DocumentModificationOptions } from "../common/abstract/document.d.mts";
 // eslint-disable-next-line import/no-named-as-default
-import type ProseMirrorMenu from "../prosemirror/menu.d.mts";
-import type { ProseMirrorDropDown } from "../prosemirror/menu.d.mts";
+import type ProseMirrorMenu from "../common/prosemirror/menu.d.mts";
+import type { ProseMirrorDropDown } from "../common/prosemirror/menu.d.mts";
 import type { OccludableObject } from "./pixi/placeables/primary-canvas-objects/occludable-object.d.mts";
 
 export {};
@@ -293,7 +293,7 @@ declare global {
        */
       updateCompendium: (
         pack: CompendiumCollection<any>,
-        documents: foundry.abstract.Document<any, any, any>[],
+        documents: foundry.abstract.Document.Any[],
         options: DocumentModificationOptions,
         userId: string,
       ) => void;
diff --git a/src/foundry/client/ui/secrets.d.mts b/src/foundry/client/ui/secrets.d.mts
index 1f80f9c2a..af72d6cf0 100644
--- a/src/foundry/client/ui/secrets.d.mts
+++ b/src/foundry/client/ui/secrets.d.mts
@@ -13,11 +13,11 @@ declare global {
    * @returns The updated Document.
    */
   type HTMLSecretUpdateCallback<
-    ConcreteDocument extends foundry.abstract.Document<any, any, any> = foundry.abstract.Document<any, any, any>,
+    ConcreteDocument extends foundry.abstract.Document.Any = foundry.abstract.Document.Any,
   > = (secret: HTMLElement, content: string) => Promise<ConcreteDocument>;
 
   interface HTMLSecretConfiguration<
-    ConcreteDocument extends foundry.abstract.Document<any, any, any> = foundry.abstract.Document<any, any, any>,
+    ConcreteDocument extends foundry.abstract.Document.Any = foundry.abstract.Document.Any,
   > {
     /** The CSS selector used to target content that contains secret blocks. */
     parentSelector: string;
@@ -44,9 +44,7 @@ declare global {
    * secrets.bind(html);
    * ```
    */
-  class HTMLSecret<
-    ConcreteDocument extends foundry.abstract.Document<any, any, any> = foundry.abstract.Document<any, any, any>,
-  > {
+  class HTMLSecret<ConcreteDocument extends foundry.abstract.Document.Any = foundry.abstract.Document.Any> {
     /**
      * @param config - Configuration options.
      */
diff --git a/src/foundry/common/abstract/embedded-collection-delta.d.mts b/src/foundry/common/abstract/embedded-collection-delta.d.mts
index 0d67ff162..62b0bd394 100644
--- a/src/foundry/common/abstract/embedded-collection-delta.d.mts
+++ b/src/foundry/common/abstract/embedded-collection-delta.d.mts
@@ -6,8 +6,8 @@ import type EmbeddedCollection from "./embedded-collection.d.mts";
  * embedded collection, and generate new embedded Documents by combining them.
  */
 export default class EmbeddedCollectionDelta<
-  ContainedDocument extends foundry.abstract.Document<any, any, any>,
-  ParentDataModel extends foundry.abstract.Document<any, any, any>,
+  ContainedDocument extends foundry.abstract.Document.Any,
+  ParentDataModel extends foundry.abstract.Document.Any,
 > extends EmbeddedCollection<ContainedDocument, ParentDataModel> {
   /**
    * A convenience getter to return the corresponding base collection.
diff --git a/src/foundry/prosemirror/prosemirror.d.mts b/src/foundry/common/prosemirror/_module.d.mts
similarity index 83%
rename from src/foundry/prosemirror/prosemirror.d.mts
rename to src/foundry/common/prosemirror/_module.d.mts
index 3fda11e1e..75c16da98 100644
--- a/src/foundry/prosemirror/prosemirror.d.mts
+++ b/src/foundry/common/prosemirror/_module.d.mts
@@ -1,25 +1,28 @@
-import * as collab from "prosemirror-collab";
-import { keymap } from "prosemirror-keymap";
-import { DOMParser, DOMSerializer, Schema } from "prosemirror-model";
-import type { Plugin, PluginKey } from "prosemirror-state";
-import { AllSelection, TextSelection, EditorState } from "prosemirror-state";
-import { Step } from "prosemirror-transform";
+import { EditorState, AllSelection, TextSelection, Plugin, PluginKey } from "prosemirror-state";
 import { EditorView } from "prosemirror-view";
-import type ProseMirrorContentLinkPlugin from "./content-link-plugin.d.mts";
-import type ProseMirrorDirtyPlugin from "./dirty-plugin.d.mts";
-import "./extensions.d.mts";
-import type ProseMirrorImagePlugin from "./image-plugin.d.mts";
+import { Schema, DOMSerializer } from "prosemirror-model";
 // eslint-disable-next-line import/no-named-as-default
 import type ProseMirrorInputRules from "./input-rules.d.mts";
+import { keymap } from "prosemirror-keymap";
 // eslint-disable-next-line import/no-named-as-default
 import type ProseMirrorKeyMaps from "./keymaps.d.mts";
 // eslint-disable-next-line import/no-named-as-default
 import type ProseMirrorMenu from "./menu.d.mts";
-import type { schema as defaultSchema } from "./schema.d.mts";
+import "./extensions.d.mts";
+import * as collab from "prosemirror-collab";
+import type { Step } from "prosemirror-transform";
 import type { parseHTMLString, serializeHTMLString } from "./util.d.mts";
+
+// A const is being imported here. It can't be `import type`.
+// eslint-disable-next-line import/extensions
+import { schema as defaultSchema } from "./schema.mjs";
 import type ProseMirrorPlugin from "./plugin.d.mts";
+import type ProseMirrorImagePlugin from "./image-plugin.d.mts";
+import type ProseMirrorDirtyPlugin from "./dirty-plugin.d.mts";
+import type ProseMirrorContentLinkPlugin from "./content-link-plugin.d.mts";
 import type ProseMirrorHighlightMatchesPlugin from "./highlight-matches-plugin.d.mts";
 import type ProseMirrorClickHandler from "./click-handler.d.mts";
+import type DOMParser from "./dom-parser.d.mts";
 
 declare const dom: {
   parser: DOMParser;
@@ -31,7 +34,6 @@ declare const dom: {
 declare const defaultPlugins: Record<
   | "inputRules"
   | "keyMaps"
-  | "images"
   | "menu"
   | "isDirty"
   | "clickHandler"
diff --git a/src/foundry/prosemirror/click-handler.d.mts b/src/foundry/common/prosemirror/click-handler.d.mts
similarity index 100%
rename from src/foundry/prosemirror/click-handler.d.mts
rename to src/foundry/common/prosemirror/click-handler.d.mts
diff --git a/src/foundry/prosemirror/content-link-plugin.d.mts b/src/foundry/common/prosemirror/content-link-plugin.d.mts
similarity index 70%
rename from src/foundry/prosemirror/content-link-plugin.d.mts
rename to src/foundry/common/prosemirror/content-link-plugin.d.mts
index 5de754136..432bdb763 100644
--- a/src/foundry/prosemirror/content-link-plugin.d.mts
+++ b/src/foundry/common/prosemirror/content-link-plugin.d.mts
@@ -3,14 +3,6 @@ import type { Plugin } from "prosemirror-state";
 import type { EditorView } from "prosemirror-view";
 import type ProseMirrorPlugin from "./plugin.d.mts";
 
-interface ProseMirrorContentLinkOptions {
-  /** The parent document housing this editor. */
-  document?: foundry.abstract.Document<any, any, any>;
-  /** @defaultValue `false` */
-  relativeLinks?: boolean;
-}
-
-export default ProseMirrorContentLinkPlugin;
 /**
  * A class responsible for handling the dropping of Documents onto the editor and creating content links for them.
  */
@@ -19,19 +11,19 @@ declare class ProseMirrorContentLinkPlugin extends ProseMirrorPlugin {
    * @param schema  - The ProseMirror schema.
    * @param options - Additional options to configure the plugin's behaviour.
    */
-  constructor(schema: Schema, options?: ProseMirrorContentLinkOptions);
+  constructor(schema: Schema, options?: ProseMirrorContentLinkPlugin.ProseMirrorContentLinkOptions);
 
   /**
    * The parent document housing this editor.
    */
-  readonly document: foundry.abstract.Document<any, any, any>;
+  readonly document: foundry.abstract.Document.Any;
 
   /**
    * Whether to generate links relative to the parent document.
    */
   readonly relativeLinks: boolean;
 
-  static override build(schema: Schema, options?: ProseMirrorContentLinkOptions): Plugin;
+  static override build(schema: Schema, options?: ProseMirrorContentLinkPlugin.ProseMirrorContentLinkOptions): Plugin;
 
   /**
    * Handle a drop onto the editor.
@@ -42,3 +34,14 @@ declare class ProseMirrorContentLinkPlugin extends ProseMirrorPlugin {
    */
   protected _onDrop(view: EditorView, event: DragEvent, slice: Slice, moved: boolean): void | true;
 }
+
+declare namespace ProseMirrorContentLinkPlugin {
+  interface ProseMirrorContentLinkOptions {
+    /** The parent document housing this editor. */
+    document?: foundry.abstract.Document.Any | undefined;
+    /** @defaultValue `false` */
+    relativeLinks?: boolean | undefined;
+  }
+}
+
+export default ProseMirrorContentLinkPlugin;
diff --git a/src/foundry/prosemirror/dirty-plugin.d.mts b/src/foundry/common/prosemirror/dirty-plugin.d.mts
similarity index 86%
rename from src/foundry/prosemirror/dirty-plugin.d.mts
rename to src/foundry/common/prosemirror/dirty-plugin.d.mts
index d0afe44cc..79dd26328 100644
--- a/src/foundry/prosemirror/dirty-plugin.d.mts
+++ b/src/foundry/common/prosemirror/dirty-plugin.d.mts
@@ -1,7 +1,7 @@
 import type { Schema } from "prosemirror-model";
 import type { Plugin } from "prosemirror-state";
 import type ProseMirrorPlugin from "./plugin.d.mts";
-import type { EmptyObject } from "../../types/utils.d.mts";
+import type { EmptyObject } from "../../../types/utils.d.mts";
 
 export default ProseMirrorDirtyPlugin;
 
diff --git a/src/foundry/prosemirror/dom-parser.d.mts b/src/foundry/common/prosemirror/dom-parser.d.mts
similarity index 100%
rename from src/foundry/prosemirror/dom-parser.d.mts
rename to src/foundry/common/prosemirror/dom-parser.d.mts
diff --git a/src/foundry/prosemirror/dropdown.d.mts b/src/foundry/common/prosemirror/dropdown.d.mts
similarity index 93%
rename from src/foundry/prosemirror/dropdown.d.mts
rename to src/foundry/common/prosemirror/dropdown.d.mts
index 9037900d4..66cedd48e 100644
--- a/src/foundry/prosemirror/dropdown.d.mts
+++ b/src/foundry/common/prosemirror/dropdown.d.mts
@@ -18,6 +18,9 @@ declare class ProseMirrorDropDown {
    */
   constructor(title: string, items: ProseMirrorDropDownMenu.Entry[], options?: Options);
 
+  // placeholder private attribute to limit what can count as a subtype at compile time
+  #proseMirrorDropDown: true;
+
   /**
    * The default title for this drop-down.
    */
diff --git a/src/foundry/prosemirror/extensions.d.mts b/src/foundry/common/prosemirror/extensions.d.mts
similarity index 100%
rename from src/foundry/prosemirror/extensions.d.mts
rename to src/foundry/common/prosemirror/extensions.d.mts
diff --git a/src/foundry/common/prosemirror/highlight-matches-plugin.d.mts b/src/foundry/common/prosemirror/highlight-matches-plugin.d.mts
new file mode 100644
index 000000000..b76f59d4c
--- /dev/null
+++ b/src/foundry/common/prosemirror/highlight-matches-plugin.d.mts
@@ -0,0 +1,82 @@
+import { Schema } from "prosemirror-model";
+import type ProseMirrorPlugin from "./plugin.d.mts";
+import type { ProseMirrorMenu } from "./menu.d.mts";
+import { EditorState, Plugin } from "prosemirror-state";
+import { EditorView } from "prosemirror-view";
+import type { EmptyObject, InexactPartial } from "../../../types/utils.d.mts";
+
+declare namespace ProseMirrorHighlightMatchesPlugin {
+  /**
+   * A class responsible for handling the display of automated link recommendations when a user highlights text in a
+   * ProseMirror editor.
+   */
+  class PossibleMatchesTooltip {
+    /**
+     * @param view - The editor view
+     */
+    constructor(view: EditorView);
+
+    /**
+     * A reference to any existing tooltip that has been generated as part of a highlight match.
+     */
+    tooltip: HTMLElement;
+
+    update(view: EditorView, lastState: EditorState): Promise<void>;
+
+    /**
+     * Create a locked tooltip at the given position
+     * @param position - A position object with coordinates for where the tooltip should be placed
+     * @param text     - Explicit tooltip text or HTML to display.
+     * @param options  - Additional options which can override tooltip behavior.
+     */
+    _createTooltip(
+      position: InexactPartial<{
+        /** Explicit top position for the tooltip */
+        top?: string;
+        /** Explicit right position for the tooltip */
+        right?: string;
+        /** Explicit bottom position for the tooltip */
+        bottom?: string;
+        /** Explicit left position for the tooltip */
+        left?: string;
+      }>,
+      text: string,
+      options?: {
+        /** An optional, space-separated list of CSS classes to apply to the activated tooltip. */
+        cssClass: string;
+      },
+    ): void;
+
+    /**
+     * Update the tooltip with new HTML
+     * @param html - The HTML to be included in the tooltip
+     */
+    _updateTooltip(html: string): void;
+
+    /**
+     * Dismiss all locked tooltips and set this tooltip to undefined.
+     */
+    _deactivateTooltip(): void;
+
+    /**
+     * Find all Documents in the world/compendia with names that match the selection insensitive to case.
+     * @param text - A string which will be matched against document names
+     */
+    _findMatches(text: string): string;
+  }
+}
+
+/**
+ * A ProseMirrorPlugin wrapper around the {@link PossibleMatchesTooltip} class.
+ */
+declare class ProseMirrorHighlightMatchesPlugin extends ProseMirrorPlugin {
+  /**
+   * @param schema  - The ProseMirror schema.
+   * @param options - Additional options to configure the plugin's behaviour.
+   */
+  constructor(schema: Schema, options: ProseMirrorMenu.ProseMirrorMenuOptions);
+
+  static override build(schema: Schema, options?: EmptyObject): Plugin;
+}
+
+export default ProseMirrorHighlightMatchesPlugin;
diff --git a/src/foundry/prosemirror/image-plugin.d.mts b/src/foundry/common/prosemirror/image-plugin.d.mts
similarity index 93%
rename from src/foundry/prosemirror/image-plugin.d.mts
rename to src/foundry/common/prosemirror/image-plugin.d.mts
index 5642ff9f4..8dd462247 100644
--- a/src/foundry/prosemirror/image-plugin.d.mts
+++ b/src/foundry/common/prosemirror/image-plugin.d.mts
@@ -2,16 +2,14 @@ import type { Schema, Slice } from "prosemirror-model";
 import type { Plugin } from "prosemirror-state";
 import type { EditorView } from "prosemirror-view";
 import type ProseMirrorPlugin from "./plugin.d.mts";
-import type { EmptyObject } from "../../types/utils.d.mts";
+import type { EmptyObject } from "../../../types/utils.d.mts";
 
 export default ProseMirrorImagePlugin;
 /**
  * A class responsible for handle drag-and-drop and pasting of image content. Ensuring no base64 data is injected
  * directly into the journal content and it is instead uploaded to the user's data directory.
  */
-declare class ProseMirrorImagePlugin<
-  RelatedDocument extends foundry.abstract.Document<any, any, any>,
-> extends ProseMirrorPlugin {
+declare class ProseMirrorImagePlugin<RelatedDocument extends foundry.abstract.Document.Any> extends ProseMirrorPlugin {
   /**
    * @param schema   - The ProseMirror schema.
    * @param options  - Additional options to configure the plugin's behaviour.
diff --git a/src/foundry/prosemirror/index.d.mts b/src/foundry/common/prosemirror/index.d.mts
similarity index 90%
rename from src/foundry/prosemirror/index.d.mts
rename to src/foundry/common/prosemirror/index.d.mts
index 495d1c415..0b9daa773 100644
--- a/src/foundry/prosemirror/index.d.mts
+++ b/src/foundry/common/prosemirror/index.d.mts
@@ -11,7 +11,7 @@ import "./keymaps.d.mts";
 import "./menu.d.mts";
 import "./paste-transformer.d.mts";
 import "./plugin.d.mts";
-import type * as ProseMirrorObject from "./prosemirror.d.mts";
+import type * as ProseMirrorObject from "./_module.d.mts";
 import "./schema/index.d.mts";
 import "./schema.d.mts";
 import "./string-serializer.d.mts";
diff --git a/src/foundry/prosemirror/input-rules.d.mts b/src/foundry/common/prosemirror/input-rules.d.mts
similarity index 85%
rename from src/foundry/prosemirror/input-rules.d.mts
rename to src/foundry/common/prosemirror/input-rules.d.mts
index 0f8ff1fa0..fa6b1a02f 100644
--- a/src/foundry/prosemirror/input-rules.d.mts
+++ b/src/foundry/common/prosemirror/input-rules.d.mts
@@ -1,11 +1,10 @@
 import type { InputRule } from "prosemirror-inputrules";
 import type { Schema } from "prosemirror-model";
 import type { Plugin } from "prosemirror-state";
-import type { Options } from "../client/dice/roll.d.mts";
 import type ProseMirrorPlugin from "./plugin.d.mts";
 
 export declare namespace ProseMirrorInputRules {
-  export interface Options {
+  export interface ProseMirrorInputRulesOptions {
     /**
      * The minimum heading level to start from when generating heading input rules.
      * The resulting heading level for a heading rule is equal to the number of
@@ -26,7 +25,7 @@ declare class ProseMirrorInputRules extends ProseMirrorPlugin {
    * @param schema  - The ProseMirror schema to build the plugin against.
    * @param options - Additional options to pass to the plugin.
    * */
-  static build(schema: Schema, options?: ProseMirrorInputRules.Options): Plugin;
+  static build(schema: Schema, options?: ProseMirrorInputRules.ProseMirrorInputRulesOptions): Plugin;
 
   /**
    * Build input rules for node types present in the schema.
diff --git a/src/foundry/prosemirror/keymaps.d.mts b/src/foundry/common/prosemirror/keymaps.d.mts
similarity index 100%
rename from src/foundry/prosemirror/keymaps.d.mts
rename to src/foundry/common/prosemirror/keymaps.d.mts
diff --git a/src/foundry/prosemirror/menu.d.mts b/src/foundry/common/prosemirror/menu.d.mts
similarity index 95%
rename from src/foundry/prosemirror/menu.d.mts
rename to src/foundry/common/prosemirror/menu.d.mts
index 7d8610e5a..15d0fb251 100644
--- a/src/foundry/prosemirror/menu.d.mts
+++ b/src/foundry/common/prosemirror/menu.d.mts
@@ -5,7 +5,7 @@ import type { ProseMirrorCommand } from "./keymaps.d.mts";
 import type ProseMirrorPlugin from "./plugin.d.mts";
 
 export declare namespace ProseMirrorMenu {
-  export interface Options {
+  export interface ProseMirrorMenuOptions {
     /** A function to call when the save button is pressed. */
     onSave?: () => void;
     /** Whether this editor instance is intended to be destroyed when saved. */
@@ -73,7 +73,10 @@ declare class ProseMirrorMenu extends ProseMirrorPlugin {
    * @param view    - The editor view.
    * @param options - Additional options to configure the plugin's behaviour.
    */
-  constructor(schema: Schema, view: EditorView, options?: ProseMirrorMenu.Options);
+  constructor(schema: Schema, view: EditorView, options?: ProseMirrorMenu.ProseMirrorMenuOptions);
+
+  // placeholder private attribute to support subclassing.
+  #proseMirrorMenu: true;
 
   /**
    * The editor view.
@@ -102,14 +105,14 @@ declare class ProseMirrorMenu extends ProseMirrorPlugin {
   /**
    * Additional options to configure the plugin's behaviour.
    */
-  options: ProseMirrorMenu.Options;
+  options: ProseMirrorMenu.ProseMirrorMenuOptions;
 
   /**
    * The dropdowns configured for this menu.
    */
   dropdowns: ProseMirrorDropDown.Entry[];
 
-  static override build(schema: Schema, options?: ProseMirrorMenu.Options): Plugin;
+  static override build(schema: Schema, options?: ProseMirrorMenu.ProseMirrorMenuOptions): Plugin;
 
   /**
    * Render the menu's HTML.
@@ -186,6 +189,11 @@ declare class ProseMirrorMenu extends ProseMirrorPlugin {
    */
   protected _handleSave(): void;
 
+  /**
+   * Global listeners for the drop-down menu.
+   */
+  static eventListeners(): void;
+
   /**
    * Display the insert image prompt.
    */
diff --git a/src/foundry/prosemirror/paste-transformer.d.mts b/src/foundry/common/prosemirror/paste-transformer.d.mts
similarity index 83%
rename from src/foundry/prosemirror/paste-transformer.d.mts
rename to src/foundry/common/prosemirror/paste-transformer.d.mts
index 5672c6d40..3d4de1d26 100644
--- a/src/foundry/prosemirror/paste-transformer.d.mts
+++ b/src/foundry/common/prosemirror/paste-transformer.d.mts
@@ -2,6 +2,7 @@ import type { Schema, Slice } from "prosemirror-model";
 import type ProseMirrorPlugin from "./plugin.d.mts";
 import type { Plugin } from "prosemirror-state";
 import type { EditorView } from "prosemirror-view";
+import type { EmptyObject } from "../../../types/utils.d.mts";
 
 export default ProseMirrorPasteTransformer;
 
@@ -9,7 +10,7 @@ export default ProseMirrorPasteTransformer;
  * A class responsible for applying transformations to content pasted inside the editor.
  */
 declare class ProseMirrorPasteTransformer extends ProseMirrorPlugin {
-  static override build(schema: Schema, options?: Record<string, unknown>): Plugin;
+  static override build(schema: Schema, options?: EmptyObject): Plugin;
 
   /**
    * Transform content before it is injected into the ProseMirror document.
diff --git a/src/foundry/prosemirror/plugin.d.mts b/src/foundry/common/prosemirror/plugin.d.mts
similarity index 83%
rename from src/foundry/prosemirror/plugin.d.mts
rename to src/foundry/common/prosemirror/plugin.d.mts
index e98211249..4e67135c6 100644
--- a/src/foundry/prosemirror/plugin.d.mts
+++ b/src/foundry/common/prosemirror/plugin.d.mts
@@ -1,5 +1,6 @@
 import type { Schema } from "prosemirror-model";
 import type { Plugin } from "prosemirror-state";
+import type { AnyObject } from "../../../types/utils.d.mts";
 
 export default ProseMirrorPlugin;
 declare abstract class ProseMirrorPlugin {
@@ -19,5 +20,5 @@ declare abstract class ProseMirrorPlugin {
    * @param options - Additional options to pass to the plugin.
    * @virtual
    */
-  static build(schema: Schema, options?: Record<string, unknown>): Plugin;
+  static build(schema: Schema, options?: AnyObject): Plugin;
 }
diff --git a/src/foundry/prosemirror/schema.d.mts b/src/foundry/common/prosemirror/schema.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema.d.mts
rename to src/foundry/common/prosemirror/schema.d.mts
diff --git a/src/foundry/common/prosemirror/schema/attribute-capture.d.mts b/src/foundry/common/prosemirror/schema/attribute-capture.d.mts
new file mode 100644
index 000000000..5c2141131
--- /dev/null
+++ b/src/foundry/common/prosemirror/schema/attribute-capture.d.mts
@@ -0,0 +1,39 @@
+import type { DOMOutputSpec, MarkSpec, NodeSpec } from "prosemirror-model";
+
+/**
+ * A class responsible for injecting attribute capture logic into the ProseMirror schema.
+ */
+declare class AttributeCapture {
+  constructor();
+
+  // placeholder for subclassing
+  #attributeCapture: true;
+
+  /**
+   * Augments the schema definition to allow each node or mark to capture all the attributes
+   * on an element and preserve them when re-serialized back into the DOM.
+   * @param spec - The schema specification
+   */
+  attributeCapture(spec: NodeSpec | MarkSpec): DOMOutputSpec;
+}
+
+declare namespace AttributeCapture {
+  // only used in truly private methods
+  // interface AllowedAttributeConfiguration {
+  //   /**  The set of exactly-matching attribute names. **/
+  //   attrs: Set<string>;
+  //   /** A list of wildcard allowed prefixes for attributes. **/
+  //   wildcards: string[];
+  // }
+  // only used in truly private methods
+  // interface ManagedAttributesSpec {
+  //   /**  A list of managed attributes. */
+  //   attributes: string[];
+  //   /**  A list of CSS property names that are managed as inline styles. */
+  //   styles: string[];
+  //   /**  A list of managed class names. */
+  //   classes: string[];
+  // }
+}
+
+export default AttributeCapture;
diff --git a/src/foundry/prosemirror/schema/core.d.mts b/src/foundry/common/prosemirror/schema/core.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/core.d.mts
rename to src/foundry/common/prosemirror/schema/core.d.mts
diff --git a/src/foundry/prosemirror/schema/image-link-node.d.mts b/src/foundry/common/prosemirror/schema/image-link-node.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/image-link-node.d.mts
rename to src/foundry/common/prosemirror/schema/image-link-node.d.mts
diff --git a/src/foundry/prosemirror/schema/image-node.d.mts b/src/foundry/common/prosemirror/schema/image-node.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/image-node.d.mts
rename to src/foundry/common/prosemirror/schema/image-node.d.mts
diff --git a/src/foundry/prosemirror/schema/index.d.mts b/src/foundry/common/prosemirror/schema/index.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/index.d.mts
rename to src/foundry/common/prosemirror/schema/index.d.mts
diff --git a/src/foundry/prosemirror/schema/link-mark.d.mts b/src/foundry/common/prosemirror/schema/link-mark.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/link-mark.d.mts
rename to src/foundry/common/prosemirror/schema/link-mark.d.mts
diff --git a/src/foundry/prosemirror/schema/lists.d.mts b/src/foundry/common/prosemirror/schema/lists.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/lists.d.mts
rename to src/foundry/common/prosemirror/schema/lists.d.mts
diff --git a/src/foundry/prosemirror/schema/marks.d.mts b/src/foundry/common/prosemirror/schema/marks.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/marks.d.mts
rename to src/foundry/common/prosemirror/schema/marks.d.mts
diff --git a/src/foundry/prosemirror/schema/other.d.mts b/src/foundry/common/prosemirror/schema/other.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/other.d.mts
rename to src/foundry/common/prosemirror/schema/other.d.mts
diff --git a/src/foundry/prosemirror/schema/schema-definition.d.mts b/src/foundry/common/prosemirror/schema/schema-definition.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/schema-definition.d.mts
rename to src/foundry/common/prosemirror/schema/schema-definition.d.mts
diff --git a/src/foundry/prosemirror/schema/secret-node.d.mts b/src/foundry/common/prosemirror/schema/secret-node.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/secret-node.d.mts
rename to src/foundry/common/prosemirror/schema/secret-node.d.mts
diff --git a/src/foundry/prosemirror/schema/tables.d.mts b/src/foundry/common/prosemirror/schema/tables.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/tables.d.mts
rename to src/foundry/common/prosemirror/schema/tables.d.mts
diff --git a/src/foundry/prosemirror/schema/utils.d.mts b/src/foundry/common/prosemirror/schema/utils.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/utils.d.mts
rename to src/foundry/common/prosemirror/schema/utils.d.mts
diff --git a/src/foundry/prosemirror/string-serializer.d.mts b/src/foundry/common/prosemirror/string-serializer.d.mts
similarity index 100%
rename from src/foundry/prosemirror/string-serializer.d.mts
rename to src/foundry/common/prosemirror/string-serializer.d.mts
diff --git a/src/foundry/prosemirror/util.d.mts b/src/foundry/common/prosemirror/util.d.mts
similarity index 100%
rename from src/foundry/prosemirror/util.d.mts
rename to src/foundry/common/prosemirror/util.d.mts
diff --git a/src/foundry/common/types.d.mts b/src/foundry/common/types.d.mts
index 3f701d473..4aa8453c4 100644
--- a/src/foundry/common/types.d.mts
+++ b/src/foundry/common/types.d.mts
@@ -8,7 +8,7 @@ declare global {
      * The parent Document of this one, if this one is embedded
      * @defaultValue `null`
      */
-    parent?: foundry.abstract.Document<any, any, any> | null | undefined;
+    parent?: foundry.abstract.Document.Any | null | undefined;
 
     /**
      * The compendium collection ID which contains this Document, if any
@@ -28,7 +28,7 @@ declare global {
     /**
      * A parent Document within which these Documents should be embedded
      */
-    parent?: foundry.abstract.Document<any, any, any> | undefined;
+    parent?: foundry.abstract.Document.Any | undefined;
 
     /**
      * A Compendium pack identifier within which the Documents should be modified
diff --git a/src/foundry/index.d.mts b/src/foundry/index.d.mts
index bc27ae6d6..be910d321 100644
--- a/src/foundry/index.d.mts
+++ b/src/foundry/index.d.mts
@@ -1,5 +1,5 @@
 import "./client/index.d.mts";
 import "./client-esm/client.d.mts";
 import "./clipper/index.d.mts";
-import "./prosemirror/index.d.mts";
+import "./common/prosemirror/index.d.mts";
 import "./public/index.d.mts";
diff --git a/src/foundry/prosemirror/highlight-matches-plugin.d.mts b/src/foundry/prosemirror/highlight-matches-plugin.d.mts
deleted file mode 100644
index a1581a47b..000000000
--- a/src/foundry/prosemirror/highlight-matches-plugin.d.mts
+++ /dev/null
@@ -1,78 +0,0 @@
-import { Schema } from "prosemirror-model";
-import type ProseMirrorPlugin from "./plugin.d.mts";
-import type { ProseMirrorMenu } from "./menu.d.mts";
-import { EditorState, Plugin } from "prosemirror-state";
-import { EditorView } from "prosemirror-view";
-
-/**
- * A class responsible for handling the display of automated link recommendations when a user highlights text in a
- * ProseMirror editor.
- */
-declare class PossibleMatchesTooltip {
-  /**
-   * @param view - The editor view
-   */
-  constructor(view: EditorView);
-
-  /**
-   * A reference to any existing tooltip that has been generated as part of a highlight match.
-   */
-  tooltip: HTMLElement;
-
-  update(view: EditorView, lastState: EditorState): Promise<void>;
-
-  /**
-   * Create a locked tooltip at the given position
-   * @param position - A position object with coordinates for where the tooltip should be placed
-   * @param text     - Explicit tooltip text or HTML to display.
-   * @param options  - Additional options which can override tooltip behavior.
-   */
-  _createTooltip(
-    position: {
-      /** Explicit top position for the tooltip */
-      top?: string;
-      /** Explicit right position for the tooltip */
-      right?: string;
-      /** Explicit bottom position for the tooltip */
-      bottom?: string;
-      /** Explicit left position for the tooltip */
-      left?: string;
-    },
-    text: string,
-    options?: {
-      /** An optional, space-separated list of CSS classes to apply to the activated tooltip. */
-      cssClass: string;
-    },
-  ): void;
-
-  /**
-   * Update the tooltip with new HTML
-   * @param html - The HTML to be included in the tooltip
-   */
-  _updateTooltip(html: string): void;
-
-  /**
-   * Dismiss all locked tooltips and set this tooltip to undefined.
-   */
-  _deactivateTooltip(): void;
-
-  /**
-   * Find all Documents in the world/compendia with names that match the selection insensitive to case.
-   * @param text - A string which will be matched against document names
-   */
-  _findMatches(text: string): string;
-}
-
-export default ProseMirrorHighlightMatchesPlugin;
-/**
- * A ProseMirrorPlugin wrapper around the {@link PossibleMatchesTooltip} class.
- */
-declare class ProseMirrorHighlightMatchesPlugin extends ProseMirrorPlugin {
-  /**
-   * @param schema  - The ProseMirror schema.
-   * @param options - Additional options to configure the plugin's behaviour.
-   */
-  constructor(schema: Schema, options: ProseMirrorMenu.Options);
-
-  static override build(schema: Schema, options?: Record<string, unknown> | undefined): Plugin;
-}
diff --git a/src/foundry/prosemirror/schema/attribute-capture.d.mts b/src/foundry/prosemirror/schema/attribute-capture.d.mts
deleted file mode 100644
index 1bb35dca3..000000000
--- a/src/foundry/prosemirror/schema/attribute-capture.d.mts
+++ /dev/null
@@ -1,16 +0,0 @@
-import type { DOMOutputSpec, MarkSpec, NodeSpec } from "prosemirror-model";
-
-export default AttributeCapture;
-/**
- * A class responsible for injecting attribute capture logic into the ProseMirror schema.
- */
-declare class AttributeCapture {
-  constructor();
-
-  /**
-   * Augments the schema definition to allow each node or mark to capture all the attributes
-   * on an element and preserve them when re-serialized back into the DOM.
-   * @param spec - The schema specification
-   */
-  attributeCapture(spec: NodeSpec | MarkSpec): DOMOutputSpec;
-}


Test patch:
diff --git a/tests/foundry/prosemirror/prosemirror.test-d.ts b/tests/foundry/common/prosemirror/prosemirror.test-d.ts
similarity index 84%
rename from tests/foundry/prosemirror/prosemirror.test-d.ts
rename to tests/foundry/common/prosemirror/prosemirror.test-d.ts
index df5d90b54..65ba23e4f 100644
--- a/tests/foundry/prosemirror/prosemirror.test-d.ts
+++ b/tests/foundry/common/prosemirror/prosemirror.test-d.ts
@@ -1,7 +1,7 @@
 import type { Schema } from "prosemirror-model";
 import type { EditorState } from "prosemirror-state";
 import { expectTypeOf } from "vitest";
-import "../../../src/foundry/prosemirror/index.d.mts";
+import "../../../../src/foundry/common/prosemirror/index.d.mts";
 
 expectTypeOf(ProseMirror.EditorState).toEqualTypeOf<typeof EditorState>();
 expectTypeOf(ProseMirror.Schema).toEqualTypeOf<typeof Schema>();