@snowcone-app/ui 0.4.11 → 0.4.13
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 +14 -0
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/services/CanvasExportService.ts +10 -1
- package/src/services/__tests__/CanvasExportService.emptyState.test.ts +48 -0
package/dist/index.js
CHANGED
|
@@ -8538,7 +8538,7 @@ var CanvasExportService = class _CanvasExportService {
|
|
|
8538
8538
|
handleStateChange = (state) => {
|
|
8539
8539
|
if (!state) return;
|
|
8540
8540
|
const hasElements = state.elements?.length > 0;
|
|
8541
|
-
if (!hasElements) return;
|
|
8541
|
+
if (!hasElements && !this.jsonModeSentSuccessfully) return;
|
|
8542
8542
|
const hasLoadingImages = state.elements?.some(
|
|
8543
8543
|
(el) => (el.type === "image" || el.transformType === "image") && el.imageLoadState === "loading"
|
|
8544
8544
|
);
|
|
@@ -8626,6 +8626,8 @@ var CanvasExportService = class _CanvasExportService {
|
|
|
8626
8626
|
this.stateChangeThrottleTimeout = null;
|
|
8627
8627
|
}
|
|
8628
8628
|
this.stateChangeLastSendTime = 0;
|
|
8629
|
+
this.jsonModeSentSuccessfully = false;
|
|
8630
|
+
this.pendingCanvasState = null;
|
|
8629
8631
|
if (this.clearImageBitmapCache) {
|
|
8630
8632
|
this.clearImageBitmapCache();
|
|
8631
8633
|
}
|