@myoc/excalidraw 0.19.527 → 0.19.529
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/CHANGELOG.md +109 -0
- package/dist/dev/{chunk-N6LESYN7.js → chunk-7GX2B2N5.js} +64 -51
- package/dist/dev/{chunk-N6LESYN7.js.map → chunk-7GX2B2N5.js.map} +2 -2
- package/dist/dev/{chunk-YNR3T55S.js → chunk-H5L4PT3U.js} +2 -2
- package/dist/dev/data/{image-D6KDEKKI.js → image-GYAOLTNI.js} +3 -3
- package/dist/dev/index.js +280 -224
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/{chunk-FIMIHFNX.js → chunk-5HMH2742.js} +1 -1
- package/dist/prod/{chunk-K3ZT7LUU.js → chunk-CYZQPYCY.js} +3 -3
- package/dist/prod/data/image-O2O5EGGU.js +1 -0
- package/dist/prod/index.js +13 -13
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +0 -27
- package/dist/types/excalidraw/actions/types.d.ts +1 -1
- package/dist/types/excalidraw/components/App.d.ts +5 -0
- package/dist/types/excalidraw/types.d.ts +18 -0
- package/package.json +4 -4
- package/dist/prod/data/image-GHQKUZQU.js +0 -1
- /package/dist/dev/{chunk-YNR3T55S.js.map → chunk-H5L4PT3U.js.map} +0 -0
- /package/dist/dev/data/{image-D6KDEKKI.js.map → image-GYAOLTNI.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -5320,6 +5320,7 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
5320
5320
|
- Incorrect import for color (was moved to common)
|
|
5321
5321
|
|
|
5322
5322
|
---
|
|
5323
|
+
|
|
5323
5324
|
## Excalidraw Library
|
|
5324
5325
|
|
|
5325
5326
|
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
@@ -5373,6 +5374,7 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
5373
5374
|
- Incorrect import for color (was moved to common)
|
|
5374
5375
|
|
|
5375
5376
|
---
|
|
5377
|
+
|
|
5376
5378
|
## Excalidraw Library
|
|
5377
5379
|
|
|
5378
5380
|
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
@@ -5426,6 +5428,7 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
5426
5428
|
- Incorrect import for color (was moved to common)
|
|
5427
5429
|
|
|
5428
5430
|
---
|
|
5431
|
+
|
|
5429
5432
|
## Excalidraw Library
|
|
5430
5433
|
|
|
5431
5434
|
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
@@ -5480,3 +5483,109 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
5480
5483
|
|
|
5481
5484
|
---
|
|
5482
5485
|
|
|
5486
|
+
## Excalidraw Library
|
|
5487
|
+
|
|
5488
|
+
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
5489
|
+
|
|
5490
|
+
### Features
|
|
5491
|
+
|
|
5492
|
+
- Add ability to turn off compression for files that are smaller than a given size
|
|
5493
|
+
|
|
5494
|
+
- Add lock tool to the dropdown and also add the status of the extra tools to be the same icon as the selected tool
|
|
5495
|
+
|
|
5496
|
+
- Add view mode button
|
|
5497
|
+
|
|
5498
|
+
- Add multiple image copy paste or drag and drop
|
|
5499
|
+
|
|
5500
|
+
- Multiple image additions from clipboard
|
|
5501
|
+
|
|
5502
|
+
- Add arrange elements action
|
|
5503
|
+
|
|
5504
|
+
- Add top picks to appProps for both stoke color and background color
|
|
5505
|
+
|
|
5506
|
+
### Fixes
|
|
5507
|
+
|
|
5508
|
+
- Issues
|
|
5509
|
+
|
|
5510
|
+
- Make mobile mode more myoc looking
|
|
5511
|
+
|
|
5512
|
+
- Add normalise functionality
|
|
5513
|
+
|
|
5514
|
+
- Update with excalidraw
|
|
5515
|
+
|
|
5516
|
+
- Fix imports
|
|
5517
|
+
|
|
5518
|
+
- Fix mutateGroup to use scene.mutateGroup
|
|
5519
|
+
|
|
5520
|
+
- Imports
|
|
5521
|
+
|
|
5522
|
+
- Ensure that fileId is different for compressed vs uncompressed file
|
|
5523
|
+
|
|
5524
|
+
- Remove not working prop for dontResizeLimitMBs
|
|
5525
|
+
|
|
5526
|
+
- Add smartview for mobile
|
|
5527
|
+
|
|
5528
|
+
- Hide the alignment buttons if there is only one group selected (they do nothing if only one group is selected)
|
|
5529
|
+
|
|
5530
|
+
- Use css vars already provided instead of hard coding directly from oc-gray
|
|
5531
|
+
|
|
5532
|
+
- Remove unused variables
|
|
5533
|
+
|
|
5534
|
+
- Pass the new top pick color props properly
|
|
5535
|
+
|
|
5536
|
+
- Incorrect import for color (was moved to common)
|
|
5537
|
+
|
|
5538
|
+
---## Excalidraw Library
|
|
5539
|
+
|
|
5540
|
+
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
5541
|
+
|
|
5542
|
+
### Features
|
|
5543
|
+
|
|
5544
|
+
- Add ability to turn off compression for files that are smaller than a given size
|
|
5545
|
+
|
|
5546
|
+
- Add lock tool to the dropdown and also add the status of the extra tools to be the same icon as the selected tool
|
|
5547
|
+
|
|
5548
|
+
- Add view mode button
|
|
5549
|
+
|
|
5550
|
+
- Add multiple image copy paste or drag and drop
|
|
5551
|
+
|
|
5552
|
+
- Multiple image additions from clipboard
|
|
5553
|
+
|
|
5554
|
+
- Add arrange elements action
|
|
5555
|
+
|
|
5556
|
+
- Add top picks to appProps for both stoke color and background color
|
|
5557
|
+
|
|
5558
|
+
### Fixes
|
|
5559
|
+
|
|
5560
|
+
- Issues
|
|
5561
|
+
|
|
5562
|
+
- Make mobile mode more myoc looking
|
|
5563
|
+
|
|
5564
|
+
- Add normalise functionality
|
|
5565
|
+
|
|
5566
|
+
- Update with excalidraw
|
|
5567
|
+
|
|
5568
|
+
- Fix imports
|
|
5569
|
+
|
|
5570
|
+
- Fix mutateGroup to use scene.mutateGroup
|
|
5571
|
+
|
|
5572
|
+
- Imports
|
|
5573
|
+
|
|
5574
|
+
- Ensure that fileId is different for compressed vs uncompressed file
|
|
5575
|
+
|
|
5576
|
+
- Remove not working prop for dontResizeLimitMBs
|
|
5577
|
+
|
|
5578
|
+
- Add smartview for mobile
|
|
5579
|
+
|
|
5580
|
+
- Hide the alignment buttons if there is only one group selected (they do nothing if only one group is selected)
|
|
5581
|
+
|
|
5582
|
+
- Use css vars already provided instead of hard coding directly from oc-gray
|
|
5583
|
+
|
|
5584
|
+
- Remove unused variables
|
|
5585
|
+
|
|
5586
|
+
- Pass the new top pick color props properly
|
|
5587
|
+
|
|
5588
|
+
- Incorrect import for color (was moved to common)
|
|
5589
|
+
|
|
5590
|
+
---
|
|
5591
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
define_import_meta_env_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-H5L4PT3U.js";
|
|
4
4
|
import {
|
|
5
5
|
__publicField
|
|
6
6
|
} from "./chunk-XDFCUUT6.js";
|
|
@@ -4654,6 +4654,7 @@ var getCanvasSize = (elements, exportPadding) => {
|
|
|
4654
4654
|
|
|
4655
4655
|
// data/restore.ts
|
|
4656
4656
|
import { isFiniteNumber, isValidPoint, pointFrom as pointFrom3 } from "@excalidraw/math";
|
|
4657
|
+
import { generateKeyBetween } from "@excalidraw/fractional-indexing";
|
|
4657
4658
|
import {
|
|
4658
4659
|
DEFAULT_FONT_FAMILY as DEFAULT_FONT_FAMILY2,
|
|
4659
4660
|
DEFAULT_STROKE_STREAMLINE,
|
|
@@ -4702,7 +4703,10 @@ import {
|
|
|
4702
4703
|
isTextElement as isTextElement4,
|
|
4703
4704
|
isUsingAdaptiveRadius
|
|
4704
4705
|
} from "@excalidraw/element";
|
|
4705
|
-
import {
|
|
4706
|
+
import {
|
|
4707
|
+
orderByFractionalIndex,
|
|
4708
|
+
syncInvalidIndices as syncInvalidIndices2
|
|
4709
|
+
} from "@excalidraw/element";
|
|
4706
4710
|
import { refreshTextDimensions } from "@excalidraw/element";
|
|
4707
4711
|
import { getNormalizedDimensions } from "@excalidraw/element";
|
|
4708
4712
|
import { isInvisiblySmallElement } from "@excalidraw/element";
|
|
@@ -5130,6 +5134,12 @@ var repairBoundElement = (boundElement, elementsMap) => {
|
|
|
5130
5134
|
if (boundElement.isDeleted) {
|
|
5131
5135
|
return;
|
|
5132
5136
|
}
|
|
5137
|
+
if (boundElement.index != null && container.index != null && boundElement.index <= container.index) {
|
|
5138
|
+
boundElement.index = generateKeyBetween(
|
|
5139
|
+
container.index,
|
|
5140
|
+
null
|
|
5141
|
+
);
|
|
5142
|
+
}
|
|
5133
5143
|
if (container.boundElements && !container.boundElements.find((binding) => binding.id === boundElement.id)) {
|
|
5134
5144
|
const boundElements = (container.boundElements || (container.boundElements = [])).slice();
|
|
5135
5145
|
boundElements.push({ type: "text", id: boundElement.id });
|
|
@@ -5217,56 +5227,58 @@ var restoreElements = (targetElements, existingElements, opts) => {
|
|
|
5217
5227
|
}
|
|
5218
5228
|
}
|
|
5219
5229
|
}
|
|
5220
|
-
return
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
(
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
);
|
|
5244
|
-
if (!boundElement) {
|
|
5245
|
-
console.error(
|
|
5246
|
-
"Bound element not found",
|
|
5230
|
+
return orderByFractionalIndex(
|
|
5231
|
+
restoredElements.map((element) => {
|
|
5232
|
+
if (isElbowArrow(element) && !isArrowBoundToElement(element) && !validateElbowPoints(element.points)) {
|
|
5233
|
+
return {
|
|
5234
|
+
...element,
|
|
5235
|
+
...updateElbowArrowPoints(
|
|
5236
|
+
element,
|
|
5237
|
+
restoredElementsMap,
|
|
5238
|
+
{
|
|
5239
|
+
points: [
|
|
5240
|
+
pointFrom3(0, 0),
|
|
5241
|
+
element.points[element.points.length - 1]
|
|
5242
|
+
]
|
|
5243
|
+
}
|
|
5244
|
+
),
|
|
5245
|
+
index: element.index
|
|
5246
|
+
};
|
|
5247
|
+
}
|
|
5248
|
+
if (isElbowArrow(element) && element.startBinding && element.endBinding && element.startBinding.elementId === element.endBinding.elementId && element.points.length > 1 && element.points.some(
|
|
5249
|
+
([rx, ry]) => Math.abs(rx) > 1e6 || Math.abs(ry) > 1e6
|
|
5250
|
+
)) {
|
|
5251
|
+
console.error("Fixing self-bound elbow arrow", element.id);
|
|
5252
|
+
const boundElement = restoredElementsMap.get(
|
|
5247
5253
|
element.startBinding.elementId
|
|
5248
5254
|
);
|
|
5249
|
-
|
|
5255
|
+
if (!boundElement) {
|
|
5256
|
+
console.error(
|
|
5257
|
+
"Bound element not found",
|
|
5258
|
+
element.startBinding.elementId
|
|
5259
|
+
);
|
|
5260
|
+
return element;
|
|
5261
|
+
}
|
|
5262
|
+
return {
|
|
5263
|
+
...element,
|
|
5264
|
+
x: boundElement.x + boundElement.width / 2,
|
|
5265
|
+
y: boundElement.y - 5,
|
|
5266
|
+
width: boundElement.width,
|
|
5267
|
+
height: boundElement.height,
|
|
5268
|
+
points: [
|
|
5269
|
+
pointFrom3(0, 0),
|
|
5270
|
+
pointFrom3(0, -10),
|
|
5271
|
+
pointFrom3(boundElement.width / 2 + 5, -10),
|
|
5272
|
+
pointFrom3(
|
|
5273
|
+
boundElement.width / 2 + 5,
|
|
5274
|
+
boundElement.height / 2 + 5
|
|
5275
|
+
)
|
|
5276
|
+
]
|
|
5277
|
+
};
|
|
5250
5278
|
}
|
|
5251
|
-
return
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
y: boundElement.y - 5,
|
|
5255
|
-
width: boundElement.width,
|
|
5256
|
-
height: boundElement.height,
|
|
5257
|
-
points: [
|
|
5258
|
-
pointFrom3(0, 0),
|
|
5259
|
-
pointFrom3(0, -10),
|
|
5260
|
-
pointFrom3(boundElement.width / 2 + 5, -10),
|
|
5261
|
-
pointFrom3(
|
|
5262
|
-
boundElement.width / 2 + 5,
|
|
5263
|
-
boundElement.height / 2 + 5
|
|
5264
|
-
)
|
|
5265
|
-
]
|
|
5266
|
-
};
|
|
5267
|
-
}
|
|
5268
|
-
return element;
|
|
5269
|
-
});
|
|
5279
|
+
return element;
|
|
5280
|
+
})
|
|
5281
|
+
);
|
|
5270
5282
|
};
|
|
5271
5283
|
var coalesceAppStateValue = (key, appState, defaultAppState) => {
|
|
5272
5284
|
const value = appState[key];
|
|
@@ -5389,7 +5401,7 @@ var parseFileContents = async (blob) => {
|
|
|
5389
5401
|
let contents;
|
|
5390
5402
|
if (blob.type === MIME_TYPES6.png) {
|
|
5391
5403
|
try {
|
|
5392
|
-
return await (await import("./data/image-
|
|
5404
|
+
return await (await import("./data/image-GYAOLTNI.js")).decodePngMetadata(blob);
|
|
5393
5405
|
} catch (error) {
|
|
5394
5406
|
if (error.message === "INVALID") {
|
|
5395
5407
|
throw new ImageSceneDataError(
|
|
@@ -5791,6 +5803,7 @@ export {
|
|
|
5791
5803
|
saveAsJSON,
|
|
5792
5804
|
loadFromJSON,
|
|
5793
5805
|
getLinkHandleFromCoords,
|
|
5806
|
+
isPointHittingLinkIcon,
|
|
5794
5807
|
isPointHittingLink,
|
|
5795
5808
|
fillCircle,
|
|
5796
5809
|
getNormalizedCanvasDimensions,
|
|
@@ -5825,4 +5838,4 @@ export {
|
|
|
5825
5838
|
createFile,
|
|
5826
5839
|
normalizeFile
|
|
5827
5840
|
};
|
|
5828
|
-
//# sourceMappingURL=chunk-
|
|
5841
|
+
//# sourceMappingURL=chunk-7GX2B2N5.js.map
|