clone

a deno framework for local-first web apps that open instantly, work offline and sync when users choose

feat/prf-provision-custody
lofi / package / runtime / mod.ts
mod.ts 3.8K
1/**2 * Build local-first browser applications with durable storage, reactive tables,3 * optional Jazz sync, recoverable accounts, and an installable PWA lifecycle.4 *5 * Application code composes these APIs; storage, identity, sync, PWA, and6 * lifecycle implementations remain versioned package code.7 *8 * Start with {@link defineLofiApp} and {@link bootLofi}. Use9 * {@link LofiRuntime.store} to bind declared Jazz tables to application UI, and10 * add account backup only after managed sync is configured.11 *12 * @module13 */1415export { defineLofiApp, type LofiAppConfig, LofiConfigurationError } from "./app.ts";16export {17 type AuthCapability,18 type AuthDependencies,19 authenticateAndDerivePrfSecret,20 authenticateDeviceCredential,21 AuthError,22 classifyCredentialOrigin,23 type CredentialOriginReport,24 decryptAtRest,25 deriveAtRestKey,26 derivePrfSecret,27 type DeviceCredential,28 encryptAtRest,29 enrollDeviceCredential,30 type EnrollOptions,31 getAuthCapability,32 type PrfSupport,33} from "./auth.ts";34export { bootLofi } from "./boot.ts";35export {36 clearProvisionCapability,37 heldProvisionCapability,38 holdProvisionCapability,39 lockProvisionCapability,40 type ProvisionCapabilityStatus,41 provisionCapabilityStatus,42 sealProvisionCapability,43 unlockProvisionCapability,44} from "./provision.ts";45export {46 assertDurableBrowser,47 type DeviceCapabilityReport,48 type DurableCapabilityReport,49 durableCapabilityReport,50 DurableStorageUnsupportedError,51 readDeviceCapabilityReport,52 requestPersistentStorage,53} from "./device-capabilities.ts";54export {55 applyPwaUpdate,56 checkPwaUpdate,57 createPwaController,58 getPwaState,59 type InstallEnvironment,60 type InstallPromptEvent,61 type PwaController,62 pwaController,63 type PwaControllerDependencies,64 type PwaFailureCode,65 pwaFailureMessage,66 type PwaInstallState,67 type PwaState,68 type PwaUpdateState,69 type PwaWorkerState,70 requestPwaInstall,71 subscribePwaState,72} from "./pwa.ts";73export { type RuntimeDiagnostics } from "./diagnostics.ts";74export {75 acquireLiveQuery,76 type LiveQueryLease,77 type LiveQuerySnapshot,78 type LiveQueryStore,79} from "./live-query-store.ts";80export {81 getRuntime,82 getRuntimeDiagnostics,83 getRuntimePrincipal,84 type LofiRuntime,85 recreateRuntime,86 reloadBrowserRuntime,87 runtimeRecreatedEvent,88 shutdownRuntime,89 subscribeRuntimeDiagnostics,90} from "./runtime.ts";91export {92 reloadAfterRuntimeStartupFailure,93 RuntimeStartupError,94 type RuntimeStartupFailure,95 type RuntimeStartupFailureCode,96} from "./startup-recovery.ts";97export {98 acquireTableMutations,99 type TableMutationLease,100 type TableMutationSnapshot,101 type TableMutationStore,102} from "./table-mutations.ts";103export {104 AccountReplacementError,105 type AccountReplacementOptions,106 confirmPhraseAccess,107 createBackupPasskey,108 createRecoverablePasskeyBackup,109 enableSyncBackup,110 enrollSyncTicket,111 type EnrollSyncTicketOptions,112 isAccountReplacementError,113 isAuthError,114 isRecoverablePasskeyError,115 isRecoveryError,116 type PasskeyBackupReceipt,117 readAccountSession,118 readSession,119 restoreFromPasskey,120 restoreFromRecoveryPhrase,121 revealRecoveryPhrase,122 type Session,123 type SessionSink,124 stopSyncBackup,125} from "./session.ts";126export {127 clearDeclaredSink,128 type DataSinkDeclaration,129 DataSinkError,130 declareDataSink,131 isDataSinkError,132 parseSyncTicket,133 readDeclaredSink,134 restoreDeclaredSink,135 type SinkRestoreOutcome,136 splitTicketForEnrollment,137 type SyncTicket,138 type TicketSplit,139} from "./data-sink.ts";140export { RecoveryError } from "./recovery.ts";141export { RecoverablePasskeyError, type RecoverablePasskeyErrorCode } from "./passkey-recovery.ts";142export {143 type RowOf,144 type TableHandle,145 type TableRow,146 type TableSnapshot,147 type TableStore,148 type TableStoreOptions,149} from "./table-store.ts";150export { settleUiMutation } from "./ui-mutation.ts";