@dwelle/excalidraw 0.3.36 → 0.3.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dwelle/excalidraw",
3
- "version": "0.3.36",
3
+ "version": "0.3.37",
4
4
  "main": "main.js",
5
5
  "types": "types/packages/excalidraw/index.d.ts",
6
6
  "files": [
@@ -31,7 +31,7 @@ export interface Action {
31
31
  perform: ActionFn;
32
32
  keyPriority?: number;
33
33
  keyTest?: (event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[]) => boolean;
34
- contextItemLabel?: string;
34
+ contextItemLabel?: string | ((elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => string);
35
35
  contextItemPredicate?: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
36
36
  checked?: (appState: Readonly<AppState>) => boolean;
37
37
  }
@@ -2,6 +2,7 @@ import "./ContextMenu.scss";
2
2
  import { Action } from "../actions/types";
3
3
  import { ActionManager } from "../actions/manager";
4
4
  import { AppState } from "../types";
5
+ import { NonDeletedExcalidrawElement } from "../element/types";
5
6
  export declare type ContextMenuOption = "separator" | Action;
6
7
  declare type ContextMenuProps = {
7
8
  options: ContextMenuOption[];
@@ -10,6 +11,7 @@ declare type ContextMenuProps = {
10
11
  left: number;
11
12
  actionManager: ActionManager;
12
13
  appState: Readonly<AppState>;
14
+ elements: readonly NonDeletedExcalidrawElement[];
13
15
  };
14
16
  declare type ContextMenuParams = {
15
17
  options: (ContextMenuOption | false | null | undefined)[];
@@ -18,6 +20,7 @@ declare type ContextMenuParams = {
18
20
  actionManager: ContextMenuProps["actionManager"];
19
21
  appState: Readonly<AppState>;
20
22
  container: HTMLElement;
23
+ elements: readonly NonDeletedExcalidrawElement[];
21
24
  };
22
25
  declare const _default: {
23
26
  push(params: ContextMenuParams): void;