@myoc/excalidraw 0.19.523 → 0.19.524
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 +70 -1
- package/dist/dev/{chunk-TFX2VD6V.js → chunk-3SND5YQP.js} +48 -5
- package/dist/dev/chunk-3SND5YQP.js.map +7 -0
- package/dist/dev/{chunk-BZ4RT7VO.js → chunk-W3K3P2GO.js} +2 -2
- package/dist/dev/data/{image-PHXNKDOA.js → image-F4TDOTKO.js} +3 -3
- package/dist/dev/index.css +723 -623
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +12510 -12318
- 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-HWRIEZWY.js → chunk-GPFWSM2Y.js} +1 -1
- package/dist/prod/chunk-H5UC5NY3.js +4 -0
- package/dist/prod/data/image-FQV7KQIF.js +1 -0
- package/dist/prod/index.css +1 -1
- 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/components/App.d.ts +4 -2
- package/dist/types/excalidraw/viewport.d.ts +7 -1
- package/package.json +4 -4
- package/dist/dev/chunk-TFX2VD6V.js.map +0 -7
- package/dist/prod/chunk-CLLD5JHX.js +0 -4
- package/dist/prod/data/image-DCK4K5JA.js +0 -1
- /package/dist/dev/{chunk-BZ4RT7VO.js.map → chunk-W3K3P2GO.js.map} +0 -0
- /package/dist/dev/data/{image-PHXNKDOA.js.map → image-F4TDOTKO.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -65,7 +65,6 @@ Please add the latest change on the top under the correct section.
|
|
|
65
65
|
|
|
66
66
|
---
|
|
67
67
|
|
|
68
|
-
|
|
69
68
|
## 0.19.503 (2026-03-22)
|
|
70
69
|
|
|
71
70
|
## Excalidraw API
|
|
@@ -4297,6 +4296,7 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
4297
4296
|
- Incorrect import for color (was moved to common)
|
|
4298
4297
|
|
|
4299
4298
|
---
|
|
4299
|
+
|
|
4300
4300
|
## Excalidraw Library
|
|
4301
4301
|
|
|
4302
4302
|
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
@@ -4350,6 +4350,7 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
4350
4350
|
- Incorrect import for color (was moved to common)
|
|
4351
4351
|
|
|
4352
4352
|
---
|
|
4353
|
+
|
|
4353
4354
|
## Excalidraw Library
|
|
4354
4355
|
|
|
4355
4356
|
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
@@ -4403,6 +4404,7 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
4403
4404
|
- Incorrect import for color (was moved to common)
|
|
4404
4405
|
|
|
4405
4406
|
---
|
|
4407
|
+
|
|
4406
4408
|
## Excalidraw Library
|
|
4407
4409
|
|
|
4408
4410
|
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
@@ -4456,6 +4458,7 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
4456
4458
|
- Incorrect import for color (was moved to common)
|
|
4457
4459
|
|
|
4458
4460
|
---
|
|
4461
|
+
|
|
4459
4462
|
## Excalidraw Library
|
|
4460
4463
|
|
|
4461
4464
|
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
@@ -4509,6 +4512,7 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
4509
4512
|
- Incorrect import for color (was moved to common)
|
|
4510
4513
|
|
|
4511
4514
|
---
|
|
4515
|
+
|
|
4512
4516
|
## Excalidraw Library
|
|
4513
4517
|
|
|
4514
4518
|
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
@@ -4562,6 +4566,7 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
4562
4566
|
- Incorrect import for color (was moved to common)
|
|
4563
4567
|
|
|
4564
4568
|
---
|
|
4569
|
+
|
|
4565
4570
|
## Excalidraw Library
|
|
4566
4571
|
|
|
4567
4572
|
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
@@ -4615,6 +4620,7 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
4615
4620
|
- Incorrect import for color (was moved to common)
|
|
4616
4621
|
|
|
4617
4622
|
---
|
|
4623
|
+
|
|
4618
4624
|
## Excalidraw Library
|
|
4619
4625
|
|
|
4620
4626
|
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
@@ -4668,6 +4674,7 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
4668
4674
|
- Incorrect import for color (was moved to common)
|
|
4669
4675
|
|
|
4670
4676
|
---
|
|
4677
|
+
|
|
4671
4678
|
## Excalidraw Library
|
|
4672
4679
|
|
|
4673
4680
|
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
@@ -4721,6 +4728,7 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
4721
4728
|
- Incorrect import for color (was moved to common)
|
|
4722
4729
|
|
|
4723
4730
|
---
|
|
4731
|
+
|
|
4724
4732
|
## Excalidraw Library
|
|
4725
4733
|
|
|
4726
4734
|
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
@@ -4774,6 +4782,7 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
4774
4782
|
- Incorrect import for color (was moved to common)
|
|
4775
4783
|
|
|
4776
4784
|
---
|
|
4785
|
+
|
|
4777
4786
|
## Excalidraw Library
|
|
4778
4787
|
|
|
4779
4788
|
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
@@ -4827,6 +4836,7 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
4827
4836
|
- Incorrect import for color (was moved to common)
|
|
4828
4837
|
|
|
4829
4838
|
---
|
|
4839
|
+
|
|
4830
4840
|
## Excalidraw Library
|
|
4831
4841
|
|
|
4832
4842
|
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
@@ -4880,6 +4890,7 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
4880
4890
|
- Incorrect import for color (was moved to common)
|
|
4881
4891
|
|
|
4882
4892
|
---
|
|
4893
|
+
|
|
4883
4894
|
## Excalidraw Library
|
|
4884
4895
|
|
|
4885
4896
|
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
@@ -4933,6 +4944,7 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
4933
4944
|
- Incorrect import for color (was moved to common)
|
|
4934
4945
|
|
|
4935
4946
|
---
|
|
4947
|
+
|
|
4936
4948
|
## Excalidraw Library
|
|
4937
4949
|
|
|
4938
4950
|
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
@@ -4986,6 +4998,7 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
4986
4998
|
- Incorrect import for color (was moved to common)
|
|
4987
4999
|
|
|
4988
5000
|
---
|
|
5001
|
+
|
|
4989
5002
|
## Excalidraw Library
|
|
4990
5003
|
|
|
4991
5004
|
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
@@ -5039,6 +5052,7 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
5039
5052
|
- Incorrect import for color (was moved to common)
|
|
5040
5053
|
|
|
5041
5054
|
---
|
|
5055
|
+
|
|
5042
5056
|
## Excalidraw Library
|
|
5043
5057
|
|
|
5044
5058
|
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
@@ -5092,6 +5106,7 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
5092
5106
|
- Incorrect import for color (was moved to common)
|
|
5093
5107
|
|
|
5094
5108
|
---
|
|
5109
|
+
|
|
5095
5110
|
## Excalidraw Library
|
|
5096
5111
|
|
|
5097
5112
|
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
@@ -5145,6 +5160,7 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
5145
5160
|
- Incorrect import for color (was moved to common)
|
|
5146
5161
|
|
|
5147
5162
|
---
|
|
5163
|
+
|
|
5148
5164
|
## Excalidraw Library
|
|
5149
5165
|
|
|
5150
5166
|
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
@@ -5198,6 +5214,7 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
5198
5214
|
- Incorrect import for color (was moved to common)
|
|
5199
5215
|
|
|
5200
5216
|
---
|
|
5217
|
+
|
|
5201
5218
|
## Excalidraw Library
|
|
5202
5219
|
|
|
5203
5220
|
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
@@ -5250,5 +5267,57 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
5250
5267
|
|
|
5251
5268
|
- Incorrect import for color (was moved to common)
|
|
5252
5269
|
|
|
5270
|
+
---## Excalidraw Library
|
|
5271
|
+
|
|
5272
|
+
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
5273
|
+
|
|
5274
|
+
### Features
|
|
5275
|
+
|
|
5276
|
+
- Add ability to turn off compression for files that are smaller than a given size
|
|
5277
|
+
|
|
5278
|
+
- Add lock tool to the dropdown and also add the status of the extra tools to be the same icon as the selected tool
|
|
5279
|
+
|
|
5280
|
+
- Add view mode button
|
|
5281
|
+
|
|
5282
|
+
- Add multiple image copy paste or drag and drop
|
|
5283
|
+
|
|
5284
|
+
- Multiple image additions from clipboard
|
|
5285
|
+
|
|
5286
|
+
- Add arrange elements action
|
|
5287
|
+
|
|
5288
|
+
- Add top picks to appProps for both stoke color and background color
|
|
5289
|
+
|
|
5290
|
+
### Fixes
|
|
5291
|
+
|
|
5292
|
+
- Issues
|
|
5293
|
+
|
|
5294
|
+
- Make mobile mode more myoc looking
|
|
5295
|
+
|
|
5296
|
+
- Add normalise functionality
|
|
5297
|
+
|
|
5298
|
+
- Update with excalidraw
|
|
5299
|
+
|
|
5300
|
+
- Fix imports
|
|
5301
|
+
|
|
5302
|
+
- Fix mutateGroup to use scene.mutateGroup
|
|
5303
|
+
|
|
5304
|
+
- Imports
|
|
5305
|
+
|
|
5306
|
+
- Ensure that fileId is different for compressed vs uncompressed file
|
|
5307
|
+
|
|
5308
|
+
- Remove not working prop for dontResizeLimitMBs
|
|
5309
|
+
|
|
5310
|
+
- Add smartview for mobile
|
|
5311
|
+
|
|
5312
|
+
- Hide the alignment buttons if there is only one group selected (they do nothing if only one group is selected)
|
|
5313
|
+
|
|
5314
|
+
- Use css vars already provided instead of hard coding directly from oc-gray
|
|
5315
|
+
|
|
5316
|
+
- Remove unused variables
|
|
5317
|
+
|
|
5318
|
+
- Pass the new top pick color props properly
|
|
5319
|
+
|
|
5320
|
+
- Incorrect import for color (was moved to common)
|
|
5321
|
+
|
|
5253
5322
|
---
|
|
5254
5323
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
define_import_meta_env_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W3K3P2GO.js";
|
|
4
4
|
import {
|
|
5
5
|
__publicField
|
|
6
6
|
} from "./chunk-XDFCUUT6.js";
|
|
@@ -486,7 +486,8 @@ var zoomToFitBounds = ({
|
|
|
486
486
|
fit = "scale-down",
|
|
487
487
|
minZoom = -Infinity,
|
|
488
488
|
maxZoom = Infinity,
|
|
489
|
-
steppedZoom = false
|
|
489
|
+
steppedZoom = false,
|
|
490
|
+
viewportZoomFactor = 1
|
|
490
491
|
}) => {
|
|
491
492
|
const [x1, y1, x2, y2] = bounds;
|
|
492
493
|
const centerX = (x1 + x2) / 2;
|
|
@@ -513,7 +514,8 @@ var zoomToFitBounds = ({
|
|
|
513
514
|
height: effectiveCanvasHeight
|
|
514
515
|
});
|
|
515
516
|
}
|
|
516
|
-
const
|
|
517
|
+
const scaledZoomValue = fit === "none" ? adjustedZoomValue : adjustedZoomValue * viewportZoomFactor;
|
|
518
|
+
const targetZoomValue = steppedZoom && fit !== "none" ? roundToStep(scaledZoomValue, ZOOM_STEP, "floor") : scaledZoomValue;
|
|
517
519
|
const newZoomValue = getNormalizedZoom(
|
|
518
520
|
clamp(targetZoomValue, minZoom, maxZoom)
|
|
519
521
|
);
|
|
@@ -4663,6 +4665,8 @@ import {
|
|
|
4663
4665
|
DEFAULT_ELEMENT_PROPS as DEFAULT_ELEMENT_PROPS2,
|
|
4664
4666
|
DEFAULT_GRID_SIZE as DEFAULT_GRID_SIZE2,
|
|
4665
4667
|
DEFAULT_GRID_STEP as DEFAULT_GRID_STEP2,
|
|
4668
|
+
COLOR_TOP_PICKS_SLOTS,
|
|
4669
|
+
colorToHex,
|
|
4666
4670
|
randomId,
|
|
4667
4671
|
getUpdatedTimestamp,
|
|
4668
4672
|
updateActiveTool,
|
|
@@ -5280,6 +5284,41 @@ var LegacyAppStateMigrations = {
|
|
|
5280
5284
|
];
|
|
5281
5285
|
}
|
|
5282
5286
|
};
|
|
5287
|
+
var restoreColorTopPicks = (colorTopPicks, defaultColorTopPicks) => {
|
|
5288
|
+
if (!colorTopPicks) {
|
|
5289
|
+
return defaultColorTopPicks;
|
|
5290
|
+
}
|
|
5291
|
+
const restorePicks = (picks) => {
|
|
5292
|
+
if (!Array.isArray(picks)) {
|
|
5293
|
+
return null;
|
|
5294
|
+
}
|
|
5295
|
+
const seen = /* @__PURE__ */ new Set();
|
|
5296
|
+
const restored = [];
|
|
5297
|
+
for (const pick of picks) {
|
|
5298
|
+
if (typeof pick !== "string") {
|
|
5299
|
+
continue;
|
|
5300
|
+
}
|
|
5301
|
+
const normalized = colorToHex(pick);
|
|
5302
|
+
if (!normalized) {
|
|
5303
|
+
continue;
|
|
5304
|
+
}
|
|
5305
|
+
if (seen.has(normalized)) {
|
|
5306
|
+
continue;
|
|
5307
|
+
}
|
|
5308
|
+
seen.add(normalized);
|
|
5309
|
+
restored.push(pick);
|
|
5310
|
+
if (restored.length === COLOR_TOP_PICKS_SLOTS) {
|
|
5311
|
+
break;
|
|
5312
|
+
}
|
|
5313
|
+
}
|
|
5314
|
+
return restored;
|
|
5315
|
+
};
|
|
5316
|
+
return {
|
|
5317
|
+
elementStroke: restorePicks(colorTopPicks?.elementStroke),
|
|
5318
|
+
elementBackground: restorePicks(colorTopPicks?.elementBackground),
|
|
5319
|
+
bucketFill: restorePicks(colorTopPicks?.bucketFill)
|
|
5320
|
+
};
|
|
5321
|
+
};
|
|
5283
5322
|
var restoreAppState = (appState, localAppState) => {
|
|
5284
5323
|
appState = appState || {};
|
|
5285
5324
|
const defaultAppState = getDefaultAppState();
|
|
@@ -5330,6 +5369,10 @@ var restoreAppState = (appState, localAppState) => {
|
|
|
5330
5369
|
// string (legacy)
|
|
5331
5370
|
typeof appState.openSidebar === "string" ? { name: DEFAULT_SIDEBAR.name } : nextAppState.openSidebar
|
|
5332
5371
|
),
|
|
5372
|
+
colorTopPicks: restoreColorTopPicks(
|
|
5373
|
+
appState.colorTopPicks,
|
|
5374
|
+
defaultAppState.colorTopPicks
|
|
5375
|
+
),
|
|
5333
5376
|
gridSize: getNormalizedGridSize(
|
|
5334
5377
|
isFiniteNumber(appState.gridSize) ? appState.gridSize : DEFAULT_GRID_SIZE2
|
|
5335
5378
|
),
|
|
@@ -5346,7 +5389,7 @@ var parseFileContents = async (blob) => {
|
|
|
5346
5389
|
let contents;
|
|
5347
5390
|
if (blob.type === MIME_TYPES6.png) {
|
|
5348
5391
|
try {
|
|
5349
|
-
return await (await import("./data/image-
|
|
5392
|
+
return await (await import("./data/image-F4TDOTKO.js")).decodePngMetadata(blob);
|
|
5350
5393
|
} catch (error) {
|
|
5351
5394
|
if (error.message === "INVALID") {
|
|
5352
5395
|
throw new ImageSceneDataError(
|
|
@@ -5782,4 +5825,4 @@ export {
|
|
|
5782
5825
|
createFile,
|
|
5783
5826
|
normalizeFile
|
|
5784
5827
|
};
|
|
5785
|
-
//# sourceMappingURL=chunk-
|
|
5828
|
+
//# sourceMappingURL=chunk-3SND5YQP.js.map
|