@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/dist/gunify.js
DELETED
|
@@ -1,294 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* unum - Component-agnostic Gun.js data binding for Svelte components
|
|
3
|
-
*
|
|
4
|
-
* This module provides a clean way to bind Gun.js data to Svelte components
|
|
5
|
-
* without the components knowing anything about Gun.js.
|
|
6
|
-
*/
|
|
7
|
-
import { getContext } from 'svelte';
|
|
8
|
-
import { writable, derived } from 'svelte/store';
|
|
9
|
-
import { gun as gunStore } from './GunContext.js';
|
|
10
|
-
/**
|
|
11
|
-
* Creates a Gun-powered version of any Svelte component
|
|
12
|
-
*
|
|
13
|
-
* This function takes a component and returns a new function component
|
|
14
|
-
* that automatically binds Gun.js data to the original component's props structure.
|
|
15
|
-
*
|
|
16
|
-
* @param {Component} Component - The Svelte component to enhance
|
|
17
|
-
* @param {Object} options - Options for the binding
|
|
18
|
-
* @param {string} options.path - Gun.js path for the data
|
|
19
|
-
* @param {string} [options.id] - Optional ID for specific component instance
|
|
20
|
-
* @param {Object} [options.defaultProps] - Default props to use when Gun data is not available
|
|
21
|
-
* @returns {Component} A new component that wraps the original with Gun.js binding
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* // Create a Gun-powered TodoList component
|
|
25
|
-
* import { unum } from '$lib/svgun/unum';
|
|
26
|
-
* import TodoList from './TodoList.svelte';
|
|
27
|
-
*
|
|
28
|
-
* export const GunTodoList = unum(TodoList, {
|
|
29
|
-
* path: 'todos',
|
|
30
|
-
* defaultProps: { items: [] }
|
|
31
|
-
* });
|
|
32
|
-
*
|
|
33
|
-
* // In a parent component or route
|
|
34
|
-
* <GunTodoList />
|
|
35
|
-
*/
|
|
36
|
-
export function unum(Component, options) {
|
|
37
|
-
const { path, id, defaultProps = {} } = options;
|
|
38
|
-
// Use id if provided, otherwise generate a unique one
|
|
39
|
-
const nodePath = id ? `${path}_${id}` : path;
|
|
40
|
-
// Return a new component function (Svelte 5 style)
|
|
41
|
-
return function GunifiedComponent($$props) {
|
|
42
|
-
const props = $$props || {};
|
|
43
|
-
// Create a store for the component props
|
|
44
|
-
const propsStore = writable({ ...defaultProps, ...props });
|
|
45
|
-
// Subscribe to the Gun instance
|
|
46
|
-
const gunStoreValue = getContext('gun') || gunStore;
|
|
47
|
-
let gun = null;
|
|
48
|
-
let unsubscribe = null;
|
|
49
|
-
// Subscribe to Gun updates when the component is created
|
|
50
|
-
const unsubscribeFromGun = gunStoreValue.subscribe($gun => {
|
|
51
|
-
if (!$gun)
|
|
52
|
-
return;
|
|
53
|
-
gun = $gun;
|
|
54
|
-
// Get the Gun node for this component
|
|
55
|
-
const node = gun.get(nodePath);
|
|
56
|
-
// Initialize Gun data with default props if empty
|
|
57
|
-
node.once(data => {
|
|
58
|
-
if (!data || Object.keys(data).length === 0) {
|
|
59
|
-
const initialData = { ...defaultProps, ...props };
|
|
60
|
-
node.put(initialData);
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
// Subscribe to Gun data changes
|
|
64
|
-
unsubscribe = node.on((data) => {
|
|
65
|
-
if (!data)
|
|
66
|
-
return;
|
|
67
|
-
// Filter out Gun metadata
|
|
68
|
-
const cleanData = {};
|
|
69
|
-
for (const k in data) {
|
|
70
|
-
if (k !== '_' && !k.startsWith('_')) {
|
|
71
|
-
cleanData[k] = data[k];
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
// Update props store
|
|
75
|
-
propsStore.update(current => ({
|
|
76
|
-
...current,
|
|
77
|
-
...cleanData
|
|
78
|
-
}));
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
// Create the derived props for the component
|
|
82
|
-
const derivedProps = derived(propsStore, $props => $props);
|
|
83
|
-
// Handle component events
|
|
84
|
-
function handleEvent(event) {
|
|
85
|
-
const { detail } = event;
|
|
86
|
-
// If Gun instance is available
|
|
87
|
-
if (gun) {
|
|
88
|
-
const node = gun.get(nodePath);
|
|
89
|
-
if (node && detail) {
|
|
90
|
-
// Update Gun data with event detail
|
|
91
|
-
node.put(detail);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
// Also update the local props store
|
|
95
|
-
if (detail) {
|
|
96
|
-
propsStore.update(current => ({
|
|
97
|
-
...current,
|
|
98
|
-
...detail
|
|
99
|
-
}));
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
// Listener for all update events
|
|
103
|
-
function addEventListeners(element) {
|
|
104
|
-
if (element) {
|
|
105
|
-
element.addEventListener('update', handleEvent);
|
|
106
|
-
}
|
|
107
|
-
return () => {
|
|
108
|
-
if (element) {
|
|
109
|
-
element.removeEventListener('update', handleEvent);
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
// Return the wrapped component
|
|
114
|
-
return {
|
|
115
|
-
component: Component,
|
|
116
|
-
props: derivedProps,
|
|
117
|
-
$$slot_def: {},
|
|
118
|
-
events: {
|
|
119
|
-
update: handleEvent
|
|
120
|
-
},
|
|
121
|
-
onMount(instance) {
|
|
122
|
-
if (instance && instance.$$root) {
|
|
123
|
-
// Add event listeners to the component's root element
|
|
124
|
-
return addEventListeners(instance.$$root);
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
// Clean up when component is destroyed
|
|
128
|
-
destroy() {
|
|
129
|
-
if (unsubscribeFromGun) {
|
|
130
|
-
unsubscribeFromGun();
|
|
131
|
-
}
|
|
132
|
-
if (unsubscribe) {
|
|
133
|
-
unsubscribe();
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Universal binding between Gun.js and any component data
|
|
141
|
-
*
|
|
142
|
-
* This function creates a reactive binding that syncs component data
|
|
143
|
-
* to Gun.js in a generic way, without caring about the specific structure.
|
|
144
|
-
*
|
|
145
|
-
* @param {string} path - Gun.js path for the data
|
|
146
|
-
* @param {Object} [options] - Configuration options
|
|
147
|
-
* @param {Object} [options.defaultData={}] - Default data to use when Gun data is not available
|
|
148
|
-
* @returns {Object} A binding object with subscriber, data object, and change handler
|
|
149
|
-
*/
|
|
150
|
-
export function connect(path, options = {}) {
|
|
151
|
-
const { defaultData = {} } = options;
|
|
152
|
-
// Create a reactive store
|
|
153
|
-
const dataStore = writable({ ...defaultData });
|
|
154
|
-
// Variable to prevent circular updates
|
|
155
|
-
let isUpdatingFromGun = false;
|
|
156
|
-
let isFirstUpdate = true;
|
|
157
|
-
// Use internal reference to track the current data state
|
|
158
|
-
let currentData = { ...defaultData };
|
|
159
|
-
// Setup Gun connection
|
|
160
|
-
const unsubscribeFromGun = gunStore.subscribe($gun => {
|
|
161
|
-
if (!$gun)
|
|
162
|
-
return;
|
|
163
|
-
// Get the Gun node
|
|
164
|
-
const node = $gun.get(path);
|
|
165
|
-
// Initialize data if empty
|
|
166
|
-
node.once(initialData => {
|
|
167
|
-
if (!initialData || Object.keys(initialData).filter(k => k !== '_').length === 0) {
|
|
168
|
-
// Initialize Gun with default data
|
|
169
|
-
node.put(defaultData);
|
|
170
|
-
// Update the store with default data
|
|
171
|
-
dataStore.set(defaultData);
|
|
172
|
-
currentData = { ...defaultData };
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
175
|
-
// Filter out Gun metadata
|
|
176
|
-
const cleanData = {};
|
|
177
|
-
for (const k in initialData) {
|
|
178
|
-
if (k !== '_' && !k.startsWith('_')) {
|
|
179
|
-
cleanData[k] = initialData[k];
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
// Update store with existing data
|
|
183
|
-
dataStore.set(cleanData);
|
|
184
|
-
currentData = { ...cleanData };
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
// Subscribe to Gun data changes
|
|
188
|
-
const unsubscribe = node.on((data) => {
|
|
189
|
-
if (!data)
|
|
190
|
-
return;
|
|
191
|
-
// Filter out Gun metadata
|
|
192
|
-
const cleanData = {};
|
|
193
|
-
for (const k in data) {
|
|
194
|
-
if (k !== '_' && !k.startsWith('_')) {
|
|
195
|
-
cleanData[k] = data[k];
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
if (isFirstUpdate || JSON.stringify(cleanData) !== JSON.stringify(currentData)) {
|
|
199
|
-
isFirstUpdate = false;
|
|
200
|
-
isUpdatingFromGun = true;
|
|
201
|
-
// Update store with clean data
|
|
202
|
-
dataStore.set(cleanData);
|
|
203
|
-
// Update our internal reference
|
|
204
|
-
currentData = { ...cleanData };
|
|
205
|
-
// Reset flag after update
|
|
206
|
-
setTimeout(() => {
|
|
207
|
-
isUpdatingFromGun = false;
|
|
208
|
-
}, 0);
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
return function cleanup() {
|
|
212
|
-
unsubscribe();
|
|
213
|
-
};
|
|
214
|
-
});
|
|
215
|
-
// Create reactive data object that syncs with Gun
|
|
216
|
-
const data = {};
|
|
217
|
-
// Set up a proxy to detect changes to data properties
|
|
218
|
-
const proxy = new Proxy(data, {
|
|
219
|
-
get(target, prop) {
|
|
220
|
-
// Get the latest data from the store
|
|
221
|
-
const storeData = currentData;
|
|
222
|
-
return storeData[prop];
|
|
223
|
-
},
|
|
224
|
-
set(target, prop, value) {
|
|
225
|
-
// Skip if we're in the middle of updating from Gun
|
|
226
|
-
if (isUpdatingFromGun)
|
|
227
|
-
return true;
|
|
228
|
-
// Create updated data
|
|
229
|
-
const updatedData = { ...currentData };
|
|
230
|
-
updatedData[prop] = value;
|
|
231
|
-
// Update Gun
|
|
232
|
-
gunStore.update($gun => {
|
|
233
|
-
if ($gun) {
|
|
234
|
-
$gun.get(path).put(updatedData);
|
|
235
|
-
}
|
|
236
|
-
return $gun;
|
|
237
|
-
});
|
|
238
|
-
// Update our internal reference
|
|
239
|
-
currentData = { ...updatedData };
|
|
240
|
-
// Update store
|
|
241
|
-
dataStore.set(updatedData);
|
|
242
|
-
return true;
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
// Generic function to handle any component data changes
|
|
246
|
-
function handleComponentChange(newData) {
|
|
247
|
-
// Skip if we're in the middle of updating from Gun
|
|
248
|
-
if (isUpdatingFromGun)
|
|
249
|
-
return;
|
|
250
|
-
// Safety check for newData
|
|
251
|
-
if (!newData)
|
|
252
|
-
return;
|
|
253
|
-
// Update Gun with the new data
|
|
254
|
-
gunStore.update($gun => {
|
|
255
|
-
if ($gun) {
|
|
256
|
-
$gun.get(path).put(newData);
|
|
257
|
-
}
|
|
258
|
-
return $gun;
|
|
259
|
-
});
|
|
260
|
-
// Update our internal reference
|
|
261
|
-
currentData = { ...newData };
|
|
262
|
-
// Update store
|
|
263
|
-
dataStore.set(newData);
|
|
264
|
-
}
|
|
265
|
-
// Expose methods for updating data
|
|
266
|
-
return {
|
|
267
|
-
data: proxy,
|
|
268
|
-
subscribe: dataStore.subscribe,
|
|
269
|
-
set: handleComponentChange,
|
|
270
|
-
update(updater) {
|
|
271
|
-
// Skip if we're in the middle of updating from Gun
|
|
272
|
-
if (isUpdatingFromGun)
|
|
273
|
-
return;
|
|
274
|
-
// Apply updater to current data
|
|
275
|
-
const updatedData = updater(currentData);
|
|
276
|
-
handleComponentChange(updatedData);
|
|
277
|
-
},
|
|
278
|
-
updateField(field, value) {
|
|
279
|
-
// Skip if we're in the middle of updating from Gun
|
|
280
|
-
if (isUpdatingFromGun)
|
|
281
|
-
return;
|
|
282
|
-
// Update a specific field
|
|
283
|
-
const updatedData = { ...currentData };
|
|
284
|
-
updatedData[field] = value;
|
|
285
|
-
handleComponentChange(updatedData);
|
|
286
|
-
},
|
|
287
|
-
// Universal change handler for any component data
|
|
288
|
-
handleChange: handleComponentChange,
|
|
289
|
-
destroy() {
|
|
290
|
-
unsubscribeFromGun();
|
|
291
|
-
}
|
|
292
|
-
};
|
|
293
|
-
}
|
|
294
|
-
//# sourceMappingURL=gunify.js.map
|
package/dist/gunify.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gunify.js","sourceRoot":"","sources":["../src/gunify.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,GAAG,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,IAAI,CAAC,SAAS,EAAE,OAAO;IACrC,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,YAAY,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC;IAEhD,sDAAsD;IACtD,MAAM,QAAQ,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAE7C,mDAAmD;IACnD,OAAO,SAAS,iBAAiB,CAAC,OAAO;QACvC,MAAM,KAAK,GAAG,OAAO,IAAI,EAAE,CAAC;QAE5B,yCAAyC;QACzC,MAAM,UAAU,GAAG,QAAQ,CAAC,EAAE,GAAG,YAAY,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;QAE3D,gCAAgC;QAChC,MAAM,aAAa,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC;QACpD,IAAI,GAAG,GAAG,IAAI,CAAC;QACf,IAAI,WAAW,GAAG,IAAI,CAAC;QAEvB,yDAAyD;QACzD,MAAM,kBAAkB,GAAG,aAAa,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;YACxD,IAAI,CAAC,IAAI;gBAAE,OAAO;YAClB,GAAG,GAAG,IAAI,CAAC;YAEX,sCAA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AC;QACd,CAAC,CAAC,CAAC;QAEH,gCAAgC;QAChC,WAAW,GAAG,EAAE,GAAG,OAAO,EAAE,CAAC;QAE7B,eAAe;QACf,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC;IAED,mCAAmC;IACnC,OAAO;QACL,IAAI,EAAE,KAAK;QACX,SAAS,EAAE,SAAS,CAAC,SAAS;QAC9B,GAAG,EAAE,qBAAqB;QAC1B,MAAM,CAAC,OAAO;YACZ,mDAAmD;YACnD,IAAI,iBAAiB;gBAAE,OAAO;YAE9B,gCAAgC;YAChC,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;YACzC,qBAAqB,CAAC,WAAW,CAAC,CAAC;QACrC,CAAC;QACD,WAAW,CAAC,KAAK,EAAE,KAAK;YACtB,mDAAmD;YACnD,IAAI,iBAAiB;gBAAE,OAAO;YAE9B,0BAA0B;YAC1B,MAAM,WAAW,GAAG,EAAE,GAAG,WAAW,EAAE,CAAC;YACvC,WAAW,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;YAC3B,qBAAqB,CAAC,WAAW,CAAC,CAAC;QACrC,CAAC;QACD,kDAAkD;QAClD,YAAY,EAAE,qBAAqB;QACnC,OAAO;YACL,kBAAkB,EAAE,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/plures-helper.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* unum - PluresDB Helper Utilities
|
|
3
|
-
*
|
|
4
|
-
* This module provides helper functions for working with PluresDB in Svelte.
|
|
5
|
-
* PluresDB is a Gun.js-compatible database available at npm package 'pluresdb'.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Get a reference to the PluresDB constructor when loaded from CDN
|
|
9
|
-
*/
|
|
10
|
-
export function getPlures(options: any): any;
|
|
11
|
-
/**
|
|
12
|
-
* Checks if PluresDB is available
|
|
13
|
-
*/
|
|
14
|
-
export function isPluresAvailable(): boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Helper to safely access PluresDB data with nested properties
|
|
17
|
-
*/
|
|
18
|
-
export function safeGet(obj: any, path: any, defaultValue?: any): any;
|
|
19
|
-
/**
|
|
20
|
-
* Helper to safely process PluresDB data in a map operation
|
|
21
|
-
*/
|
|
22
|
-
export function safeMap(dbData: any, callback: any, filterFn?: any): any[];
|
|
23
|
-
/**
|
|
24
|
-
* Create a PluresDB chain with safety checks
|
|
25
|
-
*/
|
|
26
|
-
export function safeChain(db: any, path: any): any;
|
|
27
|
-
/**
|
|
28
|
-
* unum - PluresDB Helper Utilities
|
|
29
|
-
*
|
|
30
|
-
* This module provides helper functions for working with PluresDB in Svelte.
|
|
31
|
-
* PluresDB is a Gun.js-compatible database available at npm package 'pluresdb'.
|
|
32
|
-
*/
|
|
33
|
-
/**
|
|
34
|
-
* Get a reference to the PluresDB constructor when loaded from CDN
|
|
35
|
-
*/
|
|
36
|
-
export function getGun(options: any): any;
|
|
37
|
-
/**
|
|
38
|
-
* Checks if PluresDB is available
|
|
39
|
-
*/
|
|
40
|
-
export function isGunAvailable(): boolean;
|
|
41
|
-
//# sourceMappingURL=plures-helper.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plures-helper.d.ts","sourceRoot":"","sources":["../src/plures-helper.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,6CAcC;AAED;;GAEG;AACH,6CAEC;AAED;;GAEG;AACH,sEAmBC;AAED;;GAEG;AACH,2EA2BC;AAED;;GAEG;AACH,mDAyBC;AArHD;;;;;GAKG;AAEH;;GAEG;AACH,0CAcC;AAED;;GAEG;AACH,0CAEC"}
|
package/dist/plures-helper.js
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* unum - PluresDB Helper Utilities
|
|
3
|
-
*
|
|
4
|
-
* This module provides helper functions for working with PluresDB in Svelte.
|
|
5
|
-
* PluresDB is a Gun.js-compatible database available at npm package 'pluresdb'.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Get a reference to the PluresDB constructor when loaded from CDN
|
|
9
|
-
*/
|
|
10
|
-
export function getPlures(options) {
|
|
11
|
-
// First check if PluresDB/Gun was loaded via CDN
|
|
12
|
-
if (typeof window !== 'undefined' && (window.GunDB || window.Gun)) {
|
|
13
|
-
try {
|
|
14
|
-
const DB = window.GunDB || window.Gun;
|
|
15
|
-
return new DB(options);
|
|
16
|
-
}
|
|
17
|
-
catch (error) {
|
|
18
|
-
console.error('Error initializing PluresDB:', error);
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
console.warn('PluresDB/Gun.js not available. Make sure to include it via CDN script tag or install the pluresdb npm package.');
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Checks if PluresDB is available
|
|
27
|
-
*/
|
|
28
|
-
export function isPluresAvailable() {
|
|
29
|
-
return typeof window !== 'undefined' && (window.GunDB !== undefined || window.Gun !== undefined);
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Helper to safely access PluresDB data with nested properties
|
|
33
|
-
*/
|
|
34
|
-
export function safeGet(obj, path, defaultValue = undefined) {
|
|
35
|
-
if (!obj)
|
|
36
|
-
return defaultValue;
|
|
37
|
-
try {
|
|
38
|
-
const parts = path.split('.');
|
|
39
|
-
let result = obj;
|
|
40
|
-
for (const part of parts) {
|
|
41
|
-
if (result === undefined || result === null) {
|
|
42
|
-
return defaultValue;
|
|
43
|
-
}
|
|
44
|
-
result = result[part];
|
|
45
|
-
}
|
|
46
|
-
return result === undefined ? defaultValue : result;
|
|
47
|
-
}
|
|
48
|
-
catch (error) {
|
|
49
|
-
console.error(`Error getting path ${path}:`, error);
|
|
50
|
-
return defaultValue;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Helper to safely process PluresDB data in a map operation
|
|
55
|
-
*/
|
|
56
|
-
export function safeMap(dbData, callback, filterFn = null) {
|
|
57
|
-
if (!dbData || typeof dbData !== 'object') {
|
|
58
|
-
return [];
|
|
59
|
-
}
|
|
60
|
-
try {
|
|
61
|
-
// Convert to entries and filter out metadata
|
|
62
|
-
let entries = Object.entries(dbData).filter(([key]) => key !== '_');
|
|
63
|
-
// Apply additional filter if provided
|
|
64
|
-
if (filterFn && typeof filterFn === 'function') {
|
|
65
|
-
entries = entries.filter(([key, value]) => filterFn(key, value));
|
|
66
|
-
}
|
|
67
|
-
// Map the data
|
|
68
|
-
return entries.map(([key, value]) => {
|
|
69
|
-
try {
|
|
70
|
-
return callback(key, value);
|
|
71
|
-
}
|
|
72
|
-
catch (error) {
|
|
73
|
-
console.error(`Error processing item ${key}:`, error);
|
|
74
|
-
return null;
|
|
75
|
-
}
|
|
76
|
-
}).filter(item => item !== null);
|
|
77
|
-
}
|
|
78
|
-
catch (error) {
|
|
79
|
-
console.error('Error processing PluresDB data:', error);
|
|
80
|
-
return [];
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Create a PluresDB chain with safety checks
|
|
85
|
-
*/
|
|
86
|
-
export function safeChain(db, path) {
|
|
87
|
-
if (!db) {
|
|
88
|
-
console.error('No PluresDB instance provided');
|
|
89
|
-
return null;
|
|
90
|
-
}
|
|
91
|
-
try {
|
|
92
|
-
if (!path)
|
|
93
|
-
return db;
|
|
94
|
-
let chain = db;
|
|
95
|
-
const parts = path.split('.');
|
|
96
|
-
for (const part of parts) {
|
|
97
|
-
if (part === '#') {
|
|
98
|
-
chain = chain.map();
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
chain = chain.get(part);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
return chain;
|
|
105
|
-
}
|
|
106
|
-
catch (error) {
|
|
107
|
-
console.error(`Error creating PluresDB chain for path ${path}:`, error);
|
|
108
|
-
return null;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
// Legacy exports for backward compatibility
|
|
112
|
-
export const getGun = getPlures;
|
|
113
|
-
export const isGunAvailable = isPluresAvailable;
|
|
114
|
-
//# sourceMappingURL=plures-helper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plures-helper.js","sourceRoot":"","sources":["../src/plures-helper.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,OAAO;IAC/B,iDAAiD;IACjD,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;QAClE,IAAI,CAAC;YACH,MAAM,EAAE,GAAG,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,GAAG,CAAC;YACtC,OAAO,IAAI,EAAE,CAAC,OAAO,CAAC,CAAC;QACzB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC;YACrD,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,OAAO,CAAC,IAAI,CAAC,gHAAgH,CAAC,CAAC;IAC/H,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,OAAO,MAAM,KAAK,WAAW,IAAI,CAAC,MAAM,CAAC,KAAK,KAAK,SAAS,IAAI,MAAM,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC;AACnG,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,YAAY,GAAG,SAAS;IACzD,IAAI,CAAC,GAAG;QAAE,OAAO,YAAY,CAAC;IAE9B,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,MAAM,GAAG,GAAG,CAAC;QAEjB,K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