fix: Only expose registerAction instead of ActionManager in the API

This commit is contained in:
Daniel J. Geiger 2023-11-03 19:12:46 -05:00
parent daf305af34
commit c456c1e713
4 changed files with 9 additions and 16 deletions

View file

@ -22,7 +22,6 @@ import {
checkRefreshOnSubtypeLoad,
prepareSubtype,
selectSubtype,
subtypeActionPredicate,
} from "../../element/subtypes";
import {
maybeGetSubtypeProps,
@ -42,13 +41,6 @@ const readFile = util.promisify(fs.readFile);
const { h } = window;
export class API {
constructor() {
h.app.actionManager.registerActionPredicate(subtypeActionPredicate);
if (true) {
// Call `prepareSubtype()` here for `@excalidraw/excalidraw`-specific subtypes
}
}
static addSubtype = (record: SubtypeRecord, subtypePrepFn: SubtypePrepFn) => {
const subtypeLoadedCb: SubtypeLoadedCb = (hasSubtype) => {
if (checkRefreshOnSubtypeLoad(hasSubtype, h.elements)) {