@yoamigo.com/core 0.1.9 → 0.1.10

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/index.js CHANGED
@@ -579,14 +579,14 @@ var BuilderSelectionManager = class {
579
579
  async captureRegionScreenshot(region) {
580
580
  try {
581
581
  console.log("[BuilderSelection] Capturing region screenshot:", region);
582
- const html2canvas = (await import("html2canvas")).default;
582
+ const html2canvas = (await import("html2canvas-pro")).default;
583
583
  const overlays = document.querySelectorAll(".builder-selection-container, #builder-hover-overlay");
584
584
  overlays.forEach((el) => {
585
585
  ;
586
586
  el.style.display = "none";
587
587
  });
588
588
  const canvas = await html2canvas(document.body, {
589
- scale: window.devicePixelRatio || 1,
589
+ scale: 1,
590
590
  logging: false,
591
591
  useCORS: true,
592
592
  allowTaint: true,
@@ -597,12 +597,11 @@ var BuilderSelectionManager = class {
597
597
  ;
598
598
  el.style.display = "";
599
599
  });
600
- const scale = window.devicePixelRatio || 1;
601
600
  const scaledRegion = {
602
- x: Math.round(region.x * scale),
603
- y: Math.round(region.y * scale),
604
- width: Math.round(region.width * scale),
605
- height: Math.round(region.height * scale)
601
+ x: Math.round(region.x),
602
+ y: Math.round(region.y),
603
+ width: Math.round(region.width),
604
+ height: Math.round(region.height)
606
605
  };
607
606
  const croppedCanvas = document.createElement("canvas");
608
607
  croppedCanvas.width = scaledRegion.width;
package/dist/lib.js CHANGED
@@ -538,14 +538,14 @@ var BuilderSelectionManager = class {
538
538
  async captureRegionScreenshot(region) {
539
539
  try {
540
540
  console.log("[BuilderSelection] Capturing region screenshot:", region);
541
- const html2canvas = (await import("html2canvas")).default;
541
+ const html2canvas = (await import("html2canvas-pro")).default;
542
542
  const overlays = document.querySelectorAll(".builder-selection-container, #builder-hover-overlay");
543
543
  overlays.forEach((el) => {
544
544
  ;
545
545
  el.style.display = "none";
546
546
  });
547
547
  const canvas = await html2canvas(document.body, {
548
- scale: window.devicePixelRatio || 1,
548
+ scale: 1,
549
549
  logging: false,
550
550
  useCORS: true,
551
551
  allowTaint: true,
@@ -556,12 +556,11 @@ var BuilderSelectionManager = class {
556
556
  ;
557
557
  el.style.display = "";
558
558
  });
559
- const scale = window.devicePixelRatio || 1;
560
559
  const scaledRegion = {
561
- x: Math.round(region.x * scale),
562
- y: Math.round(region.y * scale),
563
- width: Math.round(region.width * scale),
564
- height: Math.round(region.height * scale)
560
+ x: Math.round(region.x),
561
+ y: Math.round(region.y),
562
+ width: Math.round(region.width),
563
+ height: Math.round(region.height)
565
564
  };
566
565
  const croppedCanvas = document.createElement("canvas");
567
566
  croppedCanvas.width = scaledRegion.width;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoamigo.com/core",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Core components, router, and utilities for YoAmigo templates",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -63,7 +63,7 @@
63
63
  },
64
64
  "dependencies": {
65
65
  "clsx": "^2.1.1",
66
- "html2canvas": "^1.4.1",
66
+ "html2canvas-pro": "^1.6.1",
67
67
  "preact": "^10.27.2",
68
68
  "wouter": "^3.8.0"
69
69
  },