sparkecode-devtools 0.1.42 → 0.1.44
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 +1 -1
- package/sparkecode-select.js +14 -7
package/package.json
CHANGED
package/sparkecode-select.js
CHANGED
|
@@ -598,13 +598,12 @@
|
|
|
598
598
|
toggleActive();
|
|
599
599
|
}
|
|
600
600
|
isDragging = false;
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
}
|
|
601
|
+
};
|
|
602
|
+
|
|
603
|
+
document.addEventListener('mousemove', onMove);
|
|
604
|
+
document.addEventListener('mouseup', onUp);
|
|
605
|
+
document.addEventListener('touchmove', onMove, { passive: false });
|
|
606
|
+
document.addEventListener('touchend', onUp);
|
|
608
607
|
}
|
|
609
608
|
|
|
610
609
|
function createOverlay() {
|
|
@@ -1161,6 +1160,7 @@
|
|
|
1161
1160
|
|
|
1162
1161
|
const iframe = document.getElementById('sparkecode-webframe-iframe');
|
|
1163
1162
|
const loading = document.getElementById('sparkecode-webframe-loading');
|
|
1163
|
+
if (!webFrame || !iframe) return;
|
|
1164
1164
|
|
|
1165
1165
|
// Build embed URL with session ID
|
|
1166
1166
|
let url = getWebUiUrl();
|
|
@@ -1169,6 +1169,13 @@
|
|
|
1169
1169
|
} else {
|
|
1170
1170
|
url += '/embed';
|
|
1171
1171
|
}
|
|
1172
|
+
|
|
1173
|
+
// Pass API base via query param so embed can reach the server
|
|
1174
|
+
const apiUrl = config.sparkecoder?.apiBase || sparkecoderState.apiBase;
|
|
1175
|
+
if (apiUrl) {
|
|
1176
|
+
const joiner = url.includes('?') ? '&' : '?';
|
|
1177
|
+
url += `${joiner}apiUrl=${encodeURIComponent(apiUrl)}`;
|
|
1178
|
+
}
|
|
1172
1179
|
|
|
1173
1180
|
if (iframe && iframe.src !== url) {
|
|
1174
1181
|
if (loading) loading.style.display = 'flex';
|