@haex-space/vault-sdk 2.2.6 → 2.3.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 (45) hide show
  1. package/dist/{client-wxMr0ONL.d.mts → client-BIiJwbdW.d.mts} +1 -1
  2. package/dist/{client-DeP-DCz5.d.ts → client-D4hDL-PR.d.ts} +1 -1
  3. package/dist/index.d.mts +20 -5
  4. package/dist/index.d.ts +20 -5
  5. package/dist/index.js +22 -10
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +21 -11
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/node.d.mts +1 -1
  10. package/dist/node.d.ts +1 -1
  11. package/dist/nuxt.js +10 -5
  12. package/dist/nuxt.js.map +1 -1
  13. package/dist/nuxt.mjs +10 -5
  14. package/dist/nuxt.mjs.map +1 -1
  15. package/dist/react.d.mts +2 -2
  16. package/dist/react.d.ts +2 -2
  17. package/dist/react.js +20 -10
  18. package/dist/react.js.map +1 -1
  19. package/dist/react.mjs +20 -10
  20. package/dist/react.mjs.map +1 -1
  21. package/dist/runtime/nuxt.plugin.client.d.mts +2 -2
  22. package/dist/runtime/nuxt.plugin.client.d.ts +2 -2
  23. package/dist/runtime/nuxt.plugin.client.js +15 -5
  24. package/dist/runtime/nuxt.plugin.client.js.map +1 -1
  25. package/dist/runtime/nuxt.plugin.client.mjs +15 -5
  26. package/dist/runtime/nuxt.plugin.client.mjs.map +1 -1
  27. package/dist/svelte.d.mts +2 -2
  28. package/dist/svelte.d.ts +2 -2
  29. package/dist/svelte.js +20 -10
  30. package/dist/svelte.js.map +1 -1
  31. package/dist/svelte.mjs +20 -10
  32. package/dist/svelte.mjs.map +1 -1
  33. package/dist/{types-DiGbHxTr.d.mts → types-FE9ewl3r.d.mts} +23 -1
  34. package/dist/{types-DiGbHxTr.d.ts → types-FE9ewl3r.d.ts} +23 -1
  35. package/dist/vite.js +10 -5
  36. package/dist/vite.js.map +1 -1
  37. package/dist/vite.mjs +10 -5
  38. package/dist/vite.mjs.map +1 -1
  39. package/dist/vue.d.mts +2 -2
  40. package/dist/vue.d.ts +2 -2
  41. package/dist/vue.js +20 -10
  42. package/dist/vue.js.map +1 -1
  43. package/dist/vue.mjs +20 -10
  44. package/dist/vue.mjs.map +1 -1
  45. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { D as DatabaseQueryResult, M as Migration, b as MigrationResult, W as WebRequestOptions, c as WebResponse, H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext, d as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult, e as EventCallback } from './types-DiGbHxTr.mjs';
1
+ import { D as DatabaseQueryResult, M as Migration, b as MigrationResult, W as WebRequestOptions, c as WebResponse, H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext, d as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult, e as EventCallback } from './types-FE9ewl3r.mjs';
2
2
  import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
3
3
 
4
4
  declare class StorageAPI {
@@ -1,4 +1,4 @@
1
- import { D as DatabaseQueryResult, M as Migration, b as MigrationResult, W as WebRequestOptions, c as WebResponse, H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext, d as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult, e as EventCallback } from './types-DiGbHxTr.js';
1
+ import { D as DatabaseQueryResult, M as Migration, b as MigrationResult, W as WebRequestOptions, c as WebResponse, H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext, d as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult, e as EventCallback } from './types-FE9ewl3r.js';
2
2
  import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
3
3
 
4
4
  declare class StorageAPI {
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
- import { H as HaexVaultClient } from './client-wxMr0ONL.mjs';
2
- export { D as DatabaseAPI, F as FilesystemAPI, P as PermissionsAPI, W as WebAPI } from './client-wxMr0ONL.mjs';
3
- import { H as HaexHubConfig } from './types-DiGbHxTr.mjs';
4
- export { A as ApplicationContext, C as ContextChangedEvent, r as DEFAULT_TIMEOUT, m as DatabaseColumnInfo, k as DatabaseExecuteParams, i as DatabasePermission, d as DatabasePermissionRequest, j as DatabaseQueryParams, D as DatabaseQueryResult, l as DatabaseTableInfo, q as ErrorCode, e as EventCallback, a as ExtensionInfo, E as ExtensionManifest, t as HAEXTENSION_EVENTS, s as HaexHubError, h as HaexHubEvent, f as HaexHubRequest, g as HaexHubResponse, u as HaextensionEvent, P as PermissionResponse, p as PermissionStatus, n as SearchQuery, o as SearchRequestEvent, S as SearchResult, T as TABLE_SEPARATOR, W as WebRequestOptions, c as WebResponse } from './types-DiGbHxTr.mjs';
1
+ import { H as HaexVaultClient } from './client-BIiJwbdW.mjs';
2
+ export { D as DatabaseAPI, F as FilesystemAPI, P as PermissionsAPI, W as WebAPI } from './client-BIiJwbdW.mjs';
3
+ import { H as HaexHubConfig } from './types-FE9ewl3r.mjs';
4
+ export { A as ApplicationContext, C as ContextChangedEvent, r as DEFAULT_TIMEOUT, m as DatabaseColumnInfo, k as DatabaseExecuteParams, i as DatabasePermission, d as DatabasePermissionRequest, j as DatabaseQueryParams, D as DatabaseQueryResult, l as DatabaseTableInfo, q as ErrorCode, e as EventCallback, a as ExtensionInfo, E as ExtensionManifest, u as HAEXTENSION_EVENTS, t as HaexHubError, h as HaexHubEvent, f as HaexHubRequest, g as HaexHubResponse, v as HaextensionEvent, P as PermissionResponse, p as PermissionStatus, n as SearchQuery, o as SearchRequestEvent, S as SearchResult, T as TABLE_SEPARATOR, W as WebRequestOptions, c as WebResponse, s as getTableName } from './types-FE9ewl3r.mjs';
5
5
  export { H as HaextensionConfig } from './config-D_HXjsEV.mjs';
6
6
  import 'drizzle-orm/sqlite-proxy';
7
7
 
@@ -121,6 +121,21 @@ declare const HAEXTENSION_METHODS: {
121
121
  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;
122
122
  type HaextensionMethod = DeepValues<typeof HAEXTENSION_METHODS>;
123
123
 
124
+ /**
125
+ * Central message type definitions for HaexSpace SDK
126
+ *
127
+ * Message Naming Schema: haexspace:{subject}
128
+ *
129
+ * These are used for internal communication between extensions and HaexSpace
130
+ */
131
+ declare const HAEXSPACE_MESSAGE_TYPES: {
132
+ /** Debug message for development/troubleshooting */
133
+ readonly DEBUG: "haexspace:debug";
134
+ /** Console forwarding from extension iframe */
135
+ readonly CONSOLE_FORWARD: "console.forward";
136
+ };
137
+ type HaexspaceMessageType = (typeof HAEXSPACE_MESSAGE_TYPES)[keyof typeof HAEXSPACE_MESSAGE_TYPES];
138
+
124
139
  declare function createHaexVaultClient(config?: HaexHubConfig): HaexVaultClient;
125
140
 
126
- export { HAEXTENSION_METHODS, HaexHubConfig, HaexVaultClient, type HaextensionMethod, createHaexVaultClient, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill };
141
+ export { HAEXSPACE_MESSAGE_TYPES, HAEXTENSION_METHODS, HaexHubConfig, HaexVaultClient, type HaexspaceMessageType, type HaextensionMethod, createHaexVaultClient, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { H as HaexVaultClient } from './client-DeP-DCz5.js';
2
- export { D as DatabaseAPI, F as FilesystemAPI, P as PermissionsAPI, W as WebAPI } from './client-DeP-DCz5.js';
3
- import { H as HaexHubConfig } from './types-DiGbHxTr.js';
4
- export { A as ApplicationContext, C as ContextChangedEvent, r as DEFAULT_TIMEOUT, m as DatabaseColumnInfo, k as DatabaseExecuteParams, i as DatabasePermission, d as DatabasePermissionRequest, j as DatabaseQueryParams, D as DatabaseQueryResult, l as DatabaseTableInfo, q as ErrorCode, e as EventCallback, a as ExtensionInfo, E as ExtensionManifest, t as HAEXTENSION_EVENTS, s as HaexHubError, h as HaexHubEvent, f as HaexHubRequest, g as HaexHubResponse, u as HaextensionEvent, P as PermissionResponse, p as PermissionStatus, n as SearchQuery, o as SearchRequestEvent, S as SearchResult, T as TABLE_SEPARATOR, W as WebRequestOptions, c as WebResponse } from './types-DiGbHxTr.js';
1
+ import { H as HaexVaultClient } from './client-D4hDL-PR.js';
2
+ export { D as DatabaseAPI, F as FilesystemAPI, P as PermissionsAPI, W as WebAPI } from './client-D4hDL-PR.js';
3
+ import { H as HaexHubConfig } from './types-FE9ewl3r.js';
4
+ export { A as ApplicationContext, C as ContextChangedEvent, r as DEFAULT_TIMEOUT, m as DatabaseColumnInfo, k as DatabaseExecuteParams, i as DatabasePermission, d as DatabasePermissionRequest, j as DatabaseQueryParams, D as DatabaseQueryResult, l as DatabaseTableInfo, q as ErrorCode, e as EventCallback, a as ExtensionInfo, E as ExtensionManifest, u as HAEXTENSION_EVENTS, t as HaexHubError, h as HaexHubEvent, f as HaexHubRequest, g as HaexHubResponse, v as HaextensionEvent, P as PermissionResponse, p as PermissionStatus, n as SearchQuery, o as SearchRequestEvent, S as SearchResult, T as TABLE_SEPARATOR, W as WebRequestOptions, c as WebResponse, s as getTableName } from './types-FE9ewl3r.js';
5
5
  export { H as HaextensionConfig } from './config-D_HXjsEV.js';
6
6
  import 'drizzle-orm/sqlite-proxy';
7
7
 
@@ -121,6 +121,21 @@ declare const HAEXTENSION_METHODS: {
121
121
  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;
122
122
  type HaextensionMethod = DeepValues<typeof HAEXTENSION_METHODS>;
123
123
 
124
+ /**
125
+ * Central message type definitions for HaexSpace SDK
126
+ *
127
+ * Message Naming Schema: haexspace:{subject}
128
+ *
129
+ * These are used for internal communication between extensions and HaexSpace
130
+ */
131
+ declare const HAEXSPACE_MESSAGE_TYPES: {
132
+ /** Debug message for development/troubleshooting */
133
+ readonly DEBUG: "haexspace:debug";
134
+ /** Console forwarding from extension iframe */
135
+ readonly CONSOLE_FORWARD: "console.forward";
136
+ };
137
+ type HaexspaceMessageType = (typeof HAEXSPACE_MESSAGE_TYPES)[keyof typeof HAEXSPACE_MESSAGE_TYPES];
138
+
124
139
  declare function createHaexVaultClient(config?: HaexHubConfig): HaexVaultClient;
125
140
 
126
- export { HAEXTENSION_METHODS, HaexHubConfig, HaexVaultClient, type HaextensionMethod, createHaexVaultClient, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill };
141
+ export { HAEXSPACE_MESSAGE_TYPES, HAEXTENSION_METHODS, HaexHubConfig, HaexVaultClient, type HaexspaceMessageType, type HaextensionMethod, createHaexVaultClient, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill };
package/dist/index.js CHANGED
@@ -220,22 +220,30 @@ function installHistoryPolyfill() {
220
220
  }
221
221
  }
222
222
 
223
+ // src/messages.ts
224
+ var HAEXSPACE_MESSAGE_TYPES = {
225
+ /** Debug message for development/troubleshooting */
226
+ DEBUG: "haexspace:debug",
227
+ /** Console forwarding from extension iframe */
228
+ CONSOLE_FORWARD: "console.forward"
229
+ };
230
+
223
231
  // src/polyfills/debug.ts
224
232
  function installDebugDiagnostics() {
225
233
  if (typeof window === "undefined") {
226
234
  return;
227
235
  }
228
236
  const hasParent = window.parent && window.parent !== window;
229
- console.log("[HaexHub] hasParent:", hasParent);
237
+ console.log("[HaexSpace] hasParent:", hasParent);
230
238
  if (hasParent) {
231
- console.log("[HaexHub] Attempting to send debug message to parent...");
239
+ console.log("[HaexSpace] Attempting to send debug message to parent...");
232
240
  window.parent.postMessage({
233
- type: "haexhub:debug",
241
+ type: HAEXSPACE_MESSAGE_TYPES.DEBUG,
234
242
  data: `[Polyfills] window.parent test: exists=${!!window.parent}, different=${hasParent}, selfIsTop=${window.self === window.top}`
235
243
  }, "*");
236
- console.log("[HaexHub] Debug message sent!");
244
+ console.log("[HaexSpace] Debug message sent!");
237
245
  } else {
238
- console.log("[HaexHub] No parent window or parent === window");
246
+ console.log("[HaexSpace] No parent window or parent === window");
239
247
  }
240
248
  }
241
249
 
@@ -311,7 +319,7 @@ function interceptConsole(level) {
311
319
  const timestamp = (/* @__PURE__ */ new Date()).toLocaleTimeString();
312
320
  window.parent.postMessage(
313
321
  {
314
- type: "console.forward",
322
+ type: HAEXSPACE_MESSAGE_TYPES.CONSOLE_FORWARD,
315
323
  data: {
316
324
  timestamp,
317
325
  level,
@@ -404,6 +412,9 @@ var HAEXTENSION_METHODS = {
404
412
  // src/types.ts
405
413
  var DEFAULT_TIMEOUT = 3e4;
406
414
  var TABLE_SEPARATOR = "__";
415
+ function getTableName(publicKey, extensionName, tableName) {
416
+ return `${publicKey}${TABLE_SEPARATOR}${extensionName}${TABLE_SEPARATOR}${tableName}`;
417
+ }
407
418
  var PermissionStatus = /* @__PURE__ */ ((PermissionStatus2) => {
408
419
  PermissionStatus2["GRANTED"] = "granted";
409
420
  PermissionStatus2["DENIED"] = "denied";
@@ -968,14 +979,13 @@ var HaexVaultClient = class {
968
979
  }
969
980
  this.validateTableName(tableName);
970
981
  const { publicKey, name } = this._extensionInfo;
971
- const extensionName = name;
972
- return `"${publicKey}${TABLE_SEPARATOR}${extensionName}${TABLE_SEPARATOR}${tableName}"`;
982
+ return `"${getTableName(publicKey, name, tableName)}"`;
973
983
  }
974
984
  getDependencyTableName(publicKey, extensionName, tableName) {
975
985
  this.validatePublicKey(publicKey);
976
986
  this.validateExtensionName(extensionName);
977
987
  this.validateTableName(tableName);
978
- return `"${publicKey}${TABLE_SEPARATOR}${extensionName}${TABLE_SEPARATOR}${tableName}"`;
988
+ return `"${getTableName(publicKey, extensionName, tableName)}"`;
979
989
  }
980
990
  parseTableName(fullTableName) {
981
991
  let cleanTableName = fullTableName;
@@ -1268,7 +1278,7 @@ window.parent === window: ${window.parent === window}
1268
1278
  window.self === window.top: ${window.self === window.top}`;
1269
1279
  try {
1270
1280
  window.parent.postMessage({
1271
- type: "haexhub:debug",
1281
+ type: HAEXSPACE_MESSAGE_TYPES.DEBUG,
1272
1282
  data: debugInfo
1273
1283
  }, "*");
1274
1284
  } catch (e) {
@@ -1431,6 +1441,7 @@ exports.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT;
1431
1441
  exports.DatabaseAPI = DatabaseAPI;
1432
1442
  exports.ErrorCode = ErrorCode;
1433
1443
  exports.FilesystemAPI = FilesystemAPI;
1444
+ exports.HAEXSPACE_MESSAGE_TYPES = HAEXSPACE_MESSAGE_TYPES;
1434
1445
  exports.HAEXTENSION_EVENTS = HAEXTENSION_EVENTS;
1435
1446
  exports.HAEXTENSION_METHODS = HAEXTENSION_METHODS;
1436
1447
  exports.HaexHubError = HaexHubError;
@@ -1440,6 +1451,7 @@ exports.PermissionsAPI = PermissionsAPI;
1440
1451
  exports.TABLE_SEPARATOR = TABLE_SEPARATOR;
1441
1452
  exports.WebAPI = WebAPI;
1442
1453
  exports.createHaexVaultClient = createHaexVaultClient;
1454
+ exports.getTableName = getTableName;
1443
1455
  exports.installBaseTag = installBaseTag;
1444
1456
  exports.installCookiePolyfill = installCookiePolyfill;
1445
1457
  exports.installHistoryPolyfill = installHistoryPolyfill;