@inzombieland/core 1.18.10 → 1.18.12
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/AppProvider.vue +5 -2
- package/api-client.d.ts +2 -0
- package/api-client.mjs +1 -0
- package/comet-client.mjs +1 -2
- package/index.mjs +1 -2
- package/package.json +1 -1
package/AppProvider.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { onMounted, ref } from "vue"
|
|
3
|
-
import bus from "./
|
|
3
|
+
import { bus } from "./api-client"
|
|
4
4
|
import { useThemeMode, useUser } from "./index"
|
|
5
5
|
import type { ConfigProviderTheme } from "vant"
|
|
6
6
|
import "@vant/touch-emulator"
|
|
@@ -11,8 +11,11 @@ const appLoading = ref(Boolean(user.value))
|
|
|
11
11
|
|
|
12
12
|
onMounted(() => {
|
|
13
13
|
appLoading.value = false
|
|
14
|
-
bus.publish("app:mounted", true)
|
|
15
14
|
})
|
|
15
|
+
|
|
16
|
+
if (typeof window !== "undefined") {
|
|
17
|
+
bus.publish("app:mounted", true)
|
|
18
|
+
}
|
|
16
19
|
</script>
|
|
17
20
|
|
|
18
21
|
<template>
|
package/api-client.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import bus from "./bus";
|
|
1
2
|
import type { Fetch, FetchConfig, FetchExtraOptions as FetchOptions, User } from "./types";
|
|
3
|
+
export { bus };
|
|
2
4
|
export declare const setUser: (newUser?: User | null) => void;
|
|
3
5
|
export declare const updateUser: (newUser: Partial<User>) => void;
|
|
4
6
|
export declare const getToken: () => string | null | undefined;
|
package/api-client.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import bus from "./bus.mjs";
|
|
2
2
|
import { useApiActions, useUser, useVisitor } from "./composables/index.mjs";
|
|
3
3
|
import { apiHelper, once } from "./helpers/index.mjs";
|
|
4
|
+
export { bus };
|
|
4
5
|
let token = null;
|
|
5
6
|
export const setUser = (newUser) => {
|
|
6
7
|
const user = useUser();
|
package/comet-client.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Centrifuge } from "centrifuge";
|
|
2
|
-
import { getToken } from "./api-client.mjs";
|
|
3
|
-
import bus from "./bus.mjs";
|
|
2
|
+
import { bus, getToken } from "./api-client.mjs";
|
|
4
3
|
import { useApiActions } from "./composables/index.mjs";
|
|
5
4
|
import { apiHelper } from "./helpers/index.mjs";
|
|
6
5
|
if (typeof window !== "undefined" && import.meta.env.MODE !== "production") {
|
package/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useLocalStorage } from "@vueuse/core";
|
|
2
2
|
import { ref } from "vue";
|
|
3
|
-
import { createApiFetch } from "./api-client.mjs";
|
|
4
|
-
import bus from "./bus.mjs";
|
|
3
|
+
import { bus, createApiFetch } from "./api-client.mjs";
|
|
5
4
|
import { newCometClient } from "./comet-client.mjs";
|
|
6
5
|
import { useApiActions } from "./composables/index.mjs";
|
|
7
6
|
import { createApiGetUser } from "./get-user.mjs";
|