@haex-space/vault-sdk 1.0.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/README.md +1551 -0
- package/dist/cli/index.d.mts +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +455 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/index.mjs +430 -0
- package/dist/cli/index.mjs.map +1 -0
- package/dist/client-O_JEOzfx.d.mts +491 -0
- package/dist/client-O_JEOzfx.d.ts +491 -0
- package/dist/index.d.mts +124 -0
- package/dist/index.d.ts +124 -0
- package/dist/index.js +1429 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1409 -0
- package/dist/index.mjs.map +1 -0
- package/dist/node.d.mts +25 -0
- package/dist/node.d.ts +25 -0
- package/dist/node.js +28 -0
- package/dist/node.js.map +1 -0
- package/dist/node.mjs +25 -0
- package/dist/node.mjs.map +1 -0
- package/dist/nuxt.d.mts +19 -0
- package/dist/nuxt.d.ts +19 -0
- package/dist/nuxt.js +473 -0
- package/dist/nuxt.js.map +1 -0
- package/dist/nuxt.mjs +470 -0
- package/dist/nuxt.mjs.map +1 -0
- package/dist/react.d.mts +28 -0
- package/dist/react.d.ts +28 -0
- package/dist/react.js +1389 -0
- package/dist/react.js.map +1 -0
- package/dist/react.mjs +1386 -0
- package/dist/react.mjs.map +1 -0
- package/dist/runtime/nuxt.plugin.client.d.mts +43 -0
- package/dist/runtime/nuxt.plugin.client.d.ts +43 -0
- package/dist/runtime/nuxt.plugin.client.js +1137 -0
- package/dist/runtime/nuxt.plugin.client.js.map +1 -0
- package/dist/runtime/nuxt.plugin.client.mjs +1135 -0
- package/dist/runtime/nuxt.plugin.client.mjs.map +1 -0
- package/dist/runtime/nuxt.types.d.ts +15 -0
- package/dist/svelte.d.mts +48 -0
- package/dist/svelte.d.ts +48 -0
- package/dist/svelte.js +1398 -0
- package/dist/svelte.js.map +1 -0
- package/dist/svelte.mjs +1391 -0
- package/dist/svelte.mjs.map +1 -0
- package/dist/vite.d.mts +37 -0
- package/dist/vite.d.ts +37 -0
- package/dist/vite.js +346 -0
- package/dist/vite.js.map +1 -0
- package/dist/vite.mjs +341 -0
- package/dist/vite.mjs.map +1 -0
- package/dist/vue.d.mts +49 -0
- package/dist/vue.d.ts +49 -0
- package/dist/vue.js +1388 -0
- package/dist/vue.js.map +1 -0
- package/dist/vue.mjs +1385 -0
- package/dist/vue.mjs.map +1 -0
- package/package.json +121 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { H as HaexHubConfig, a as HaexVaultClient } from './client-O_JEOzfx.js';
|
|
2
|
+
export { A as ApplicationContext, C as ContextChangedEvent, u as DEFAULT_TIMEOUT, D as DatabaseAPI, m as DatabaseColumnInfo, k as DatabaseExecuteParams, g as DatabasePermission, h as DatabasePermissionRequest, i as DatabaseQueryParams, j as DatabaseQueryResult, l as DatabaseTableInfo, t as ErrorCode, e as EventCallback, E as ExtensionInfo, F as FilesystemAPI, w as HAEXTENSION_EVENTS, v as HaexHubError, d as HaexHubEvent, b as HaexHubRequest, c as HaexHubResponse, x as HaextensionEvent, f as PermissionResponse, s as PermissionStatus, P as PermissionsAPI, n as SearchQuery, p as SearchRequestEvent, o as SearchResult, T as TABLE_SEPARATOR, W as WebAPI, q as WebRequestOptions, r as WebResponse } from './client-O_JEOzfx.js';
|
|
3
|
+
export { HaextensionConfig } from './node.js';
|
|
4
|
+
import 'drizzle-orm/sqlite-proxy';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* localStorage Polyfill for HaexHub Extensions
|
|
8
|
+
*
|
|
9
|
+
* Provides an in-memory fallback when localStorage is blocked
|
|
10
|
+
* due to custom protocol restrictions (haex-extension://)
|
|
11
|
+
*/
|
|
12
|
+
declare function installLocalStoragePolyfill(): void;
|
|
13
|
+
/**
|
|
14
|
+
* sessionStorage Polyfill for HaexHub Extensions
|
|
15
|
+
*
|
|
16
|
+
* Provides a no-op implementation as session state doesn't work
|
|
17
|
+
* reliably in custom protocol contexts
|
|
18
|
+
*/
|
|
19
|
+
declare function installSessionStoragePolyfill(): void;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Cookie Polyfill for HaexHub Extensions
|
|
23
|
+
*
|
|
24
|
+
* Provides an in-memory cookie implementation when cookies are blocked
|
|
25
|
+
* due to custom protocol restrictions (haex-extension://)
|
|
26
|
+
*/
|
|
27
|
+
declare function installCookiePolyfill(): void;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* History API Polyfill for HaexHub Extensions
|
|
31
|
+
*
|
|
32
|
+
* Works around SecurityError when using pushState/replaceState
|
|
33
|
+
* in custom protocol contexts (haex-extension://)
|
|
34
|
+
*
|
|
35
|
+
* Falls back to hash-based routing when necessary
|
|
36
|
+
*/
|
|
37
|
+
declare function installHistoryPolyfill(): void;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Base Tag Polyfill
|
|
41
|
+
* Dynamically injects <base> tag for SPA routing in custom protocol
|
|
42
|
+
*/
|
|
43
|
+
declare global {
|
|
44
|
+
interface Window {
|
|
45
|
+
__HAEXHUB_BASE_TAG_INSTALLING__?: boolean;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Installs the base tag by extracting the base path from window.location
|
|
50
|
+
* Works with haex-extension:// protocol URLs
|
|
51
|
+
*/
|
|
52
|
+
declare function installBaseTag(): void;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* HaexHub Extension Polyfills
|
|
56
|
+
*
|
|
57
|
+
* Auto-initializing polyfills for localStorage, cookies, and history API
|
|
58
|
+
* that work around restrictions in custom protocol contexts (haex-extension://)
|
|
59
|
+
*
|
|
60
|
+
* These polyfills are automatically installed when you import the SDK:
|
|
61
|
+
*
|
|
62
|
+
* ```typescript
|
|
63
|
+
* import { createHaexVaultClient } from '@haex-space/vault-sdk';
|
|
64
|
+
* // Polyfills are active!
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* You can also install them manually:
|
|
68
|
+
*
|
|
69
|
+
* ```typescript
|
|
70
|
+
* import { installPolyfills } from '@haexhub/sdk/polyfills';
|
|
71
|
+
* installPolyfills();
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Install all HaexHub polyfills
|
|
77
|
+
*
|
|
78
|
+
* This function is called automatically when the SDK is imported.
|
|
79
|
+
* You usually don't need to call this manually.
|
|
80
|
+
*/
|
|
81
|
+
declare function installPolyfills(): void;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Central request method name definitions for HaexHub SDK
|
|
85
|
+
*
|
|
86
|
+
* Request Naming Schema: haextension:{subject}:{action}
|
|
87
|
+
*
|
|
88
|
+
* These are used for client.request() calls between extensions and HaexHub
|
|
89
|
+
*/
|
|
90
|
+
declare const HAEXTENSION_METHODS: {
|
|
91
|
+
readonly context: {
|
|
92
|
+
readonly get: "haextension:context:get";
|
|
93
|
+
};
|
|
94
|
+
readonly database: {
|
|
95
|
+
readonly query: "haextension:database:query";
|
|
96
|
+
readonly execute: "haextension:database:execute";
|
|
97
|
+
readonly transaction: "haextension:database:transaction";
|
|
98
|
+
readonly registerMigrations: "haextension:database:register-migrations";
|
|
99
|
+
};
|
|
100
|
+
readonly filesystem: {
|
|
101
|
+
readonly saveFile: "haextension:filesystem:save-file";
|
|
102
|
+
readonly openFile: "haextension:filesystem:open-file";
|
|
103
|
+
readonly showImage: "haextension:filesystem:show-image";
|
|
104
|
+
};
|
|
105
|
+
readonly storage: {
|
|
106
|
+
readonly getItem: "haextension:storage:get-item";
|
|
107
|
+
readonly setItem: "haextension:storage:set-item";
|
|
108
|
+
readonly removeItem: "haextension:storage:remove-item";
|
|
109
|
+
readonly clear: "haextension:storage:clear";
|
|
110
|
+
readonly keys: "haextension:storage:keys";
|
|
111
|
+
};
|
|
112
|
+
readonly web: {
|
|
113
|
+
readonly fetch: "haextension:web:fetch";
|
|
114
|
+
};
|
|
115
|
+
readonly application: {
|
|
116
|
+
readonly open: "haextension:application:open";
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
type DeepValues<T> = T extends object ? T[keyof T] extends string ? T[keyof T] : T[keyof T] extends object ? DeepValues<T[keyof T]> : never : never;
|
|
120
|
+
type HaextensionMethod = DeepValues<typeof HAEXTENSION_METHODS>;
|
|
121
|
+
|
|
122
|
+
declare function createHaexVaultClient(config?: HaexHubConfig): HaexVaultClient;
|
|
123
|
+
|
|
124
|
+
export { HAEXTENSION_METHODS, HaexHubConfig, HaexVaultClient, type HaextensionMethod, createHaexVaultClient, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill };
|