@zsviczian/excalidraw 0.18.0-15 → 0.18.0-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.
- package/dist/excalidraw.development.js +50 -50
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/styles.development.css +16 -20
- package/dist/styles.production.css +1 -1
- package/package.json +1 -1
- package/types/common/src/constants.d.ts +7 -1
- package/types/element/src/linearElementEditor.d.ts +7 -8
- package/types/element/src/newElement.d.ts +2 -1
- package/types/element/src/shapes.d.ts +5 -1
- package/types/element/src/typeChecks.d.ts +3 -1
- package/types/element/src/types.d.ts +7 -2
- package/types/excalidraw/actions/actionLinearEditor.d.ts +497 -0
- package/types/excalidraw/actions/actionProperties.d.ts +10 -2
- package/types/excalidraw/actions/types.d.ts +2 -1
- package/types/excalidraw/components/ButtonIcon.d.ts +1 -0
- package/types/excalidraw/components/{ButtonIconSelect.d.ts → RadioSelection.d.ts} +1 -1
- package/types/excalidraw/components/hyperlink/helpers.d.ts +1 -0
- package/types/excalidraw/components/icons.d.ts +1 -0
- package/types/excalidraw/lasso/index.d.ts +1 -0
- package/types/excalidraw/renderer/helpers.d.ts +1 -1
- package/types/math/src/point.d.ts +1 -1
- package/types/excalidraw/components/ButtonSelect.d.ts +0 -9
|
@@ -220,3 +220,500 @@ export declare const actionToggleLinearEditor: {
|
|
|
220
220
|
} & {
|
|
221
221
|
keyTest?: undefined;
|
|
222
222
|
};
|
|
223
|
+
export declare const actionTogglePolygon: {
|
|
224
|
+
name: "togglePolygon";
|
|
225
|
+
category: string;
|
|
226
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
227
|
+
keywords: string[];
|
|
228
|
+
label: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, app: import("../types").AppClassProperties) => "labels.polygon.breakPolygon" | "labels.polygon.convertToPolygon";
|
|
229
|
+
trackEvent: {
|
|
230
|
+
category: "element";
|
|
231
|
+
};
|
|
232
|
+
predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
233
|
+
perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties): false | {
|
|
234
|
+
elements: ((Readonly<{
|
|
235
|
+
id: string;
|
|
236
|
+
x: number;
|
|
237
|
+
y: number;
|
|
238
|
+
strokeColor: string;
|
|
239
|
+
backgroundColor: string;
|
|
240
|
+
fillStyle: import("@excalidraw/element/types").FillStyle;
|
|
241
|
+
strokeWidth: number;
|
|
242
|
+
strokeStyle: import("@excalidraw/element/types").StrokeStyle;
|
|
243
|
+
roundness: {
|
|
244
|
+
type: import("@excalidraw/element/types").RoundnessType;
|
|
245
|
+
value?: number | undefined;
|
|
246
|
+
} | null;
|
|
247
|
+
roughness: number;
|
|
248
|
+
opacity: number;
|
|
249
|
+
width: number;
|
|
250
|
+
height: number;
|
|
251
|
+
angle: import("@excalidraw/math").Radians;
|
|
252
|
+
seed: number;
|
|
253
|
+
version: number;
|
|
254
|
+
versionNonce: number;
|
|
255
|
+
index: import("@excalidraw/element/types").FractionalIndex | null;
|
|
256
|
+
isDeleted: boolean;
|
|
257
|
+
groupIds: readonly string[];
|
|
258
|
+
frameId: string | null;
|
|
259
|
+
boundElements: readonly Readonly<{
|
|
260
|
+
id: string;
|
|
261
|
+
type: "text" | "arrow";
|
|
262
|
+
}>[] | null;
|
|
263
|
+
updated: number;
|
|
264
|
+
link: string | null;
|
|
265
|
+
locked: boolean;
|
|
266
|
+
customData?: Record<string, any> | undefined;
|
|
267
|
+
}> & {
|
|
268
|
+
type: "selection";
|
|
269
|
+
} & {
|
|
270
|
+
index: import("@excalidraw/element/types").FractionalIndex;
|
|
271
|
+
}) | (Readonly<{
|
|
272
|
+
id: string;
|
|
273
|
+
x: number;
|
|
274
|
+
y: number;
|
|
275
|
+
strokeColor: string;
|
|
276
|
+
backgroundColor: string;
|
|
277
|
+
fillStyle: import("@excalidraw/element/types").FillStyle;
|
|
278
|
+
strokeWidth: number;
|
|
279
|
+
strokeStyle: import("@excalidraw/element/types").StrokeStyle;
|
|
280
|
+
roundness: {
|
|
281
|
+
type: import("@excalidraw/element/types").RoundnessType;
|
|
282
|
+
value?: number | undefined;
|
|
283
|
+
} | null;
|
|
284
|
+
roughness: number;
|
|
285
|
+
opacity: number;
|
|
286
|
+
width: number;
|
|
287
|
+
height: number;
|
|
288
|
+
angle: import("@excalidraw/math").Radians;
|
|
289
|
+
seed: number;
|
|
290
|
+
version: number;
|
|
291
|
+
versionNonce: number;
|
|
292
|
+
index: import("@excalidraw/element/types").FractionalIndex | null;
|
|
293
|
+
isDeleted: boolean;
|
|
294
|
+
groupIds: readonly string[];
|
|
295
|
+
frameId: string | null;
|
|
296
|
+
boundElements: readonly Readonly<{
|
|
297
|
+
id: string;
|
|
298
|
+
type: "text" | "arrow";
|
|
299
|
+
}>[] | null;
|
|
300
|
+
updated: number;
|
|
301
|
+
link: string | null;
|
|
302
|
+
locked: boolean;
|
|
303
|
+
customData?: Record<string, any> | undefined;
|
|
304
|
+
}> & {
|
|
305
|
+
type: "rectangle";
|
|
306
|
+
} & {
|
|
307
|
+
index: import("@excalidraw/element/types").FractionalIndex;
|
|
308
|
+
}) | (Readonly<{
|
|
309
|
+
id: string;
|
|
310
|
+
x: number;
|
|
311
|
+
y: number;
|
|
312
|
+
strokeColor: string;
|
|
313
|
+
backgroundColor: string;
|
|
314
|
+
fillStyle: import("@excalidraw/element/types").FillStyle;
|
|
315
|
+
strokeWidth: number;
|
|
316
|
+
strokeStyle: import("@excalidraw/element/types").StrokeStyle;
|
|
317
|
+
roundness: {
|
|
318
|
+
type: import("@excalidraw/element/types").RoundnessType;
|
|
319
|
+
value?: number | undefined;
|
|
320
|
+
} | null;
|
|
321
|
+
roughness: number;
|
|
322
|
+
opacity: number;
|
|
323
|
+
width: number;
|
|
324
|
+
height: number;
|
|
325
|
+
angle: import("@excalidraw/math").Radians;
|
|
326
|
+
seed: number;
|
|
327
|
+
version: number;
|
|
328
|
+
versionNonce: number;
|
|
329
|
+
index: import("@excalidraw/element/types").FractionalIndex | null;
|
|
330
|
+
isDeleted: boolean;
|
|
331
|
+
groupIds: readonly string[];
|
|
332
|
+
frameId: string | null;
|
|
333
|
+
boundElements: readonly Readonly<{
|
|
334
|
+
id: string;
|
|
335
|
+
type: "text" | "arrow";
|
|
336
|
+
}>[] | null;
|
|
337
|
+
updated: number;
|
|
338
|
+
link: string | null;
|
|
339
|
+
locked: boolean;
|
|
340
|
+
customData?: Record<string, any> | undefined;
|
|
341
|
+
}> & {
|
|
342
|
+
type: "diamond";
|
|
343
|
+
} & {
|
|
344
|
+
index: import("@excalidraw/element/types").FractionalIndex;
|
|
345
|
+
}) | (Readonly<{
|
|
346
|
+
id: string;
|
|
347
|
+
x: number;
|
|
348
|
+
y: number;
|
|
349
|
+
strokeColor: string;
|
|
350
|
+
backgroundColor: string;
|
|
351
|
+
fillStyle: import("@excalidraw/element/types").FillStyle;
|
|
352
|
+
strokeWidth: number;
|
|
353
|
+
strokeStyle: import("@excalidraw/element/types").StrokeStyle;
|
|
354
|
+
roundness: {
|
|
355
|
+
type: import("@excalidraw/element/types").RoundnessType;
|
|
356
|
+
value?: number | undefined;
|
|
357
|
+
} | null;
|
|
358
|
+
roughness: number;
|
|
359
|
+
opacity: number;
|
|
360
|
+
width: number;
|
|
361
|
+
height: number;
|
|
362
|
+
angle: import("@excalidraw/math").Radians;
|
|
363
|
+
seed: number;
|
|
364
|
+
version: number;
|
|
365
|
+
versionNonce: number;
|
|
366
|
+
index: import("@excalidraw/element/types").FractionalIndex | null;
|
|
367
|
+
isDeleted: boolean;
|
|
368
|
+
groupIds: readonly string[];
|
|
369
|
+
frameId: string | null;
|
|
370
|
+
boundElements: readonly Readonly<{
|
|
371
|
+
id: string;
|
|
372
|
+
type: "text" | "arrow";
|
|
373
|
+
}>[] | null;
|
|
374
|
+
updated: number;
|
|
375
|
+
link: string | null;
|
|
376
|
+
locked: boolean;
|
|
377
|
+
customData?: Record<string, any> | undefined;
|
|
378
|
+
}> & {
|
|
379
|
+
type: "ellipse";
|
|
380
|
+
} & {
|
|
381
|
+
index: import("@excalidraw/element/types").FractionalIndex;
|
|
382
|
+
}) | (Readonly<{
|
|
383
|
+
id: string;
|
|
384
|
+
x: number;
|
|
385
|
+
y: number;
|
|
386
|
+
strokeColor: string;
|
|
387
|
+
backgroundColor: string;
|
|
388
|
+
fillStyle: import("@excalidraw/element/types").FillStyle;
|
|
389
|
+
strokeWidth: number;
|
|
390
|
+
strokeStyle: import("@excalidraw/element/types").StrokeStyle;
|
|
391
|
+
roundness: {
|
|
392
|
+
type: import("@excalidraw/element/types").RoundnessType;
|
|
393
|
+
value?: number | undefined;
|
|
394
|
+
} | null;
|
|
395
|
+
roughness: number;
|
|
396
|
+
opacity: number;
|
|
397
|
+
width: number;
|
|
398
|
+
height: number;
|
|
399
|
+
angle: import("@excalidraw/math").Radians;
|
|
400
|
+
seed: number;
|
|
401
|
+
version: number;
|
|
402
|
+
versionNonce: number;
|
|
403
|
+
index: import("@excalidraw/element/types").FractionalIndex | null;
|
|
404
|
+
isDeleted: boolean;
|
|
405
|
+
groupIds: readonly string[];
|
|
406
|
+
frameId: string | null;
|
|
407
|
+
boundElements: readonly Readonly<{
|
|
408
|
+
id: string;
|
|
409
|
+
type: "text" | "arrow";
|
|
410
|
+
}>[] | null;
|
|
411
|
+
updated: number;
|
|
412
|
+
link: string | null;
|
|
413
|
+
locked: boolean;
|
|
414
|
+
customData?: Record<string, any> | undefined;
|
|
415
|
+
}> & Readonly<{
|
|
416
|
+
type: "text";
|
|
417
|
+
fontSize: number;
|
|
418
|
+
fontFamily: number;
|
|
419
|
+
text: string;
|
|
420
|
+
rawText: string;
|
|
421
|
+
textAlign: string;
|
|
422
|
+
verticalAlign: string;
|
|
423
|
+
containerId: string | null;
|
|
424
|
+
originalText: string;
|
|
425
|
+
autoResize: boolean;
|
|
426
|
+
lineHeight: number & {
|
|
427
|
+
_brand: "unitlessLineHeight";
|
|
428
|
+
};
|
|
429
|
+
}> & {
|
|
430
|
+
index: import("@excalidraw/element/types").FractionalIndex;
|
|
431
|
+
}) | (Readonly<{
|
|
432
|
+
id: string;
|
|
433
|
+
x: number;
|
|
434
|
+
y: number;
|
|
435
|
+
strokeColor: string;
|
|
436
|
+
backgroundColor: string;
|
|
437
|
+
fillStyle: import("@excalidraw/element/types").FillStyle;
|
|
438
|
+
strokeWidth: number;
|
|
439
|
+
strokeStyle: import("@excalidraw/element/types").StrokeStyle;
|
|
440
|
+
roundness: {
|
|
441
|
+
type: import("@excalidraw/element/types").RoundnessType;
|
|
442
|
+
value?: number | undefined;
|
|
443
|
+
} | null;
|
|
444
|
+
roughness: number;
|
|
445
|
+
opacity: number;
|
|
446
|
+
width: number;
|
|
447
|
+
height: number;
|
|
448
|
+
angle: import("@excalidraw/math").Radians;
|
|
449
|
+
seed: number;
|
|
450
|
+
version: number;
|
|
451
|
+
versionNonce: number;
|
|
452
|
+
index: import("@excalidraw/element/types").FractionalIndex | null;
|
|
453
|
+
isDeleted: boolean;
|
|
454
|
+
groupIds: readonly string[];
|
|
455
|
+
frameId: string | null;
|
|
456
|
+
boundElements: readonly Readonly<{
|
|
457
|
+
id: string;
|
|
458
|
+
type: "text" | "arrow";
|
|
459
|
+
}>[] | null;
|
|
460
|
+
updated: number;
|
|
461
|
+
link: string | null;
|
|
462
|
+
locked: boolean;
|
|
463
|
+
customData?: Record<string, any> | undefined;
|
|
464
|
+
}> & Readonly<{
|
|
465
|
+
type: "line" | "arrow";
|
|
466
|
+
points: readonly import("@excalidraw/math").LocalPoint[];
|
|
467
|
+
lastCommittedPoint: import("@excalidraw/math").LocalPoint | null;
|
|
468
|
+
startBinding: import("@excalidraw/element/types").PointBinding | null;
|
|
469
|
+
endBinding: import("@excalidraw/element/types").PointBinding | null;
|
|
470
|
+
startArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
471
|
+
endArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
472
|
+
}> & {
|
|
473
|
+
index: import("@excalidraw/element/types").FractionalIndex;
|
|
474
|
+
}) | (Readonly<{
|
|
475
|
+
id: string;
|
|
476
|
+
x: number;
|
|
477
|
+
y: number;
|
|
478
|
+
strokeColor: string;
|
|
479
|
+
backgroundColor: string;
|
|
480
|
+
fillStyle: import("@excalidraw/element/types").FillStyle;
|
|
481
|
+
strokeWidth: number;
|
|
482
|
+
strokeStyle: import("@excalidraw/element/types").StrokeStyle;
|
|
483
|
+
roundness: {
|
|
484
|
+
type: import("@excalidraw/element/types").RoundnessType;
|
|
485
|
+
value?: number | undefined;
|
|
486
|
+
} | null;
|
|
487
|
+
roughness: number;
|
|
488
|
+
opacity: number;
|
|
489
|
+
width: number;
|
|
490
|
+
height: number;
|
|
491
|
+
angle: import("@excalidraw/math").Radians;
|
|
492
|
+
seed: number;
|
|
493
|
+
version: number;
|
|
494
|
+
versionNonce: number;
|
|
495
|
+
index: import("@excalidraw/element/types").FractionalIndex | null;
|
|
496
|
+
isDeleted: boolean;
|
|
497
|
+
groupIds: readonly string[];
|
|
498
|
+
frameId: string | null;
|
|
499
|
+
boundElements: readonly Readonly<{
|
|
500
|
+
id: string;
|
|
501
|
+
type: "text" | "arrow";
|
|
502
|
+
}>[] | null;
|
|
503
|
+
updated: number;
|
|
504
|
+
link: string | null;
|
|
505
|
+
locked: boolean;
|
|
506
|
+
customData?: Record<string, any> | undefined;
|
|
507
|
+
}> & Readonly<{
|
|
508
|
+
type: "freedraw";
|
|
509
|
+
points: readonly import("@excalidraw/math").LocalPoint[];
|
|
510
|
+
pressures: readonly number[];
|
|
511
|
+
simulatePressure: boolean;
|
|
512
|
+
lastCommittedPoint: import("@excalidraw/math").LocalPoint | null;
|
|
513
|
+
}> & {
|
|
514
|
+
index: import("@excalidraw/element/types").FractionalIndex;
|
|
515
|
+
}) | (Readonly<{
|
|
516
|
+
id: string;
|
|
517
|
+
x: number;
|
|
518
|
+
y: number;
|
|
519
|
+
strokeColor: string;
|
|
520
|
+
backgroundColor: string;
|
|
521
|
+
fillStyle: import("@excalidraw/element/types").FillStyle;
|
|
522
|
+
strokeWidth: number;
|
|
523
|
+
strokeStyle: import("@excalidraw/element/types").StrokeStyle;
|
|
524
|
+
roundness: {
|
|
525
|
+
type: import("@excalidraw/element/types").RoundnessType;
|
|
526
|
+
value?: number | undefined;
|
|
527
|
+
} | null;
|
|
528
|
+
roughness: number;
|
|
529
|
+
opacity: number;
|
|
530
|
+
width: number;
|
|
531
|
+
height: number;
|
|
532
|
+
angle: import("@excalidraw/math").Radians;
|
|
533
|
+
seed: number;
|
|
534
|
+
version: number;
|
|
535
|
+
versionNonce: number;
|
|
536
|
+
index: import("@excalidraw/element/types").FractionalIndex | null;
|
|
537
|
+
isDeleted: boolean;
|
|
538
|
+
groupIds: readonly string[];
|
|
539
|
+
frameId: string | null;
|
|
540
|
+
boundElements: readonly Readonly<{
|
|
541
|
+
id: string;
|
|
542
|
+
type: "text" | "arrow";
|
|
543
|
+
}>[] | null;
|
|
544
|
+
updated: number;
|
|
545
|
+
link: string | null;
|
|
546
|
+
locked: boolean;
|
|
547
|
+
customData?: Record<string, any> | undefined;
|
|
548
|
+
}> & Readonly<{
|
|
549
|
+
type: "image";
|
|
550
|
+
fileId: import("@excalidraw/element/types").FileId | null;
|
|
551
|
+
status: "error" | "pending" | "saved";
|
|
552
|
+
scale: [number, number];
|
|
553
|
+
crop: import("@excalidraw/element/types").ImageCrop | null;
|
|
554
|
+
}> & {
|
|
555
|
+
index: import("@excalidraw/element/types").FractionalIndex;
|
|
556
|
+
}) | (Readonly<{
|
|
557
|
+
id: string;
|
|
558
|
+
x: number;
|
|
559
|
+
y: number;
|
|
560
|
+
strokeColor: string;
|
|
561
|
+
backgroundColor: string;
|
|
562
|
+
fillStyle: import("@excalidraw/element/types").FillStyle;
|
|
563
|
+
strokeWidth: number;
|
|
564
|
+
strokeStyle: import("@excalidraw/element/types").StrokeStyle;
|
|
565
|
+
roundness: {
|
|
566
|
+
type: import("@excalidraw/element/types").RoundnessType;
|
|
567
|
+
value?: number | undefined;
|
|
568
|
+
} | null;
|
|
569
|
+
roughness: number;
|
|
570
|
+
opacity: number;
|
|
571
|
+
width: number;
|
|
572
|
+
height: number;
|
|
573
|
+
angle: import("@excalidraw/math").Radians;
|
|
574
|
+
seed: number;
|
|
575
|
+
version: number;
|
|
576
|
+
versionNonce: number;
|
|
577
|
+
index: import("@excalidraw/element/types").FractionalIndex | null;
|
|
578
|
+
isDeleted: boolean;
|
|
579
|
+
groupIds: readonly string[];
|
|
580
|
+
frameId: string | null;
|
|
581
|
+
boundElements: readonly Readonly<{
|
|
582
|
+
id: string;
|
|
583
|
+
type: "text" | "arrow";
|
|
584
|
+
}>[] | null;
|
|
585
|
+
updated: number;
|
|
586
|
+
link: string | null;
|
|
587
|
+
locked: boolean;
|
|
588
|
+
customData?: Record<string, any> | undefined;
|
|
589
|
+
}> & {
|
|
590
|
+
type: "frame";
|
|
591
|
+
name: string | null;
|
|
592
|
+
} & {
|
|
593
|
+
index: import("@excalidraw/element/types").FractionalIndex;
|
|
594
|
+
}) | (Readonly<{
|
|
595
|
+
id: string;
|
|
596
|
+
x: number;
|
|
597
|
+
y: number;
|
|
598
|
+
strokeColor: string;
|
|
599
|
+
backgroundColor: string;
|
|
600
|
+
fillStyle: import("@excalidraw/element/types").FillStyle;
|
|
601
|
+
strokeWidth: number;
|
|
602
|
+
strokeStyle: import("@excalidraw/element/types").StrokeStyle;
|
|
603
|
+
roundness: {
|
|
604
|
+
type: import("@excalidraw/element/types").RoundnessType;
|
|
605
|
+
value?: number | undefined;
|
|
606
|
+
} | null;
|
|
607
|
+
roughness: number;
|
|
608
|
+
opacity: number;
|
|
609
|
+
width: number;
|
|
610
|
+
height: number;
|
|
611
|
+
angle: import("@excalidraw/math").Radians;
|
|
612
|
+
seed: number;
|
|
613
|
+
version: number;
|
|
614
|
+
versionNonce: number;
|
|
615
|
+
index: import("@excalidraw/element/types").FractionalIndex | null;
|
|
616
|
+
isDeleted: boolean;
|
|
617
|
+
groupIds: readonly string[];
|
|
618
|
+
frameId: string | null;
|
|
619
|
+
boundElements: readonly Readonly<{
|
|
620
|
+
id: string;
|
|
621
|
+
type: "text" | "arrow";
|
|
622
|
+
}>[] | null;
|
|
623
|
+
updated: number;
|
|
624
|
+
link: string | null;
|
|
625
|
+
locked: boolean;
|
|
626
|
+
customData?: Record<string, any> | undefined;
|
|
627
|
+
}> & {
|
|
628
|
+
type: "magicframe";
|
|
629
|
+
name: string | null;
|
|
630
|
+
} & {
|
|
631
|
+
index: import("@excalidraw/element/types").FractionalIndex;
|
|
632
|
+
}) | (Readonly<{
|
|
633
|
+
id: string;
|
|
634
|
+
x: number;
|
|
635
|
+
y: number;
|
|
636
|
+
strokeColor: string;
|
|
637
|
+
backgroundColor: string;
|
|
638
|
+
fillStyle: import("@excalidraw/element/types").FillStyle;
|
|
639
|
+
strokeWidth: number;
|
|
640
|
+
strokeStyle: import("@excalidraw/element/types").StrokeStyle;
|
|
641
|
+
roundness: {
|
|
642
|
+
type: import("@excalidraw/element/types").RoundnessType;
|
|
643
|
+
value?: number | undefined;
|
|
644
|
+
} | null;
|
|
645
|
+
roughness: number;
|
|
646
|
+
opacity: number;
|
|
647
|
+
width: number;
|
|
648
|
+
height: number;
|
|
649
|
+
angle: import("@excalidraw/math").Radians;
|
|
650
|
+
seed: number;
|
|
651
|
+
version: number;
|
|
652
|
+
versionNonce: number;
|
|
653
|
+
index: import("@excalidraw/element/types").FractionalIndex | null;
|
|
654
|
+
isDeleted: boolean;
|
|
655
|
+
groupIds: readonly string[];
|
|
656
|
+
frameId: string | null;
|
|
657
|
+
boundElements: readonly Readonly<{
|
|
658
|
+
id: string;
|
|
659
|
+
type: "text" | "arrow";
|
|
660
|
+
}>[] | null;
|
|
661
|
+
updated: number;
|
|
662
|
+
link: string | null;
|
|
663
|
+
locked: boolean;
|
|
664
|
+
customData?: Record<string, any> | undefined;
|
|
665
|
+
}> & Readonly<{
|
|
666
|
+
type: "iframe";
|
|
667
|
+
customData?: {
|
|
668
|
+
generationData?: import("@excalidraw/element/types").MagicGenerationData | undefined;
|
|
669
|
+
} | undefined;
|
|
670
|
+
scale: [number, number];
|
|
671
|
+
}> & {
|
|
672
|
+
index: import("@excalidraw/element/types").FractionalIndex;
|
|
673
|
+
}) | (Readonly<{
|
|
674
|
+
id: string;
|
|
675
|
+
x: number;
|
|
676
|
+
y: number;
|
|
677
|
+
strokeColor: string;
|
|
678
|
+
backgroundColor: string;
|
|
679
|
+
fillStyle: import("@excalidraw/element/types").FillStyle;
|
|
680
|
+
strokeWidth: number;
|
|
681
|
+
strokeStyle: import("@excalidraw/element/types").StrokeStyle;
|
|
682
|
+
roundness: {
|
|
683
|
+
type: import("@excalidraw/element/types").RoundnessType;
|
|
684
|
+
value?: number | undefined;
|
|
685
|
+
} | null;
|
|
686
|
+
roughness: number;
|
|
687
|
+
opacity: number;
|
|
688
|
+
width: number;
|
|
689
|
+
height: number;
|
|
690
|
+
angle: import("@excalidraw/math").Radians;
|
|
691
|
+
seed: number;
|
|
692
|
+
version: number;
|
|
693
|
+
versionNonce: number;
|
|
694
|
+
index: import("@excalidraw/element/types").FractionalIndex | null;
|
|
695
|
+
isDeleted: boolean;
|
|
696
|
+
groupIds: readonly string[];
|
|
697
|
+
frameId: string | null;
|
|
698
|
+
boundElements: readonly Readonly<{
|
|
699
|
+
id: string;
|
|
700
|
+
type: "text" | "arrow";
|
|
701
|
+
}>[] | null;
|
|
702
|
+
updated: number;
|
|
703
|
+
link: string | null;
|
|
704
|
+
locked: boolean;
|
|
705
|
+
customData?: Record<string, any> | undefined;
|
|
706
|
+
}> & Readonly<{
|
|
707
|
+
type: "embeddable";
|
|
708
|
+
scale: [number, number];
|
|
709
|
+
}> & {
|
|
710
|
+
index: import("@excalidraw/element/types").FractionalIndex;
|
|
711
|
+
}))[];
|
|
712
|
+
appState: Readonly<import("../types").AppState>;
|
|
713
|
+
captureUpdate: "IMMEDIATELY";
|
|
714
|
+
};
|
|
715
|
+
PanelComponent: ({ appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
716
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
717
|
+
} & {
|
|
718
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
719
|
+
};
|
|
@@ -16,7 +16,15 @@ export declare const actionChangeBackgroundColor: {
|
|
|
16
16
|
name: "changeBackgroundColor";
|
|
17
17
|
label: string;
|
|
18
18
|
trackEvent: false;
|
|
19
|
-
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, value: any) =>
|
|
19
|
+
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, value: any, app: AppClassProperties) => {
|
|
20
|
+
appState: any;
|
|
21
|
+
captureUpdate: "EVENTUALLY";
|
|
22
|
+
elements?: undefined;
|
|
23
|
+
} | {
|
|
24
|
+
elements: ExcalidrawElement[];
|
|
25
|
+
appState: any;
|
|
26
|
+
captureUpdate: "IMMEDIATELY";
|
|
27
|
+
};
|
|
20
28
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
29
|
} & {
|
|
22
30
|
keyTest?: undefined;
|
|
@@ -2820,7 +2828,7 @@ export declare const actionChangeRoundness: {
|
|
|
2820
2828
|
};
|
|
2821
2829
|
captureUpdate: "IMMEDIATELY";
|
|
2822
2830
|
};
|
|
2823
|
-
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
2831
|
+
PanelComponent: ({ elements, appState, updateData, app, renderAction }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
2824
2832
|
} & {
|
|
2825
2833
|
keyTest?: undefined;
|
|
2826
2834
|
};
|
|
@@ -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" | "wrapSelectionInFrame" | "toggleLassoTool" | "toggleShapeSwitch";
|
|
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" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
|
|
18
18
|
export type PanelComponentProps = {
|
|
19
19
|
elements: readonly ExcalidrawElement[];
|
|
20
20
|
appState: AppState;
|
|
@@ -22,6 +22,7 @@ export type PanelComponentProps = {
|
|
|
22
22
|
appProps: ExcalidrawProps;
|
|
23
23
|
data?: Record<string, any>;
|
|
24
24
|
app: AppClassProperties;
|
|
25
|
+
renderAction: (name: ActionName, data?: PanelComponentProps["data"]) => React.JSX.Element | null;
|
|
25
26
|
};
|
|
26
27
|
export interface Action {
|
|
27
28
|
name: ActionName;
|
|
@@ -10,6 +10,7 @@ interface ButtonIconProps {
|
|
|
10
10
|
/** include standalone style (could interfere with parent styles) */
|
|
11
11
|
standalone?: boolean;
|
|
12
12
|
onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
13
|
+
style?: React.CSSProperties;
|
|
13
14
|
}
|
|
14
15
|
export declare const ButtonIcon: import("react").ForwardRefExoticComponent<ButtonIconProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
15
16
|
export {};
|
|
@@ -2,6 +2,7 @@ import type { GlobalPoint, Radians } from "@excalidraw/math";
|
|
|
2
2
|
import type { Bounds } from "@excalidraw/element";
|
|
3
3
|
import type { ElementsMap, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
|
|
4
4
|
import type { AppState, UIAppState } from "../../types";
|
|
5
|
+
export declare const DEFAULT_LINK_SIZE = 12;
|
|
5
6
|
export declare const EXTERNAL_LINK_IMG: HTMLImageElement;
|
|
6
7
|
export declare const ELEMENT_LINK_IMG: HTMLImageElement;
|
|
7
8
|
export declare const getLinkHandleFromCoords: ([x1, y1, x2, y2]: Bounds, angle: Radians, appState: Pick<UIAppState, "zoom">) => Bounds;
|
|
@@ -12,6 +12,7 @@ export declare const LibraryIcon: import("react/jsx-runtime").JSX.Element;
|
|
|
12
12
|
export declare const PlusIcon: import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export declare const DotsIcon: import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export declare const PinIcon: import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const polygonIcon: import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export declare const UnlockedIcon: import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export declare const LockedIcon: import("react/jsx-runtime").JSX.Element;
|
|
17
18
|
export declare const WelcomeScreenMenuArrow: import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,6 +5,7 @@ export declare class LassoTrail extends AnimatedTrail {
|
|
|
5
5
|
private intersectedElements;
|
|
6
6
|
private enclosedElements;
|
|
7
7
|
private elementsSegments;
|
|
8
|
+
private canvasTranslate;
|
|
8
9
|
private keepPreviousSelection;
|
|
9
10
|
constructor(animationFrameHandler: AnimationFrameHandler, app: App);
|
|
10
11
|
startPath(x: number, y: number, keepPreviousSelection?: boolean): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ExcalidrawDiamondElement, ExcalidrawRectanguloidElement } from "@excalidraw/element/types";
|
|
2
2
|
import type { StaticCanvasRenderConfig } from "../scene/types";
|
|
3
3
|
import type { AppState, StaticCanvasAppState } from "../types";
|
|
4
|
-
export declare const fillCircle: (context: CanvasRenderingContext2D, cx: number, cy: number, radius: number, stroke?: boolean) => void;
|
|
4
|
+
export declare const fillCircle: (context: CanvasRenderingContext2D, cx: number, cy: number, radius: number, stroke: boolean, fill?: boolean) => void;
|
|
5
5
|
export declare const getNormalizedCanvasDimensions: (canvas: HTMLCanvasElement, scale: number) => [number, number];
|
|
6
6
|
export declare const bootstrapCanvas: ({ canvas, scale, normalizedWidth, normalizedHeight, theme, isExporting, viewBackgroundColor, }: {
|
|
7
7
|
canvas: HTMLCanvasElement;
|
|
@@ -43,7 +43,7 @@ export declare function isPoint(p: unknown): p is LocalPoint | GlobalPoint;
|
|
|
43
43
|
* @param b Point The second point to compare
|
|
44
44
|
* @returns TRUE if the points are sufficiently close to each other
|
|
45
45
|
*/
|
|
46
|
-
export declare function pointsEqual<Point extends GlobalPoint | LocalPoint>(a: Point, b: Point): boolean;
|
|
46
|
+
export declare function pointsEqual<Point extends GlobalPoint | LocalPoint>(a: Point, b: Point, tolerance?: number): boolean;
|
|
47
47
|
/**
|
|
48
48
|
* Rotate a point by [angle] radians.
|
|
49
49
|
*
|