Skip to content

2.25.0-beta.5

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 30 Jun 22:20

Fixed flaky embeddable state management leading to back of the note card in "lock preview mode" snapping out of preview mode a few seconds after the user ticked a checkbox.

Bumped Excalidraw Extras requirement to 0.0.15 to solve LaTeX and Mermaid not working on iOS #2825

New in ExcalidrawAutomate

  • Added onSceneChangeHook to allow scripts and sidepanel tabs to react to scene changes. The hook supports filtering by appStateKeys, tracking element changes, and checking for tab visibility to optimize performance.
/**
 * If set, this callback is triggered when the scene changes in the target view.
 * You can use this to react to appState or element changes.
 * Any script can sign up for updates via this hook.
 * Because this hook fires extremely frequently (on every mouse move during drawing),
 * you MUST specify which appState keys you are interested in OR set trackElements to true.
 * If trackElements is falsy and appStateKeys is empty or undefined, the callback will NOT be triggered to prevent performance issues.
 * For sidepanel tabs, there is an additional filter feature: if triggerWhenInvisible is false,
 * the callback will only trigger when the sidepanel is visible and the tab is active.
 */
onSceneChangeHook: {
  appStateKeys?: (keyof AppState)[];
  trackElements?: boolean;
  triggerWhenInvisible?: boolean;
  callback: (
    elements: readonly ExcalidrawElement[],
    appState: AppState,
    files: BinaryFiles,
    view: ExcalidrawView,
    ea: ExcalidrawAutomate,
  ) => void;
} | null = null;