style

style.clearStyles

clearStyles(): Promise<void>

Reset API-level style state to defaults.

Reset, non-undoable (direct field writes on this API module): stylesheet rules cache, caption config, caption scale, global edge shape override. These live only in StyleApi memory and do not pass through CommandExecutor, so api.history.undo() will not restore them.

Reset, undoable (dispatched via CommandExecutor): edge scale (SetEdgeScaleCommand(1)) and edge arrow visibility (SetEdgeArrowCommand(true)). These push history entries and can be rolled back individually with api.history.undo().

Not touched: per-node/edge mutations applied earlier (colors, sizes, icons, images, widths, per-edge shapes) remain on their nodes/edges. api.history.undo() can unwind those one step at a time since each was dispatched as its own command.

Returns: Promise<void>