@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.
Files changed (59) hide show
  1. package/README.md +1551 -0
  2. package/dist/cli/index.d.mts +1 -0
  3. package/dist/cli/index.d.ts +1 -0
  4. package/dist/cli/index.js +455 -0
  5. package/dist/cli/index.js.map +1 -0
  6. package/dist/cli/index.mjs +430 -0
  7. package/dist/cli/index.mjs.map +1 -0
  8. package/dist/client-O_JEOzfx.d.mts +491 -0
  9. package/dist/client-O_JEOzfx.d.ts +491 -0
  10. package/dist/index.d.mts +124 -0
  11. package/dist/index.d.ts +124 -0
  12. package/dist/index.js +1429 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/index.mjs +1409 -0
  15. package/dist/index.mjs.map +1 -0
  16. package/dist/node.d.mts +25 -0
  17. package/dist/node.d.ts +25 -0
  18. package/dist/node.js +28 -0
  19. package/dist/node.js.map +1 -0
  20. package/dist/node.mjs +25 -0
  21. package/dist/node.mjs.map +1 -0
  22. package/dist/nuxt.d.mts +19 -0
  23. package/dist/nuxt.d.ts +19 -0
  24. package/dist/nuxt.js +473 -0
  25. package/dist/nuxt.js.map +1 -0
  26. package/dist/nuxt.mjs +470 -0
  27. package/dist/nuxt.mjs.map +1 -0
  28. package/dist/react.d.mts +28 -0
  29. package/dist/react.d.ts +28 -0
  30. package/dist/react.js +1389 -0
  31. package/dist/react.js.map +1 -0
  32. package/dist/react.mjs +1386 -0
  33. package/dist/react.mjs.map +1 -0
  34. package/dist/runtime/nuxt.plugin.client.d.mts +43 -0
  35. package/dist/runtime/nuxt.plugin.client.d.ts +43 -0
  36. package/dist/runtime/nuxt.plugin.client.js +1137 -0
  37. package/dist/runtime/nuxt.plugin.client.js.map +1 -0
  38. package/dist/runtime/nuxt.plugin.client.mjs +1135 -0
  39. package/dist/runtime/nuxt.plugin.client.mjs.map +1 -0
  40. package/dist/runtime/nuxt.types.d.ts +15 -0
  41. package/dist/svelte.d.mts +48 -0
  42. package/dist/svelte.d.ts +48 -0
  43. package/dist/svelte.js +1398 -0
  44. package/dist/svelte.js.map +1 -0
  45. package/dist/svelte.mjs +1391 -0
  46. package/dist/svelte.mjs.map +1 -0
  47. package/dist/vite.d.mts +37 -0
  48. package/dist/vite.d.ts +37 -0
  49. package/dist/vite.js +346 -0
  50. package/dist/vite.js.map +1 -0
  51. package/dist/vite.mjs +341 -0
  52. package/dist/vite.mjs.map +1 -0
  53. package/dist/vue.d.mts +49 -0
  54. package/dist/vue.d.ts +49 -0
  55. package/dist/vue.js +1388 -0
  56. package/dist/vue.js.map +1 -0
  57. package/dist/vue.mjs +1385 -0
  58. package/dist/vue.mjs.map +1 -0
  59. package/package.json +121 -0
@@ -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 };