@zsviczian/excalidraw 0.17.1-obsidian-14 → 0.17.1-obsidian-16

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 (74) hide show
  1. package/dist/excalidraw.development.js +118 -96
  2. package/dist/excalidraw.production.min.js +1 -1
  3. package/dist/styles.development.css +405 -357
  4. package/dist/styles.production.css +12 -12
  5. package/package.json +2 -2
  6. package/types/excalidraw/actions/actionAddToLibrary.d.ts +6 -6
  7. package/types/excalidraw/actions/actionBoundText.d.ts +4 -4
  8. package/types/excalidraw/actions/actionCanvas.d.ts +28 -28
  9. package/types/excalidraw/actions/actionClipboard.d.ts +14 -14
  10. package/types/excalidraw/actions/actionDeleteSelected.d.ts +7 -7
  11. package/types/excalidraw/actions/actionDuplicateSelection.d.ts +1 -1
  12. package/types/excalidraw/actions/actionElementLock.d.ts +4 -4
  13. package/types/excalidraw/actions/actionExport.d.ts +18 -18
  14. package/types/excalidraw/actions/actionFinalize.d.ts +4 -4
  15. package/types/excalidraw/actions/actionFrame.d.ts +6 -6
  16. package/types/excalidraw/actions/actionGroup.d.ts +4 -4
  17. package/types/excalidraw/actions/actionLinearEditor.d.ts +2 -2
  18. package/types/excalidraw/actions/actionLink.d.ts +197 -0
  19. package/types/excalidraw/actions/actionMenu.d.ts +6 -6
  20. package/types/excalidraw/actions/actionNavigate.d.ts +4 -4
  21. package/types/excalidraw/actions/actionProperties.d.ts +26 -26
  22. package/types/excalidraw/actions/actionSelectAll.d.ts +2 -2
  23. package/types/excalidraw/actions/actionStyles.d.ts +2 -2
  24. package/types/excalidraw/actions/actionToggleGridMode.d.ts +2 -2
  25. package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +2 -2
  26. package/types/excalidraw/actions/actionToggleStats.d.ts +2 -2
  27. package/types/excalidraw/actions/actionToggleViewMode.d.ts +2 -2
  28. package/types/excalidraw/actions/actionToggleZenMode.d.ts +2 -2
  29. package/types/excalidraw/actions/index.d.ts +1 -1
  30. package/types/excalidraw/animated-trail.d.ts +1 -1
  31. package/types/excalidraw/appState.d.ts +1 -1
  32. package/types/excalidraw/components/App.d.ts +3 -0
  33. package/types/excalidraw/components/Button.d.ts +1 -0
  34. package/types/excalidraw/components/FilledButton.d.ts +2 -2
  35. package/types/excalidraw/components/ImageExportDialog.d.ts +2 -1
  36. package/types/excalidraw/components/LaserTool/LaserPathManager.d.ts +28 -0
  37. package/types/excalidraw/components/LaserTool/LaserPointerButton.d.ts +10 -0
  38. package/types/excalidraw/components/LaserTool/LaserTool.d.ts +7 -0
  39. package/types/excalidraw/components/ProjectName.d.ts +0 -1
  40. package/types/excalidraw/components/TextField.d.ts +5 -2
  41. package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +18 -0
  42. package/types/excalidraw/components/hyperlink/helpers.d.ts +7 -0
  43. package/types/excalidraw/constants.d.ts +5 -0
  44. package/types/excalidraw/data/filesystem.d.ts +1 -1
  45. package/types/excalidraw/data/index.d.ts +2 -1
  46. package/types/excalidraw/data/json.d.ts +1 -1
  47. package/types/excalidraw/data/resave.d.ts +1 -1
  48. package/types/excalidraw/element/ElementCanvasButtons.d.ts +3 -2
  49. package/types/excalidraw/element/binding.d.ts +9 -9
  50. package/types/excalidraw/element/bounds.d.ts +6 -6
  51. package/types/excalidraw/element/collision.d.ts +8 -8
  52. package/types/excalidraw/element/embeddable.d.ts +2 -2
  53. package/types/excalidraw/element/linearElementEditor.d.ts +30 -30
  54. package/types/excalidraw/element/newElement.d.ts +4 -4
  55. package/types/excalidraw/element/resizeElements.d.ts +1 -1
  56. package/types/excalidraw/element/resizeTest.d.ts +3 -3
  57. package/types/excalidraw/element/sizeHelpers.d.ts +2 -2
  58. package/types/excalidraw/element/textElement.d.ts +5 -5
  59. package/types/excalidraw/element/transformHandles.d.ts +2 -2
  60. package/types/excalidraw/example/App.d.ts +14 -0
  61. package/types/excalidraw/example/CustomFooter.d.ts +5 -0
  62. package/types/excalidraw/example/MobileFooter.d.ts +5 -0
  63. package/types/excalidraw/example/index.d.ts +1 -0
  64. package/types/excalidraw/example/initialData.d.ts +290 -0
  65. package/types/excalidraw/example/sidebar/ExampleSidebar.d.ts +4 -0
  66. package/types/excalidraw/frame.d.ts +11 -11
  67. package/types/excalidraw/history.d.ts +1 -1
  68. package/types/excalidraw/scene/Scene.d.ts +2 -7
  69. package/types/excalidraw/scene/scrollbars.d.ts +3 -2
  70. package/types/excalidraw/scene/selection.d.ts +3 -3
  71. package/types/excalidraw/snapping.d.ts +7 -7
  72. package/types/excalidraw/types.d.ts +5 -3
  73. package/types/excalidraw/vite.config.d.mts +2 -0
  74. package/types/utils/index.d.ts +1 -0
@@ -82,7 +82,7 @@ export declare const actionChangeFillStyle: {
82
82
  scrollY: number;
83
83
  cursorButton: "up" | "down";
84
84
  scrolledOutside: boolean;
85
- name: string;
85
+ name: string | null;
86
86
  isResizing: boolean;
87
87
  isRotating: boolean;
88
88
  zoom: Readonly<{
@@ -160,7 +160,7 @@ export declare const actionChangeFillStyle: {
160
160
  data: import("../charts").Spreadsheet;
161
161
  };
162
162
  pendingImageElementId: string | null;
163
- showHyperlinkPopup: false | "editor" | "info";
163
+ showHyperlinkPopup: false | "info" | "editor";
164
164
  linkOpacity: number;
165
165
  trayModeEnabled: boolean;
166
166
  colorPalette?: {
@@ -273,7 +273,7 @@ export declare const actionChangeStrokeWidth: {
273
273
  scrollY: number;
274
274
  cursorButton: "up" | "down";
275
275
  scrolledOutside: boolean;
276
- name: string;
276
+ name: string | null;
277
277
  isResizing: boolean;
278
278
  isRotating: boolean;
279
279
  zoom: Readonly<{
@@ -351,7 +351,7 @@ export declare const actionChangeStrokeWidth: {
351
351
  data: import("../charts").Spreadsheet;
352
352
  };
353
353
  pendingImageElementId: string | null;
354
- showHyperlinkPopup: false | "editor" | "info";
354
+ showHyperlinkPopup: false | "info" | "editor";
355
355
  linkOpacity: number;
356
356
  trayModeEnabled: boolean;
357
357
  colorPalette?: {
@@ -464,7 +464,7 @@ export declare const actionChangeSloppiness: {
464
464
  scrollY: number;
465
465
  cursorButton: "up" | "down";
466
466
  scrolledOutside: boolean;
467
- name: string;
467
+ name: string | null;
468
468
  isResizing: boolean;
469
469
  isRotating: boolean;
470
470
  zoom: Readonly<{
@@ -542,7 +542,7 @@ export declare const actionChangeSloppiness: {
542
542
  data: import("../charts").Spreadsheet;
543
543
  };
544
544
  pendingImageElementId: string | null;
545
- showHyperlinkPopup: false | "editor" | "info";
545
+ showHyperlinkPopup: false | "info" | "editor";
546
546
  linkOpacity: number;
547
547
  trayModeEnabled: boolean;
548
548
  colorPalette?: {
@@ -655,7 +655,7 @@ export declare const actionChangeStrokeStyle: {
655
655
  scrollY: number;
656
656
  cursorButton: "up" | "down";
657
657
  scrolledOutside: boolean;
658
- name: string;
658
+ name: string | null;
659
659
  isResizing: boolean;
660
660
  isRotating: boolean;
661
661
  zoom: Readonly<{
@@ -733,7 +733,7 @@ export declare const actionChangeStrokeStyle: {
733
733
  data: import("../charts").Spreadsheet;
734
734
  };
735
735
  pendingImageElementId: string | null;
736
- showHyperlinkPopup: false | "editor" | "info";
736
+ showHyperlinkPopup: false | "info" | "editor";
737
737
  linkOpacity: number;
738
738
  trayModeEnabled: boolean;
739
739
  colorPalette?: {
@@ -846,7 +846,7 @@ export declare const actionChangeOpacity: {
846
846
  scrollY: number;
847
847
  cursorButton: "up" | "down";
848
848
  scrolledOutside: boolean;
849
- name: string;
849
+ name: string | null;
850
850
  isResizing: boolean;
851
851
  isRotating: boolean;
852
852
  zoom: Readonly<{
@@ -924,7 +924,7 @@ export declare const actionChangeOpacity: {
924
924
  data: import("../charts").Spreadsheet;
925
925
  };
926
926
  pendingImageElementId: string | null;
927
- showHyperlinkPopup: false | "editor" | "info";
927
+ showHyperlinkPopup: false | "info" | "editor";
928
928
  linkOpacity: number;
929
929
  trayModeEnabled: boolean;
930
930
  colorPalette?: {
@@ -1038,7 +1038,7 @@ export declare const actionChangeFontSize: {
1038
1038
  scrollY: number;
1039
1039
  cursorButton: "up" | "down";
1040
1040
  scrolledOutside: boolean;
1041
- name: string;
1041
+ name: string | null;
1042
1042
  isResizing: boolean;
1043
1043
  isRotating: boolean;
1044
1044
  zoom: Readonly<{
@@ -1116,7 +1116,7 @@ export declare const actionChangeFontSize: {
1116
1116
  data: import("../charts").Spreadsheet;
1117
1117
  };
1118
1118
  pendingImageElementId: string | null;
1119
- showHyperlinkPopup: false | "editor" | "info";
1119
+ showHyperlinkPopup: false | "info" | "editor";
1120
1120
  linkOpacity: number;
1121
1121
  trayModeEnabled: boolean;
1122
1122
  colorPalette?: {
@@ -1229,7 +1229,7 @@ export declare const actionDecreaseFontSize: {
1229
1229
  scrollY: number;
1230
1230
  cursorButton: "up" | "down";
1231
1231
  scrolledOutside: boolean;
1232
- name: string;
1232
+ name: string | null;
1233
1233
  isResizing: boolean;
1234
1234
  isRotating: boolean;
1235
1235
  zoom: Readonly<{
@@ -1307,7 +1307,7 @@ export declare const actionDecreaseFontSize: {
1307
1307
  data: import("../charts").Spreadsheet;
1308
1308
  };
1309
1309
  pendingImageElementId: string | null;
1310
- showHyperlinkPopup: false | "editor" | "info";
1310
+ showHyperlinkPopup: false | "info" | "editor";
1311
1311
  linkOpacity: number;
1312
1312
  trayModeEnabled: boolean;
1313
1313
  colorPalette?: {
@@ -1420,7 +1420,7 @@ export declare const actionIncreaseFontSize: {
1420
1420
  scrollY: number;
1421
1421
  cursorButton: "up" | "down";
1422
1422
  scrolledOutside: boolean;
1423
- name: string;
1423
+ name: string | null;
1424
1424
  isResizing: boolean;
1425
1425
  isRotating: boolean;
1426
1426
  zoom: Readonly<{
@@ -1498,7 +1498,7 @@ export declare const actionIncreaseFontSize: {
1498
1498
  data: import("../charts").Spreadsheet;
1499
1499
  };
1500
1500
  pendingImageElementId: string | null;
1501
- showHyperlinkPopup: false | "editor" | "info";
1501
+ showHyperlinkPopup: false | "info" | "editor";
1502
1502
  linkOpacity: number;
1503
1503
  trayModeEnabled: boolean;
1504
1504
  colorPalette?: {
@@ -1611,7 +1611,7 @@ export declare const actionChangeFontFamily: {
1611
1611
  scrollY: number;
1612
1612
  cursorButton: "up" | "down";
1613
1613
  scrolledOutside: boolean;
1614
- name: string;
1614
+ name: string | null;
1615
1615
  isResizing: boolean;
1616
1616
  isRotating: boolean;
1617
1617
  zoom: Readonly<{
@@ -1689,7 +1689,7 @@ export declare const actionChangeFontFamily: {
1689
1689
  data: import("../charts").Spreadsheet;
1690
1690
  };
1691
1691
  pendingImageElementId: string | null;
1692
- showHyperlinkPopup: false | "editor" | "info";
1692
+ showHyperlinkPopup: false | "info" | "editor";
1693
1693
  linkOpacity: number;
1694
1694
  trayModeEnabled: boolean;
1695
1695
  colorPalette?: {
@@ -1802,7 +1802,7 @@ export declare const actionChangeTextAlign: {
1802
1802
  scrollY: number;
1803
1803
  cursorButton: "up" | "down";
1804
1804
  scrolledOutside: boolean;
1805
- name: string;
1805
+ name: string | null;
1806
1806
  isResizing: boolean;
1807
1807
  isRotating: boolean;
1808
1808
  zoom: Readonly<{
@@ -1880,7 +1880,7 @@ export declare const actionChangeTextAlign: {
1880
1880
  data: import("../charts").Spreadsheet;
1881
1881
  };
1882
1882
  pendingImageElementId: string | null;
1883
- showHyperlinkPopup: false | "editor" | "info";
1883
+ showHyperlinkPopup: false | "info" | "editor";
1884
1884
  linkOpacity: number;
1885
1885
  trayModeEnabled: boolean;
1886
1886
  colorPalette?: {
@@ -1995,7 +1995,7 @@ export declare const actionChangeVerticalAlign: {
1995
1995
  scrollY: number;
1996
1996
  cursorButton: "up" | "down";
1997
1997
  scrolledOutside: boolean;
1998
- name: string;
1998
+ name: string | null;
1999
1999
  isResizing: boolean;
2000
2000
  isRotating: boolean;
2001
2001
  zoom: Readonly<{
@@ -2073,7 +2073,7 @@ export declare const actionChangeVerticalAlign: {
2073
2073
  data: import("../charts").Spreadsheet;
2074
2074
  };
2075
2075
  pendingImageElementId: string | null;
2076
- showHyperlinkPopup: false | "editor" | "info";
2076
+ showHyperlinkPopup: false | "info" | "editor";
2077
2077
  linkOpacity: number;
2078
2078
  trayModeEnabled: boolean;
2079
2079
  colorPalette?: {
@@ -2186,7 +2186,7 @@ export declare const actionChangeRoundness: {
2186
2186
  scrollY: number;
2187
2187
  cursorButton: "up" | "down";
2188
2188
  scrolledOutside: boolean;
2189
- name: string;
2189
+ name: string | null;
2190
2190
  isResizing: boolean;
2191
2191
  isRotating: boolean;
2192
2192
  zoom: Readonly<{
@@ -2264,7 +2264,7 @@ export declare const actionChangeRoundness: {
2264
2264
  data: import("../charts").Spreadsheet;
2265
2265
  };
2266
2266
  pendingImageElementId: string | null;
2267
- showHyperlinkPopup: false | "editor" | "info";
2267
+ showHyperlinkPopup: false | "info" | "editor";
2268
2268
  linkOpacity: number;
2269
2269
  trayModeEnabled: boolean;
2270
2270
  colorPalette?: {
@@ -2380,7 +2380,7 @@ export declare const actionChangeArrowhead: {
2380
2380
  scrollY: number;
2381
2381
  cursorButton: "up" | "down";
2382
2382
  scrolledOutside: boolean;
2383
- name: string;
2383
+ name: string | null;
2384
2384
  isResizing: boolean;
2385
2385
  isRotating: boolean;
2386
2386
  zoom: Readonly<{
@@ -2458,7 +2458,7 @@ export declare const actionChangeArrowhead: {
2458
2458
  data: import("../charts").Spreadsheet;
2459
2459
  };
2460
2460
  pendingImageElementId: string | null;
2461
- showHyperlinkPopup: false | "editor" | "info";
2461
+ showHyperlinkPopup: false | "info" | "editor";
2462
2462
  linkOpacity: number;
2463
2463
  trayModeEnabled: boolean;
2464
2464
  colorPalette?: {
@@ -73,7 +73,7 @@ export declare const actionSelectAll: {
73
73
  scrollY: number;
74
74
  cursorButton: "up" | "down";
75
75
  scrolledOutside: boolean;
76
- name: string;
76
+ name: string | null;
77
77
  isResizing: boolean;
78
78
  isRotating: boolean;
79
79
  zoom: Readonly<{
@@ -144,7 +144,7 @@ export declare const actionSelectAll: {
144
144
  data: import("../charts").Spreadsheet;
145
145
  };
146
146
  pendingImageElementId: string | null;
147
- showHyperlinkPopup: false | "editor" | "info";
147
+ showHyperlinkPopup: false | "info" | "editor";
148
148
  linkOpacity: number;
149
149
  trayModeEnabled: boolean;
150
150
  colorPalette?: {
@@ -67,7 +67,7 @@ export declare const actionCopyStyles: {
67
67
  scrollY: number;
68
68
  cursorButton: "up" | "down";
69
69
  scrolledOutside: boolean;
70
- name: string;
70
+ name: string | null;
71
71
  isResizing: boolean;
72
72
  isRotating: boolean;
73
73
  zoom: Readonly<{
@@ -140,7 +140,7 @@ export declare const actionCopyStyles: {
140
140
  data: import("../charts").Spreadsheet;
141
141
  };
142
142
  pendingImageElementId: string | null;
143
- showHyperlinkPopup: false | "editor" | "info";
143
+ showHyperlinkPopup: false | "info" | "editor";
144
144
  linkOpacity: number;
145
145
  trayModeEnabled: boolean;
146
146
  colorPalette?: {
@@ -68,7 +68,7 @@ export declare const actionToggleGridMode: {
68
68
  scrollY: number;
69
69
  cursorButton: "up" | "down";
70
70
  scrolledOutside: boolean;
71
- name: string;
71
+ name: string | null;
72
72
  isResizing: boolean;
73
73
  isRotating: boolean;
74
74
  zoom: Readonly<{
@@ -145,7 +145,7 @@ export declare const actionToggleGridMode: {
145
145
  data: import("../charts").Spreadsheet;
146
146
  };
147
147
  pendingImageElementId: string | null;
148
- showHyperlinkPopup: false | "editor" | "info";
148
+ showHyperlinkPopup: false | "info" | "editor";
149
149
  linkOpacity: number;
150
150
  trayModeEnabled: boolean;
151
151
  colorPalette?: {
@@ -67,7 +67,7 @@ export declare const actionToggleObjectsSnapMode: {
67
67
  scrollY: number;
68
68
  cursorButton: "up" | "down";
69
69
  scrolledOutside: boolean;
70
- name: string;
70
+ name: string | null;
71
71
  isResizing: boolean;
72
72
  isRotating: boolean;
73
73
  zoom: Readonly<{
@@ -144,7 +144,7 @@ export declare const actionToggleObjectsSnapMode: {
144
144
  data: import("../charts").Spreadsheet;
145
145
  };
146
146
  pendingImageElementId: string | null;
147
- showHyperlinkPopup: false | "editor" | "info";
147
+ showHyperlinkPopup: false | "info" | "editor";
148
148
  linkOpacity: number;
149
149
  trayModeEnabled: boolean;
150
150
  colorPalette?: {
@@ -65,7 +65,7 @@ export declare const actionToggleStats: {
65
65
  scrollY: number;
66
66
  cursorButton: "up" | "down";
67
67
  scrolledOutside: boolean;
68
- name: string;
68
+ name: string | null;
69
69
  isResizing: boolean;
70
70
  isRotating: boolean;
71
71
  zoom: Readonly<{
@@ -142,7 +142,7 @@ export declare const actionToggleStats: {
142
142
  data: import("../charts").Spreadsheet;
143
143
  };
144
144
  pendingImageElementId: string | null;
145
- showHyperlinkPopup: false | "editor" | "info";
145
+ showHyperlinkPopup: false | "info" | "editor";
146
146
  linkOpacity: number;
147
147
  trayModeEnabled: boolean;
148
148
  colorPalette?: {
@@ -66,7 +66,7 @@ export declare const actionToggleViewMode: {
66
66
  scrollY: number;
67
67
  cursorButton: "up" | "down";
68
68
  scrolledOutside: boolean;
69
- name: string;
69
+ name: string | null;
70
70
  isResizing: boolean;
71
71
  isRotating: boolean;
72
72
  zoom: Readonly<{
@@ -143,7 +143,7 @@ export declare const actionToggleViewMode: {
143
143
  data: import("../charts").Spreadsheet;
144
144
  };
145
145
  pendingImageElementId: string | null;
146
- showHyperlinkPopup: false | "editor" | "info";
146
+ showHyperlinkPopup: false | "info" | "editor";
147
147
  linkOpacity: number;
148
148
  trayModeEnabled: boolean;
149
149
  colorPalette?: {
@@ -66,7 +66,7 @@ export declare const actionToggleZenMode: {
66
66
  scrollY: number;
67
67
  cursorButton: "up" | "down";
68
68
  scrolledOutside: boolean;
69
- name: string;
69
+ name: string | null;
70
70
  isResizing: boolean;
71
71
  isRotating: boolean;
72
72
  zoom: Readonly<{
@@ -143,7 +143,7 @@ export declare const actionToggleZenMode: {
143
143
  data: import("../charts").Spreadsheet;
144
144
  };
145
145
  pendingImageElementId: string | null;
146
- showHyperlinkPopup: false | "editor" | "info";
146
+ showHyperlinkPopup: false | "info" | "editor";
147
147
  linkOpacity: number;
148
148
  trayModeEnabled: boolean;
149
149
  colorPalette?: {
@@ -20,6 +20,6 @@ export { actionToggleZenMode } from "./actionToggleZenMode";
20
20
  export { actionToggleObjectsSnapMode } from "./actionToggleObjectsSnapMode";
21
21
  export { actionToggleStats } from "./actionToggleStats";
22
22
  export { actionUnbindText, actionBindText } from "./actionBoundText";
23
- export { actionLink } from "../element/Hyperlink";
23
+ export { actionLink } from "./actionLink";
24
24
  export { actionToggleElementLock } from "./actionElementLock";
25
25
  export { actionToggleLinearEditor } from "./actionLinearEditor";
@@ -1,4 +1,4 @@
1
- import { LaserPointerOptions } from "@excalidraw/laser-pointer";
1
+ import { LaserPointerOptions } from "@zsviczian/laser-pointer";
2
2
  import { AnimationFrameHandler } from "./animation-frame-handler";
3
3
  import type App from "./components/App";
4
4
  export interface Trail {
@@ -30,7 +30,7 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
30
30
  scrollY?: number | undefined;
31
31
  cursorButton?: "up" | "down" | undefined;
32
32
  scrolledOutside?: boolean | undefined;
33
- name?: string | undefined;
33
+ name?: string | null | undefined;
34
34
  zoom?: Readonly<{
35
35
  value: NormalizedZoomValue;
36
36
  }> | undefined;
@@ -232,6 +232,7 @@ declare class App extends React.Component<AppProps, AppState> {
232
232
  private getFrameNameDOMId;
233
233
  frameNameBoundsCache: FrameNameBoundsCache;
234
234
  private renderFrameNames;
235
+ private toggleOverscrollBehavior;
235
236
  render(): import("react/jsx-runtime").JSX.Element;
236
237
  focusContainer: AppClassProperties["focusContainer"];
237
238
  getSceneElementsIncludingDeleted: () => readonly ExcalidrawElement[];
@@ -388,6 +389,7 @@ declare class App extends React.Component<AppProps, AppState> {
388
389
  * GestureEvent is standardized.
389
390
  */
390
391
  private isTouchScreenMultiTouchGesture;
392
+ getName: () => string;
391
393
  private onGestureStart;
392
394
  private onGestureChange;
393
395
  private onGestureEnd;
@@ -502,4 +504,5 @@ declare global {
502
504
  };
503
505
  }
504
506
  }
507
+ export declare const createTestHook: () => void;
505
508
  export default App;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import "./Button.scss";
2
3
  interface ButtonProps extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
3
4
  type?: "button" | "submit" | "reset";
@@ -6,12 +6,12 @@ export type ButtonSize = "medium" | "large";
6
6
  export type FilledButtonProps = {
7
7
  label: string;
8
8
  children?: React.ReactNode;
9
- onClick?: () => void;
9
+ onClick?: (event: React.MouseEvent) => void;
10
10
  variant?: ButtonVariant;
11
11
  color?: ButtonColor;
12
12
  size?: ButtonSize;
13
13
  className?: string;
14
14
  fullWidth?: boolean;
15
- startIcon?: React.ReactNode;
15
+ icon?: React.ReactNode;
16
16
  };
17
17
  export declare const FilledButton: React.ForwardRefExoticComponent<FilledButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -3,11 +3,12 @@ import type { AppClassProperties, BinaryFiles, UIAppState } from "../types";
3
3
  import { NonDeletedExcalidrawElement } from "../element/types";
4
4
  import "./ImageExportDialog.scss";
5
5
  export declare const ErrorCanvasPreview: () => import("react/jsx-runtime").JSX.Element;
6
- export declare const ImageExportDialog: ({ elements, appState, files, actionManager, onExportImage, onCloseRequest, }: {
6
+ export declare const ImageExportDialog: ({ elements, appState, files, actionManager, onExportImage, onCloseRequest, name, }: {
7
7
  appState: UIAppState;
8
8
  elements: readonly NonDeletedExcalidrawElement[];
9
9
  files: BinaryFiles;
10
10
  actionManager: ActionManager;
11
11
  onExportImage: AppClassProperties["onExportImage"];
12
12
  onCloseRequest: () => void;
13
+ name: string;
13
14
  }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,28 @@
1
+ import { LaserPointer } from "@excalidraw/laser-pointer";
2
+ import App from "../App";
3
+ declare global {
4
+ interface Window {
5
+ LPM: LaserPathManager;
6
+ }
7
+ }
8
+ export declare class LaserPathManager {
9
+ private app;
10
+ private ownState;
11
+ private collaboratorsState;
12
+ private rafId;
13
+ private isDrawing;
14
+ private container;
15
+ constructor(app: App);
16
+ destroy(): void;
17
+ startPath(x: number, y: number): void;
18
+ addPointToPath(x: number, y: number): void;
19
+ endPath(): void;
20
+ private updatePath;
21
+ private isRunning;
22
+ start(svg?: SVGSVGElement): void;
23
+ stop(): void;
24
+ loop(): void;
25
+ draw(path: LaserPointer): string;
26
+ updateCollabolatorsState(): void;
27
+ update(): void;
28
+ }
@@ -0,0 +1,10 @@
1
+ import "../ToolIcon.scss";
2
+ type LaserPointerIconProps = {
3
+ title?: string;
4
+ name?: string;
5
+ checked: boolean;
6
+ onChange?(): void;
7
+ isMobile?: boolean;
8
+ };
9
+ export declare const LaserPointerButton: (props: LaserPointerIconProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,7 @@
1
+ import { LaserPathManager } from "./LaserPathManager";
2
+ import "./LaserToolOverlay.scss";
3
+ type LaserToolOverlayProps = {
4
+ manager: LaserPathManager;
5
+ };
6
+ export declare const LaserToolOverlay: ({ manager }: LaserToolOverlayProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -4,7 +4,6 @@ type Props = {
4
4
  value: string;
5
5
  onChange: (value: string) => void;
6
6
  label: string;
7
- isNameEditable: boolean;
8
7
  ignoreFocus?: boolean;
9
8
  };
10
9
  export declare const ProjectName: (props: Props) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,6 @@
1
1
  import { KeyboardEvent } from "react";
2
2
  import "./TextField.scss";
3
3
  type TextFieldProps = {
4
- value?: string;
5
4
  onChange?: (value: string) => void;
6
5
  onClick?: () => void;
7
6
  onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;
@@ -11,6 +10,10 @@ type TextFieldProps = {
11
10
  label?: string;
12
11
  placeholder?: string;
13
12
  isRedacted?: boolean;
14
- };
13
+ } & ({
14
+ value: string;
15
+ } | {
16
+ defaultValue: string;
17
+ });
15
18
  export declare const TextField: import("react").ForwardRefExoticComponent<TextFieldProps & import("react").RefAttributes<HTMLInputElement>>;
16
19
  export {};
@@ -0,0 +1,18 @@
1
+ import { AppState, ExcalidrawProps } from "../../types";
2
+ import { ElementsMap, ExcalidrawEmbeddableElement, NonDeletedExcalidrawElement } from "../../element/types";
3
+ import "./Hyperlink.scss";
4
+ export declare const Hyperlink: ({ element, elementsMap, setAppState, onLinkOpen, setToast, updateEmbedValidationStatus, }: {
5
+ element: NonDeletedExcalidrawElement;
6
+ elementsMap: ElementsMap;
7
+ setAppState: React.Component<any, AppState>["setState"];
8
+ onLinkOpen: ExcalidrawProps["onLinkOpen"];
9
+ setToast: (toast: {
10
+ message: string;
11
+ closable?: boolean;
12
+ duration?: number;
13
+ } | null) => void;
14
+ updateEmbedValidationStatus: (element: ExcalidrawEmbeddableElement, status: boolean) => void;
15
+ }) => import("react/jsx-runtime").JSX.Element | null;
16
+ export declare const getContextMenuLabel: (elements: readonly NonDeletedExcalidrawElement[], appState: AppState) => "labels.link.editEmbed" | "labels.link.edit" | "labels.link.createEmbed" | "labels.link.create";
17
+ export declare const showHyperlinkTooltip: (element: NonDeletedExcalidrawElement, appState: AppState, elementsMap: ElementsMap) => void;
18
+ export declare const hideHyperlinkToolip: () => void;
@@ -0,0 +1,7 @@
1
+ import { Bounds } from "../../element/bounds";
2
+ import { ElementsMap, NonDeletedExcalidrawElement } from "../../element/types";
3
+ import { AppState, UIAppState } from "../../types";
4
+ export declare const EXTERNAL_LINK_IMG: HTMLImageElement;
5
+ export declare const getLinkHandleFromCoords: ([x1, y1, x2, y2]: Bounds, angle: number, appState: Pick<UIAppState, "zoom">) => Bounds;
6
+ export declare const isPointHittingLinkIcon: (element: NonDeletedExcalidrawElement, elementsMap: ElementsMap, appState: AppState, [x, y]: readonly [number, number]) => boolean;
7
+ export declare const isPointHittingLink: (element: NonDeletedExcalidrawElement, elementsMap: ElementsMap, appState: AppState, [x, y]: readonly [number, number], isMobile: boolean) => boolean;
@@ -276,3 +276,8 @@ export declare const EDITOR_LS_KEYS: {
276
276
  readonly MERMAID_TO_EXCALIDRAW: "mermaid-to-excalidraw";
277
277
  readonly PUBLISH_LIBRARY: "publish-library-data";
278
278
  };
279
+ /**
280
+ * not translated as this is used only in public, stateless API as default value
281
+ * where filename is optional and we can't retrieve name from app state
282
+ */
283
+ export declare const DEFAULT_FILENAME = "Untitled";
@@ -6,7 +6,7 @@ export declare const fileOpen: <M extends boolean | undefined = false>(opts: {
6
6
  description: string;
7
7
  multiple?: M | undefined;
8
8
  }) => Promise<M extends false | undefined ? File : File[]>;
9
- export declare const fileSave: (blob: Blob, opts: {
9
+ export declare const fileSave: (blob: Blob | Promise<Blob>, opts: {
10
10
  /** supply without the extension */
11
11
  name: string;
12
12
  /** file extension */
@@ -15,7 +15,8 @@ export declare const exportCanvas: (type: Omit<ExportType, "backend">, elements:
15
15
  exportBackground: boolean;
16
16
  exportPadding?: number | undefined;
17
17
  viewBackgroundColor: string;
18
- name: string;
18
+ /** filename, if applicable */
19
+ name?: string | undefined;
19
20
  fileHandle?: FileSystemHandle | null | undefined;
20
21
  exportingFrame: ExcalidrawFrameLikeElement | null;
21
22
  }) => Promise<FileSystemHandle | null | undefined>;
@@ -2,7 +2,7 @@ import { ExcalidrawElement } from "../element/types";
2
2
  import { AppState, BinaryFiles, LibraryItems } from "../types";
3
3
  import { ImportedDataState, ImportedLibraryData } from "./types";
4
4
  export declare const serializeAsJSON: (elements: readonly ExcalidrawElement[], appState: Partial<AppState>, files: BinaryFiles, type: "local" | "database") => string;
5
- export declare const saveAsJSON: (elements: readonly ExcalidrawElement[], appState: AppState, files: BinaryFiles) => Promise<{
5
+ export declare const saveAsJSON: (elements: readonly ExcalidrawElement[], appState: AppState, files: BinaryFiles, name?: string) => Promise<{
6
6
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
7
7
  }>;
8
8
  export declare const loadFromJSON: (localAppState: AppState, localElements: readonly ExcalidrawElement[] | null) => Promise<import("./restore").RestoredDataState>;
@@ -1,5 +1,5 @@
1
1
  import { ExcalidrawElement } from "../element/types";
2
2
  import { AppState, BinaryFiles } from "../types";
3
- export declare const resaveAsImageWithScene: (elements: readonly ExcalidrawElement[], appState: AppState, files: BinaryFiles) => Promise<{
3
+ export declare const resaveAsImageWithScene: (elements: readonly ExcalidrawElement[], appState: AppState, files: BinaryFiles, name: string) => Promise<{
4
4
  fileHandle: import("browser-fs-access").FileSystemHandle;
5
5
  }>;
@@ -1,6 +1,7 @@
1
- import { NonDeletedExcalidrawElement } from "./types";
1
+ import { ElementsMap, NonDeletedExcalidrawElement } from "./types";
2
2
  import "./ElementCanvasButtons.scss";
3
- export declare const ElementCanvasButtons: ({ children, element, }: {
3
+ export declare const ElementCanvasButtons: ({ children, element, elementsMap, }: {
4
4
  children: React.ReactNode;
5
5
  element: NonDeletedExcalidrawElement;
6
+ elementsMap: ElementsMap;
6
7
  }) => import("react/jsx-runtime").JSX.Element | null;