monoidentity 0.31.5 → 0.31.7

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.
@@ -0,0 +1,14 @@
1
+ import { STORAGE_EVENT, SYNC_REQUEST_EVENT, storageClient } from "./storageclient.svelte.js";
2
+
3
+ //#region src/index.d.ts
4
+ declare const getLoginRecognized: () => {
5
+ email: string;
6
+ password: string;
7
+ };
8
+ declare const setLoginRecognized: (login: string) => void;
9
+ declare const openHub: (path: string) => never;
10
+ declare const relog: () => never;
11
+ declare const getStorage: (realm: "config" | "userdata" | "cache" | (string & {})) => Record<string, any>;
12
+ declare const getScopedFS: (dir: string) => Record<string, any>;
13
+ //#endregion
14
+ export { STORAGE_EVENT, SYNC_REQUEST_EVENT, storageClient as _storageClient, getLoginRecognized, getScopedFS, getStorage, openHub, relog, setLoginRecognized };
@@ -1,4 +1,4 @@
1
- import { n as SYNC_REQUEST_EVENT, r as storageClient, t as STORAGE_EVENT } from "./storageclient.svelte-B-JE-dGU.mjs";
1
+ import { STORAGE_EVENT, SYNC_REQUEST_EVENT, storageClient } from "./storageclient.svelte.js";
2
2
  import { parse, stringify } from "devalue";
3
3
  import { email, object, parse as parse$1, pipe, string } from "valibot";
4
4
  import { decode } from "base36-esm";
@@ -1,4 +1,4 @@
1
- import { setLoginRecognized } from "./index.mjs";
1
+ import { setLoginRecognized } from "./index.js";
2
2
 
3
3
  //#region src/receive-callback.ts
4
4
  const params = new URLSearchParams(location.hash.slice(1));
@@ -13,15 +13,4 @@ declare global {
13
13
  }
14
14
  declare const storageClient: (prefix?: (key: string) => string, unprefix?: (key: string) => string | undefined, serialize?: (data: any) => string, deserialize?: (data: string) => any, isSyncContext?: boolean) => Record<string, any>;
15
15
  //#endregion
16
- //#region src/index.d.ts
17
- declare const getLoginRecognized: () => {
18
- email: string;
19
- password: string;
20
- };
21
- declare const setLoginRecognized: (login: string) => void;
22
- declare const openHub: (path: string) => never;
23
- declare const relog: () => never;
24
- declare const getStorage: (realm: "config" | "userdata" | "cache" | (string & {})) => Record<string, any>;
25
- declare const getScopedFS: (dir: string) => Record<string, any>;
26
- //#endregion
27
- export { STORAGE_EVENT, SYNC_REQUEST_EVENT, storageClient as _storageClient, getLoginRecognized, getScopedFS, getStorage, openHub, relog, setLoginRecognized };
16
+ export { STORAGE_EVENT, SYNC_REQUEST_EVENT, storageClient };
@@ -2,14 +2,14 @@
2
2
  const SYNC_REQUEST_EVENT = "monoidentity-sync-request";
3
3
  const STORAGE_EVENT = "monoidentity-storage";
4
4
  const waitForSync = async (key) => {
5
- await new Promise((resolve, reject) => window.dispatchEvent(new CustomEvent(SYNC_REQUEST_EVENT, { detail: {
5
+ await new Promise((resolve, reject) => dispatchEvent(new CustomEvent(SYNC_REQUEST_EVENT, { detail: {
6
6
  key,
7
7
  resolve,
8
8
  reject
9
9
  } })));
10
10
  };
11
11
  const announce = (key, value, isSync = false) => {
12
- window.dispatchEvent(new CustomEvent(STORAGE_EVENT, { detail: {
12
+ dispatchEvent(new CustomEvent(STORAGE_EVENT, { detail: {
13
13
  key,
14
14
  value,
15
15
  isSync
@@ -83,4 +83,4 @@ const storageClient = (prefix, unprefix, serialize, deserialize, isSyncContext =
83
83
  };
84
84
 
85
85
  //#endregion
86
- export { SYNC_REQUEST_EVENT as n, storageClient as r, STORAGE_EVENT as t };
86
+ export { STORAGE_EVENT, SYNC_REQUEST_EVENT, storageClient };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monoidentity",
3
- "version": "0.31.5",
3
+ "version": "0.31.7",
4
4
  "license": "ISC",
5
5
  "repository": "KTibow/monoidentity",
6
6
  "author": {
@@ -14,17 +14,17 @@
14
14
  "!dist/**/*.spec.*"
15
15
  ],
16
16
  "sideEffects": [
17
- "**/receive-callback.mjs"
17
+ "**/receive-callback.js"
18
18
  ],
19
19
  "type": "module",
20
20
  "exports": {
21
21
  ".": {
22
- "types": "./dist/index.d.mts",
23
- "import": "./dist/index.mjs"
22
+ "types": "./dist/index.d.ts",
23
+ "import": "./dist/index.js"
24
24
  },
25
25
  "./receive-callback": {
26
- "types": "./dist/receive-callback.d.mts",
27
- "import": "./dist/receive-callback.mjs"
26
+ "types": "./dist/receive-callback.d.ts",
27
+ "import": "./dist/receive-callback.js"
28
28
  }
29
29
  },
30
30
  "peerDependencies": {