@keepkit/core 0.28.8 → 0.28.10

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/core.d.ts CHANGED
@@ -1,12 +1,10 @@
1
- import { a as StorageAdapter, b as KeepCollectionMembership, c as KeepItem, R as RemoteSyncDriver, k as KeepPluginContext, l as KeepPlugin, m as SyncOperation, n as KeepCollectionSyncOperation, o as KeepMembershipSyncOperation, S as SyncScope, p as SyncCapableStorageAdapter, q as RemoteSyncResult, K as KeepCollectionDefinition, r as KeepSyncAuthError } from './types-GTCMFt5T.js';
2
- export { s as KeepAction, i as KeepChangeContext, t as KeepChangePhase, u as KeepCollectionSyncConflict, v as KeepCollectionSyncResult, w as KeepConflictContext, x as KeepConflictResolver, y as KeepErrorContext, z as KeepErrorHandler, A as KeepEventHandlers, h as KeepInvalidItemPolicy, B as KeepItemInput, f as KeepItemStatus, g as KeepSchema, C as KeepSchemaParseResult, D as KeepStorageAccessError, E as KeepStorageError, F as KeepStorageOperation, G as KeepStorageParseError, H as KeepStorageQuotaError, I as KeepSyncAuthStatus, J as KeepSyncConflict, e as KeepSyncQueueOperation, L as KeepSyncResolution, M as KeepSyncState, N as KeepSyncStatus, j as KeepUndoState, d as SyncQueueAdapter, O as isKeepSyncAuthError, P as normalizeKeepTags } from './types-GTCMFt5T.js';
3
- import { K as KeepListQuery } from './store-98vWM3tV.js';
4
- export { D as DEFAULT_KEEP_URL_PARAMS, I as ImportItemsOptions, a as ImportItemsResult, b as KEEP_BACKUP_FORMAT, c as KEEP_BACKUP_VERSION, d as KeepAutoRevalidationOptions, e as KeepBackup, f as KeepBackupAppliedCounts, g as KeepBackupDataType, h as KeepBackupImportError, i as KeepBackupParseError, j as KeepBackupV1, k as KeepBackupV2, l as KeepCollectionMeta, m as KeepItemMetadataRefresher, n as KeepItemResolver, o as KeepItemRevalidationRecord, p as KeepItemRevalidationResult, q as KeepItemRevalidationSummary, r as KeepItemRevalidator, s as KeepNavigationState, t as KeepRediscoveryOptions, u as KeepRediscoveryStrategy, v as KeepStore, w as KeepStoreActions, x as KeepStoreState, y as KeepUrlParamNames, z as KeepUrlState, A as KeepUrlSyncOptions, Q as QueryKeepItemsResult, R as RevalidateKeepItemsOptions, B as createInboxQuery, C as createRediscoveryQuery, E as decodeKeepListQuery, F as encodeKeepListQuery, G as exportItems, H as getKeepNavigationState, J as getTagCounts, L as importItems, M as isKeepItemMetadataStale, N as mergeKeepListQueryFromUrl, O as moveKeepItem, P as orderKeepItems, S as queryKeepItems, T as reconcileKeepItems, U as reorderKeepItems, V as revalidateKeepItems, W as serializeKeepListQuery } from './store-98vWM3tV.js';
5
- import { K as KeepScope } from './scope-1bxGd68Y.js';
6
- export { S as ScopedStorageAdapter, a as ScopedSyncQueueAdapter, c as createScopedStorageAdapter, g as getKeepScopeKey, i as isSameKeepScope } from './scope-1bxGd68Y.js';
1
+ import { S as StorageAdapter, d as KeepCollectionMembership, K as KeepItem, e as KeepScope, R as RemoteSyncDriver, f as KeepPluginContext, g as KeepPlugin, h as SyncOperation, i as KeepCollectionSyncOperation, j as KeepMembershipSyncOperation, k as SyncScope, l as SyncCapableStorageAdapter, m as RemoteSyncResult, n as KeepCollectionDefinition, o as KeepSyncAuthError } from './types-DjXvE9Zb.js';
2
+ export { F as FallbackRecoveryJournal, p as FallbackRecoveryJournalState, q as FallbackRecoveryJournalV2, r as FallbackRecoveryOperation, s as FallbackRecoverySnapshot, I as ImportItemsOptions, t as ImportItemsResult, u as KEEP_BACKUP_FORMAT, v as KEEP_BACKUP_VERSION, w as KeepAction, x as KeepBackup, y as KeepBackupAppliedCounts, z as KeepBackupDataType, A as KeepBackupImportError, B as KeepBackupParseError, C as KeepBackupV1, D as KeepBackupV2, b as KeepChangeContext, E as KeepChangePhase, G as KeepCollectionSyncConflict, H as KeepCollectionSyncResult, J as KeepConflictContext, L as KeepConflictResolver, M as KeepErrorContext, N as KeepErrorHandler, O as KeepEventHandlers, P as KeepInvalidItemPolicy, Q as KeepItemInput, a as KeepItemStatus, T as KeepRecoveryInspection, U as KeepRecoveryResult, V as KeepRecoveryRow, W as KeepRecoveryState, X as KeepSchema, Y as KeepSchemaParseResult, Z as KeepStorageAccessError, _ as KeepStorageError, $ as KeepStorageOperation, a0 as KeepStorageParseError, a1 as KeepStorageQuotaError, a2 as KeepStorageRecovery, a3 as KeepStorageSerializationError, a4 as KeepSyncAuthStatus, a5 as KeepSyncConflict, a6 as KeepSyncQueueOperation, a7 as KeepSyncResolution, a8 as KeepSyncState, a9 as KeepSyncStatus, c as KeepUndoState, aa as LocalStorageRecoveryJournal, ab as ScopedStorageAdapter, ac as ScopedSyncQueueAdapter, ad as SyncQueueAdapter, ae as createScopedStorageAdapter, af as exportItems, ag as getKeepScopeKey, ah as importItems, ai as isKeepSyncAuthError, aj as isSameKeepScope, ak as normalizeKeepTags } from './types-DjXvE9Zb.js';
3
+ import { K as KeepListQuery } from './store-C8cxvXRV.js';
4
+ export { D as DEFAULT_KEEP_URL_PARAMS, a as KeepAutoRevalidationOptions, b as KeepCollectionMeta, c as KeepItemMetadataRefresher, d as KeepItemResolver, e as KeepItemRevalidationRecord, f as KeepItemRevalidationResult, g as KeepItemRevalidationSummary, h as KeepItemRevalidator, i as KeepNavigationState, j as KeepRediscoveryOptions, k as KeepRediscoveryStrategy, l as KeepStore, m as KeepStoreActions, n as KeepStoreState, o as KeepUrlParamNames, p as KeepUrlState, q as KeepUrlSyncOptions, Q as QueryKeepItemsResult, R as RevalidateKeepItemsOptions, r as createInboxQuery, s as createRediscoveryQuery, t as decodeKeepListQuery, u as encodeKeepListQuery, v as getKeepNavigationState, w as getTagCounts, x as isKeepItemMetadataStale, y as mergeKeepListQueryFromUrl, z as moveKeepItem, A as orderKeepItems, B as queryKeepItems, C as reconcileKeepItems, E as reorderKeepItems, F as revalidateKeepItems, G as serializeKeepListQuery } from './store-C8cxvXRV.js';
7
5
  export { KeepSchemaValidationError, parseKeepMeta, validateKeepItem } from './schema.js';
8
6
  import { SyncStorageAdapterOptions, BrowserStorageAdapterOptions } from './storage.js';
9
- export { DEFAULT_INDEXEDDB_DATABASE, DEFAULT_INDEXEDDB_STORE, DEFAULT_STORAGE_KEY, DEFAULT_SYNC_QUEUE_DATABASE, DEFAULT_SYNC_QUEUE_KEY, DEFAULT_SYNC_QUEUE_STORE, FallbackStorageAdapter, FallbackStorageAdapterOptions, FallbackSyncQueueAdapter, FallbackSyncQueueAdapterOptions, IndexedDBAdapter, IndexedDBAdapterOptions, IndexedDBSyncQueueAdapter, IndexedDBSyncQueueOptions, LocalStorageAdapter, LocalStorageAdapterOptions, LocalStorageSyncQueueAdapter, LocalStorageSyncQueueOptions, StorageAdapterFactoryOptions, SyncStorageAdapter, createBrowserStorageAdapter, createStorageAdapter } from './storage.js';
7
+ export { DEFAULT_INDEXEDDB_DATABASE, DEFAULT_INDEXEDDB_STORE, DEFAULT_STORAGE_KEY, DEFAULT_SYNC_QUEUE_DATABASE, DEFAULT_SYNC_QUEUE_KEY, DEFAULT_SYNC_QUEUE_STORE, FallbackStorageAdapter, FallbackStorageAdapterOptions, FallbackSyncQueueAdapter, FallbackSyncQueueAdapterOptions, IndexedDBAdapter, IndexedDBAdapterOptions, IndexedDBSyncQueueAdapter, IndexedDBSyncQueueOptions, LocalStorageAdapter, LocalStorageAdapterOptions, LocalStorageSyncQueueAdapter, LocalStorageSyncQueueOptions, RecoveryJournalFactoryContext, StorageAdapterFactoryOptions, SyncStorageAdapter, createBrowserStorageAdapter, createStorageAdapter } from './storage.js';
10
8
 
11
9
  type KeepHistoryEntry = {
12
10
  itemId: string;
package/dist/core.js CHANGED
@@ -1,31 +1,17 @@
1
1
  import {
2
- KEEP_BACKUP_FORMAT,
3
- KEEP_BACKUP_VERSION,
4
- KeepBackupImportError,
5
- KeepBackupParseError,
6
2
  KeepStore,
7
3
  createInboxQuery,
8
4
  createRediscoveryQuery,
9
- exportItems,
10
5
  getKeepNavigationState,
11
6
  getTagCounts,
12
- importItems,
13
7
  isKeepItemMetadataStale,
14
- mergeKeepItems,
15
- migrateKeepItems,
16
- migrateLegacyCollectionMemberships,
17
8
  moveKeepItem,
18
9
  orderKeepItems,
19
10
  queryKeepItems,
20
11
  reconcileKeepItems,
21
12
  reorderKeepItems,
22
13
  revalidateKeepItems
23
- } from "./chunk-EMOPFB5D.js";
24
- import {
25
- KeepSchemaValidationError,
26
- parseKeepMeta,
27
- validateKeepItem
28
- } from "./chunk-5W4QSJHV.js";
14
+ } from "./chunk-CSBPFROD.js";
29
15
  import {
30
16
  DEFAULT_INDEXEDDB_DATABASE,
31
17
  DEFAULT_INDEXEDDB_STORE,
@@ -37,12 +23,18 @@ import {
37
23
  FallbackSyncQueueAdapter,
38
24
  IndexedDBAdapter,
39
25
  IndexedDBSyncQueueAdapter,
26
+ KEEP_BACKUP_FORMAT,
27
+ KEEP_BACKUP_VERSION,
28
+ KeepBackupImportError,
29
+ KeepBackupParseError,
40
30
  KeepStorageAccessError,
41
31
  KeepStorageError,
42
32
  KeepStorageParseError,
43
33
  KeepStorageQuotaError,
34
+ KeepStorageSerializationError,
44
35
  KeepSyncAuthError,
45
36
  LocalStorageAdapter,
37
+ LocalStorageRecoveryJournal,
46
38
  LocalStorageSyncQueueAdapter,
47
39
  ScopedStorageAdapter,
48
40
  ScopedSyncQueueAdapter,
@@ -50,27 +42,22 @@ import {
50
42
  createBrowserStorageAdapter,
51
43
  createScopedStorageAdapter,
52
44
  createStorageAdapter,
45
+ exportItems,
53
46
  getKeepScopeKey,
47
+ importItems,
54
48
  isKeepSyncAuthError,
55
49
  isSameKeepScope,
56
- normalizeKeepTags
57
- } from "./chunk-SLH4DFYQ.js";
58
-
59
- // src/features/persistence/write-lock.ts
60
- var writeQueues = /* @__PURE__ */ new Map();
61
- function withLocalStorageWriteLock(key, operation, lockUnavailableError) {
62
- const lockName = `keepkit:local-storage:${key}`;
63
- if (typeof navigator !== "undefined" && navigator.locks) {
64
- return navigator.locks.request(lockName, operation);
65
- }
66
- if (typeof window !== "undefined") return Promise.reject(lockUnavailableError);
67
- const previous = writeQueues.get(lockName) ?? Promise.resolve();
68
- const next = previous.catch(() => void 0).then(operation);
69
- writeQueues.set(lockName, next);
70
- return next.finally(() => {
71
- if (writeQueues.get(lockName) === next) writeQueues.delete(lockName);
72
- });
73
- }
50
+ mergeKeepItems,
51
+ migrateKeepItems,
52
+ migrateLegacyCollectionMemberships,
53
+ normalizeKeepTags,
54
+ withLocalStorageWriteLock
55
+ } from "./chunk-SS22UTBH.js";
56
+ import {
57
+ KeepSchemaValidationError,
58
+ parseKeepMeta,
59
+ validateKeepItem
60
+ } from "./chunk-5W4QSJHV.js";
74
61
 
75
62
  // src/features/items/activity.ts
76
63
  var DEFAULT_KEEP_HISTORY_KEY = "keepkit:view-history";
@@ -1207,6 +1194,7 @@ export {
1207
1194
  KeepStorageError,
1208
1195
  KeepStorageParseError,
1209
1196
  KeepStorageQuotaError,
1197
+ KeepStorageSerializationError,
1210
1198
  KeepStore,
1211
1199
  KeepSyncAuthError,
1212
1200
  LocalStorageAdapter,
@@ -1214,6 +1202,7 @@ export {
1214
1202
  LocalStorageKeepProgressStorage,
1215
1203
  LocalStorageKeepSavedViewStorage,
1216
1204
  LocalStorageKeepViewingRecordStorage,
1205
+ LocalStorageRecoveryJournal,
1217
1206
  LocalStorageSyncQueueAdapter,
1218
1207
  ScopedStorageAdapter,
1219
1208
  ScopedSyncQueueAdapter,