labellife-design-tool 1.2.4 → 1.2.6

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.
@@ -3365,6 +3365,7 @@ var CanvasEditor = ({
3365
3365
  useEffect4(() => {
3366
3366
  if (externalStore) {
3367
3367
  const handleDesignChange = (newDesign) => {
3368
+ console.log("Design changed - New pages:", newDesign.pages.length);
3368
3369
  setDesign(newDesign);
3369
3370
  };
3370
3371
  const handleActivePageChange = (pageId) => {
@@ -3376,7 +3377,17 @@ var CanvasEditor = ({
3376
3377
  externalStore.on("designChanged", handleDesignChange);
3377
3378
  externalStore.on("activePageChanged", handleActivePageChange);
3378
3379
  externalStore.on("activePanelChanged", handleActivePanelChange);
3380
+ console.log("CanvasEditor useEffect - Store pages:", externalStore.design.pages.length);
3381
+ console.log("CanvasEditor useEffect - Store activePageId:", externalStore.activePageId);
3382
+ console.log("CanvasEditor useEffect - Internal design pages:", design.pages.length);
3383
+ console.log("CanvasEditor useEffect - Internal currentPageId:", currentPageId);
3384
+ if (externalStore.design.pages.length > 0) {
3385
+ console.log("Forcing initial sync with store design...");
3386
+ setDesign(externalStore.design);
3387
+ setCurrentPageId(externalStore.activePageId || externalStore.design.pages[0].id);
3388
+ }
3379
3389
  if (externalStore.design.pages.length === 0) {
3390
+ console.log("CanvasEditor creating default page...");
3380
3391
  externalStore.addPage();
3381
3392
  }
3382
3393
  return () => {
@@ -3365,6 +3365,7 @@ var CanvasEditor = ({
3365
3365
  useEffect4(() => {
3366
3366
  if (externalStore) {
3367
3367
  const handleDesignChange = (newDesign) => {
3368
+ console.log("Design changed - New pages:", newDesign.pages.length);
3368
3369
  setDesign(newDesign);
3369
3370
  };
3370
3371
  const handleActivePageChange = (pageId) => {
@@ -3376,7 +3377,17 @@ var CanvasEditor = ({
3376
3377
  externalStore.on("designChanged", handleDesignChange);
3377
3378
  externalStore.on("activePageChanged", handleActivePageChange);
3378
3379
  externalStore.on("activePanelChanged", handleActivePanelChange);
3380
+ console.log("CanvasEditor useEffect - Store pages:", externalStore.design.pages.length);
3381
+ console.log("CanvasEditor useEffect - Store activePageId:", externalStore.activePageId);
3382
+ console.log("CanvasEditor useEffect - Internal design pages:", design.pages.length);
3383
+ console.log("CanvasEditor useEffect - Internal currentPageId:", currentPageId);
3384
+ if (externalStore.design.pages.length > 0) {
3385
+ console.log("Forcing initial sync with store design...");
3386
+ setDesign(externalStore.design);
3387
+ setCurrentPageId(externalStore.activePageId || externalStore.design.pages[0].id);
3388
+ }
3379
3389
  if (externalStore.design.pages.length === 0) {
3390
+ console.log("CanvasEditor creating default page...");
3380
3391
  externalStore.addPage();
3381
3392
  }
3382
3393
  return () => {
@@ -1 +1 @@
1
- {"version":3,"file":"CanvasEditor.d.ts","sourceRoot":"","sources":["../../src/CanvasEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6F,MAAM,OAAO,CAAC;AAkFlH,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAqB,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE3E,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,iBAAiB,CAAA;CAAE,CA2iCxF,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"CanvasEditor.d.ts","sourceRoot":"","sources":["../../src/CanvasEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6F,MAAM,OAAO,CAAC;AAkFlH,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAqB,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE3E,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,iBAAiB,CAAA;CAAE,CA0jCxF,CAAC;AAEF,eAAe,YAAY,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "labellife-design-tool",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "Professional canvas editor built with React, TypeScript, and Konva",
5
5
  "main": "./dist/lib/lib/index.js",
6
6
  "module": "./dist/lib/lib/index.js",