@gudhub/ssg-web-components-library 1.0.84 → 1.0.85

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gudhub/ssg-web-components-library",
3
- "version": "1.0.84",
3
+ "version": "1.0.85",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -8,5 +8,6 @@
8
8
  id="image-after"
9
9
  src="${after}"
10
10
  alt="After renovation"
11
+ class="hidden"
11
12
  />
12
13
  </div>
@@ -19,6 +19,8 @@ class AiImageCompare extends GHComponent {
19
19
 
20
20
  initImageCompare() {
21
21
  const element = this.querySelector("div#image-compare");
22
+ const imageAfter = element.querySelector('#image-after')
23
+
22
24
  if (!element || typeof window.ImageCompare === 'undefined') {
23
25
  console.error("ImageCompare is not available or element not found.");
24
26
  return;
@@ -33,6 +35,7 @@ class AiImageCompare extends GHComponent {
33
35
  hoverStart: true
34
36
  }
35
37
  new window.ImageCompare(element, options).mount();
38
+ imageAfter.classList.remove('hidden');
36
39
  }
37
40
 
38
41
  addScripts() {
@@ -82,7 +82,7 @@ class AiImageGenerator extends GHComponent {
82
82
  loader.classList.remove("hidden");
83
83
 
84
84
  try {
85
- const response = await fetch("https://ai.applet3d.com/api/image-upload", {
85
+ const response = await fetch("https://ai.applet3d.com/api/sketch-to-render-ai/image-upload", {
86
86
  method: "POST",
87
87
  body: formData,
88
88
  });