@hyperbook/markdown 0.42.1 → 0.42.3

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.
@@ -280,8 +280,9 @@ var hyperbook = (function () {
280
280
  const urlParams = new URLSearchParams(window.location.search);
281
281
  const standaloneParam = urlParams.get('standalone') === 'true';
282
282
 
283
- // Check if page is inside an iframe
284
- const isInIframe = window.self !== window.top;
283
+ // Check if page is inside an iframe (but not VSCode webview)
284
+ const isVSCodeWebview = typeof acquireVsCodeApi !== 'undefined';
285
+ const isInIframe = window.self !== window.top && !isVSCodeWebview;
285
286
 
286
287
  if (standaloneParam || isInIframe) {
287
288
  const mainGrid = document.querySelector('.main-grid');
package/dist/index.js CHANGED
@@ -62794,7 +62794,7 @@ window.Prism.manual = true;`
62794
62794
  tagName: "link",
62795
62795
  properties: {
62796
62796
  rel: "stylesheet",
62797
- href: style3.includes("://") ? style3 : makeUrl(style3, "public")
62797
+ href: style3.includes("://") ? style3 : makeUrl(style3, "public", currentPage || void 0)
62798
62798
  },
62799
62799
  children: []
62800
62800
  })
@@ -62907,7 +62907,7 @@ HYPERBOOK_ASSETS = "${makeUrl("/", "assets")}"
62907
62907
  type: "element",
62908
62908
  tagName: "script",
62909
62909
  properties: {
62910
- src: script.includes("://") ? script : makeUrl(script, "public"),
62910
+ src: script.includes("://") ? script : makeUrl(script, "public", currentPage || void 0),
62911
62911
  defer: true
62912
62912
  },
62913
62913
  children: []
@@ -64025,11 +64025,7 @@ var remarkImage_default = (ctx) => () => {
64025
64025
  tagName: "img",
64026
64026
  properties: {
64027
64027
  ...figureProps,
64028
- src: ctx.makeUrl(
64029
- node3.url,
64030
- "public",
64031
- ctx.navigation.current || void 0
64032
- ),
64028
+ src: node3.url,
64033
64029
  alt: node3.alt,
64034
64030
  onclick: `hyperbook.toggleLightbox(this)`
64035
64031
  },