@haex-space/vault-sdk 2.3.0 → 2.3.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.
package/dist/svelte.js CHANGED
@@ -10,7 +10,7 @@ function installLocalStoragePolyfill() {
10
10
  if (typeof window === "undefined") {
11
11
  return;
12
12
  }
13
- console.log("[HaexHub] Storage Polyfill loading immediately");
13
+ console.log("[HaexSpace] Storage Polyfill loading immediately");
14
14
  let localStorageWorks = false;
15
15
  try {
16
16
  const testKey = "__ls_test__";
@@ -18,7 +18,7 @@ function installLocalStoragePolyfill() {
18
18
  localStorage.removeItem(testKey);
19
19
  localStorageWorks = true;
20
20
  } catch (e) {
21
- console.warn("[HaexHub] localStorage blocked \u2013 using in-memory fallback");
21
+ console.warn("[HaexSpace] localStorage blocked \u2013 using in-memory fallback");
22
22
  }
23
23
  if (!localStorageWorks) {
24
24
  const lsStorage = /* @__PURE__ */ new Map();
@@ -51,7 +51,7 @@ function installLocalStoragePolyfill() {
51
51
  } catch (e) {
52
52
  window.localStorage = localStoragePoly;
53
53
  }
54
- console.log("[HaexHub] localStorage replaced with in-memory polyfill");
54
+ console.log("[HaexSpace] localStorage replaced with in-memory polyfill");
55
55
  }
56
56
  }
57
57
  function installSessionStoragePolyfill() {
@@ -96,7 +96,7 @@ function installSessionStoragePolyfill() {
96
96
  key: () => null
97
97
  };
98
98
  }
99
- console.log("[HaexHub] sessionStorage polyfill installed");
99
+ console.log("[HaexSpace] sessionStorage polyfill installed");
100
100
  }
101
101
 
102
102
  // src/polyfills/cookies.ts
@@ -109,7 +109,7 @@ function installCookiePolyfill() {
109
109
  document.cookie = "__cookie_test__=1";
110
110
  cookiesWork = document.cookie.indexOf("__cookie_test__") !== -1;
111
111
  } catch (e) {
112
- console.warn("[HaexHub] Cookies blocked \u2013 using in-memory fallback");
112
+ console.warn("[HaexSpace] Cookies blocked \u2013 using in-memory fallback");
113
113
  }
114
114
  if (!cookiesWork) {
115
115
  const cookieStore = /* @__PURE__ */ new Map();
@@ -155,7 +155,7 @@ function installCookiePolyfill() {
155
155
  },
156
156
  configurable: true
157
157
  });
158
- console.log("[HaexHub] Cookie polyfill installed");
158
+ console.log("[HaexSpace] Cookie polyfill installed");
159
159
  }
160
160
  }
161
161
 
@@ -165,16 +165,16 @@ function installHistoryPolyfill() {
165
165
  return;
166
166
  }
167
167
  const install = () => {
168
- console.log("[HaexHub] History Patch loading");
168
+ console.log("[HaexSpace] History Patch loading");
169
169
  const originalPushState = history.pushState;
170
170
  const originalReplaceState = history.replaceState;
171
171
  let skipNextPush = false;
172
172
  let skipNextReplace = false;
173
173
  history.pushState = function(state, title, url) {
174
- console.log("[HaexHub] pushState called:", url, "skip:", skipNextPush);
174
+ console.log("[HaexSpace] pushState called:", url, "skip:", skipNextPush);
175
175
  if (skipNextPush) {
176
176
  skipNextPush = false;
177
- console.log("[HaexHub] pushState skipped");
177
+ console.log("[HaexSpace] pushState skipped");
178
178
  return;
179
179
  }
180
180
  try {
@@ -184,7 +184,7 @@ function installHistoryPolyfill() {
184
184
  const urlString = url.toString();
185
185
  let hashUrl = urlString.replace(/^\/#/, "");
186
186
  hashUrl = hashUrl.startsWith("#") ? hashUrl : "#" + hashUrl;
187
- console.log("[HaexHub] SecurityError - setting hash to:", hashUrl);
187
+ console.log("[HaexSpace] SecurityError - setting hash to:", hashUrl);
188
188
  skipNextPush = true;
189
189
  window.location.hash = hashUrl.replace(/^#/, "");
190
190
  return;
@@ -193,10 +193,10 @@ function installHistoryPolyfill() {
193
193
  }
194
194
  };
195
195
  history.replaceState = function(state, title, url) {
196
- console.log("[HaexHub] replaceState called:", url, "skip:", skipNextReplace);
196
+ console.log("[HaexSpace] replaceState called:", url, "skip:", skipNextReplace);
197
197
  if (skipNextReplace) {
198
198
  skipNextReplace = false;
199
- console.log("[HaexHub] replaceState skipped");
199
+ console.log("[HaexSpace] replaceState skipped");
200
200
  return;
201
201
  }
202
202
  try {
@@ -206,7 +206,7 @@ function installHistoryPolyfill() {
206
206
  const urlString = url.toString();
207
207
  let hashUrl = urlString.replace(/^\/#/, "");
208
208
  hashUrl = hashUrl.startsWith("#") ? hashUrl : "#" + hashUrl;
209
- console.log("[HaexHub] SecurityError - setting hash to:", hashUrl);
209
+ console.log("[HaexSpace] SecurityError - setting hash to:", hashUrl);
210
210
  skipNextReplace = true;
211
211
  window.location.hash = hashUrl.replace(/^#/, "");
212
212
  return;
@@ -214,7 +214,7 @@ function installHistoryPolyfill() {
214
214
  throw e;
215
215
  }
216
216
  };
217
- console.log("[HaexHub] History API patched");
217
+ console.log("[HaexSpace] History API patched");
218
218
  };
219
219
  if (document.readyState === "loading") {
220
220
  document.addEventListener("DOMContentLoaded", install, { once: true });
@@ -292,7 +292,7 @@ function interceptConsole(level) {
292
292
  "*"
293
293
  );
294
294
  } catch (error) {
295
- originalConsole.error("[HaexHub] Failed to forward console message:", error);
295
+ originalConsole.error("[HaexSpace] Failed to forward console message:", error);
296
296
  }
297
297
  }
298
298
  };
@@ -305,7 +305,7 @@ function installConsoleForwarding(debug = false) {
305
305
  return;
306
306
  }
307
307
  if (!debug) {
308
- console.log("[HaexHub] Console forwarding disabled (not in debug mode)");
308
+ console.log("[HaexSpace] Console forwarding disabled (not in debug mode)");
309
309
  return;
310
310
  }
311
311
  interceptConsole("log");
@@ -313,7 +313,7 @@ function installConsoleForwarding(debug = false) {
313
313
  interceptConsole("warn");
314
314
  interceptConsole("error");
315
315
  interceptConsole("debug");
316
- console.log("[HaexHub] Console forwarding installed");
316
+ console.log("[HaexSpace] Console forwarding installed");
317
317
  }
318
318
 
319
319
  // src/polyfills/index.ts
@@ -325,7 +325,7 @@ function installPolyfills() {
325
325
  installSessionStoragePolyfill();
326
326
  installCookiePolyfill();
327
327
  installHistoryPolyfill();
328
- console.log("[HaexHub] All polyfills loaded successfully");
328
+ console.log("[HaexSpace] All polyfills loaded successfully");
329
329
  installDebugDiagnostics();
330
330
  }
331
331
  if (typeof window !== "undefined") {
@@ -827,13 +827,13 @@ var HaexVaultClient = class {
827
827
  async runSetupAsync() {
828
828
  if (!this.setupHook) return;
829
829
  try {
830
- this.log("[HaexHub] Running setup hook...");
830
+ this.log("[HaexSpace] Running setup hook...");
831
831
  await this.setupHook();
832
832
  this._setupCompleted = true;
833
- this.log("[HaexHub] Setup completed successfully");
833
+ this.log("[HaexSpace] Setup completed successfully");
834
834
  this.notifySubscribers();
835
835
  } catch (error) {
836
- this.log("[HaexHub] Setup failed:", error);
836
+ this.log("[HaexSpace] Setup failed:", error);
837
837
  throw error;
838
838
  }
839
839
  }
@@ -1162,26 +1162,26 @@ var HaexVaultClient = class {
1162
1162
  this.log("Application context:", this._context);
1163
1163
  this.notifySubscribers();
1164
1164
  const { listen } = window.__TAURI__.event;
1165
- console.log("[HaexHub SDK] Setting up Tauri event listener for:", HAEXTENSION_EVENTS.CONTEXT_CHANGED);
1165
+ console.log("[HaexSpace SDK] Setting up Tauri event listener for:", HAEXTENSION_EVENTS.CONTEXT_CHANGED);
1166
1166
  try {
1167
1167
  await listen(HAEXTENSION_EVENTS.CONTEXT_CHANGED, (event) => {
1168
- console.log("[HaexHub SDK] Received Tauri event:", HAEXTENSION_EVENTS.CONTEXT_CHANGED, event);
1168
+ console.log("[HaexSpace SDK] Received Tauri event:", HAEXTENSION_EVENTS.CONTEXT_CHANGED, event);
1169
1169
  this.log("Received context change event:", event);
1170
1170
  if (event.payload?.context) {
1171
1171
  this._context = event.payload.context;
1172
- console.log("[HaexHub SDK] Updated context to:", this._context);
1172
+ console.log("[HaexSpace SDK] Updated context to:", this._context);
1173
1173
  this.handleEvent({
1174
1174
  type: HAEXTENSION_EVENTS.CONTEXT_CHANGED,
1175
1175
  data: { context: this._context },
1176
1176
  timestamp: Date.now()
1177
1177
  });
1178
1178
  } else {
1179
- console.warn("[HaexHub SDK] Event received but no context in payload:", event);
1179
+ console.warn("[HaexSpace SDK] Event received but no context in payload:", event);
1180
1180
  }
1181
1181
  });
1182
- console.log("[HaexHub SDK] Context change listener registered successfully");
1182
+ console.log("[HaexSpace SDK] Context change listener registered successfully");
1183
1183
  } catch (error) {
1184
- console.error("[HaexHub SDK] Failed to setup context change listener:", error);
1184
+ console.error("[HaexSpace SDK] Failed to setup context change listener:", error);
1185
1185
  this.log("Failed to setup context change listener:", error);
1186
1186
  }
1187
1187
  this.resolveReady();
@@ -1198,7 +1198,7 @@ var HaexVaultClient = class {
1198
1198
  window.addEventListener("message", this.messageHandler);
1199
1199
  this.isNativeWindow = false;
1200
1200
  this.initialized = true;
1201
- this.log("HaexHub SDK initialized in iframe mode");
1201
+ this.log("HaexSpace SDK initialized in iframe mode");
1202
1202
  try {
1203
1203
  if (this.config.manifest) {
1204
1204
  this._extensionInfo = {
@@ -1366,7 +1366,7 @@ postMessage error: ${e}`);
1366
1366
  }
1367
1367
  log(...args) {
1368
1368
  if (this.config.debug) {
1369
- console.log("[HaexHub SDK]", ...args);
1369
+ console.log("[HaexSpace SDK]", ...args);
1370
1370
  }
1371
1371
  }
1372
1372
  };