selfstore 1.8.23 → 1.8.24

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/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { indexedDbCache, memoryCache, gisDriveAuth, isLockableCache, createLocalStore } from './chunk-DJZ5S3FI.js';
2
- export { gisDriveAuth } from './chunk-DJZ5S3FI.js';
1
+ import { indexedDbCache, memoryCache, gisDriveAuth, isLockableCache, createLocalStore } from './chunk-VRHSBY3T.js';
2
+ export { gisDriveAuth, preloadGoogleIdentity } from './chunk-VRHSBY3T.js';
3
3
  import { saveToDisk } from './chunk-AUH35AAQ.js';
4
4
  export { pickFromDisk, saveToDisk } from './chunk-AUH35AAQ.js';
5
5
  import { sha256Hex } from './chunk-QSLHEE2L.js';
@@ -40,6 +40,17 @@ declare function changePassword(input: Blob | Uint8Array, opts: {
40
40
  * that holds a refresh token instead (a broker implementing this same DriveAuth).
41
41
  */
42
42
 
43
+ /**
44
+ * Start loading Google Identity Services now, ahead of the click that connects.
45
+ *
46
+ * The consent popup only opens inside the user activation of a click. Loaded
47
+ * cold on that click, the script can take longer than the activation lasts:
48
+ * the browser then blocks the popup and Google answers exactly as if the user
49
+ * had refused. Call this when the screen holding the Drive button opens. It
50
+ * contacts Google, so it is never done implicitly. Safe to call any number of
51
+ * times, and a no-op outside a browser.
52
+ */
53
+ declare function preloadGoogleIdentity(): void;
43
54
  /** Where the access token survives between requests. */
44
55
  type GisTokenPersistence = 'memory' | 'session';
45
56
  interface GisDriveAuthOptions {
@@ -97,4 +108,4 @@ declare function datedName(filename: string, when?: Date): string;
97
108
  /** Prompt the user to pick a backup file from disk. Resolves null if cancelled. */
98
109
  declare function pickFromDisk(): Promise<File | null>;
99
110
 
100
- export { type GisDriveAuthOptions as G, type GisTokenPersistence as a, inspect as b, isEncrypted as c, datedName as d, exportSnapshot as e, changePassword as f, gisDriveAuth as g, importSnapshot as i, pickFromDisk as p, saveToDisk as s };
111
+ export { type GisDriveAuthOptions as G, type GisTokenPersistence as a, inspect as b, isEncrypted as c, datedName as d, exportSnapshot as e, preloadGoogleIdentity as f, gisDriveAuth as g, changePassword as h, importSnapshot as i, pickFromDisk as p, saveToDisk as s };
package/llms.txt CHANGED
@@ -19,7 +19,8 @@ collaborative editing (use a CRDT library), or Node-side storage.
19
19
  ## Entry points (one npm package, eight imports)
20
20
 
21
21
  - 'selfstore' - START HERE: the simple store (below) + fluent backup files +
22
- errors + gisDriveAuth. Small on purpose.
22
+ errors + gisDriveAuth (+ preloadGoogleIdentity, called when the Drive
23
+ button's screen opens). Small on purpose.
23
24
  - 'selfstore/flows' - the user journeys as HEADLESS state machines:
24
25
  connectFlow (choose/authorize/password/conflict, one popup per gesture,
25
26
  password proven by trial-read BEFORE anything attaches; an existing backup
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "selfstore",
3
- "version": "1.8.23",
3
+ "version": "1.8.24",
4
4
  "description": "Local-first storage for browser apps: an IndexedDB working copy, portable encrypted ZIP backups (AES-256-GCM over Argon2id), durable homes (disk, Google Drive, WebDAV) and a serverless multi-device merge.",
5
5
  "type": "module",
6
6
  "license": "MIT",