@plures/unum 0.2.2 → 0.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.
- package/README.md +3 -6
- package/dist/adapters/index.d.ts +3 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +3 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/memory.d.ts +7 -0
- package/dist/adapters/memory.d.ts.map +1 -0
- package/dist/adapters/memory.js +116 -0
- package/dist/adapters/memory.js.map +1 -0
- package/dist/adapters/pluresdb.d.ts +14 -0
- package/dist/adapters/pluresdb.d.ts.map +1 -0
- package/dist/adapters/pluresdb.js +48 -0
- package/dist/adapters/pluresdb.js.map +1 -0
- package/dist/context.d.ts +29 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +43 -0
- package/dist/context.js.map +1 -0
- package/dist/index.d.ts +8 -53
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -196
- package/dist/index.js.map +1 -1
- package/dist/runes.d.ts +17 -161
- package/dist/runes.d.ts.map +1 -1
- package/dist/runes.js +121 -290
- package/dist/runes.js.map +1 -1
- package/dist/store.d.ts +10 -21
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +31 -135
- package/dist/store.js.map +1 -1
- package/dist/types.d.ts +69 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/package.json +54 -49
- package/dist/GunContext.d.ts +0 -17
- package/dist/GunContext.d.ts.map +0 -1
- package/dist/GunContext.js +0 -180
- package/dist/GunContext.js.map +0 -1
- package/dist/actions.d.ts +0 -39
- package/dist/actions.d.ts.map +0 -1
- package/dist/actions.js +0 -89
- package/dist/actions.js.map +0 -1
- package/dist/gunComponent.d.ts +0 -44
- package/dist/gunComponent.d.ts.map +0 -1
- package/dist/gunComponent.js +0 -205
- package/dist/gunComponent.js.map +0 -1
- package/dist/gunify.d.ts +0 -46
- package/dist/gunify.d.ts.map +0 -1
- package/dist/gunify.js +0 -294
- package/dist/gunify.js.map +0 -1
- package/dist/plures-helper.d.ts +0 -41
- package/dist/plures-helper.d.ts.map +0 -1
- package/dist/plures-helper.js +0 -114
- package/dist/plures-helper.js.map +0 -1
- package/dist/universalGunBind.d.ts +0 -219
- package/dist/universalGunBind.d.ts.map +0 -1
- package/dist/universalGunBind.js +0 -394
- package/dist/universalGunBind.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
# unum
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
PluresDB is published to npm as `pluresdb` and is also available as a Deno package. It provides a modern, graph-based database with real-time synchronization capabilities, inspired by and compatible with Gun.js. Version 1.3.0 includes Node.js N-API bindings for enhanced performance.
|
|
3
|
+
Svelte bindings for [PluresDB](https://github.com/plures/pluresdb) - a graph-based database with real-time synchronization.
|
|
6
4
|
|
|
7
5
|
## Features
|
|
8
6
|
|
|
9
7
|
- **Svelte 4 & 5 Compatible**: Works with both store-based and runes-based reactivity
|
|
10
|
-
- **Type-Safe**: Full TypeScript support
|
|
11
|
-
- **Action-Based**:
|
|
8
|
+
- **Type-Safe**: Full TypeScript support
|
|
9
|
+
- **Action-Based**: Svelte actions for DOM binding
|
|
12
10
|
- **Store-Based**: Writable store implementation for reactive data
|
|
13
11
|
- **Collection Support**: Easy handling of PluresDB collections
|
|
14
|
-
- **PluresDB v1.3.0**: Supports latest PluresDB with Node.js N-API bindings and better-sqlite3 compatibility
|
|
15
12
|
|
|
16
13
|
## Installation
|
|
17
14
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/adapters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/adapters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/adapters/memory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAA2B,SAAS,EAAe,MAAM,aAAa,CAAC;AAanF,wBAAgB,mBAAmB,IAAI,SAAS,CA4F/C"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In-memory adapter — useful for testing and SSR.
|
|
3
|
+
* No external dependencies.
|
|
4
|
+
*/
|
|
5
|
+
function createMemNode() {
|
|
6
|
+
return { data: undefined, children: new Map(), listeners: new Set(), mapListeners: new Set() };
|
|
7
|
+
}
|
|
8
|
+
export function createMemoryAdapter() {
|
|
9
|
+
const root = createMemNode();
|
|
10
|
+
function resolve(node, path) {
|
|
11
|
+
let cur = node;
|
|
12
|
+
for (const key of path) {
|
|
13
|
+
if (!cur.children.has(key))
|
|
14
|
+
cur.children.set(key, createMemNode());
|
|
15
|
+
cur = cur.children.get(key);
|
|
16
|
+
}
|
|
17
|
+
return cur;
|
|
18
|
+
}
|
|
19
|
+
function notify(node, key) {
|
|
20
|
+
for (const cb of node.listeners) {
|
|
21
|
+
try {
|
|
22
|
+
cb(node.data, key);
|
|
23
|
+
}
|
|
24
|
+
catch (e) {
|
|
25
|
+
console.error('[unum/memory]', e);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function notifyMap(parent) {
|
|
30
|
+
for (const [key, child] of parent.children) {
|
|
31
|
+
for (const cb of parent.mapListeners) {
|
|
32
|
+
try {
|
|
33
|
+
cb(child.data, key);
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
36
|
+
console.error('[unum/memory]', e);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function makeChain(path, isMap = false) {
|
|
42
|
+
return {
|
|
43
|
+
get(key) { return makeChain([...path, key]); },
|
|
44
|
+
put(data, cb) {
|
|
45
|
+
const node = resolve(root, path);
|
|
46
|
+
node.data = data;
|
|
47
|
+
const key = path[path.length - 1];
|
|
48
|
+
notify(node, key);
|
|
49
|
+
// notify parent map listeners
|
|
50
|
+
if (path.length > 0) {
|
|
51
|
+
const parent = resolve(root, path.slice(0, -1));
|
|
52
|
+
for (const mcb of parent.mapListeners) {
|
|
53
|
+
try {
|
|
54
|
+
mcb(data, key);
|
|
55
|
+
}
|
|
56
|
+
catch (e) {
|
|
57
|
+
console.error('[unum/memory]', e);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
cb?.(data, key);
|
|
62
|
+
return this;
|
|
63
|
+
},
|
|
64
|
+
set(data, cb) {
|
|
65
|
+
const id = Math.random().toString(36).slice(2, 10);
|
|
66
|
+
makeChain([...path, id]).put(data, cb);
|
|
67
|
+
return makeChain([...path, id]);
|
|
68
|
+
},
|
|
69
|
+
on(cb) {
|
|
70
|
+
const node = resolve(root, path);
|
|
71
|
+
if (isMap) {
|
|
72
|
+
node.mapListeners.add(cb);
|
|
73
|
+
// Fire for existing children
|
|
74
|
+
for (const [key, child] of node.children) {
|
|
75
|
+
try {
|
|
76
|
+
cb(child.data, key);
|
|
77
|
+
}
|
|
78
|
+
catch (e) {
|
|
79
|
+
console.error('[unum/memory]', e);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return () => { node.mapListeners.delete(cb); };
|
|
83
|
+
}
|
|
84
|
+
node.listeners.add(cb);
|
|
85
|
+
if (node.data !== undefined) {
|
|
86
|
+
try {
|
|
87
|
+
cb(node.data, path[path.length - 1]);
|
|
88
|
+
}
|
|
89
|
+
catch (e) {
|
|
90
|
+
console.error('[unum/memory]', e);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return () => { node.listeners.delete(cb); };
|
|
94
|
+
},
|
|
95
|
+
once(cb) {
|
|
96
|
+
const node = resolve(root, path);
|
|
97
|
+
cb(node.data, path[path.length - 1]);
|
|
98
|
+
},
|
|
99
|
+
map() { return makeChain(path, true); },
|
|
100
|
+
off() {
|
|
101
|
+
const node = resolve(root, path);
|
|
102
|
+
node.listeners.clear();
|
|
103
|
+
node.mapListeners.clear();
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
root() { return makeChain([]); },
|
|
109
|
+
destroy() {
|
|
110
|
+
root.children.clear();
|
|
111
|
+
root.listeners.clear();
|
|
112
|
+
root.mapListeners.clear();
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=memory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../../src/adapters/memory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,SAAS,aAAa;IACpB,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,GAAG,EAAE,EAAE,YAAY,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC;AACjG,CAAC;AAED,MAAM,UAAU,mBAAmB;IACjC,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,SAAS,OAAO,CAAC,IAAa,EAAE,IAAc;QAC5C,IAAI,GAAG,GAAG,IAAI,CAAC;QACf,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC;gBAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,aAAa,EAAE,CAAC,CAAC;YACnE,GAAG,GAAG,GAAG,CAAC,QAAQ,CAAC,GA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IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;YAC5B,CAAC;SACF,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI,KAAK,OAAO,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAChC,OAAO;YACL,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;YACtB,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;YACvB,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;QAC5B,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PluresDB adapter — native adapter using PluresDB's chain API.
|
|
3
|
+
*
|
|
4
|
+
* PluresDB exposes a Gun-compatible API: db.get(), .put(), .on(), .once(), .map()
|
|
5
|
+
* This adapter wraps any PluresDB (or Gun) instance.
|
|
6
|
+
*/
|
|
7
|
+
import type { DbAdapter } from '../types.js';
|
|
8
|
+
/**
|
|
9
|
+
* Wrap a PluresDB/Gun instance as a DbAdapter.
|
|
10
|
+
*
|
|
11
|
+
* @param db - A PluresDB or Gun instance (anything with .get/.put/.on/.once/.map)
|
|
12
|
+
*/
|
|
13
|
+
export declare function createPluresDbAdapter(db: any): DbAdapter;
|
|
14
|
+
//# sourceMappingURL=pluresdb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluresdb.d.ts","sourceRoot":"","sources":["../../src/adapters/pluresdb.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAA2B,SAAS,EAAe,MAAM,aAAa,CAAC;AAEnF;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,GAAG,GAAG,SAAS,CAoCxD"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PluresDB adapter — native adapter using PluresDB's chain API.
|
|
3
|
+
*
|
|
4
|
+
* PluresDB exposes a Gun-compatible API: db.get(), .put(), .on(), .once(), .map()
|
|
5
|
+
* This adapter wraps any PluresDB (or Gun) instance.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Wrap a PluresDB/Gun instance as a DbAdapter.
|
|
9
|
+
*
|
|
10
|
+
* @param db - A PluresDB or Gun instance (anything with .get/.put/.on/.once/.map)
|
|
11
|
+
*/
|
|
12
|
+
export function createPluresDbAdapter(db) {
|
|
13
|
+
function wrapChain(chain) {
|
|
14
|
+
return {
|
|
15
|
+
get(key) {
|
|
16
|
+
return wrapChain(chain.get(key));
|
|
17
|
+
},
|
|
18
|
+
put(data, cb) {
|
|
19
|
+
chain.put(data, cb);
|
|
20
|
+
return this;
|
|
21
|
+
},
|
|
22
|
+
set(data, cb) {
|
|
23
|
+
chain.set(data, cb);
|
|
24
|
+
return this;
|
|
25
|
+
},
|
|
26
|
+
on(cb) {
|
|
27
|
+
const ref = chain.on(cb);
|
|
28
|
+
// Gun returns the chain, not an unsub function
|
|
29
|
+
return typeof ref === 'function' ? ref : () => chain.off();
|
|
30
|
+
},
|
|
31
|
+
once(cb) {
|
|
32
|
+
chain.once(cb);
|
|
33
|
+
},
|
|
34
|
+
map() {
|
|
35
|
+
return wrapChain(chain.map());
|
|
36
|
+
},
|
|
37
|
+
off() {
|
|
38
|
+
chain.off();
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
root() {
|
|
44
|
+
return wrapChain(db);
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=pluresdb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluresdb.js","sourceRoot":"","sources":["../../src/adapters/pluresdb.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,EAAO;IAC3C,SAAS,SAAS,CAAC,KAAU;QAC3B,OAAO;YACL,GAAG,CAAC,GAAW;gBACb,OAAO,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC;YACD,GAAG,CAAC,IAAS,EAAE,EAAiB;gBAC9B,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,GAAG,CAAC,IAAS,EAAE,EAAiB;gBAC9B,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,EAAE,CAAC,EAAgB;gBACjB,MAAM,GAAG,GAAG,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;gBACzB,+CAA+C;gBAC/C,OAAO,OAAO,GAAG,KAAK,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;YAC7D,CAAC;YACD,IAAI,CAAC,EAAgB;gBACnB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACjB,CAAC;YACD,GAAG;gBACD,OAAO,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;YAChC,CAAC;YACD,GAAG;gBACD,KAAK,CAAC,GAAG,EAAE,CAAC;YACd,CAAC;SACF,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI;YACF,OAAO,SAAS,CAAC,EAAE,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Database context — singleton adapter management.
|
|
3
|
+
* Replaces GunContext.js (no CDN, no global detection).
|
|
4
|
+
*/
|
|
5
|
+
import { type Readable } from 'svelte/store';
|
|
6
|
+
import type { DbAdapter, ChainNode } from './types.js';
|
|
7
|
+
/**
|
|
8
|
+
* Initialize unum with a database adapter.
|
|
9
|
+
* Call once at app startup.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { initDb, createPluresDbAdapter } from '@plures/unum';
|
|
14
|
+
* import PluresDB from 'pluresdb';
|
|
15
|
+
*
|
|
16
|
+
* const db = new PluresDB({ localStorage: true });
|
|
17
|
+
* initDb(createPluresDbAdapter(db));
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare function initDb(adapter: DbAdapter): void;
|
|
21
|
+
/** Get the current adapter (throws if not initialized) */
|
|
22
|
+
export declare function getAdapter(): DbAdapter;
|
|
23
|
+
/** Get a root ChainNode from the current adapter */
|
|
24
|
+
export declare function getRoot(): ChainNode;
|
|
25
|
+
/** Svelte store for the adapter — subscribe for lazy init patterns */
|
|
26
|
+
export declare const db: Readable<DbAdapter | null>;
|
|
27
|
+
/** Tear down the adapter */
|
|
28
|
+
export declare function destroyDb(): void;
|
|
29
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAY,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAKvD;;;;;;;;;;;;GAYG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,SAAS,GAAG,IAAI,CAG/C;AAED,0DAA0D;AAC1D,wBAAgB,UAAU,IAAI,SAAS,CAGtC;AAED,oDAAoD;AACpD,wBAAgB,OAAO,IAAI,SAAS,CAEnC;AAED,sEAAsE;AACtE,eAAO,MAAM,EAAE,EAAE,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAgB,CAAC;AAE3D,4BAA4B;AAC5B,wBAAgB,SAAS,IAAI,IAAI,CAIhC"}
|
package/dist/context.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Database context — singleton adapter management.
|
|
3
|
+
* Replaces GunContext.js (no CDN, no global detection).
|
|
4
|
+
*/
|
|
5
|
+
import { writable } from 'svelte/store';
|
|
6
|
+
let _adapter = null;
|
|
7
|
+
const adapterStore = writable(null);
|
|
8
|
+
/**
|
|
9
|
+
* Initialize unum with a database adapter.
|
|
10
|
+
* Call once at app startup.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* import { initDb, createPluresDbAdapter } from '@plures/unum';
|
|
15
|
+
* import PluresDB from 'pluresdb';
|
|
16
|
+
*
|
|
17
|
+
* const db = new PluresDB({ localStorage: true });
|
|
18
|
+
* initDb(createPluresDbAdapter(db));
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export function initDb(adapter) {
|
|
22
|
+
_adapter = adapter;
|
|
23
|
+
adapterStore.set(adapter);
|
|
24
|
+
}
|
|
25
|
+
/** Get the current adapter (throws if not initialized) */
|
|
26
|
+
export function getAdapter() {
|
|
27
|
+
if (!_adapter)
|
|
28
|
+
throw new Error('unum: call initDb() before using data bindings');
|
|
29
|
+
return _adapter;
|
|
30
|
+
}
|
|
31
|
+
/** Get a root ChainNode from the current adapter */
|
|
32
|
+
export function getRoot() {
|
|
33
|
+
return getAdapter().root();
|
|
34
|
+
}
|
|
35
|
+
/** Svelte store for the adapter — subscribe for lazy init patterns */
|
|
36
|
+
export const db = adapterStore;
|
|
37
|
+
/** Tear down the adapter */
|
|
38
|
+
export function destroyDb() {
|
|
39
|
+
_adapter?.destroy?.();
|
|
40
|
+
_adapter = null;
|
|
41
|
+
adapterStore.set(null);
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAiB,MAAM,cAAc,CAAC;AAGvD,IAAI,QAAQ,GAAqB,IAAI,CAAC;AACtC,MAAM,YAAY,GAAG,QAAQ,CAAmB,IAAI,CAAC,CAAC;AAEtD;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,MAAM,CAAC,OAAkB;IACvC,QAAQ,GAAG,OAAO,CAAC;IACnB,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAC5B,CAAC;AAED,0DAA0D;AAC1D,MAAM,UAAU,UAAU;IACxB,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IACjF,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,oDAAoD;AACpD,MAAM,UAAU,OAAO;IACrB,OAAO,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC;AAC7B,CAAC;AAED,sEAAsE;AACtE,MAAM,CAAC,MAAM,EAAE,GAA+B,YAAY,CAAC;AAE3D,4BAA4B;AAC5B,MAAM,UAAU,SAAS;IACvB,QAAQ,EAAE,OAAO,EAAE,EAAE,CAAC;IACtB,QAAQ,GAAG,IAAI,CAAC;IAChB,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,57 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* @plures/unum — Reactive Svelte bindings for PluresDB
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* syncs with PluresDB (from the 'pluresdb' npm package), without requiring any knowledge of
|
|
6
|
-
* the component's props structure. Just specify the component and path, and
|
|
7
|
-
* it handles the rest.
|
|
8
|
-
*
|
|
9
|
-
* @param {Object} options - Configuration options
|
|
10
|
-
* @param {Function} options.component - The component to bind with PluresDB data
|
|
11
|
-
* @param {Object} options.db - PluresDB instance from 'pluresdb' package (can also use 'gun' for compatibility)
|
|
12
|
-
* @param {string} options.path - PluresDB path for data storage
|
|
13
|
-
* @param {string} [options.id] - Optional ID for multiple instances of the same component
|
|
14
|
-
* @param {Object} [options.defaultData] - Default data to use ONLY if no data exists yet
|
|
15
|
-
* @param {Object} [options.props] - Additional props to pass to the component (not synced with PluresDB)
|
|
16
|
-
* @returns {Function} A self-contained component that handles the synchronization
|
|
17
|
-
*/
|
|
18
|
-
export function pluresComponent(options: {
|
|
19
|
-
component: Function;
|
|
20
|
-
db: any;
|
|
21
|
-
path: string;
|
|
22
|
-
id?: string;
|
|
23
|
-
defaultData?: any;
|
|
24
|
-
props?: any;
|
|
25
|
-
}): Function;
|
|
26
|
-
export * from "./store.js";
|
|
27
|
-
export * from "./actions.js";
|
|
28
|
-
export * from "./plures-helper.js";
|
|
29
|
-
export * from "./plures-helper.js";
|
|
30
|
-
/**
|
|
31
|
-
* Creates a complete PluresDB-powered component with automatic synchronization
|
|
32
|
-
*
|
|
33
|
-
* This higher-level function creates a wrapped component that automatically
|
|
34
|
-
* syncs with PluresDB (from the 'pluresdb' npm package), without requiring any knowledge of
|
|
35
|
-
* the component's props structure. Just specify the component and path, and
|
|
36
|
-
* it handles the rest.
|
|
37
|
-
*
|
|
38
|
-
* @param {Object} options - Configuration options
|
|
39
|
-
* @param {Function} options.component - The component to bind with PluresDB data
|
|
40
|
-
* @param {Object} options.db - PluresDB instance from 'pluresdb' package (can also use 'gun' for compatibility)
|
|
41
|
-
* @param {string} options.path - PluresDB path for data storage
|
|
42
|
-
* @param {string} [options.id] - Optional ID for multiple instances of the same component
|
|
43
|
-
* @param {Object} [options.defaultData] - Default data to use ONLY if no data exists yet
|
|
44
|
-
* @param {Object} [options.props] - Additional props to pass to the component (not synced with PluresDB)
|
|
45
|
-
* @returns {Function} A self-contained component that handles the synchronization
|
|
4
|
+
* Zero Gun.js dependency. Backend-agnostic via adapters.
|
|
46
5
|
*/
|
|
47
|
-
export
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
props?: any;
|
|
54
|
-
}): Function;
|
|
55
|
-
import { gun } from './GunContext.js';
|
|
56
|
-
export { unum, connect, gun, gun as db, gun as plures };
|
|
6
|
+
export { initDb, getAdapter, getRoot, destroyDb, db } from './context.js';
|
|
7
|
+
export { pluresData, pluresDerived, pluresBind } from './runes.js';
|
|
8
|
+
export { PluresStore, createPluresStore } from './store.js';
|
|
9
|
+
export { createPluresDbAdapter } from './adapters/pluresdb.js';
|
|
10
|
+
export { createMemoryAdapter } from './adapters/memory.js';
|
|
11
|
+
export type { ChainNode, DbAdapter, DataCallback, DataRef, PluresDataOptions, Unsubscribe, } from './types.js';
|
|
57
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAG5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAG3D,YAAY,EACV,SAAS,EACT,SAAS,EACT,YAAY,EACZ,OAAO,EACP,iBAAiB,EACjB,WAAW,GACZ,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,200 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* unum
|
|
2
|
+
* @plures/unum — Reactive Svelte bindings for PluresDB
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Zero Gun.js dependency. Backend-agnostic via adapters.
|
|
5
5
|
*/
|
|
6
|
-
//
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
export
|
|
10
|
-
//
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
export * from './plures-helper.js';
|
|
14
|
-
/**
|
|
15
|
-
* Re-export unum and connect functions for easier imports
|
|
16
|
-
*/
|
|
17
|
-
import { unum, connect } from './unum.js';
|
|
18
|
-
import { gun } from './GunContext.js';
|
|
19
|
-
export { unum, connect, gun };
|
|
20
|
-
export { gun as db, gun as plures }; // Alternative export names
|
|
21
|
-
/**
|
|
22
|
-
* Creates a complete PluresDB-powered component with automatic synchronization
|
|
23
|
-
*
|
|
24
|
-
* This higher-level function creates a wrapped component that automatically
|
|
25
|
-
* syncs with PluresDB (from the 'pluresdb' npm package), without requiring any knowledge of
|
|
26
|
-
* the component's props structure. Just specify the component and path, and
|
|
27
|
-
* it handles the rest.
|
|
28
|
-
*
|
|
29
|
-
* @param {Object} options - Configuration options
|
|
30
|
-
* @param {Function} options.component - The component to bind with PluresDB data
|
|
31
|
-
* @param {Object} options.db - PluresDB instance from 'pluresdb' package (can also use 'gun' for compatibility)
|
|
32
|
-
* @param {string} options.path - PluresDB path for data storage
|
|
33
|
-
* @param {string} [options.id] - Optional ID for multiple instances of the same component
|
|
34
|
-
* @param {Object} [options.defaultData] - Default data to use ONLY if no data exists yet
|
|
35
|
-
* @param {Object} [options.props] - Additional props to pass to the component (not synced with PluresDB)
|
|
36
|
-
* @returns {Function} A self-contained component that handles the synchronization
|
|
37
|
-
*/
|
|
38
|
-
export function pluresComponent(options) {
|
|
39
|
-
const { component, db, gun, path, id, defaultData = {}, props: extraProps = {} } = options;
|
|
40
|
-
const dbInstance = db || gun; // Support both 'db' and 'gun' for compatibility
|
|
41
|
-
if (!component) {
|
|
42
|
-
console.error('Component is required for pluresComponent');
|
|
43
|
-
return () => null;
|
|
44
|
-
}
|
|
45
|
-
if (!dbInstance) {
|
|
46
|
-
console.error('PluresDB instance from the pluresdb package is required for pluresComponent');
|
|
47
|
-
return () => null;
|
|
48
|
-
}
|
|
49
|
-
if (!path) {
|
|
50
|
-
console.error('Path is required for pluresComponent');
|
|
51
|
-
return () => null;
|
|
52
|
-
}
|
|
53
|
-
// The full path including optional ID
|
|
54
|
-
const fullPath = id ? `${path}_${id}` : path;
|
|
55
|
-
// Return a dynamically created component constructor
|
|
56
|
-
return class PluresComponentWrapper {
|
|
57
|
-
constructor(options = {}) {
|
|
58
|
-
this.options = options;
|
|
59
|
-
this.Component = component;
|
|
60
|
-
this.instance = null;
|
|
61
|
-
this.isMounted = false;
|
|
62
|
-
this.dbNode = dbInstance.get(fullPath);
|
|
63
|
-
this.proxyData = null;
|
|
64
|
-
this.unsubscribe = null;
|
|
65
|
-
this.isUpdatingFromDb = false; // Flag to prevent circular updates
|
|
66
|
-
this.lastSnapshot = JSON.stringify({}); // Used to track changes
|
|
67
|
-
// Initialize data if empty
|
|
68
|
-
this.dbNode.once(data => {
|
|
69
|
-
if (!data || Object.keys(data).filter(k => k !== '_').length === 0) {
|
|
70
|
-
// Only apply default data if empty
|
|
71
|
-
if (defaultData && Object.keys(defaultData).length > 0) {
|
|
72
|
-
this.dbNode.put(defaultData);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
// Create reactive proxy
|
|
77
|
-
this.proxyData = this.createReactiveProxy();
|
|
78
|
-
}
|
|
79
|
-
// Create a proxy that automatically syncs with PluresDB
|
|
80
|
-
createReactiveProxy() {
|
|
81
|
-
// Initial state
|
|
82
|
-
const state = { ...defaultData };
|
|
83
|
-
// Create proxy
|
|
84
|
-
const proxy = new Proxy(state, {
|
|
85
|
-
get: (target, prop) => {
|
|
86
|
-
return target[prop];
|
|
87
|
-
},
|
|
88
|
-
set: (target, prop, value) => {
|
|
89
|
-
// Set value in state
|
|
90
|
-
target[prop] = value;
|
|
91
|
-
// Only update PluresDB if not updating from PluresDB
|
|
92
|
-
if (!this.isUpdatingFromDb && this.dbNode) {
|
|
93
|
-
// Update PluresDB
|
|
94
|
-
this.dbNode.get(prop).put(value);
|
|
95
|
-
// Handle arrays
|
|
96
|
-
if (Array.isArray(value)) {
|
|
97
|
-
this.wrapArrayMethods(value, prop);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
// Update component if mounted
|
|
101
|
-
if (this.isMounted && this.instance) {
|
|
102
|
-
const props = {};
|
|
103
|
-
props[prop] = value;
|
|
104
|
-
this.instance.$set(props);
|
|
105
|
-
}
|
|
106
|
-
return true;
|
|
107
|
-
},
|
|
108
|
-
deleteProperty: (target, prop) => {
|
|
109
|
-
delete target[prop];
|
|
110
|
-
// Update PluresDB
|
|
111
|
-
if (!this.isUpdatingFromDb && this.dbNode) {
|
|
112
|
-
this.dbNode.get(prop).put(null);
|
|
113
|
-
}
|
|
114
|
-
return true;
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
return proxy;
|
|
118
|
-
}
|
|
119
|
-
// Wrap array methods to detect changes
|
|
120
|
-
wrapArrayMethods(array, propPath) {
|
|
121
|
-
['push', 'pop', 'shift', 'unshift', 'splice', 'reverse', 'sort'].forEach(method => {
|
|
122
|
-
const original = array[method];
|
|
123
|
-
array[method] = function (...args) {
|
|
124
|
-
// Call original
|
|
125
|
-
const result = original.apply(this, args);
|
|
126
|
-
// Update PluresDB with entire array
|
|
127
|
-
if (this.dbNode) {
|
|
128
|
-
this.dbNode.get(propPath).put(array);
|
|
129
|
-
}
|
|
130
|
-
return result;
|
|
131
|
-
}.bind(this);
|
|
132
|
-
});
|
|
133
|
-
return array;
|
|
134
|
-
}
|
|
135
|
-
mount(target) {
|
|
136
|
-
if (!target) {
|
|
137
|
-
console.error('Target element is required for mounting');
|
|
138
|
-
return this;
|
|
139
|
-
}
|
|
140
|
-
// Get initial props
|
|
141
|
-
const props = {
|
|
142
|
-
...this.proxyData,
|
|
143
|
-
...extraProps,
|
|
144
|
-
...this.options?.props
|
|
145
|
-
};
|
|
146
|
-
// Create the component instance
|
|
147
|
-
this.instance = new this.Component({
|
|
148
|
-
target,
|
|
149
|
-
props
|
|
150
|
-
});
|
|
151
|
-
// Mark as mounted
|
|
152
|
-
this.isMounted = true;
|
|
153
|
-
// Subscribe to PluresDB updates
|
|
154
|
-
this.unsubscribe = this.dbNode.on((data) => {
|
|
155
|
-
if (!data)
|
|
156
|
-
return;
|
|
157
|
-
// Filter out PluresDB metadata
|
|
158
|
-
const cleanData = {};
|
|
159
|
-
for (const key in data) {
|
|
160
|
-
if (key !== '_' && !key.startsWith('_')) {
|
|
161
|
-
cleanData[key] = data[key];
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
// Update proxy without triggering PluresDB updates
|
|
165
|
-
this.isUpdatingFromDb = true;
|
|
166
|
-
try {
|
|
167
|
-
// Update all properties
|
|
168
|
-
for (const key in cleanData) {
|
|
169
|
-
// Update proxy
|
|
170
|
-
this.proxyData[key] = cleanData[key];
|
|
171
|
-
}
|
|
172
|
-
// Update component if mounted
|
|
173
|
-
if (this.isMounted && this.instance) {
|
|
174
|
-
this.instance.$set(cleanData);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
finally {
|
|
178
|
-
this.isUpdatingFromDb = false;
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
return this;
|
|
182
|
-
}
|
|
183
|
-
destroy() {
|
|
184
|
-
// Unsubscribe from PluresDB
|
|
185
|
-
if (this.unsubscribe) {
|
|
186
|
-
this.unsubscribe();
|
|
187
|
-
this.unsubscribe = null;
|
|
188
|
-
}
|
|
189
|
-
// Destroy component
|
|
190
|
-
if (this.instance && typeof this.instance.$destroy === 'function') {
|
|
191
|
-
this.instance.$destroy();
|
|
192
|
-
this.instance = null;
|
|
193
|
-
}
|
|
194
|
-
this.isMounted = false;
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
// Legacy export for backward compatibility
|
|
199
|
-
export const gunComponent = pluresComponent;
|
|
6
|
+
// Core
|
|
7
|
+
export { initDb, getAdapter, getRoot, destroyDb, db } from './context.js';
|
|
8
|
+
export { pluresData, pluresDerived, pluresBind } from './runes.js';
|
|
9
|
+
export { PluresStore, createPluresStore } from './store.js';
|
|
10
|
+
// Adapters
|
|
11
|
+
export { createPluresDbAdapter } from './adapters/pluresdb.js';
|
|
12
|
+
export { createMemoryAdapter } from './adapters/memory.js';
|
|
200
13
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO;AACP,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE5D,WAAW;AACX,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC"}
|