@classic-homes/offline-core 0.1.1 → 0.1.3
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/dist/cache/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { CACHE_PREFIX, CacheService, createCacheService, getCacheKey, getOriginalKey } from '../chunk-
|
|
1
|
+
export { CACHE_PREFIX, CacheService, createCacheService, getCacheKey, getOriginalKey } from '../chunk-K7USXDTP.js';
|
|
2
2
|
import '../chunk-ZC7F2HDV.js';
|
|
@@ -372,9 +372,11 @@ var IndexedDBAdapter = class {
|
|
|
372
372
|
createdAt: metadata?.createdAt ?? Date.now()
|
|
373
373
|
};
|
|
374
374
|
try {
|
|
375
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
375
376
|
await db.put("blobs", {
|
|
376
377
|
key,
|
|
377
|
-
|
|
378
|
+
data: arrayBuffer,
|
|
379
|
+
contentType: blob.type || metadata?.contentType || "",
|
|
378
380
|
metadata: fullMetadata
|
|
379
381
|
});
|
|
380
382
|
} catch (error) {
|
|
@@ -396,7 +398,7 @@ var IndexedDBAdapter = class {
|
|
|
396
398
|
return null;
|
|
397
399
|
}
|
|
398
400
|
return {
|
|
399
|
-
blob: entry.
|
|
401
|
+
blob: new Blob([entry.data], { type: entry.contentType }),
|
|
400
402
|
metadata: entry.metadata
|
|
401
403
|
};
|
|
402
404
|
} catch (error) {
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { createAdapter, OfflineStorageError } from './chunk-
|
|
2
|
-
export { OfflineStorageError, createAdapter, detectAvailableAdapters, detectBrowser, isBrowser, isSSR, isWorker, supportsIndexedDB, supportsLocalStorage, supportsOPFS } from './chunk-
|
|
1
|
+
import { createAdapter, OfflineStorageError } from './chunk-IDRYBB6Z.js';
|
|
2
|
+
export { OfflineStorageError, createAdapter, detectAvailableAdapters, detectBrowser, isBrowser, isSSR, isWorker, supportsIndexedDB, supportsLocalStorage, supportsOPFS } from './chunk-IDRYBB6Z.js';
|
|
3
3
|
import { createFileStorageService } from './chunk-U27TKOYZ.js';
|
|
4
4
|
export { FileStorageService, createFileStorageService } from './chunk-U27TKOYZ.js';
|
|
5
5
|
import { createDraftStorageService } from './chunk-IIG4QLLN.js';
|
|
6
6
|
export { DraftStorageService, createDraftStorageService } from './chunk-IIG4QLLN.js';
|
|
7
|
-
import { createCacheService } from './chunk-
|
|
8
|
-
export { CACHE_PREFIX, CacheService, createCacheService } from './chunk-
|
|
7
|
+
import { createCacheService } from './chunk-K7USXDTP.js';
|
|
8
|
+
export { CACHE_PREFIX, CacheService, createCacheService } from './chunk-K7USXDTP.js';
|
|
9
9
|
export { ConnectivityMonitor, SyncQueue, SyncService, applyResolution, compareDrafts, createConnectivityMonitor, createSyncQueue, createSyncService, detectConflict } from './chunk-XHMX3BYT.js';
|
|
10
10
|
import { createDraftManagerService } from './chunk-4QWZX3LM.js';
|
|
11
11
|
export { DRAFT_PREFIX, DRAFT_V2_PREFIX, DraftManagerService, createDraftManagerService, generateDraftId, getOrCreateDeviceId } from './chunk-4QWZX3LM.js';
|
package/dist/storage/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { IndexedDBAdapter, MemoryAdapter, OPFSAdapter, createAdapter, createIndexedDBAdapter, createMemoryAdapter, createOPFSAdapter, detectAvailableAdapters } from '../chunk-
|
|
1
|
+
export { IndexedDBAdapter, MemoryAdapter, OPFSAdapter, createAdapter, createIndexedDBAdapter, createMemoryAdapter, createOPFSAdapter, detectAvailableAdapters } from '../chunk-IDRYBB6Z.js';
|
|
2
2
|
import '../chunk-ZC7F2HDV.js';
|