@prabhask5/stellar-engine 1.1.7 → 1.1.9
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 +12 -18
- package/dist/actions/remoteChange.d.ts +143 -18
- package/dist/actions/remoteChange.d.ts.map +1 -1
- package/dist/actions/remoteChange.js +182 -58
- package/dist/actions/remoteChange.js.map +1 -1
- package/dist/actions/truncateTooltip.d.ts +26 -12
- package/dist/actions/truncateTooltip.d.ts.map +1 -1
- package/dist/actions/truncateTooltip.js +89 -34
- package/dist/actions/truncateTooltip.js.map +1 -1
- package/dist/auth/crypto.d.ts +35 -8
- package/dist/auth/crypto.d.ts.map +1 -1
- package/dist/auth/crypto.js +38 -10
- package/dist/auth/crypto.js.map +1 -1
- package/dist/auth/deviceVerification.d.ts +236 -20
- package/dist/auth/deviceVerification.d.ts.map +1 -1
- package/dist/auth/deviceVerification.js +293 -40
- package/dist/auth/deviceVerification.js.map +1 -1
- package/dist/auth/displayUtils.d.ts +98 -0
- package/dist/auth/displayUtils.d.ts.map +1 -0
- package/dist/auth/displayUtils.js +133 -0
- package/dist/auth/displayUtils.js.map +1 -0
- package/dist/auth/loginGuard.d.ts +103 -16
- package/dist/auth/loginGuard.d.ts.map +1 -1
- package/dist/auth/loginGuard.js +163 -76
- package/dist/auth/loginGuard.js.map +1 -1
- package/dist/auth/offlineCredentials.d.ts +88 -24
- package/dist/auth/offlineCredentials.d.ts.map +1 -1
- package/dist/auth/offlineCredentials.js +114 -73
- package/dist/auth/offlineCredentials.js.map +1 -1
- package/dist/auth/offlineSession.d.ts +83 -9
- package/dist/auth/offlineSession.d.ts.map +1 -1
- package/dist/auth/offlineSession.js +104 -13
- package/dist/auth/offlineSession.js.map +1 -1
- package/dist/auth/resolveAuthState.d.ts +67 -9
- package/dist/auth/resolveAuthState.d.ts.map +1 -1
- package/dist/auth/resolveAuthState.js +125 -71
- package/dist/auth/resolveAuthState.js.map +1 -1
- package/dist/auth/singleUser.d.ts +390 -37
- package/dist/auth/singleUser.d.ts.map +1 -1
- package/dist/auth/singleUser.js +504 -103
- package/dist/auth/singleUser.js.map +1 -1
- package/dist/bin/install-pwa.d.ts +18 -2
- package/dist/bin/install-pwa.d.ts.map +1 -1
- package/dist/bin/install-pwa.js +2624 -77
- package/dist/bin/install-pwa.js.map +1 -1
- package/dist/config.d.ts +131 -15
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +87 -9
- package/dist/config.js.map +1 -1
- package/dist/conflicts.d.ts +246 -23
- package/dist/conflicts.d.ts.map +1 -1
- package/dist/conflicts.js +495 -46
- package/dist/conflicts.js.map +1 -1
- package/dist/data.d.ts +338 -18
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +385 -34
- package/dist/data.js.map +1 -1
- package/dist/database.d.ts +72 -14
- package/dist/database.d.ts.map +1 -1
- package/dist/database.js +120 -29
- package/dist/database.js.map +1 -1
- package/dist/debug.d.ts +77 -1
- package/dist/debug.d.ts.map +1 -1
- package/dist/debug.js +88 -1
- package/dist/debug.js.map +1 -1
- package/dist/deviceId.d.ts +38 -7
- package/dist/deviceId.d.ts.map +1 -1
- package/dist/deviceId.js +68 -10
- package/dist/deviceId.js.map +1 -1
- package/dist/engine.d.ts +175 -3
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +756 -109
- package/dist/engine.js.map +1 -1
- package/dist/entries/actions.d.ts +13 -0
- package/dist/entries/actions.d.ts.map +1 -1
- package/dist/entries/actions.js +26 -1
- package/dist/entries/actions.js.map +1 -1
- package/dist/entries/auth.d.ts +15 -4
- package/dist/entries/auth.d.ts.map +1 -1
- package/dist/entries/auth.js +47 -4
- package/dist/entries/auth.js.map +1 -1
- package/dist/entries/config.d.ts +12 -0
- package/dist/entries/config.d.ts.map +1 -1
- package/dist/entries/config.js +18 -1
- package/dist/entries/config.js.map +1 -1
- package/dist/entries/kit.d.ts +11 -0
- package/dist/entries/kit.d.ts.map +1 -1
- package/dist/entries/kit.js +52 -2
- package/dist/entries/kit.js.map +1 -1
- package/dist/entries/stores.d.ts +11 -0
- package/dist/entries/stores.d.ts.map +1 -1
- package/dist/entries/stores.js +43 -2
- package/dist/entries/stores.js.map +1 -1
- package/dist/entries/types.d.ts +10 -1
- package/dist/entries/types.d.ts.map +1 -1
- package/dist/entries/types.js +10 -0
- package/dist/entries/types.js.map +1 -1
- package/dist/entries/utils.d.ts +6 -0
- package/dist/entries/utils.d.ts.map +1 -1
- package/dist/entries/utils.js +22 -1
- package/dist/entries/utils.js.map +1 -1
- package/dist/entries/vite.d.ts +17 -0
- package/dist/entries/vite.d.ts.map +1 -1
- package/dist/entries/vite.js +24 -1
- package/dist/entries/vite.js.map +1 -1
- package/dist/index.d.ts +32 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +166 -23
- package/dist/index.js.map +1 -1
- package/dist/kit/auth.d.ts +60 -5
- package/dist/kit/auth.d.ts.map +1 -1
- package/dist/kit/auth.js +45 -4
- package/dist/kit/auth.js.map +1 -1
- package/dist/kit/confirm.d.ts +93 -12
- package/dist/kit/confirm.d.ts.map +1 -1
- package/dist/kit/confirm.js +103 -16
- package/dist/kit/confirm.js.map +1 -1
- package/dist/kit/loads.d.ts +148 -23
- package/dist/kit/loads.d.ts.map +1 -1
- package/dist/kit/loads.js +136 -28
- package/dist/kit/loads.js.map +1 -1
- package/dist/kit/server.d.ts +142 -10
- package/dist/kit/server.d.ts.map +1 -1
- package/dist/kit/server.js +158 -15
- package/dist/kit/server.js.map +1 -1
- package/dist/kit/sw.d.ts +152 -23
- package/dist/kit/sw.d.ts.map +1 -1
- package/dist/kit/sw.js +182 -26
- package/dist/kit/sw.js.map +1 -1
- package/dist/queue.d.ts +274 -0
- package/dist/queue.d.ts.map +1 -1
- package/dist/queue.js +556 -38
- package/dist/queue.js.map +1 -1
- package/dist/realtime.d.ts +241 -27
- package/dist/realtime.d.ts.map +1 -1
- package/dist/realtime.js +633 -109
- package/dist/realtime.js.map +1 -1
- package/dist/runtime/runtimeConfig.d.ts +91 -8
- package/dist/runtime/runtimeConfig.d.ts.map +1 -1
- package/dist/runtime/runtimeConfig.js +146 -19
- package/dist/runtime/runtimeConfig.js.map +1 -1
- package/dist/stores/authState.d.ts +150 -11
- package/dist/stores/authState.d.ts.map +1 -1
- package/dist/stores/authState.js +169 -17
- package/dist/stores/authState.js.map +1 -1
- package/dist/stores/network.d.ts +39 -0
- package/dist/stores/network.d.ts.map +1 -1
- package/dist/stores/network.js +169 -16
- package/dist/stores/network.js.map +1 -1
- package/dist/stores/remoteChanges.d.ts +327 -52
- package/dist/stores/remoteChanges.d.ts.map +1 -1
- package/dist/stores/remoteChanges.js +337 -75
- package/dist/stores/remoteChanges.js.map +1 -1
- package/dist/stores/sync.d.ts +130 -0
- package/dist/stores/sync.d.ts.map +1 -1
- package/dist/stores/sync.js +167 -7
- package/dist/stores/sync.js.map +1 -1
- package/dist/supabase/auth.d.ts +186 -46
- package/dist/supabase/auth.d.ts.map +1 -1
- package/dist/supabase/auth.js +238 -190
- package/dist/supabase/auth.js.map +1 -1
- package/dist/supabase/client.d.ts +79 -6
- package/dist/supabase/client.d.ts.map +1 -1
- package/dist/supabase/client.js +158 -15
- package/dist/supabase/client.js.map +1 -1
- package/dist/supabase/validate.d.ts +101 -7
- package/dist/supabase/validate.d.ts.map +1 -1
- package/dist/supabase/validate.js +117 -8
- package/dist/supabase/validate.js.map +1 -1
- package/dist/sw/build/vite-plugin.d.ts +55 -10
- package/dist/sw/build/vite-plugin.d.ts.map +1 -1
- package/dist/sw/build/vite-plugin.js +77 -18
- package/dist/sw/build/vite-plugin.js.map +1 -1
- package/dist/sw/sw.js +99 -44
- package/dist/types.d.ts +150 -26
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +12 -10
- package/dist/types.js.map +1 -1
- package/dist/utils.d.ts +55 -13
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +83 -22
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/auth/admin.d.ts +0 -12
- package/dist/auth/admin.d.ts.map +0 -1
- package/dist/auth/admin.js +0 -26
- package/dist/auth/admin.js.map +0 -1
- package/dist/auth/offlineLogin.d.ts +0 -34
- package/dist/auth/offlineLogin.d.ts.map +0 -1
- package/dist/auth/offlineLogin.js +0 -75
- package/dist/auth/offlineLogin.js.map +0 -1
package/dist/entries/kit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kit.js","sourceRoot":"","sources":["../../src/entries/kit.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"kit.js","sourceRoot":"","sources":["../../src/entries/kit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,gFAAgF;AAChF,4CAA4C;AAC5C,gFAAgF;AAChF,wDAAwD;AACxD,qEAAqE;AACrE,0EAA0E;AAC1E,2EAA2E;AAC3E,6DAA6D;AAE7D,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAG1F,gFAAgF;AAChF,iDAAiD;AACjD,gFAAgF;AAChF,4EAA4E;AAC5E,2EAA2E;AAC3E,+DAA+D;AAC/D,kFAAkF;AAClF,6BAA6B;AAC7B,gFAAgF;AAChF,gCAAgC;AAEhC,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAGhG,gFAAgF;AAChF,+CAA+C;AAC/C,gFAAgF;AAChF,wEAAwE;AACxE,+EAA+E;AAC/E,wDAAwD;AACxD,8EAA8E;AAC9E,2CAA2C;AAE3C,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAGpF,gFAAgF;AAChF,oDAAoD;AACpD,gFAAgF;AAChF,oEAAoE;AACpE,0EAA0E;AAC1E,yEAAyE;AACzE,2EAA2E;AAC3E,6CAA6C;AAE7C,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAG3F,gFAAgF;AAChF,+CAA+C;AAC/C,gFAAgF;AAChF,wEAAwE;AACxE,kEAAkE;AAClE,6EAA6E;AAC7E,gDAAgD;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/entries/stores.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Stores subpath barrel — `@prabhask5/stellar-engine/stores`
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all Svelte-compatible reactive stores and lifecycle event
|
|
5
|
+
* subscription hooks. These stores provide real-time observability into the
|
|
6
|
+
* engine's sync status, network connectivity, remote data changes, and
|
|
7
|
+
* authentication state.
|
|
8
|
+
*
|
|
9
|
+
* All stores follow the Svelte store contract (subscribe/unsubscribe) and can
|
|
10
|
+
* be used with the `$store` auto-subscription syntax in `.svelte` files.
|
|
11
|
+
*/
|
|
1
12
|
export { syncStatusStore } from '../stores/sync';
|
|
2
13
|
export type { SyncError, RealtimeState } from '../stores/sync';
|
|
3
14
|
export { remoteChangesStore } from '../stores/remoteChanges';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stores.d.ts","sourceRoot":"","sources":["../../src/entries/stores.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stores.d.ts","sourceRoot":"","sources":["../../src/entries/stores.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AASH,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAU/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAQhE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAU7C,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAUlF,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/entries/stores.js
CHANGED
|
@@ -1,9 +1,50 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Stores subpath barrel — `@prabhask5/stellar-engine/stores`
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all Svelte-compatible reactive stores and lifecycle event
|
|
5
|
+
* subscription hooks. These stores provide real-time observability into the
|
|
6
|
+
* engine's sync status, network connectivity, remote data changes, and
|
|
7
|
+
* authentication state.
|
|
8
|
+
*
|
|
9
|
+
* All stores follow the Svelte store contract (subscribe/unsubscribe) and can
|
|
10
|
+
* be used with the `$store` auto-subscription syntax in `.svelte` files.
|
|
11
|
+
*/
|
|
12
|
+
// =============================================================================
|
|
13
|
+
// Sync Status Store
|
|
14
|
+
// =============================================================================
|
|
15
|
+
// Exposes the current state of the sync engine: whether it is idle, syncing,
|
|
16
|
+
// or in error; the number of pending local changes; the last error message;
|
|
17
|
+
// the realtime connection state; and the timestamp of the last successful sync.
|
|
2
18
|
export { syncStatusStore } from '../stores/sync';
|
|
19
|
+
// =============================================================================
|
|
20
|
+
// Remote Changes Store
|
|
21
|
+
// =============================================================================
|
|
22
|
+
// Tracks incoming remote changes from other devices via Supabase Realtime.
|
|
23
|
+
// Provides methods to check for deferred changes (changes that arrived while
|
|
24
|
+
// the user was actively editing an entity) and to clear them after the user
|
|
25
|
+
// has acknowledged or dismissed the notification.
|
|
3
26
|
export { remoteChangesStore } from '../stores/remoteChanges';
|
|
27
|
+
// =============================================================================
|
|
28
|
+
// Network Connectivity Store
|
|
29
|
+
// =============================================================================
|
|
30
|
+
// A boolean Svelte store that reflects the browser's online/offline status.
|
|
31
|
+
// Automatically updates via `navigator.onLine` and `online`/`offline` events.
|
|
4
32
|
export { isOnline } from '../stores/network';
|
|
33
|
+
// =============================================================================
|
|
34
|
+
// Auth State Stores
|
|
35
|
+
// =============================================================================
|
|
36
|
+
// Reactive stores for the current authentication state:
|
|
37
|
+
// - `authState` — full auth state object (user, session, mode, etc.).
|
|
38
|
+
// - `isAuthenticated` — derived boolean: `true` when a valid session exists.
|
|
39
|
+
// - `userDisplayInfo` — derived store with the user's display name and avatar.
|
|
5
40
|
export { authState, isAuthenticated, userDisplayInfo } from '../stores/authState';
|
|
6
|
-
//
|
|
41
|
+
// =============================================================================
|
|
42
|
+
// Lifecycle Event Subscriptions
|
|
43
|
+
// =============================================================================
|
|
44
|
+
// Callback registration hooks for engine lifecycle events:
|
|
45
|
+
// - `onSyncComplete` — fires after every successful sync cycle completes.
|
|
46
|
+
// - `onRealtimeDataUpdate` — fires when a realtime payload is received and
|
|
47
|
+
// applied to the local database.
|
|
7
48
|
export { onSyncComplete } from '../engine';
|
|
8
49
|
export { onRealtimeDataUpdate } from '../realtime';
|
|
9
50
|
//# sourceMappingURL=stores.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stores.js","sourceRoot":"","sources":["../../src/entries/stores.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"stores.js","sourceRoot":"","sources":["../../src/entries/stores.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,gFAAgF;AAChF,qBAAqB;AACrB,gFAAgF;AAChF,6EAA6E;AAC7E,4EAA4E;AAC5E,gFAAgF;AAEhF,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,gFAAgF;AAChF,wBAAwB;AACxB,gFAAgF;AAChF,2EAA2E;AAC3E,6EAA6E;AAC7E,4EAA4E;AAC5E,kDAAkD;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,gFAAgF;AAChF,8BAA8B;AAC9B,gFAAgF;AAChF,4EAA4E;AAC5E,8EAA8E;AAE9E,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,gFAAgF;AAChF,qBAAqB;AACrB,gFAAgF;AAChF,wDAAwD;AACxD,sEAAsE;AACtE,6EAA6E;AAC7E,+EAA+E;AAE/E,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAElF,gFAAgF;AAChF,iCAAiC;AACjC,gFAAgF;AAChF,2DAA2D;AAC3D,0EAA0E;AAC1E,2EAA2E;AAC3E,mCAAmC;AAEnC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/entries/types.d.ts
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Types subpath barrel — `@prabhask5/stellar-engine/types`
|
|
3
|
+
*
|
|
4
|
+
* Aggregates all public TypeScript type exports from the stellar-engine package
|
|
5
|
+
* into a single, convenient entry point. Consumers can import any type from
|
|
6
|
+
* this path without needing to know the internal module structure.
|
|
7
|
+
*
|
|
8
|
+
* No runtime code is emitted from this file — it contains only `export type`
|
|
9
|
+
* statements and will be fully erased during compilation.
|
|
10
|
+
*/
|
|
1
11
|
export type { SyncEngineConfig, TableConfig } from '../config';
|
|
2
12
|
export type { DatabaseConfig, DatabaseVersionConfig } from '../database';
|
|
3
13
|
export type { BatchOperation } from '../data';
|
|
4
|
-
export type { AuthResponse } from '../supabase/auth';
|
|
5
14
|
export type { AuthStateResult } from '../auth/resolveAuthState';
|
|
6
15
|
export type { AppConfig } from '../runtime/runtimeConfig';
|
|
7
16
|
export type { SyncOperationItem, OperationType, OfflineCredentials, OfflineSession, ConflictHistoryEntry, SyncStatus, AuthMode, SingleUserConfig, SingleUserGateType } from '../types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/entries/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/entries/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAQH,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAQ/D,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAQzE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAQ9C,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAOhE,YAAY,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAe1D,YAAY,EACV,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,UAAU,CAAC;AASlB,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/D,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAQhE,YAAY,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC"}
|
package/dist/entries/types.js
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Types subpath barrel — `@prabhask5/stellar-engine/types`
|
|
3
|
+
*
|
|
4
|
+
* Aggregates all public TypeScript type exports from the stellar-engine package
|
|
5
|
+
* into a single, convenient entry point. Consumers can import any type from
|
|
6
|
+
* this path without needing to know the internal module structure.
|
|
7
|
+
*
|
|
8
|
+
* No runtime code is emitted from this file — it contains only `export type`
|
|
9
|
+
* statements and will be fully erased during compilation.
|
|
10
|
+
*/
|
|
1
11
|
export {};
|
|
2
12
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/entries/types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/entries/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|
package/dist/entries/utils.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Utils subpath barrel — `@prabhask5/stellar-engine/utils`
|
|
3
|
+
*
|
|
4
|
+
* Re-exports general-purpose utility functions and debug tooling. These
|
|
5
|
+
* helpers are framework-agnostic and can be used anywhere in the application.
|
|
6
|
+
*/
|
|
1
7
|
export { generateId, now, calculateNewOrder, snakeToCamel } from '../utils';
|
|
2
8
|
export { debug, isDebugMode, setDebugMode } from '../debug';
|
|
3
9
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/entries/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/entries/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAYH,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAU5E,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/entries/utils.js
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Utils subpath barrel — `@prabhask5/stellar-engine/utils`
|
|
3
|
+
*
|
|
4
|
+
* Re-exports general-purpose utility functions and debug tooling. These
|
|
5
|
+
* helpers are framework-agnostic and can be used anywhere in the application.
|
|
6
|
+
*/
|
|
7
|
+
// =============================================================================
|
|
8
|
+
// General Utilities
|
|
9
|
+
// =============================================================================
|
|
10
|
+
// Pure helper functions for common operations:
|
|
11
|
+
// - `generateId` — produces a unique identifier (UUID v4 or similar).
|
|
12
|
+
// - `now` — returns the current ISO 8601 timestamp string.
|
|
13
|
+
// - `calculateNewOrder` — computes a fractional order value for reorderable
|
|
14
|
+
// lists (inserts between two adjacent items without reindexing).
|
|
15
|
+
// - `snakeToCamel` — converts a `snake_case` string to `camelCase`.
|
|
2
16
|
export { generateId, now, calculateNewOrder, snakeToCamel } from '../utils';
|
|
17
|
+
// =============================================================================
|
|
18
|
+
// Debug Utilities
|
|
19
|
+
// =============================================================================
|
|
20
|
+
// Development-time logging and debug mode management:
|
|
21
|
+
// - `debug` — conditional logger that only outputs when debug mode is active.
|
|
22
|
+
// - `isDebugMode` — returns whether debug mode is currently enabled.
|
|
23
|
+
// - `setDebugMode` — enables or disables debug mode at runtime.
|
|
3
24
|
export { debug, isDebugMode, setDebugMode } from '../debug';
|
|
4
25
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/entries/utils.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/entries/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,gFAAgF;AAChF,qBAAqB;AACrB,gFAAgF;AAChF,+CAA+C;AAC/C,sEAAsE;AACtE,2DAA2D;AAC3D,4EAA4E;AAC5E,mEAAmE;AACnE,oEAAoE;AAEpE,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE5E,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAChF,sDAAsD;AACtD,8EAA8E;AAC9E,qEAAqE;AACrE,gEAAgE;AAEhE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/entries/vite.d.ts
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Vite subpath barrel — `@prabhask5/stellar-engine/vite`
|
|
3
|
+
*
|
|
4
|
+
* Provides the Vite plugin for building and configuring the service worker
|
|
5
|
+
* required by stellar-engine's PWA functionality. This entry point is intended
|
|
6
|
+
* for use in `vite.config.ts` only — it runs at build time, not in the browser.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* ```ts
|
|
10
|
+
* // vite.config.ts
|
|
11
|
+
* import { stellarPWA } from '@prabhask5/stellar-engine/vite';
|
|
12
|
+
*
|
|
13
|
+
* export default defineConfig({
|
|
14
|
+
* plugins: [stellarPWA({ /* SWConfig options *\/ })]
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
1
18
|
export { stellarPWA } from '../sw/build/vite-plugin.js';
|
|
2
19
|
export type { SWConfig } from '../sw/build/vite-plugin.js';
|
|
3
20
|
//# sourceMappingURL=vite.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite.d.ts","sourceRoot":"","sources":["../../src/entries/vite.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vite.d.ts","sourceRoot":"","sources":["../../src/entries/vite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAUH,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,YAAY,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/entries/vite.js
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Vite subpath barrel — `@prabhask5/stellar-engine/vite`
|
|
3
|
+
*
|
|
4
|
+
* Provides the Vite plugin for building and configuring the service worker
|
|
5
|
+
* required by stellar-engine's PWA functionality. This entry point is intended
|
|
6
|
+
* for use in `vite.config.ts` only — it runs at build time, not in the browser.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* ```ts
|
|
10
|
+
* // vite.config.ts
|
|
11
|
+
* import { stellarPWA } from '@prabhask5/stellar-engine/vite';
|
|
12
|
+
*
|
|
13
|
+
* export default defineConfig({
|
|
14
|
+
* plugins: [stellarPWA({ /* SWConfig options *\/ })]
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
// =============================================================================
|
|
19
|
+
// Stellar PWA Vite Plugin
|
|
20
|
+
// =============================================================================
|
|
21
|
+
// - `stellarPWA` — Vite plugin factory that generates and injects a service
|
|
22
|
+
// worker with precaching, runtime caching strategies, and offline support.
|
|
23
|
+
// - `SWConfig` — configuration interface for customizing cache strategies,
|
|
24
|
+
// precache globs, network-first vs cache-first routes, and SW behaviour.
|
|
2
25
|
export { stellarPWA } from '../sw/build/vite-plugin.js';
|
|
3
26
|
//# sourceMappingURL=vite.js.map
|
package/dist/entries/vite.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite.js","sourceRoot":"","sources":["../../src/entries/vite.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"vite.js","sourceRoot":"","sources":["../../src/entries/vite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,gFAAgF;AAChF,2BAA2B;AAC3B,gFAAgF;AAChF,4EAA4E;AAC5E,6EAA6E;AAC7E,2EAA2E;AAC3E,2EAA2E;AAE3E,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Main entry point — `@prabhask5/stellar-engine`
|
|
3
|
+
*
|
|
4
|
+
* This is the primary barrel export for the stellar-engine package. It
|
|
5
|
+
* re-exports the **full** public API surface, covering:
|
|
6
|
+
*
|
|
7
|
+
* - **Engine Configuration & Lifecycle** — initialize, start, and run the
|
|
8
|
+
* offline-first sync engine.
|
|
9
|
+
* - **Database Access** — get a handle to the IndexedDB instance or reset it.
|
|
10
|
+
* - **Generic CRUD & Query** — create, read, update, delete, batch write,
|
|
11
|
+
* increment, and query data in the local database.
|
|
12
|
+
* - **Authentication** — Single-user PIN/password gate auth, device
|
|
13
|
+
* verification, login guards, and session management.
|
|
14
|
+
* - **Reactive Stores** — Svelte-compatible stores for sync status, network
|
|
15
|
+
* state, remote changes, and auth state.
|
|
16
|
+
* - **Realtime Events** — lifecycle hooks for sync completion and realtime
|
|
17
|
+
* data updates.
|
|
18
|
+
* - **Runtime Configuration** — read and write app-level config at runtime.
|
|
19
|
+
* - **Debug & Utilities** — logging, ID generation, ordering, and string
|
|
20
|
+
* conversion helpers.
|
|
21
|
+
* - **Svelte Actions** — DOM-level directives for remote-change animations.
|
|
22
|
+
* - **Type Definitions** — all public TypeScript types and interfaces.
|
|
23
|
+
* - **Supabase Client** — direct access to the Supabase client for advanced
|
|
24
|
+
* or custom queries.
|
|
25
|
+
* - **Supabase Validation** — server-side credential and schema validation.
|
|
26
|
+
*
|
|
27
|
+
* For tree-shaking or smaller bundle sizes, prefer the subpath entry points
|
|
28
|
+
* (e.g. `@prabhask5/stellar-engine/auth`, `@prabhask5/stellar-engine/stores`)
|
|
29
|
+
* which expose focused subsets of this API.
|
|
30
|
+
*/
|
|
1
31
|
export { initEngine } from './config';
|
|
2
32
|
export type { SyncEngineConfig, TableConfig } from './config';
|
|
3
33
|
export { getDb, resetDatabase } from './database';
|
|
@@ -7,14 +37,12 @@ export { onSyncComplete } from './engine';
|
|
|
7
37
|
export { engineCreate, engineUpdate, engineDelete, engineBatchWrite, engineIncrement } from './data';
|
|
8
38
|
export type { BatchOperation } from './data';
|
|
9
39
|
export { engineGet, engineGetAll, engineQuery, engineQueryRange, engineGetOrCreate } from './data';
|
|
10
|
-
export {
|
|
11
|
-
export type { AuthResponse } from './supabase/auth';
|
|
40
|
+
export { signOut, resendConfirmationEmail, getUserProfile, updateProfile, verifyOtp, getValidSession } from './supabase/auth';
|
|
12
41
|
export { resolveAuthState } from './auth/resolveAuthState';
|
|
13
42
|
export type { AuthStateResult } from './auth/resolveAuthState';
|
|
14
|
-
export { isAdmin } from './auth/admin';
|
|
15
43
|
export { resetLoginGuard } from './auth/loginGuard';
|
|
16
|
-
export { signInOffline, getOfflineLoginInfo } from './auth/offlineLogin';
|
|
17
44
|
export { isSingleUserSetUp, getSingleUserInfo, setupSingleUser, unlockSingleUser, lockSingleUser, changeSingleUserGate, updateSingleUserProfile, resetSingleUser, completeSingleUserSetup, completeDeviceVerification, pollDeviceVerification, padPin, changeSingleUserEmail, completeSingleUserEmailChange, fetchRemoteGateConfig, linkSingleUserDevice, resetSingleUserRemote } from './auth/singleUser';
|
|
45
|
+
export { resolveFirstName, resolveUserId, resolveAvatarInitial } from './auth/displayUtils';
|
|
18
46
|
export { isDeviceTrusted, trustCurrentDevice, trustPendingDevice, getTrustedDevices, removeTrustedDevice, maskEmail, sendDeviceVerification, getCurrentDeviceId, getDeviceLabel } from './auth/deviceVerification';
|
|
19
47
|
export { syncStatusStore } from './stores/sync';
|
|
20
48
|
export type { SyncError, RealtimeState } from './stores/sync';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AASH,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAS9D,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAClD,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAYxE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAa1C,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,eAAe,EAChB,MAAM,Q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AAS,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AASjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AASlD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAU7C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC3E,YAAY,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AASzD,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAW3D,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAU3E,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAQpG,YAAY,EACV,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACd,MAAM,SAAS,CAAC;AAQjB,YAAY,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAYrD,OAAO,EAAE,2BAA2B,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,45 +1,188 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Main entry point — `@prabhask5/stellar-engine`
|
|
3
|
+
*
|
|
4
|
+
* This is the primary barrel export for the stellar-engine package. It
|
|
5
|
+
* re-exports the **full** public API surface, covering:
|
|
6
|
+
*
|
|
7
|
+
* - **Engine Configuration & Lifecycle** — initialize, start, and run the
|
|
8
|
+
* offline-first sync engine.
|
|
9
|
+
* - **Database Access** — get a handle to the IndexedDB instance or reset it.
|
|
10
|
+
* - **Generic CRUD & Query** — create, read, update, delete, batch write,
|
|
11
|
+
* increment, and query data in the local database.
|
|
12
|
+
* - **Authentication** — Single-user PIN/password gate auth, device
|
|
13
|
+
* verification, login guards, and session management.
|
|
14
|
+
* - **Reactive Stores** — Svelte-compatible stores for sync status, network
|
|
15
|
+
* state, remote changes, and auth state.
|
|
16
|
+
* - **Realtime Events** — lifecycle hooks for sync completion and realtime
|
|
17
|
+
* data updates.
|
|
18
|
+
* - **Runtime Configuration** — read and write app-level config at runtime.
|
|
19
|
+
* - **Debug & Utilities** — logging, ID generation, ordering, and string
|
|
20
|
+
* conversion helpers.
|
|
21
|
+
* - **Svelte Actions** — DOM-level directives for remote-change animations.
|
|
22
|
+
* - **Type Definitions** — all public TypeScript types and interfaces.
|
|
23
|
+
* - **Supabase Client** — direct access to the Supabase client for advanced
|
|
24
|
+
* or custom queries.
|
|
25
|
+
* - **Supabase Validation** — server-side credential and schema validation.
|
|
26
|
+
*
|
|
27
|
+
* For tree-shaking or smaller bundle sizes, prefer the subpath entry points
|
|
28
|
+
* (e.g. `@prabhask5/stellar-engine/auth`, `@prabhask5/stellar-engine/stores`)
|
|
29
|
+
* which expose focused subsets of this API.
|
|
30
|
+
*/
|
|
31
|
+
// =============================================================================
|
|
32
|
+
// Engine Configuration
|
|
33
|
+
// =============================================================================
|
|
34
|
+
// `initEngine` bootstraps the sync engine with the provided configuration
|
|
35
|
+
// (Supabase credentials, table definitions, conflict strategies, etc.).
|
|
36
|
+
// `SyncEngineConfig` and `TableConfig` describe the configuration shape.
|
|
2
37
|
export { initEngine } from './config';
|
|
3
|
-
//
|
|
38
|
+
// =============================================================================
|
|
39
|
+
// Database Access
|
|
40
|
+
// =============================================================================
|
|
41
|
+
// Direct access to the underlying IndexedDB database:
|
|
42
|
+
// - `getDb` — returns a typed handle to the open database instance.
|
|
43
|
+
// - `resetDatabase` — deletes and re-creates the local database (destructive).
|
|
4
44
|
export { getDb, resetDatabase } from './database';
|
|
5
|
-
//
|
|
45
|
+
// =============================================================================
|
|
46
|
+
// Engine Lifecycle
|
|
47
|
+
// =============================================================================
|
|
48
|
+
// Controls for the sync engine's runtime lifecycle:
|
|
49
|
+
// - `startSyncEngine` — begins periodic background sync and realtime
|
|
50
|
+
// subscription after the engine has been initialized.
|
|
51
|
+
// - `runFullSync` — triggers an immediate full sync cycle (push + pull).
|
|
52
|
+
// - `onSyncComplete` — registers a callback that fires after each successful
|
|
53
|
+
// sync cycle (useful for refreshing UI or derived data).
|
|
6
54
|
export { startSyncEngine, runFullSync } from './engine';
|
|
7
55
|
export { onSyncComplete } from './engine';
|
|
8
|
-
//
|
|
56
|
+
// =============================================================================
|
|
57
|
+
// Generic CRUD Operations
|
|
58
|
+
// =============================================================================
|
|
59
|
+
// Framework-agnostic data mutation functions that write to IndexedDB and queue
|
|
60
|
+
// changes for the next sync cycle:
|
|
61
|
+
// - `engineCreate` — inserts a new entity.
|
|
62
|
+
// - `engineUpdate` — patches an existing entity.
|
|
63
|
+
// - `engineDelete` — marks an entity as deleted (soft-delete for sync).
|
|
64
|
+
// - `engineBatchWrite` — applies multiple operations atomically.
|
|
65
|
+
// - `engineIncrement` — atomically increments a numeric field.
|
|
9
66
|
export { engineCreate, engineUpdate, engineDelete, engineBatchWrite, engineIncrement } from './data';
|
|
10
|
-
//
|
|
67
|
+
// =============================================================================
|
|
68
|
+
// Generic Query Operations
|
|
69
|
+
// =============================================================================
|
|
70
|
+
// Read-only data access functions that query the local IndexedDB:
|
|
71
|
+
// - `engineGet` — retrieves a single entity by primary key.
|
|
72
|
+
// - `engineGetAll` — retrieves all entities in a table.
|
|
73
|
+
// - `engineQuery` — retrieves entities matching a key-value filter.
|
|
74
|
+
// - `engineQueryRange` — retrieves entities within an IDB key range.
|
|
75
|
+
// - `engineGetOrCreate` — retrieves an entity or creates it with defaults.
|
|
11
76
|
export { engineGet, engineGetAll, engineQuery, engineQueryRange, engineGetOrCreate } from './data';
|
|
12
|
-
//
|
|
13
|
-
|
|
14
|
-
//
|
|
77
|
+
// =============================================================================
|
|
78
|
+
// Supabase Auth — Core Authentication Utilities
|
|
79
|
+
// =============================================================================
|
|
80
|
+
// Sign-out with full teardown, session management, profile CRUD, email
|
|
81
|
+
// confirmation resend, OTP verification, and session validation.
|
|
82
|
+
export { signOut, resendConfirmationEmail, getUserProfile, updateProfile, verifyOtp, getValidSession } from './supabase/auth';
|
|
83
|
+
// =============================================================================
|
|
84
|
+
// Auth State Resolution
|
|
85
|
+
// =============================================================================
|
|
86
|
+
// Determines the user's authentication state during app initialization.
|
|
87
|
+
// Returns an `AuthStateResult` describing whether the user is authenticated,
|
|
88
|
+
// anonymous, has an expired session, or needs setup.
|
|
15
89
|
export { resolveAuthState } from './auth/resolveAuthState';
|
|
16
|
-
//
|
|
17
|
-
|
|
18
|
-
//
|
|
90
|
+
// =============================================================================
|
|
91
|
+
// Login Guard
|
|
92
|
+
// =============================================================================
|
|
93
|
+
// Prevents duplicate login attempts by maintaining a transient lock.
|
|
94
|
+
// `resetLoginGuard` clears the lock (e.g. after a failed attempt).
|
|
19
95
|
export { resetLoginGuard } from './auth/loginGuard';
|
|
20
|
-
//
|
|
21
|
-
|
|
22
|
-
//
|
|
96
|
+
// =============================================================================
|
|
97
|
+
// Single-User Auth (PIN/Password Gate)
|
|
98
|
+
// =============================================================================
|
|
99
|
+
// Full lifecycle for single-user (kiosk/personal device) authentication:
|
|
100
|
+
// setup, lock/unlock, profile management, device linking, and remote config.
|
|
23
101
|
export { isSingleUserSetUp, getSingleUserInfo, setupSingleUser, unlockSingleUser, lockSingleUser, changeSingleUserGate, updateSingleUserProfile, resetSingleUser, completeSingleUserSetup, completeDeviceVerification, pollDeviceVerification, padPin, changeSingleUserEmail, completeSingleUserEmailChange, fetchRemoteGateConfig, linkSingleUserDevice, resetSingleUserRemote } from './auth/singleUser';
|
|
24
|
-
//
|
|
102
|
+
// =============================================================================
|
|
103
|
+
// Auth Display Utilities
|
|
104
|
+
// =============================================================================
|
|
105
|
+
// Pure helper functions that resolve user-facing display values from the auth
|
|
106
|
+
// state. Each handles the full fallback chain across online (Supabase session)
|
|
107
|
+
// and offline (cached credential) modes.
|
|
108
|
+
export { resolveFirstName, resolveUserId, resolveAvatarInitial } from './auth/displayUtils';
|
|
109
|
+
// =============================================================================
|
|
110
|
+
// Device Verification
|
|
111
|
+
// =============================================================================
|
|
112
|
+
// Trust management for multi-device single-user setups:
|
|
113
|
+
// - `isDeviceTrusted` / `trustCurrentDevice` / `trustPendingDevice` — manage
|
|
114
|
+
// the trust status of the current or a pending device.
|
|
115
|
+
// - `getTrustedDevices` / `removeTrustedDevice` — list and revoke trusted devices.
|
|
116
|
+
// - `maskEmail` — partially masks an email for display during verification.
|
|
117
|
+
// - `sendDeviceVerification` — initiates the device verification email flow.
|
|
118
|
+
// - `getCurrentDeviceId` / `getDeviceLabel` — device identification helpers.
|
|
25
119
|
export { isDeviceTrusted, trustCurrentDevice, trustPendingDevice, getTrustedDevices, removeTrustedDevice, maskEmail, sendDeviceVerification, getCurrentDeviceId, getDeviceLabel } from './auth/deviceVerification';
|
|
26
|
-
//
|
|
120
|
+
// =============================================================================
|
|
121
|
+
// Reactive Stores
|
|
122
|
+
// =============================================================================
|
|
123
|
+
// Svelte-compatible stores providing real-time observability into the engine:
|
|
124
|
+
// - `syncStatusStore` — sync lifecycle state, pending count, errors, realtime state.
|
|
125
|
+
// - `remoteChangesStore` — incoming remote changes and deferred-change tracking.
|
|
126
|
+
// - `isOnline` — boolean reflecting browser online/offline status.
|
|
127
|
+
// - `authState` / `isAuthenticated` / `userDisplayInfo` — auth state stores.
|
|
27
128
|
export { syncStatusStore } from './stores/sync';
|
|
28
129
|
export { remoteChangesStore } from './stores/remoteChanges';
|
|
29
130
|
export { isOnline } from './stores/network';
|
|
30
131
|
export { authState, isAuthenticated, userDisplayInfo } from './stores/authState';
|
|
31
|
-
//
|
|
132
|
+
// =============================================================================
|
|
133
|
+
// Realtime Event Subscriptions
|
|
134
|
+
// =============================================================================
|
|
135
|
+
// Callback registration for app-specific event hooks. `onRealtimeDataUpdate`
|
|
136
|
+
// fires when a realtime payload is received and applied to the local database,
|
|
137
|
+
// allowing the app to react to cross-device changes.
|
|
32
138
|
export { onRealtimeDataUpdate } from './realtime';
|
|
33
|
-
//
|
|
139
|
+
// =============================================================================
|
|
140
|
+
// Supabase Client (Advanced / Custom Queries)
|
|
141
|
+
// =============================================================================
|
|
142
|
+
// Direct access to the initialized Supabase client instance. Use this for
|
|
143
|
+
// queries or operations not covered by the generic CRUD layer (e.g. RPC calls,
|
|
144
|
+
// storage operations, or custom PostgREST filters).
|
|
34
145
|
export { supabase } from './supabase/client';
|
|
35
|
-
//
|
|
146
|
+
// =============================================================================
|
|
147
|
+
// Runtime Configuration
|
|
148
|
+
// =============================================================================
|
|
149
|
+
// Application-level configuration store:
|
|
150
|
+
// - `initConfig` — initializes with defaults on app boot.
|
|
151
|
+
// - `getConfig` — reads the current configuration snapshot.
|
|
152
|
+
// - `setConfig` — merges partial updates into the active configuration.
|
|
36
153
|
export { initConfig, getConfig, setConfig } from './runtime/runtimeConfig';
|
|
37
|
-
//
|
|
154
|
+
// =============================================================================
|
|
155
|
+
// Debug Utilities
|
|
156
|
+
// =============================================================================
|
|
157
|
+
// Development-time logging and debug mode management:
|
|
158
|
+
// - `debug` — conditional logger (only outputs when debug mode is active).
|
|
159
|
+
// - `isDebugMode` / `setDebugMode` — query and toggle debug mode at runtime.
|
|
38
160
|
export { debug, isDebugMode, setDebugMode } from './debug';
|
|
39
|
-
//
|
|
161
|
+
// =============================================================================
|
|
162
|
+
// General Utilities
|
|
163
|
+
// =============================================================================
|
|
164
|
+
// Pure helper functions:
|
|
165
|
+
// - `generateId` — produces a unique identifier.
|
|
166
|
+
// - `now` — returns the current ISO 8601 timestamp.
|
|
167
|
+
// - `calculateNewOrder` — computes fractional order for reorderable lists.
|
|
168
|
+
// - `snakeToCamel` — converts `snake_case` to `camelCase`.
|
|
40
169
|
export { generateId, now, calculateNewOrder, snakeToCamel } from './utils';
|
|
41
|
-
//
|
|
170
|
+
// =============================================================================
|
|
171
|
+
// Svelte Actions
|
|
172
|
+
// =============================================================================
|
|
173
|
+
// DOM-level `use:action` directives for remote-change visual feedback:
|
|
174
|
+
// - `remoteChangeAnimation` — applies a highlight/pulse when a remote update arrives.
|
|
175
|
+
// - `trackEditing` — marks an element as actively being edited.
|
|
176
|
+
// - `triggerLocalAnimation` — manually fires the animation for local feedback.
|
|
42
177
|
export { remoteChangeAnimation, trackEditing, triggerLocalAnimation } from './actions/remoteChange';
|
|
43
|
-
//
|
|
178
|
+
// =============================================================================
|
|
179
|
+
// Supabase Credential Validation (Server-Side)
|
|
180
|
+
// =============================================================================
|
|
181
|
+
// Server-side utilities for validating Supabase credentials and database
|
|
182
|
+
// schema during initial app setup flows:
|
|
183
|
+
// - `validateSupabaseCredentials` — tests that the provided URL and anon key
|
|
184
|
+
// can successfully connect to a Supabase project.
|
|
185
|
+
// - `validateSchema` — verifies that the required database tables and columns
|
|
186
|
+
// exist in the connected Supabase project.
|
|
44
187
|
export { validateSupabaseCredentials, validateSchema } from './supabase/validate';
|
|
45
188
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,gFAAgF;AAChF,wBAAwB;AACxB,gFAAgF;AAChF,0EAA0E;AAC1E,wEAAwE;AACxE,yEAAyE;AAEzE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAChF,sDAAsD;AACtD,oEAAoE;AACpE,+EAA+E;AAE/E,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGlD,gFAAgF;AAChF,oBAAoB;AACpB,gFAAgF;AAChF,oDAAoD;AACpD,qEAA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