@lvce-editor/iframe-worker 5.10.0 → 5.11.0

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.
@@ -896,11 +896,11 @@ const createLocalHostUrl = (locationProtocol, locationHost, isGitpod, webViewPor
896
896
  return `http://localhost:${webViewPort}`;
897
897
  };
898
898
 
899
- const getIframeSrcRemoteBaseUrl = (webViewRoot, locationOrigin, platform, webViewId, useNewWebViewHandler) => {
899
+ const getIframeSrcRemoteBaseUrl = (webViewRoot, locationOrigin, platform, webViewId, useNewWebViewHandler, root) => {
900
900
  if (webViewRoot && (webViewRoot.startsWith('http:') || webViewRoot.startsWith('https:'))) {
901
901
  if (webViewRoot.startsWith(locationOrigin)) {
902
902
  const baseUrl = webViewRoot.slice(locationOrigin.length);
903
- return baseUrl;
903
+ return `/remote${root}${baseUrl}`;
904
904
  }
905
905
  return webViewRoot;
906
906
  }
@@ -982,7 +982,7 @@ const getIframeSrcRemote = (webViews, webViewPort, webViewId, locationProtocol,
982
982
  webViewRoot = webView.uri;
983
983
  iframeSrc = createLocalHostUrl(locationProtocol, locationHost, isGitpod, webViewPort, webViewId, useNewWebViewHandler);
984
984
  }
985
- const baseUrl = getIframeSrcRemoteBaseUrl(webViewRoot, locationOrigin, platform$1, webViewId, useNewWebViewHandler);
985
+ const baseUrl = getIframeSrcRemoteBaseUrl(webViewRoot, locationOrigin, platform$1, webViewId, useNewWebViewHandler, root);
986
986
  const iframeContent = getWebViewHtml(baseUrl, '', webView.elements, assetDir);
987
987
  // TODO either
988
988
  // - load webviews the same as in web using blob urls
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/iframe-worker",
3
- "version": "5.10.0",
3
+ "version": "5.11.0",
4
4
  "description": "Web Worker to manage creation and lifecycle of iframes in Lvce Editor",
5
5
  "main": "dist/iframeWorkerMain.js",
6
6
  "type": "module",