@foretag/tanstack-db-surrealdb 0.1.2 → 0.1.4

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
@@ -132,5 +132,5 @@ DEFINE FIELD OVERWRITE updated_at ON <table>
132
132
 
133
133
  <details>
134
134
  <summary><strong>Can I reduce the package sizes?</strong></summary>
135
- <p>They can be reduced, but these steps are very unique based on use-case. Loro ships a WASM binary thats 3-4 MB in size, it's one of the tradeoffs of using this approach. The maintainers up-stream are working on reducing the size of the WASM binary.</p>
135
+ <p>They can be reduced, but these steps are very unique based on use-case. Loro ships a WASM binary thats 1 MB Gzipped in size, it's one of the tradeoffs of using this approach. The maintainers up-stream are working on reducing the size of the WASM binary.</p>
136
136
  </details>
package/dist/index.d.mts CHANGED
@@ -26,6 +26,6 @@ type SurrealCollectionConfig<T extends SurrealObject<object>> = {
26
26
 
27
27
  declare function surrealCollectionOptions<T extends SyncedRow, S extends Record<string, Container> = {
28
28
  [k: string]: never;
29
- }>({ id, useLoro, onError, db, ...config }: SurrealCollectionConfig<T>): CollectionConfig<T, Id, never, UtilsRecord>;
29
+ }>({ id, useLoro, onError, db, ...config }: SurrealCollectionConfig<T>): CollectionConfig<T, string | number, never, UtilsRecord>;
30
30
 
31
31
  export { surrealCollectionOptions };
package/dist/index.d.ts CHANGED
@@ -26,6 +26,6 @@ type SurrealCollectionConfig<T extends SurrealObject<object>> = {
26
26
 
27
27
  declare function surrealCollectionOptions<T extends SyncedRow, S extends Record<string, Container> = {
28
28
  [k: string]: never;
29
- }>({ id, useLoro, onError, db, ...config }: SurrealCollectionConfig<T>): CollectionConfig<T, Id, never, UtilsRecord>;
29
+ }>({ id, useLoro, onError, db, ...config }: SurrealCollectionConfig<T>): CollectionConfig<T, string | number, never, UtilsRecord>;
30
30
 
31
31
  export { surrealCollectionOptions };
package/dist/index.js CHANGED
@@ -292,7 +292,7 @@ function surrealCollectionOptions({
292
292
  if (offLive) offLive();
293
293
  };
294
294
  };
295
- const now = () => Date.now();
295
+ const now = () => /* @__PURE__ */ new Date();
296
296
  const onInsert = async (p) => {
297
297
  const resultRows = [];
298
298
  for (const m of p.transaction.mutations) {
package/dist/index.mjs CHANGED
@@ -274,7 +274,7 @@ function surrealCollectionOptions({
274
274
  if (offLive) offLive();
275
275
  };
276
276
  };
277
- const now = () => Date.now();
277
+ const now = () => /* @__PURE__ */ new Date();
278
278
  const onInsert = async (p) => {
279
279
  const resultRows = [];
280
280
  for (const m of p.transaction.mutations) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@foretag/tanstack-db-surrealdb",
3
3
  "description": "Add Offline / Local First Caching & Syncing to your SurrealDB app with TanstackDB and Loro (CRDTs)",
4
- "version": "0.1.2",
4
+ "version": "0.1.4",
5
5
  "files": [
6
6
  "dist"
7
7
  ],
@@ -41,12 +41,15 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@tanstack/db": "^0.4.10",
44
- "loro-crdt": "^1.8.4",
44
+ "loro-crdt": "^1.8.4"
45
+ },
46
+ "peerDependencies": {
45
47
  "surrealdb": "2.0.0-alpha.9"
46
48
  },
47
49
  "devDependencies": {
48
50
  "@biomejs/biome": "^2.2.6",
49
51
  "@tanstack/svelte-db": "^0.1.32",
52
+ "surrealdb": "2.0.0-alpha.9",
50
53
  "tsup": "^8.5.0"
51
54
  }
52
55
  }