@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/{client-Bw04hBmE.d.mts → client-Bcysw57u.d.mts} +1 -1
- package/dist/{client-CJC-_fwd.d.ts → client-K4BOBLQE.d.ts} +1 -1
- package/dist/index.d.mts +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -4
- package/dist/index.mjs.map +1 -1
- package/dist/node.d.mts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +9 -3
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +9 -3
- package/dist/react.mjs.map +1 -1
- package/dist/runtime/nuxt.plugin.client.d.mts +2 -2
- package/dist/runtime/nuxt.plugin.client.d.ts +2 -2
- package/dist/runtime/nuxt.plugin.client.js +9 -3
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs +9 -3
- package/dist/runtime/nuxt.plugin.client.mjs.map +1 -1
- package/dist/svelte.d.mts +2 -2
- package/dist/svelte.d.ts +2 -2
- package/dist/svelte.js +9 -3
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +9 -3
- package/dist/svelte.mjs.map +1 -1
- package/dist/{types-mMVOhsmm.d.mts → types-CAHAohTY.d.mts} +11 -1
- package/dist/{types-mMVOhsmm.d.ts → types-CAHAohTY.d.ts} +11 -1
- package/dist/vue.d.mts +2 -2
- package/dist/vue.d.ts +2 -2
- package/dist/vue.js +9 -3
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +9 -3
- package/dist/vue.mjs.map +1 -1
- package/package.json +1 -1
package/dist/svelte.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { H as HaexVaultClient, S as StorageAPI } from './client-
|
|
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-
|
|
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-
|
|
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-
|
|
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(
|
|
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:
|
|
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 ===
|
|
1598
|
+
if (event.type === EXTERNAL_EVENTS.REQUEST) {
|
|
1593
1599
|
const externalEvent = event;
|
|
1594
1600
|
onExternalRequest(externalEvent);
|
|
1595
1601
|
return;
|