notifyListeners() {
        const state = {
            canUndo: this.canUndo,
            canRedo: this.canRedo,
            undoStackSize: this.undoStack.length,
            redoStackSize: this.redoStack.length
        };
        for (const listener of this.changeListeners) {
            listener(state);
        }
    }
Notifies all registered listeners of the current state.

@description
This method creates a state object with the current undo/redo information
and calls all registered listener functions with this state. It's typically
called after operations that might change the undo/redo state.

@example
// This is usually called internally, but could be used like this:
undoRedoManager.execute(someCommand);
undoRedoManager.notifyListeners();