@zsviczian/excalidraw 0.17.6-25 → 0.17.6-27

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.
Files changed (62) hide show
  1. package/dist/excalidraw.development.js +127 -94
  2. package/dist/excalidraw.production.min.js +1 -1
  3. package/dist/styles.development.css +18 -48
  4. package/dist/styles.production.css +3 -3
  5. package/package.json +4 -2
  6. package/types/excalidraw/actions/actionAddToLibrary.d.ts +3 -3
  7. package/types/excalidraw/actions/actionBoundText.d.ts +2 -2
  8. package/types/excalidraw/actions/actionCanvas.d.ts +14 -14
  9. package/types/excalidraw/actions/actionClipboard.d.ts +13 -9
  10. package/types/excalidraw/actions/actionCropEditor.d.ts +1 -1
  11. package/types/excalidraw/actions/actionDeleteSelected.d.ts +10 -6
  12. package/types/excalidraw/actions/actionElementLock.d.ts +2 -2
  13. package/types/excalidraw/actions/actionExport.d.ts +8 -8
  14. package/types/excalidraw/actions/actionFinalize.d.ts +2 -2
  15. package/types/excalidraw/actions/actionFrame.d.ts +500 -4
  16. package/types/excalidraw/actions/actionGroup.d.ts +2 -2
  17. package/types/excalidraw/actions/actionLinearEditor.d.ts +1 -1
  18. package/types/excalidraw/actions/actionLink.d.ts +1 -1
  19. package/types/excalidraw/actions/actionMenu.d.ts +2 -2
  20. package/types/excalidraw/actions/actionNavigate.d.ts +2 -2
  21. package/types/excalidraw/actions/actionProperties.d.ts +15 -15
  22. package/types/excalidraw/actions/actionSelectAll.d.ts +1 -1
  23. package/types/excalidraw/actions/actionStyles.d.ts +1 -1
  24. package/types/excalidraw/actions/actionToggleGridMode.d.ts +1 -1
  25. package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +1 -1
  26. package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +1 -1
  27. package/types/excalidraw/actions/actionToggleStats.d.ts +1 -1
  28. package/types/excalidraw/actions/actionToggleViewMode.d.ts +1 -1
  29. package/types/excalidraw/actions/actionToggleZenMode.d.ts +1 -1
  30. package/types/excalidraw/actions/shortcuts.d.ts +1 -1
  31. package/types/excalidraw/actions/types.d.ts +1 -1
  32. package/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
  33. package/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
  34. package/types/excalidraw/components/EyeDropper.d.ts +1 -1
  35. package/types/excalidraw/components/IconPicker.d.ts +2 -2
  36. package/types/excalidraw/components/LibraryMenu.d.ts +1 -1
  37. package/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
  38. package/types/excalidraw/components/SearchMenu.d.ts +1 -1
  39. package/types/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
  40. package/types/excalidraw/components/Stats/Collapsible.d.ts +2 -1
  41. package/types/excalidraw/components/icons.d.ts +9 -0
  42. package/types/excalidraw/context/tunnels.d.ts +2 -1
  43. package/types/excalidraw/data/filesystem.d.ts +2 -1
  44. package/types/excalidraw/data/image.d.ts +0 -6
  45. package/types/excalidraw/data/library.d.ts +9 -3
  46. package/types/excalidraw/data/url.d.ts +0 -1
  47. package/types/excalidraw/editor-jotai.d.ts +56 -0
  48. package/types/excalidraw/element/binding.d.ts +1 -1
  49. package/types/excalidraw/element/elbowArrow.d.ts +14 -0
  50. package/types/excalidraw/element/embeddable.d.ts +1 -1
  51. package/types/excalidraw/element/heading.d.ts +5 -1
  52. package/types/excalidraw/element/linearElementEditor.d.ts +9 -11
  53. package/types/excalidraw/element/mutateElement.d.ts +3 -1
  54. package/types/excalidraw/element/newElement.d.ts +8 -7
  55. package/types/excalidraw/element/resizeElements.d.ts +1 -2
  56. package/types/excalidraw/element/types.d.ts +23 -1
  57. package/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  58. package/types/excalidraw/scene/export.d.ts +7 -0
  59. package/types/excalidraw/utils.d.ts +1 -0
  60. package/types/excalidraw/visualdebug.d.ts +8 -1
  61. package/types/math/line.d.ts +19 -0
  62. package/types/math/point.d.ts +10 -0
@@ -82,7 +82,7 @@ export declare const actionGoToCollaborator: {
82
82
  tab?: string | undefined;
83
83
  } | null;
84
84
  openDialog: {
85
- name: "imageExport" | "help" | "jsonExport";
85
+ name: "help" | "imageExport" | "jsonExport";
86
86
  } | {
87
87
  name: "ttd";
88
88
  tab: "mermaid" | "text-to-diagram";
@@ -292,7 +292,7 @@ export declare const actionGoToCollaborator: {
292
292
  tab?: string | undefined;
293
293
  } | null;
294
294
  openDialog: {
295
- name: "imageExport" | "help" | "jsonExport";
295
+ name: "help" | "imageExport" | "jsonExport";
296
296
  } | {
297
297
  name: "ttd";
298
298
  tab: "mermaid" | "text-to-diagram";
@@ -101,7 +101,7 @@ export declare const actionChangeFillStyle: {
101
101
  tab?: string | undefined;
102
102
  } | null;
103
103
  openDialog: {
104
- name: "imageExport" | "help" | "jsonExport";
104
+ name: "help" | "imageExport" | "jsonExport";
105
105
  } | {
106
106
  name: "ttd";
107
107
  tab: "mermaid" | "text-to-diagram";
@@ -318,7 +318,7 @@ export declare const actionChangeStrokeWidth: {
318
318
  tab?: string | undefined;
319
319
  } | null;
320
320
  openDialog: {
321
- name: "imageExport" | "help" | "jsonExport";
321
+ name: "help" | "imageExport" | "jsonExport";
322
322
  } | {
323
323
  name: "ttd";
324
324
  tab: "mermaid" | "text-to-diagram";
@@ -535,7 +535,7 @@ export declare const actionChangeSloppiness: {
535
535
  tab?: string | undefined;
536
536
  } | null;
537
537
  openDialog: {
538
- name: "imageExport" | "help" | "jsonExport";
538
+ name: "help" | "imageExport" | "jsonExport";
539
539
  } | {
540
540
  name: "ttd";
541
541
  tab: "mermaid" | "text-to-diagram";
@@ -752,7 +752,7 @@ export declare const actionChangeStrokeStyle: {
752
752
  tab?: string | undefined;
753
753
  } | null;
754
754
  openDialog: {
755
- name: "imageExport" | "help" | "jsonExport";
755
+ name: "help" | "imageExport" | "jsonExport";
756
756
  } | {
757
757
  name: "ttd";
758
758
  tab: "mermaid" | "text-to-diagram";
@@ -969,7 +969,7 @@ export declare const actionChangeOpacity: {
969
969
  tab?: string | undefined;
970
970
  } | null;
971
971
  openDialog: {
972
- name: "imageExport" | "help" | "jsonExport";
972
+ name: "help" | "imageExport" | "jsonExport";
973
973
  } | {
974
974
  name: "ttd";
975
975
  tab: "mermaid" | "text-to-diagram";
@@ -1187,7 +1187,7 @@ export declare const actionChangeFontSize: {
1187
1187
  tab?: string | undefined;
1188
1188
  } | null;
1189
1189
  openDialog: {
1190
- name: "imageExport" | "help" | "jsonExport";
1190
+ name: "help" | "imageExport" | "jsonExport";
1191
1191
  } | {
1192
1192
  name: "ttd";
1193
1193
  tab: "mermaid" | "text-to-diagram";
@@ -1405,7 +1405,7 @@ export declare const actionDecreaseFontSize: {
1405
1405
  tab?: string | undefined;
1406
1406
  } | null;
1407
1407
  openDialog: {
1408
- name: "imageExport" | "help" | "jsonExport";
1408
+ name: "help" | "imageExport" | "jsonExport";
1409
1409
  } | {
1410
1410
  name: "ttd";
1411
1411
  tab: "mermaid" | "text-to-diagram";
@@ -1623,7 +1623,7 @@ export declare const actionIncreaseFontSize: {
1623
1623
  tab?: string | undefined;
1624
1624
  } | null;
1625
1625
  openDialog: {
1626
- name: "imageExport" | "help" | "jsonExport";
1626
+ name: "help" | "imageExport" | "jsonExport";
1627
1627
  } | {
1628
1628
  name: "ttd";
1629
1629
  tab: "mermaid" | "text-to-diagram";
@@ -1839,7 +1839,7 @@ export declare const actionChangeFontFamily: {
1839
1839
  tab?: string | undefined;
1840
1840
  } | null;
1841
1841
  openDialog: {
1842
- name: "imageExport" | "help" | "jsonExport";
1842
+ name: "help" | "imageExport" | "jsonExport";
1843
1843
  } | {
1844
1844
  name: "ttd";
1845
1845
  tab: "mermaid" | "text-to-diagram";
@@ -2047,7 +2047,7 @@ export declare const actionChangeFontFamily: {
2047
2047
  tab?: string | undefined;
2048
2048
  } | null;
2049
2049
  openDialog: {
2050
- name: "imageExport" | "help" | "jsonExport";
2050
+ name: "help" | "imageExport" | "jsonExport";
2051
2051
  } | {
2052
2052
  name: "ttd";
2053
2053
  tab: "mermaid" | "text-to-diagram";
@@ -2264,7 +2264,7 @@ export declare const actionChangeTextAlign: {
2264
2264
  tab?: string | undefined;
2265
2265
  } | null;
2266
2266
  openDialog: {
2267
- name: "imageExport" | "help" | "jsonExport";
2267
+ name: "help" | "imageExport" | "jsonExport";
2268
2268
  } | {
2269
2269
  name: "ttd";
2270
2270
  tab: "mermaid" | "text-to-diagram";
@@ -2483,7 +2483,7 @@ export declare const actionChangeVerticalAlign: {
2483
2483
  tab?: string | undefined;
2484
2484
  } | null;
2485
2485
  openDialog: {
2486
- name: "imageExport" | "help" | "jsonExport";
2486
+ name: "help" | "imageExport" | "jsonExport";
2487
2487
  } | {
2488
2488
  name: "ttd";
2489
2489
  tab: "mermaid" | "text-to-diagram";
@@ -2700,7 +2700,7 @@ export declare const actionChangeRoundness: {
2700
2700
  tab?: string | undefined;
2701
2701
  } | null;
2702
2702
  openDialog: {
2703
- name: "imageExport" | "help" | "jsonExport";
2703
+ name: "help" | "imageExport" | "jsonExport";
2704
2704
  } | {
2705
2705
  name: "ttd";
2706
2706
  tab: "mermaid" | "text-to-diagram";
@@ -2920,7 +2920,7 @@ export declare const actionChangeArrowhead: {
2920
2920
  tab?: string | undefined;
2921
2921
  } | null;
2922
2922
  openDialog: {
2923
- name: "imageExport" | "help" | "jsonExport";
2923
+ name: "help" | "imageExport" | "jsonExport";
2924
2924
  } | {
2925
2925
  name: "ttd";
2926
2926
  tab: "mermaid" | "text-to-diagram";
@@ -3137,7 +3137,7 @@ export declare const actionChangeArrowType: {
3137
3137
  tab?: string | undefined;
3138
3138
  } | null;
3139
3139
  openDialog: {
3140
- name: "imageExport" | "help" | "jsonExport";
3140
+ name: "help" | "imageExport" | "jsonExport";
3141
3141
  } | {
3142
3142
  name: "ttd";
3143
3143
  tab: "mermaid" | "text-to-diagram";
@@ -91,7 +91,7 @@ export declare const actionSelectAll: {
91
91
  tab?: string | undefined;
92
92
  } | null;
93
93
  openDialog: {
94
- name: "imageExport" | "help" | "jsonExport";
94
+ name: "help" | "imageExport" | "jsonExport";
95
95
  } | {
96
96
  name: "ttd";
97
97
  tab: "mermaid" | "text-to-diagram";
@@ -84,7 +84,7 @@ export declare const actionCopyStyles: {
84
84
  tab?: string | undefined;
85
85
  } | null;
86
86
  openDialog: {
87
- name: "imageExport" | "help" | "jsonExport";
87
+ name: "help" | "imageExport" | "jsonExport";
88
88
  } | {
89
89
  name: "ttd";
90
90
  tab: "mermaid" | "text-to-diagram";
@@ -86,7 +86,7 @@ export declare const actionToggleGridMode: {
86
86
  tab?: string | undefined;
87
87
  } | null;
88
88
  openDialog: {
89
- name: "imageExport" | "help" | "jsonExport";
89
+ name: "help" | "imageExport" | "jsonExport";
90
90
  } | {
91
91
  name: "ttd";
92
92
  tab: "mermaid" | "text-to-diagram";
@@ -84,7 +84,7 @@ export declare const actionToggleObjectsSnapMode: {
84
84
  tab?: string | undefined;
85
85
  } | null;
86
86
  openDialog: {
87
- name: "imageExport" | "help" | "jsonExport";
87
+ name: "help" | "imageExport" | "jsonExport";
88
88
  } | {
89
89
  name: "ttd";
90
90
  tab: "mermaid" | "text-to-diagram";
@@ -82,7 +82,7 @@ export declare const actionToggleSearchMenu: {
82
82
  openMenu: "canvas" | "shape" | null;
83
83
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
84
84
  openDialog: {
85
- name: "imageExport" | "help" | "jsonExport";
85
+ name: "help" | "imageExport" | "jsonExport";
86
86
  } | {
87
87
  name: "ttd";
88
88
  tab: "mermaid" | "text-to-diagram";
@@ -87,7 +87,7 @@ export declare const actionToggleStats: {
87
87
  tab?: string | undefined;
88
88
  } | null;
89
89
  openDialog: {
90
- name: "imageExport" | "help" | "jsonExport";
90
+ name: "help" | "imageExport" | "jsonExport";
91
91
  } | {
92
92
  name: "ttd";
93
93
  tab: "mermaid" | "text-to-diagram";
@@ -84,7 +84,7 @@ export declare const actionToggleViewMode: {
84
84
  tab?: string | undefined;
85
85
  } | null;
86
86
  openDialog: {
87
- name: "imageExport" | "help" | "jsonExport";
87
+ name: "help" | "imageExport" | "jsonExport";
88
88
  } | {
89
89
  name: "ttd";
90
90
  tab: "mermaid" | "text-to-diagram";
@@ -84,7 +84,7 @@ export declare const actionToggleZenMode: {
84
84
  tab?: string | undefined;
85
85
  } | null;
86
86
  openDialog: {
87
- name: "imageExport" | "help" | "jsonExport";
87
+ name: "help" | "imageExport" | "jsonExport";
88
88
  } | {
89
89
  name: "ttd";
90
90
  tab: "mermaid" | "text-to-diagram";
@@ -1,4 +1,4 @@
1
1
  import type { SubtypeOf } from "../utility-types";
2
2
  import type { ActionName } from "./types";
3
- export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "clearCanvas" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "toggleLaserPointerTool" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "toggleEraserTool" | "toggleHandTool" | "setFrameAsActiveTool" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts"> | "saveScene" | "imageExport" | "commandPalette" | "searchMenu";
3
+ export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "clearCanvas" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "toggleLaserPointerTool" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "toggleEraserTool" | "toggleHandTool" | "setFrameAsActiveTool" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts" | "wrapSelectionInFrame"> | "saveScene" | "imageExport" | "commandPalette" | "searchMenu";
4
4
  export declare const getShortcutFromShortcutName: (name: ShortcutName, idx?: number) => string;
@@ -14,7 +14,7 @@ export type ActionResult = {
14
14
  type ActionFn = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
15
15
  export type UpdaterFn = (res: ActionResult) => void;
16
16
  export type ActionFilterFn = (action: Action) => void;
17
- export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "toggleLaserPointerTool" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor";
17
+ export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "toggleLaserPointerTool" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame";
18
18
  export type PanelComponentProps = {
19
19
  elements: readonly ExcalidrawElement[];
20
20
  appState: AppState;
@@ -1,4 +1,4 @@
1
- export declare const activeConfirmDialogAtom: import("jotai").PrimitiveAtom<"clearCanvas" | null> & {
1
+ export declare const activeConfirmDialogAtom: import("jotai/vanilla/atom").PrimitiveAtom<"clearCanvas" | null> & {
2
2
  init: "clearCanvas" | null;
3
3
  };
4
4
  export declare const ActiveConfirmDialog: () => JSX.Element | null;
@@ -14,7 +14,7 @@ export declare const isCustomColor: ({ color, palette, }: {
14
14
  }) => boolean;
15
15
  export declare const getMostUsedCustomColors: (elements: readonly ExcalidrawElement[], type: "elementBackground" | "elementStroke", palette: ColorPaletteCustom) => string[];
16
16
  export type ActiveColorPickerSectionAtomType = "custom" | "baseColors" | "shades" | "hex" | null;
17
- export declare const activeColorPickerSectionAtom: import("jotai").PrimitiveAtom<ActiveColorPickerSectionAtomType> & {
17
+ export declare const activeColorPickerSectionAtom: import("jotai/vanilla/atom").PrimitiveAtom<ActiveColorPickerSectionAtomType> & {
18
18
  init: ActiveColorPickerSectionAtomType;
19
19
  };
20
20
  export declare const getContrastYIQ: (bgHex: string, isCustomColor: boolean) => "white" | "black";
@@ -13,7 +13,7 @@ export type EyeDropperProperties = {
13
13
  **/
14
14
  colorPickerType: ColorPickerType;
15
15
  };
16
- export declare const activeEyeDropperAtom: import("jotai").PrimitiveAtom<EyeDropperProperties | null> & {
16
+ export declare const activeEyeDropperAtom: import("jotai/vanilla/atom").PrimitiveAtom<EyeDropperProperties | null> & {
17
17
  init: EyeDropperProperties | null;
18
18
  };
19
19
  export declare const EyeDropper: React.FC<{
@@ -1,5 +1,5 @@
1
1
  import "./IconPicker.scss";
2
- export declare function IconPicker<T>({ value, label, options, onChange, group, }: {
2
+ export declare function IconPicker<T>({ value, label, options, onChange, group, numberOfOptionsToAlwaysShow, }: {
3
3
  label: string;
4
4
  value: T;
5
5
  options: readonly {
@@ -7,8 +7,8 @@ export declare function IconPicker<T>({ value, label, options, onChange, group,
7
7
  text: string;
8
8
  icon: JSX.Element;
9
9
  keyBinding: string | null;
10
- showInPicker?: boolean;
11
10
  }[];
12
11
  onChange: (value: T) => void;
12
+ numberOfOptionsToAlwaysShow?: number;
13
13
  group?: string;
14
14
  }): JSX.Element;
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import type Library from "../data/library";
3
3
  import type { LibraryItems, LibraryItem, ExcalidrawProps, UIAppState } from "../types";
4
4
  import "./LibraryMenu.scss";
5
- export declare const isLibraryMenuOpenAtom: import("jotai").PrimitiveAtom<boolean> & {
5
+ export declare const isLibraryMenuOpenAtom: import("jotai/vanilla/atom").PrimitiveAtom<boolean> & {
6
6
  init: boolean;
7
7
  };
8
8
  export declare const LibraryMenuContent: ({ onInsertLibraryItems, pendingElements, onAddToLibrary, setAppState, libraryReturnUrl, library, id, theme, selectedItems, onSelectItems, }: {
@@ -11,7 +11,7 @@ export type OverwriteConfirmState = {
11
11
  } | {
12
12
  active: false;
13
13
  };
14
- export declare const overwriteConfirmStateAtom: import("jotai").PrimitiveAtom<OverwriteConfirmState> & {
14
+ export declare const overwriteConfirmStateAtom: import("jotai/vanilla/atom").PrimitiveAtom<OverwriteConfirmState> & {
15
15
  init: OverwriteConfirmState;
16
16
  };
17
17
  export declare function openConfirmModal({ title, description, actionLabel, color, }: {
@@ -1,5 +1,5 @@
1
1
  import "./SearchMenu.scss";
2
- export declare const searchItemInFocusAtom: import("jotai").PrimitiveAtom<number | null> & {
2
+ export declare const searchItemInFocusAtom: import("jotai/vanilla/atom").PrimitiveAtom<number | null> & {
3
3
  init: number | null;
4
4
  };
5
5
  export declare const SearchMenu: () => JSX.Element;
@@ -8,7 +8,7 @@ import "./Sidebar.scss";
8
8
  *
9
9
  * Since we can only render one Sidebar at a time, we can use a simple flag.
10
10
  */
11
- export declare const isSidebarDockedAtom: import("jotai").PrimitiveAtom<boolean> & {
11
+ export declare const isSidebarDockedAtom: import("jotai/vanilla/atom").PrimitiveAtom<boolean> & {
12
12
  init: boolean;
13
13
  };
14
14
  export declare const SidebarInner: React.ForwardRefExoticComponent<Omit<{
@@ -3,6 +3,7 @@ interface CollapsibleProps {
3
3
  open: boolean;
4
4
  openTrigger: () => void;
5
5
  children: React.ReactNode;
6
+ className?: string;
6
7
  }
7
- declare const Collapsible: ({ label, open, openTrigger, children, }: CollapsibleProps) => JSX.Element;
8
+ declare const Collapsible: ({ label, open, openTrigger, children, className, }: CollapsibleProps) => JSX.Element;
8
9
  export default Collapsible;
@@ -136,6 +136,15 @@ export declare const ArrowheadDiamondIcon: React.MemoExoticComponent<({ flip }:
136
136
  export declare const ArrowheadDiamondOutlineIcon: React.MemoExoticComponent<({ flip }: {
137
137
  flip?: boolean | undefined;
138
138
  }) => JSX.Element>;
139
+ export declare const ArrowheadCrowfootIcon: React.MemoExoticComponent<({ flip }: {
140
+ flip?: boolean | undefined;
141
+ }) => JSX.Element>;
142
+ export declare const ArrowheadCrowfootOneIcon: React.MemoExoticComponent<({ flip }: {
143
+ flip?: boolean | undefined;
144
+ }) => JSX.Element>;
145
+ export declare const ArrowheadCrowfootOneOrManyIcon: React.MemoExoticComponent<({ flip }: {
146
+ flip?: boolean | undefined;
147
+ }) => JSX.Element>;
139
148
  export declare const FontSizeSmallIcon: JSX.Element;
140
149
  export declare const FontSizeMediumIcon: JSX.Element;
141
150
  export declare const FontSizeLargeIcon: JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  import tunnel from "tunnel-rat";
3
+ import { createIsolation } from "jotai-scope";
3
4
  export type Tunnel = ReturnType<typeof tunnel>;
4
5
  type TunnelsContextValue = {
5
6
  MainMenuTunnel: Tunnel;
@@ -12,7 +13,7 @@ type TunnelsContextValue = {
12
13
  DefaultSidebarTabTriggersTunnel: Tunnel;
13
14
  OverwriteConfirmDialogTunnel: Tunnel;
14
15
  TTDDialogTriggerTunnel: Tunnel;
15
- jotaiScope: symbol;
16
+ tunnelsJotai: ReturnType<typeof createIsolation>;
16
17
  };
17
18
  export declare const TunnelsContext: React.Context<TunnelsContextValue>;
18
19
  export declare const useTunnels: () => TunnelsContextValue;
@@ -12,9 +12,10 @@ export declare const fileSave: (blob: Blob | Promise<Blob>, opts: {
12
12
  name: string;
13
13
  /** file extension */
14
14
  extension: FILE_EXTENSION;
15
+ mimeTypes?: string[];
15
16
  description: string;
16
17
  /** existing FileSystemHandle */
17
18
  fileHandle?: FileSystemHandle | null;
18
19
  }) => Promise<FileSystemHandle | null>;
19
- export type { FileSystemHandle };
20
20
  export { nativeFileSystemSupported };
21
+ export type { FileSystemHandle };
@@ -7,9 +7,3 @@ export declare const encodePngMetadata: ({ blob, metadata, }: {
7
7
  metadata: string;
8
8
  }) => Promise<Blob>;
9
9
  export declare const decodePngMetadata: (blob: Blob) => Promise<string>;
10
- export declare const encodeSvgMetadata: ({ text }: {
11
- text: string;
12
- }) => string;
13
- export declare const decodeSvgMetadata: ({ svg }: {
14
- svg: string;
15
- }) => string;
@@ -37,7 +37,7 @@ export interface LibraryMigrationAdapter {
37
37
  /** clears entire storage afterwards */
38
38
  clear(): MaybePromise<void>;
39
39
  }
40
- export declare const libraryItemsAtom: import("jotai").PrimitiveAtom<{
40
+ export declare const libraryItemsAtom: import("jotai/vanilla/atom").PrimitiveAtom<{
41
41
  status: "loading" | "loaded";
42
42
  /** indicates whether library is initialized with library items (has gone
43
43
  * through at least one update). Used in UI. Specific to this atom only. */
@@ -83,6 +83,7 @@ declare class Library {
83
83
  }
84
84
  export default Library;
85
85
  export declare const distributeLibraryItemsOnSquareGrid: (libraryItems: LibraryItems) => ExcalidrawElement[];
86
+ declare const validateLibraryUrl: (libraryUrl: string, validator?: ((libraryUrl: string) => boolean) | undefined) => boolean;
86
87
  export declare const parseLibraryTokensFromUrl: () => {
87
88
  libraryUrl: string;
88
89
  idToken: string | null;
@@ -90,9 +91,14 @@ export declare const parseLibraryTokensFromUrl: () => {
90
91
  export declare const getLibraryItemsHash: (items: LibraryItems) => number;
91
92
  export declare const useHandleLibrary: (opts: {
92
93
  excalidrawAPI: ExcalidrawImperativeAPI | null;
94
+ /**
95
+ * Return `true` if the library install url should be allowed.
96
+ * If not supplied, only the excalidraw.com base domain is allowed.
97
+ */
98
+ validateLibraryUrl?: ((libraryUrl: string) => boolean) | undefined;
93
99
  } & ({
94
100
  /** @deprecated we recommend using `opts.adapter` instead */
95
- getInitialLibraryItems?: () => MaybePromise<LibraryItemsSource>;
101
+ getInitialLibraryItems?: (() => MaybePromise<LibraryItemsSource>) | undefined;
96
102
  } | {
97
103
  adapter: LibraryPersistenceAdapter;
98
104
  /**
@@ -102,5 +108,5 @@ export declare const useHandleLibrary: (opts: {
102
108
  *
103
109
  * Can be a different LibraryPersistenceAdapter.
104
110
  */
105
- migrationAdapter?: LibraryMigrationAdapter;
111
+ migrationAdapter?: LibraryMigrationAdapter | undefined;
106
112
  })) => void;
@@ -1,4 +1,3 @@
1
- export declare const sanitizeHTMLAttribute: (html: string) => string;
2
1
  export declare const normalizeLink: (link: string) => string;
3
2
  export declare const isLocalLink: (link: string | null) => boolean;
4
3
  /**
@@ -0,0 +1,56 @@
1
+ import { atom, createStore, type PrimitiveAtom } from "jotai";
2
+ import { createIsolation } from "jotai-scope";
3
+ export { atom, PrimitiveAtom };
4
+ export declare const useAtom: typeof import("jotai").useAtom, useSetAtom: typeof import("jotai").useSetAtom, useAtomValue: typeof import("jotai").useAtomValue, useStore: (options?: {
5
+ store?: {
6
+ get: <Value>(atom: import("jotai").Atom<Value>) => Value;
7
+ set: <Value_1, Args extends unknown[], Result>(atom: import("jotai").WritableAtom<Value_1, Args, Result>, ...args: Args) => Result;
8
+ sub: (atom: import("jotai").Atom<unknown>, listener: () => void) => () => void;
9
+ } | ({
10
+ get: <Value_2>(atom: import("jotai").Atom<Value_2>) => Value_2;
11
+ set: <Value_1_1, Args_1 extends unknown[], Result_1>(atom: import("jotai").WritableAtom<Value_1_1, Args_1, Result_1>, ...args: Args_1) => Result_1;
12
+ sub: (atom: import("jotai").Atom<unknown>, listener: () => void) => () => void;
13
+ } & {
14
+ dev4_get_internal_weak_map: () => WeakMap<import("jotai").Atom<unknown>, {
15
+ readonly d: Map<import("jotai").Atom<unknown>, number>;
16
+ readonly p: Set<import("jotai").Atom<unknown>>;
17
+ n: number;
18
+ m?: {
19
+ readonly l: Set<() => void>;
20
+ readonly d: Set<import("jotai").Atom<unknown>>;
21
+ readonly t: Set<import("jotai").Atom<unknown>>;
22
+ u?: (() => void) | undefined;
23
+ } | undefined;
24
+ v?: unknown;
25
+ e?: unknown;
26
+ }>;
27
+ dev4_get_mounted_atoms: () => Set<import("jotai").Atom<unknown>>;
28
+ dev4_restore_atoms: (values: Iterable<readonly [import("jotai").Atom<unknown>, unknown]>) => void;
29
+ }) | undefined;
30
+ } | undefined) => {
31
+ get: <Value_3>(atom: import("jotai").Atom<Value_3>) => Value_3;
32
+ set: <Value_1_2, Args_2 extends unknown[], Result_2>(atom: import("jotai").WritableAtom<Value_1_2, Args_2, Result_2>, ...args: Args_2) => Result_2;
33
+ sub: (atom: import("jotai").Atom<unknown>, listener: () => void) => () => void;
34
+ } | ({
35
+ get: <Value_4>(atom: import("jotai").Atom<Value_4>) => Value_4;
36
+ set: <Value_1_3, Args_3 extends unknown[], Result_3>(atom: import("jotai").WritableAtom<Value_1_3, Args_3, Result_3>, ...args: Args_3) => Result_3;
37
+ sub: (atom: import("jotai").Atom<unknown>, listener: () => void) => () => void;
38
+ } & {
39
+ dev4_get_internal_weak_map: () => WeakMap<import("jotai").Atom<unknown>, {
40
+ readonly d: Map<import("jotai").Atom<unknown>, number>;
41
+ readonly p: Set<import("jotai").Atom<unknown>>;
42
+ n: number;
43
+ m?: {
44
+ readonly l: Set<() => void>;
45
+ readonly d: Set<import("jotai").Atom<unknown>>;
46
+ readonly t: Set<import("jotai").Atom<unknown>>;
47
+ u?: (() => void) | undefined;
48
+ } | undefined;
49
+ v?: unknown;
50
+ e?: unknown;
51
+ }>;
52
+ dev4_get_mounted_atoms: () => Set<import("jotai").Atom<unknown>>;
53
+ dev4_restore_atoms: (values: Iterable<readonly [import("jotai").Atom<unknown>, unknown]>) => void;
54
+ });
55
+ export declare const EditorJotaiProvider: ReturnType<typeof createIsolation>["Provider"];
56
+ export declare const editorJotaiStore: ReturnType<typeof createStore>;
@@ -37,7 +37,6 @@ export declare const updateBoundElements: (changedElement: NonDeletedExcalidrawE
37
37
  height: number;
38
38
  };
39
39
  changedElements?: Map<string, OrderedExcalidrawElement>;
40
- zoom?: AppState["zoom"];
41
40
  }) => void;
42
41
  export declare const getHeadingForElbowArrowSnap: (p: Readonly<GlobalPoint>, otherPoint: Readonly<GlobalPoint>, bindableElement: ExcalidrawBindableElement | undefined | null, aabb: Bounds | undefined | null, elementsMap: ElementsMap, origPoint: GlobalPoint, zoom?: AppState["zoom"]) => Heading;
43
42
  export declare const bindPointToSnapToElementOutline: (p: Readonly<GlobalPoint>, otherPoint: Readonly<GlobalPoint>, bindableElement: ExcalidrawBindableElement | undefined, elementsMap: ElementsMap) => GlobalPoint;
@@ -98,5 +97,6 @@ export declare class BindableElement {
98
97
  static rebindAffected: (elements: ElementsMap, bindableElement: ExcalidrawElement | undefined, updateElementWith: (affected: ExcalidrawElement, updates: ElementUpdate<ExcalidrawElement>) => void) => void;
99
98
  }
100
99
  export declare const getGlobalFixedPointForBindableElement: (fixedPointRatio: [number, number], element: ExcalidrawBindableElement) => GlobalPoint;
100
+ export declare const getGlobalFixedPoints: (arrow: ExcalidrawElbowArrowElement, elementsMap: ElementsMap) => [GlobalPoint, GlobalPoint];
101
101
  export declare const getArrowLocalFixedPoints: (arrow: ExcalidrawElbowArrowElement, elementsMap: ElementsMap) => LocalPoint[];
102
102
  export declare const normalizeFixedPoint: <T extends FixedPoint | null>(fixedPoint: T) => T extends null ? null : FixedPoint;
@@ -0,0 +1,14 @@
1
+ import { type LocalPoint } from "../../math";
2
+ import { type ElementUpdate } from "./mutateElement";
3
+ import { type ExcalidrawElbowArrowElement, type NonDeletedSceneElementsMap, type SceneElementsMap } from "./types";
4
+ import type { FixedSegment } from "./types";
5
+ export declare const BASE_PADDING = 40;
6
+ /**
7
+ *
8
+ */
9
+ export declare const updateElbowArrowPoints: (arrow: Readonly<ExcalidrawElbowArrowElement>, elementsMap: NonDeletedSceneElementsMap | SceneElementsMap, updates: {
10
+ points?: readonly LocalPoint[];
11
+ fixedSegments?: FixedSegment[] | null;
12
+ }, options?: {
13
+ isDragging?: boolean;
14
+ }) => ElementUpdate<ExcalidrawElbowArrowElement>;
@@ -88,7 +88,7 @@ export declare const actionSetEmbeddableAsActiveTool: {
88
88
  tab?: string | undefined;
89
89
  } | null;
90
90
  openDialog: {
91
- name: "imageExport" | "help" | "jsonExport";
91
+ name: "help" | "imageExport" | "jsonExport";
92
92
  } | {
93
93
  name: "ttd";
94
94
  tab: "mermaid" | "text-to-diagram";
@@ -7,6 +7,10 @@ export declare const HEADING_UP: Heading;
7
7
  export type Heading = [1, 0] | [0, 1] | [-1, 0] | [0, -1];
8
8
  export declare const headingForDiamond: <Point extends GlobalPoint | LocalPoint>(a: Point, b: Point) => Heading;
9
9
  export declare const vectorToHeading: (vec: Vector) => Heading;
10
+ export declare const headingForPoint: <P extends GlobalPoint | LocalPoint>(p: P, o: P) => Heading;
11
+ export declare const headingForPointIsHorizontal: <P extends GlobalPoint | LocalPoint>(p: P, o: P) => boolean;
10
12
  export declare const compareHeading: (a: Heading, b: Heading) => boolean;
11
- export declare const headingForPointFromElement: <Point extends GlobalPoint | LocalPoint>(element: Readonly<ExcalidrawBindableElement>, aabb: readonly [minX: number, minY: number, maxX: number, maxY: number], p: Readonly<LocalPoint | GlobalPoint>) => Heading;
13
+ export declare const headingIsHorizontal: (a: Heading) => boolean;
14
+ export declare const headingIsVertical: (a: Heading) => boolean;
15
+ export declare const headingForPointFromElement: <Point extends GlobalPoint | LocalPoint>(element: Readonly<ExcalidrawBindableElement>, aabb: readonly [minX: number, minY: number, maxX: number, maxY: number], p: Readonly<Point>) => Heading;
12
16
  export declare const flipHeading: (h: Heading) => Heading;