@haex-space/vault-sdk 2.3.0 → 2.3.1

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