@temboplus/afloat 0.1.4 → 0.1.5
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client_store.d.ts","sourceRoot":"","sources":["../../../../../src/src/features/auth/storage/client_store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAU,KAAK,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"client_store.d.ts","sourceRoot":"","sources":["../../../../../src/src/features/auth/storage/client_store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAU,KAAK,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAEpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAK5C,4CAA4C;AAC5C,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAE1C,8CAA8C;AAC9C,UAAU,OAAO;IACf,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC9B,OAAO,EAAE,MAAM,IAAI,GAAG,SAAS,CAAC;IAChC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,QAAQ,CAAC,KAAK,GAAG,OAAO,CAAC,CA2BhE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAO,SAMpC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAO,IAAI,GAAG,SAEvC,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { User } from "../../../models/user/index.js";
|
|
2
2
|
import { create } from "zustand";
|
|
3
|
-
import { persist } from "zustand/middleware";
|
|
4
|
-
import { createJSONStorage } from "zustand/middleware/storage";
|
|
3
|
+
import { persist, createJSONStorage } from "zustand/middleware";
|
|
5
4
|
/** Key used for storing auth data in session storage */
|
|
6
5
|
const AUTH_STORE_SESSION_STORAGE_KEY = "auth-store";
|
|
7
6
|
/**
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client_store.d.ts","sourceRoot":"","sources":["../../../../../src/src/features/auth/storage/client_store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAU,KAAK,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"client_store.d.ts","sourceRoot":"","sources":["../../../../../src/src/features/auth/storage/client_store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAU,KAAK,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAEpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAK5C,4CAA4C;AAC5C,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAE1C,8CAA8C;AAC9C,UAAU,OAAO;IACf,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC9B,OAAO,EAAE,MAAM,IAAI,GAAG,SAAS,CAAC;IAChC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,QAAQ,CAAC,KAAK,GAAG,OAAO,CAAC,CA2BhE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAO,SAMpC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAO,IAAI,GAAG,SAEvC,CAAC"}
|
|
@@ -4,7 +4,6 @@ exports.useClientUser = exports.createClientStore = exports.clientStore = void 0
|
|
|
4
4
|
const index_js_1 = require("../../../models/user/index.js");
|
|
5
5
|
const zustand_1 = require("zustand");
|
|
6
6
|
const middleware_1 = require("zustand/middleware");
|
|
7
|
-
const storage_1 = require("zustand/middleware/storage");
|
|
8
7
|
/** Key used for storing auth data in session storage */
|
|
9
8
|
const AUTH_STORE_SESSION_STORAGE_KEY = "auth-store";
|
|
10
9
|
/**
|
|
@@ -28,7 +27,7 @@ exports.clientStore = (0, zustand_1.create)((0, middleware_1.persist)((set, get)
|
|
|
28
27
|
refresh: () => set({ user: undefined }),
|
|
29
28
|
}), {
|
|
30
29
|
name: AUTH_STORE_SESSION_STORAGE_KEY,
|
|
31
|
-
storage: (0,
|
|
30
|
+
storage: (0, middleware_1.createJSONStorage)(() => sessionStorage),
|
|
32
31
|
}));
|
|
33
32
|
/**
|
|
34
33
|
* Creates a client-side authentication store using Zustand.
|