@haex-space/vault-sdk 2.2.7 → 2.3.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.
package/dist/svelte.mjs CHANGED
@@ -221,22 +221,30 @@ function installHistoryPolyfill() {
221
221
  }
222
222
  }
223
223
 
224
+ // src/messages.ts
225
+ var HAEXSPACE_MESSAGE_TYPES = {
226
+ /** Debug message for development/troubleshooting */
227
+ DEBUG: "haexspace:debug",
228
+ /** Console forwarding from extension iframe */
229
+ CONSOLE_FORWARD: "console.forward"
230
+ };
231
+
224
232
  // src/polyfills/debug.ts
225
233
  function installDebugDiagnostics() {
226
234
  if (typeof window === "undefined") {
227
235
  return;
228
236
  }
229
237
  const hasParent = window.parent && window.parent !== window;
230
- console.log("[HaexHub] hasParent:", hasParent);
238
+ console.log("[HaexSpace] hasParent:", hasParent);
231
239
  if (hasParent) {
232
- console.log("[HaexHub] Attempting to send debug message to parent...");
240
+ console.log("[HaexSpace] Attempting to send debug message to parent...");
233
241
  window.parent.postMessage({
234
- type: "haexhub:debug",
242
+ type: HAEXSPACE_MESSAGE_TYPES.DEBUG,
235
243
  data: `[Polyfills] window.parent test: exists=${!!window.parent}, different=${hasParent}, selfIsTop=${window.self === window.top}`
236
244
  }, "*");
237
- console.log("[HaexHub] Debug message sent!");
245
+ console.log("[HaexSpace] Debug message sent!");
238
246
  } else {
239
- console.log("[HaexHub] No parent window or parent === window");
247
+ console.log("[HaexSpace] No parent window or parent === window");
240
248
  }
241
249
  }
242
250
 
@@ -271,7 +279,7 @@ function interceptConsole(level) {
271
279
  const timestamp = (/* @__PURE__ */ new Date()).toLocaleTimeString();
272
280
  window.parent.postMessage(
273
281
  {
274
- type: "console.forward",
282
+ type: HAEXSPACE_MESSAGE_TYPES.CONSOLE_FORWARD,
275
283
  data: {
276
284
  timestamp,
277
285
  level,
@@ -1207,7 +1215,7 @@ window.parent === window: ${window.parent === window}
1207
1215
  window.self === window.top: ${window.self === window.top}`;
1208
1216
  try {
1209
1217
  window.parent.postMessage({
1210
- type: "haexhub:debug",
1218
+ type: HAEXSPACE_MESSAGE_TYPES.DEBUG,
1211
1219
  data: debugInfo
1212
1220
  }, "*");
1213
1221
  } catch (e) {