edmaxlabs-core 1.3.7 → 1.4.8

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 CHANGED
@@ -31,7 +31,7 @@ import EdmaxLabs from "edmaxlabs-core";
31
31
  const app = new EdmaxLabs({
32
32
  token: "your-api-token",
33
33
  project: "your-project-id",
34
- enableOffline: true, // Enable offline persistence
34
+ persistence: true, // Enable offline persistence
35
35
  });
36
36
 
37
37
  // Get data
@@ -47,7 +47,7 @@ import EdmaxLabs from "edmaxlabs-core";
47
47
  const app = new EdmaxLabs({
48
48
  token: "your-token",
49
49
  project: "your-project-id",
50
- enableOffline: true,
50
+ persistence: true,
51
51
  });
52
52
 
53
53
  function ChatApp() {
@@ -91,7 +91,7 @@ const app = new EdmaxLabs({
91
91
  token: "your-api-token", // Required: Your API token
92
92
  project: "your-project-id", // Required: Project identifier
93
93
  baseUrl: "https://api.edmaxlabs.com", // Optional: API endpoint
94
- enableOffline: true, // Optional: Enable offline persistence
94
+ persistence: true, // Optional: Enable offline persistence
95
95
  appName: "my-app", // Optional: Unique app identifier
96
96
  });
97
97
  ```
@@ -274,9 +274,6 @@ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md).
274
274
 
275
275
  MIT License - see [LICENSE](LICENSE) file for details.
276
276
  - [https://edmaxlabs.com/docs/database](https://edmaxlabs.com/docs/database)
277
- - [https://edmaxlabs.com/docs/realtime](https://edmaxlabs.com/docs/realtime)
278
- - [https://edmaxlabs.com/docs/offline](https://edmaxlabs.com/docs/offline)
279
-
280
277
  ---
281
278
 
282
279
  ## Who is this for?
package/dist/index.cjs CHANGED
@@ -1848,7 +1848,7 @@ replaceTraps((oldTraps) => ({
1848
1848
  var Persistence = class {
1849
1849
  constructor(appName = "default") {
1850
1850
  this.appName = appName;
1851
- this.dbPromise = openDB(`edmaxlabs_offline_${appName}`, 1, {
1851
+ this.dbPromise = openDB(`edmaxlabs_storage_${appName}`, 1, {
1852
1852
  upgrade(app, oldVersion) {
1853
1853
  if (oldVersion < 1) {
1854
1854
  if (!app.objectStoreNames.contains("docs")) {
@@ -1888,7 +1888,7 @@ var Persistence = class {
1888
1888
  }
1889
1889
  if (error.name === "VersionError") {
1890
1890
  console.error("[EdmaxLabs] IndexedDB version conflict - clearing and retrying");
1891
- indexedDB.deleteDatabase(`edmaxlabs_offline_${appName}`);
1891
+ indexedDB.deleteDatabase(`edmaxlabs_storage_${appName}`);
1892
1892
  throw error;
1893
1893
  }
1894
1894
  throw error;
@@ -1909,8 +1909,8 @@ var Persistence = class {
1909
1909
  }
1910
1910
  if (error.name === "VersionError") {
1911
1911
  console.warn("[EdmaxLabs] IndexedDB version error - attempting recovery");
1912
- indexedDB.deleteDatabase(`edmaxlabs_offline_${this.appName}`);
1913
- this.dbPromise = openDB(`edmaxlabs_offline_${this.appName}`, 1, {
1912
+ indexedDB.deleteDatabase(`edmaxlabs_storage_${this.appName}`);
1913
+ this.dbPromise = openDB(`edmaxlabs_storage_${this.appName}`, 1, {
1914
1914
  upgrade(app, oldVersion) {
1915
1915
  if (oldVersion < 1) {
1916
1916
  if (!app.objectStoreNames.contains("docs")) {