@haex-space/vault-sdk 2.5.4 → 2.5.7

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.d.mts CHANGED
@@ -1,7 +1,7 @@
1
- import { H as HaexVaultClient, S as StorageAPI } from './client-Bw04hBmE.mjs';
1
+ import { H as HaexVaultClient, S as StorageAPI } from './client-Bcysw57u.mjs';
2
2
  import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
3
3
  import { Readable } from 'svelte/store';
4
- import { H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext } from './types-mMVOhsmm.mjs';
4
+ import { H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext } from './types-CAHAohTY.mjs';
5
5
 
6
6
  /**
7
7
  * Initialize the HaexHub SDK for Svelte
package/dist/svelte.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { H as HaexVaultClient, S as StorageAPI } from './client-CJC-_fwd.js';
1
+ import { H as HaexVaultClient, S as StorageAPI } from './client-K4BOBLQE.js';
2
2
  import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
3
3
  import { Readable } from 'svelte/store';
4
- import { H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext } from './types-mMVOhsmm.js';
4
+ import { H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext } from './types-CAHAohTY.js';
5
5
 
6
6
  /**
7
7
  * Initialize the HaexHub SDK for Svelte
package/dist/svelte.js CHANGED
@@ -339,6 +339,12 @@ var HAEXTENSION_EVENTS = {
339
339
  /** Search request from HaexHub */
340
340
  SEARCH_REQUEST: "haextension:search:request"
341
341
  };
342
+ var EXTERNAL_EVENTS = {
343
+ /** External request from authorized client */
344
+ REQUEST: "haextension:external:request",
345
+ /** New external client requesting authorization */
346
+ AUTHORIZATION_REQUEST: "external:authorization-request"
347
+ };
342
348
 
343
349
  // src/types.ts
344
350
  var DEFAULT_TIMEOUT = 3e4;
@@ -1123,11 +1129,11 @@ async function setupTauriEventListeners(ctx, log, onEvent, onContextChange) {
1123
1129
  log("Failed to setup context change listener:", error);
1124
1130
  }
1125
1131
  try {
1126
- await listen(HAEXTENSION_EVENTS.EXTERNAL_REQUEST, (event) => {
1132
+ await listen(EXTERNAL_EVENTS.REQUEST, (event) => {
1127
1133
  log("Received external request event:", event);
1128
1134
  if (event.payload) {
1129
1135
  onEvent({
1130
- type: HAEXTENSION_EVENTS.EXTERNAL_REQUEST,
1136
+ type: EXTERNAL_EVENTS.REQUEST,
1131
1137
  data: event.payload,
1132
1138
  timestamp: Date.now()
1133
1139
  });
@@ -1589,7 +1595,7 @@ function processEvent(event, log, eventListeners, onContextChanged, onExternalRe
1589
1595
  onContextChanged(contextEvent.data.context);
1590
1596
  log("Context updated:", contextEvent.data.context);
1591
1597
  }
1592
- if (event.type === HAEXTENSION_EVENTS.EXTERNAL_REQUEST) {
1598
+ if (event.type === EXTERNAL_EVENTS.REQUEST) {
1593
1599
  const externalEvent = event;
1594
1600
  onExternalRequest(externalEvent);
1595
1601
  return;