@vuetify/one 0.1.3 → 0.3.0
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.d.ts +102 -6
- package/dist/index.js +309 -254
- package/dist/style.css +1 -1
- package/package.json +8 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { App } from 'vue';
|
|
3
3
|
import * as pinia from 'pinia';
|
|
4
|
+
import { PiniaPluginContext } from 'pinia';
|
|
4
5
|
|
|
5
6
|
declare const useAuthStore: pinia.StoreDefinition<"auth", pinia._UnwrapAll<Pick<{
|
|
6
7
|
user: vue.Ref<{
|
|
@@ -90,7 +91,7 @@ declare const useAuthStore: pinia.StoreDefinition<"auth", pinia._UnwrapAll<Pick<
|
|
|
90
91
|
};
|
|
91
92
|
}[];
|
|
92
93
|
} | null>;
|
|
93
|
-
url:
|
|
94
|
+
url: string;
|
|
94
95
|
isLoading: vue.ShallowRef<boolean>;
|
|
95
96
|
verify: {
|
|
96
97
|
(force?: boolean): Promise<void>;
|
|
@@ -188,7 +189,7 @@ declare const useAuthStore: pinia.StoreDefinition<"auth", pinia._UnwrapAll<Pick<
|
|
|
188
189
|
};
|
|
189
190
|
}[];
|
|
190
191
|
} | null>;
|
|
191
|
-
url:
|
|
192
|
+
url: string;
|
|
192
193
|
isLoading: vue.ShallowRef<boolean>;
|
|
193
194
|
verify: {
|
|
194
195
|
(force?: boolean): Promise<void>;
|
|
@@ -198,7 +199,7 @@ declare const useAuthStore: pinia.StoreDefinition<"auth", pinia._UnwrapAll<Pick<
|
|
|
198
199
|
logout: () => Promise<void>;
|
|
199
200
|
isSubscriber: vue.ComputedRef<boolean | undefined>;
|
|
200
201
|
lastLoginProvider: () => string | null;
|
|
201
|
-
}, "
|
|
202
|
+
}, "isSubscriber">, Pick<{
|
|
202
203
|
user: vue.Ref<{
|
|
203
204
|
id: string;
|
|
204
205
|
isAdmin: boolean;
|
|
@@ -286,7 +287,7 @@ declare const useAuthStore: pinia.StoreDefinition<"auth", pinia._UnwrapAll<Pick<
|
|
|
286
287
|
};
|
|
287
288
|
}[];
|
|
288
289
|
} | null>;
|
|
289
|
-
url:
|
|
290
|
+
url: string;
|
|
290
291
|
isLoading: vue.ShallowRef<boolean>;
|
|
291
292
|
verify: {
|
|
292
293
|
(force?: boolean): Promise<void>;
|
|
@@ -296,7 +297,101 @@ declare const useAuthStore: pinia.StoreDefinition<"auth", pinia._UnwrapAll<Pick<
|
|
|
296
297
|
logout: () => Promise<void>;
|
|
297
298
|
isSubscriber: vue.ComputedRef<boolean | undefined>;
|
|
298
299
|
lastLoginProvider: () => string | null;
|
|
299
|
-
}, "
|
|
300
|
+
}, "verify" | "login" | "logout" | "lastLoginProvider">>;
|
|
301
|
+
|
|
302
|
+
type Bin = {
|
|
303
|
+
id: string;
|
|
304
|
+
content: string;
|
|
305
|
+
favorite: boolean;
|
|
306
|
+
pinned: boolean;
|
|
307
|
+
owner: Record<string, unknown>;
|
|
308
|
+
visibility: 'private' | 'public';
|
|
309
|
+
};
|
|
310
|
+
declare const useBinsStore: pinia.StoreDefinition<"bins", pinia._UnwrapAll<Pick<{
|
|
311
|
+
isOwner: vue.ComputedRef<boolean>;
|
|
312
|
+
all: vue.Ref<{
|
|
313
|
+
id: string;
|
|
314
|
+
content: string;
|
|
315
|
+
favorite: boolean;
|
|
316
|
+
pinned: boolean;
|
|
317
|
+
owner: Record<string, unknown>;
|
|
318
|
+
visibility: 'private' | 'public';
|
|
319
|
+
}[]>;
|
|
320
|
+
create: (bin: Bin) => Promise<{
|
|
321
|
+
bin: Bin;
|
|
322
|
+
}>;
|
|
323
|
+
delete: (id: string) => Promise<Response>;
|
|
324
|
+
current: vue.Ref<Bin | undefined>;
|
|
325
|
+
find: (id: string) => Promise<{
|
|
326
|
+
bin: Bin;
|
|
327
|
+
}>;
|
|
328
|
+
get: () => Promise<Bin[]>;
|
|
329
|
+
update: (bin: Bin, id: string) => Promise<{
|
|
330
|
+
bin: Bin;
|
|
331
|
+
}>;
|
|
332
|
+
updateOrCreate: (bin: Bin, id?: string) => Promise<{
|
|
333
|
+
bin: Bin;
|
|
334
|
+
}>;
|
|
335
|
+
}, "all" | "current">>, Pick<{
|
|
336
|
+
isOwner: vue.ComputedRef<boolean>;
|
|
337
|
+
all: vue.Ref<{
|
|
338
|
+
id: string;
|
|
339
|
+
content: string;
|
|
340
|
+
favorite: boolean;
|
|
341
|
+
pinned: boolean;
|
|
342
|
+
owner: Record<string, unknown>;
|
|
343
|
+
visibility: 'private' | 'public';
|
|
344
|
+
}[]>;
|
|
345
|
+
create: (bin: Bin) => Promise<{
|
|
346
|
+
bin: Bin;
|
|
347
|
+
}>;
|
|
348
|
+
delete: (id: string) => Promise<Response>;
|
|
349
|
+
current: vue.Ref<Bin | undefined>;
|
|
350
|
+
find: (id: string) => Promise<{
|
|
351
|
+
bin: Bin;
|
|
352
|
+
}>;
|
|
353
|
+
get: () => Promise<Bin[]>;
|
|
354
|
+
update: (bin: Bin, id: string) => Promise<{
|
|
355
|
+
bin: Bin;
|
|
356
|
+
}>;
|
|
357
|
+
updateOrCreate: (bin: Bin, id?: string) => Promise<{
|
|
358
|
+
bin: Bin;
|
|
359
|
+
}>;
|
|
360
|
+
}, "isOwner">, Pick<{
|
|
361
|
+
isOwner: vue.ComputedRef<boolean>;
|
|
362
|
+
all: vue.Ref<{
|
|
363
|
+
id: string;
|
|
364
|
+
content: string;
|
|
365
|
+
favorite: boolean;
|
|
366
|
+
pinned: boolean;
|
|
367
|
+
owner: Record<string, unknown>;
|
|
368
|
+
visibility: 'private' | 'public';
|
|
369
|
+
}[]>;
|
|
370
|
+
create: (bin: Bin) => Promise<{
|
|
371
|
+
bin: Bin;
|
|
372
|
+
}>;
|
|
373
|
+
delete: (id: string) => Promise<Response>;
|
|
374
|
+
current: vue.Ref<Bin | undefined>;
|
|
375
|
+
find: (id: string) => Promise<{
|
|
376
|
+
bin: Bin;
|
|
377
|
+
}>;
|
|
378
|
+
get: () => Promise<Bin[]>;
|
|
379
|
+
update: (bin: Bin, id: string) => Promise<{
|
|
380
|
+
bin: Bin;
|
|
381
|
+
}>;
|
|
382
|
+
updateOrCreate: (bin: Bin, id?: string) => Promise<{
|
|
383
|
+
bin: Bin;
|
|
384
|
+
}>;
|
|
385
|
+
}, "get" | "delete" | "update" | "find" | "create" | "updateOrCreate">>;
|
|
386
|
+
|
|
387
|
+
declare const useHttpStore: pinia.StoreDefinition<"http", {
|
|
388
|
+
url: string;
|
|
389
|
+
}, {}, {
|
|
390
|
+
fetch<T = any>(url: string, options?: RequestInit): Promise<T>;
|
|
391
|
+
post<T_1 = any>(url: string, body?: any, options?: RequestInit): Promise<T_1>;
|
|
392
|
+
get<T_2 = any>(url: string, options?: RequestInit): Promise<T_2>;
|
|
393
|
+
delete(url: string, options?: RequestInit): Promise<Response>;
|
|
394
|
+
}>;
|
|
300
395
|
|
|
301
396
|
declare const useOneStore: pinia.StoreDefinition<"one", pinia._UnwrapAll<Pick<{
|
|
302
397
|
activate: () => Promise<void>;
|
|
@@ -632,5 +727,6 @@ declare const useUserStore: pinia.StoreDefinition<"user", pinia._UnwrapAll<Pick<
|
|
|
632
727
|
declare function createOne(): {
|
|
633
728
|
install: (app: App) => void;
|
|
634
729
|
};
|
|
730
|
+
declare function one(ctx: PiniaPluginContext): void;
|
|
635
731
|
|
|
636
|
-
export { createOne, useAuthStore, useOneStore, useUserStore };
|
|
732
|
+
export { createOne, one, useAuthStore, useBinsStore, useHttpStore, useOneStore, useUserStore };
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,51 @@
|
|
|
1
|
-
import { reactive as Y, toRefs as Z, ref as
|
|
2
|
-
import { defineStore as
|
|
3
|
-
import { merge as
|
|
4
|
-
import { mdiDiscord as
|
|
5
|
-
import { VListItem as
|
|
6
|
-
import { VAvatar as
|
|
7
|
-
import { VBtn as
|
|
8
|
-
import { VMenu as
|
|
9
|
-
import { VSkeletonLoader as
|
|
10
|
-
import { useDisplay as ve, useTheme as
|
|
11
|
-
import { VCard as ye, VCardTitle as
|
|
12
|
-
import { VDialog as
|
|
13
|
-
import { VImg as
|
|
1
|
+
import { reactive as Y, toRefs as Z, ref as O, shallowRef as T, computed as x, watch as H, defineComponent as V, openBlock as h, createBlock as b, unref as l, withCtx as f, createVNode as d, createTextVNode as S, toDisplayString as B, createCommentVNode as K, mergeProps as Q, createElementVNode as k, createElementBlock as ee, Fragment as te, renderList as oe, pushScopeId as se, popScopeId as ne, onBeforeMount as ie } from "vue";
|
|
2
|
+
import { defineStore as $ } from "pinia";
|
|
3
|
+
import { merge as D } from "lodash-es";
|
|
4
|
+
import { mdiDiscord as M, mdiGithub as G, mdiViewDashboard as re, mdiLogoutVariant as ae, mdiLogin as le, mdiShieldStarOutline as ce, mdiReddit as ue } from "@mdi/js";
|
|
5
|
+
import { VListItem as z, VList as J, VListSubheader as de } from "vuetify/lib/components/VList/index.mjs";
|
|
6
|
+
import { VAvatar as fe } from "vuetify/lib/components/VAvatar/index.mjs";
|
|
7
|
+
import { VBtn as W } from "vuetify/lib/components/VBtn/index.mjs";
|
|
8
|
+
import { VMenu as pe } from "vuetify/lib/components/VMenu/index.mjs";
|
|
9
|
+
import { VSkeletonLoader as me } from "vuetify/lib/components/VSkeletonLoader/index.mjs";
|
|
10
|
+
import { useDisplay as ve, useTheme as he } from "vuetify";
|
|
11
|
+
import { VCard as ye, VCardTitle as ge, VCardSubtitle as be } from "vuetify/lib/components/VCard/index.mjs";
|
|
12
|
+
import { VDialog as _e } from "vuetify/lib/components/VDialog/index.mjs";
|
|
13
|
+
import { VImg as we } from "vuetify/lib/components/VImg/index.mjs";
|
|
14
14
|
import { VFooter as Le } from "vuetify/lib/components/VFooter/index.mjs";
|
|
15
15
|
import { VIcon as xe } from "vuetify/lib/components/VIcon/index.mjs";
|
|
16
|
-
const
|
|
16
|
+
const N = $("http", {
|
|
17
|
+
state: () => ({
|
|
18
|
+
url: ""
|
|
19
|
+
}),
|
|
20
|
+
actions: {
|
|
21
|
+
async fetch(o, t = {}) {
|
|
22
|
+
const s = await fetch(`${this.url}${o}`, {
|
|
23
|
+
credentials: "include",
|
|
24
|
+
...t
|
|
25
|
+
});
|
|
26
|
+
return s.status === 204 ? s : s.json();
|
|
27
|
+
},
|
|
28
|
+
async post(o, t, s = {}) {
|
|
29
|
+
return this.fetch(o, {
|
|
30
|
+
method: "POST",
|
|
31
|
+
headers: {
|
|
32
|
+
"Content-Type": "application/json"
|
|
33
|
+
},
|
|
34
|
+
body: JSON.stringify(t),
|
|
35
|
+
...s
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
async get(o, t = {}) {
|
|
39
|
+
return this.fetch(o, t);
|
|
40
|
+
},
|
|
41
|
+
async delete(o, t = {}) {
|
|
42
|
+
return this.fetch(o, {
|
|
43
|
+
method: "DELETE",
|
|
44
|
+
...t
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}), C = typeof window < "u", P = {
|
|
17
49
|
v: 4,
|
|
18
50
|
api: "link-only",
|
|
19
51
|
avatar: "",
|
|
@@ -40,279 +72,273 @@ const I = typeof window < "u", H = {
|
|
|
40
72
|
jobs: null
|
|
41
73
|
}
|
|
42
74
|
}
|
|
43
|
-
},
|
|
44
|
-
const
|
|
75
|
+
}, q = $("user", () => {
|
|
76
|
+
const o = Y(D({}, P));
|
|
45
77
|
function t() {
|
|
46
|
-
if (!
|
|
78
|
+
if (!C)
|
|
47
79
|
return;
|
|
48
|
-
const
|
|
49
|
-
e.v || (e.pwaRefresh = !0, typeof e.api == "boolean" && (e.api = e.api ? "inline" : "link-only"), typeof e.rtl == "boolean" && (e.direction = e.rtl ? "rtl" : "ltr", delete e.rtl), typeof e.theme == "object" && (e.mixedTheme = e.theme.mixed, e.theme = e.theme.system ? "system" : e.theme.dark ? "dark" : "light"), Array.isArray(e.notifications) && (e.notifications = { read: e.notifications }), typeof e.last == "object" && (e.notifications.last = e.last, delete e.last)), e.v === 1 && (Array.isArray(e.composition) && (e.composition = "composition"), Array.isArray(e.notifications.last.banner) || (e.notifications = e.notifications || {}, e.notifications.last = e.notifications.last || {}, e.notifications.last.banner = [])), e.v === 2 && (e.syncSettings = !0, e.disableAds = !1, e.v = 3), e.v === 3 && (e.quickbar = !1), e.v =
|
|
80
|
+
const a = localStorage.getItem("vuetify@user"), e = a ? JSON.parse(a) : {}, p = e.v === o.v;
|
|
81
|
+
e.v || (e.pwaRefresh = !0, typeof e.api == "boolean" && (e.api = e.api ? "inline" : "link-only"), typeof e.rtl == "boolean" && (e.direction = e.rtl ? "rtl" : "ltr", delete e.rtl), typeof e.theme == "object" && (e.mixedTheme = e.theme.mixed, e.theme = e.theme.system ? "system" : e.theme.dark ? "dark" : "light"), Array.isArray(e.notifications) && (e.notifications = { read: e.notifications }), typeof e.last == "object" && (e.notifications.last = e.last, delete e.last)), e.v === 1 && (Array.isArray(e.composition) && (e.composition = "composition"), Array.isArray(e.notifications.last.banner) || (e.notifications = e.notifications || {}, e.notifications.last = e.notifications.last || {}, e.notifications.last.banner = [])), e.v === 2 && (e.syncSettings = !0, e.disableAds = !1, e.v = 3), e.v === 3 && (e.quickbar = !1), e.v = o.v, Object.assign(o, D(o, e)), p && s();
|
|
50
82
|
}
|
|
51
83
|
function s() {
|
|
52
|
-
|
|
84
|
+
C && localStorage.setItem("vuetify@user", JSON.stringify(o, null, 2));
|
|
53
85
|
}
|
|
54
86
|
function n() {
|
|
55
|
-
|
|
87
|
+
C && (Object.assign(o, D({}, P)), s());
|
|
56
88
|
}
|
|
57
89
|
return t(), {
|
|
58
|
-
...Z(
|
|
90
|
+
...Z(o),
|
|
59
91
|
load: t,
|
|
60
92
|
save: s,
|
|
61
93
|
reset: n
|
|
62
94
|
};
|
|
63
|
-
}),
|
|
64
|
-
const
|
|
65
|
-
var
|
|
66
|
-
return ((
|
|
95
|
+
}), w = $("auth", () => {
|
|
96
|
+
const o = O(null), t = N(), s = q(), n = T(!1), a = x(() => {
|
|
97
|
+
var i, r;
|
|
98
|
+
return !t.url || ((i = o.value) == null ? void 0 : i.isAdmin) || ((r = o.value) == null ? void 0 : r.sponsorships.some((c) => c.isActive));
|
|
67
99
|
});
|
|
68
|
-
let
|
|
69
|
-
|
|
70
|
-
if (!(
|
|
100
|
+
let e = !1;
|
|
101
|
+
H(o, (i) => {
|
|
102
|
+
if (!(i != null && i.settings))
|
|
71
103
|
return;
|
|
72
|
-
const
|
|
73
|
-
JSON.stringify(
|
|
74
|
-
}),
|
|
75
|
-
|
|
104
|
+
const r = localStorage.getItem("vuetify@user") || "{}";
|
|
105
|
+
JSON.stringify(i.settings, null, 2) !== r && (e = !0, Object.assign(s, i.settings));
|
|
106
|
+
}), s.$subscribe(() => {
|
|
107
|
+
e || p(), e = !1;
|
|
76
108
|
});
|
|
77
|
-
async function
|
|
109
|
+
async function p() {
|
|
78
110
|
try {
|
|
79
|
-
await
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
headers: {
|
|
83
|
-
"Content-Type": "application/json"
|
|
84
|
-
},
|
|
85
|
-
body: JSON.stringify({
|
|
86
|
-
settings: t.$state
|
|
87
|
-
})
|
|
88
|
-
});
|
|
89
|
-
} catch (o) {
|
|
90
|
-
console.error(o);
|
|
111
|
+
await t.post("/user/settings", { settings: s.$state });
|
|
112
|
+
} catch (i) {
|
|
113
|
+
console.error(i);
|
|
91
114
|
}
|
|
92
115
|
}
|
|
93
|
-
async function
|
|
94
|
-
if (
|
|
95
|
-
return
|
|
96
|
-
|
|
116
|
+
async function u(i = !1) {
|
|
117
|
+
if (u.promise)
|
|
118
|
+
return u.promise;
|
|
119
|
+
n.value = !0, u.promise = fetch(`${t.url}/auth/verify`, {
|
|
97
120
|
credentials: "include",
|
|
98
|
-
headers:
|
|
121
|
+
headers: i ? {
|
|
99
122
|
"Cache-Control": "no-cache"
|
|
100
123
|
} : void 0
|
|
101
124
|
}).then(
|
|
102
|
-
async (
|
|
103
|
-
|
|
125
|
+
async (r) => {
|
|
126
|
+
r.ok ? o.value = (await r.json()).user : r.status === 401 ? o.value = null : console.error(r.statusText);
|
|
104
127
|
},
|
|
105
128
|
() => {
|
|
106
129
|
}
|
|
107
130
|
).finally(() => {
|
|
108
|
-
|
|
131
|
+
n.value = !1, u.promise = null;
|
|
109
132
|
});
|
|
110
133
|
}
|
|
111
|
-
|
|
112
|
-
async function
|
|
113
|
-
|
|
114
|
-
const
|
|
134
|
+
u.promise = null;
|
|
135
|
+
async function _(i = "github") {
|
|
136
|
+
n.value = !0;
|
|
137
|
+
const r = `${t.url}/auth/${i}/redirect`, c = 400, m = 600, I = window.screenX + (window.innerWidth - c) / 2, A = window.screenY + (window.innerHeight - m) / 2, v = window.open(
|
|
115
138
|
"",
|
|
116
139
|
"vuetify:authorize:popup",
|
|
117
|
-
`popup,left=${
|
|
140
|
+
`popup,left=${I},top=${A},width=${c},height=${m},resizable`
|
|
118
141
|
);
|
|
119
|
-
if (!
|
|
142
|
+
if (!v) {
|
|
120
143
|
console.error("Failed to open popup");
|
|
121
144
|
return;
|
|
122
145
|
}
|
|
123
|
-
|
|
124
|
-
let
|
|
125
|
-
function
|
|
126
|
-
var
|
|
127
|
-
|
|
146
|
+
v.location.href = r;
|
|
147
|
+
let U = -1, R = -1;
|
|
148
|
+
function E(L) {
|
|
149
|
+
var F;
|
|
150
|
+
L.origin === t.url && ((F = L.data) == null ? void 0 : F.type) === "auth-response" && (L.data.status === "success" ? (o.value || localStorage.setItem("vuetify@lastLoginProvider", i), o.value = L.data.body.user) : console.error(L.data.message), j());
|
|
128
151
|
}
|
|
129
|
-
function
|
|
130
|
-
window.removeEventListener("message",
|
|
152
|
+
function j() {
|
|
153
|
+
window.removeEventListener("message", E), window.clearInterval(U), window.clearTimeout(R), v == null || v.close(), n.value = !1;
|
|
131
154
|
}
|
|
132
|
-
window.addEventListener("message",
|
|
133
|
-
!
|
|
134
|
-
}, 1e3),
|
|
135
|
-
|
|
155
|
+
window.addEventListener("message", E), U = window.setInterval(() => {
|
|
156
|
+
!v || v.closed ? (console.error("Auth popup closed"), j()) : v.postMessage({ type: "auth-request" }, "*");
|
|
157
|
+
}, 1e3), R = window.setTimeout(() => {
|
|
158
|
+
j(), console.error("Auth timed out");
|
|
136
159
|
}, 120 * 1e3);
|
|
137
160
|
}
|
|
138
|
-
async function
|
|
139
|
-
|
|
161
|
+
async function y() {
|
|
162
|
+
n.value = !0;
|
|
140
163
|
try {
|
|
141
|
-
await
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}), await c(!0), i.value = null;
|
|
145
|
-
} catch (o) {
|
|
146
|
-
console.error(o);
|
|
164
|
+
await t.post("/auth/logout"), await u(!0), o.value = null;
|
|
165
|
+
} catch (i) {
|
|
166
|
+
console.error(i);
|
|
147
167
|
} finally {
|
|
148
|
-
|
|
168
|
+
n.value = !1;
|
|
149
169
|
}
|
|
150
170
|
}
|
|
151
|
-
function
|
|
171
|
+
function g() {
|
|
152
172
|
return localStorage.getItem("vuetify@lastLoginProvider");
|
|
153
173
|
}
|
|
154
|
-
return
|
|
155
|
-
user:
|
|
156
|
-
url:
|
|
157
|
-
isLoading:
|
|
158
|
-
verify:
|
|
159
|
-
login:
|
|
160
|
-
logout:
|
|
161
|
-
isSubscriber:
|
|
162
|
-
lastLoginProvider:
|
|
174
|
+
return g() && u(), {
|
|
175
|
+
user: o,
|
|
176
|
+
url: t.url,
|
|
177
|
+
isLoading: n,
|
|
178
|
+
verify: u,
|
|
179
|
+
login: _,
|
|
180
|
+
logout: y,
|
|
181
|
+
isSubscriber: a,
|
|
182
|
+
lastLoginProvider: g
|
|
163
183
|
};
|
|
164
|
-
}), Ve = /* @__PURE__ */
|
|
184
|
+
}), Ve = /* @__PURE__ */ V({
|
|
165
185
|
__name: "VoDiscordLogin",
|
|
166
|
-
setup(
|
|
167
|
-
const t =
|
|
168
|
-
return (s, n) => (
|
|
169
|
-
"prepend-icon": `svg:${
|
|
170
|
-
title:
|
|
171
|
-
subtitle: !
|
|
186
|
+
setup(o) {
|
|
187
|
+
const t = w();
|
|
188
|
+
return (s, n) => (h(), b(z, {
|
|
189
|
+
"prepend-icon": `svg:${l(M)}`,
|
|
190
|
+
title: l(t).user ? "Connect Discord" : "Log in with Discord",
|
|
191
|
+
subtitle: !l(t).user && l(t).lastLoginProvider() === "discord" ? "Last Used" : "",
|
|
172
192
|
nav: "",
|
|
173
193
|
"base-color": "#5865F2",
|
|
174
194
|
slim: "",
|
|
175
195
|
variant: "flat",
|
|
176
|
-
onClick: n[0] || (n[0] = (
|
|
196
|
+
onClick: n[0] || (n[0] = (a) => l(t).login("discord"))
|
|
177
197
|
}, null, 8, ["prepend-icon", "title", "subtitle"]));
|
|
178
198
|
}
|
|
179
|
-
}),
|
|
199
|
+
}), $e = /* @__PURE__ */ V({
|
|
180
200
|
__name: "VoGithubLogin",
|
|
181
|
-
setup(
|
|
182
|
-
const t =
|
|
183
|
-
return (s, n) => (
|
|
184
|
-
"prepend-icon": `svg:${
|
|
185
|
-
title:
|
|
186
|
-
subtitle: !
|
|
201
|
+
setup(o) {
|
|
202
|
+
const t = w();
|
|
203
|
+
return (s, n) => (h(), b(z, {
|
|
204
|
+
"prepend-icon": `svg:${l(G)}`,
|
|
205
|
+
title: l(t).user ? "Connect GitHub" : "Log in with GitHub",
|
|
206
|
+
subtitle: !l(t).user && l(t).lastLoginProvider() === "github" ? "Last Used" : "",
|
|
187
207
|
"base-color": "#2a2a2a",
|
|
188
208
|
nav: "",
|
|
189
209
|
slim: "",
|
|
190
210
|
variant: "flat",
|
|
191
|
-
onClick: n[0] || (n[0] = (
|
|
211
|
+
onClick: n[0] || (n[0] = (a) => l(t).login("github"))
|
|
192
212
|
}, null, 8, ["prepend-icon", "title", "subtitle"]));
|
|
193
213
|
}
|
|
194
|
-
}),
|
|
214
|
+
}), Se = /* @__PURE__ */ V({
|
|
195
215
|
__name: "VoUserBtn",
|
|
196
216
|
props: {
|
|
197
217
|
external: Boolean
|
|
198
218
|
},
|
|
199
|
-
setup(
|
|
200
|
-
const t =
|
|
219
|
+
setup(o) {
|
|
220
|
+
const t = o, s = w(), n = q(), a = x(() => [
|
|
201
221
|
{ title: "Options", type: "subheader" },
|
|
202
222
|
{
|
|
203
223
|
title: "My Dashboard",
|
|
204
|
-
appendIcon: `svg:${
|
|
224
|
+
appendIcon: `svg:${re}`,
|
|
205
225
|
to: t.external ? void 0 : "/user/dashboard",
|
|
206
226
|
href: t.external ? "https://vuetifyjs.com/user/dashboard/" : void 0,
|
|
207
227
|
target: t.external ? "_blank" : void 0
|
|
208
228
|
},
|
|
229
|
+
{
|
|
230
|
+
title: "My Subscriptions",
|
|
231
|
+
appendIcon: "$vuetify",
|
|
232
|
+
href: "https://vuetifyjs.com/user/subscriptions/",
|
|
233
|
+
target: "_blank"
|
|
234
|
+
},
|
|
209
235
|
{
|
|
210
236
|
title: "Logout",
|
|
211
|
-
appendIcon: `svg:${
|
|
237
|
+
appendIcon: `svg:${ae}`,
|
|
212
238
|
onClick: () => {
|
|
213
239
|
s.logout();
|
|
214
240
|
}
|
|
215
241
|
}
|
|
216
|
-
];
|
|
217
|
-
return (e,
|
|
242
|
+
]);
|
|
243
|
+
return (e, p) => (h(), b(W, {
|
|
218
244
|
class: "vo-user-btn",
|
|
219
|
-
loading:
|
|
245
|
+
loading: l(s).isLoading,
|
|
220
246
|
icon: ""
|
|
221
247
|
}, {
|
|
222
|
-
loader:
|
|
223
|
-
|
|
248
|
+
loader: f(() => [
|
|
249
|
+
d(me, { type: "avatar" })
|
|
224
250
|
]),
|
|
225
|
-
default:
|
|
226
|
-
|
|
227
|
-
disabled: !
|
|
251
|
+
default: f(() => [
|
|
252
|
+
d(pe, {
|
|
253
|
+
disabled: !l(s).user || l(s).isLoading,
|
|
228
254
|
activator: "parent",
|
|
229
255
|
location: "bottom end"
|
|
230
256
|
}, {
|
|
231
|
-
default:
|
|
232
|
-
|
|
233
|
-
items:
|
|
257
|
+
default: f(() => [
|
|
258
|
+
d(J, {
|
|
259
|
+
items: a.value,
|
|
234
260
|
lines: !1,
|
|
235
261
|
density: "compact",
|
|
236
262
|
"item-props": "",
|
|
237
263
|
nav: ""
|
|
238
264
|
}, {
|
|
239
|
-
subheader:
|
|
240
|
-
|
|
241
|
-
default:
|
|
242
|
-
|
|
265
|
+
subheader: f(({ props: u }) => [
|
|
266
|
+
d(de, { class: "text-high-emphasis text-uppercase font-weight-black" }, {
|
|
267
|
+
default: f(() => [
|
|
268
|
+
S(B(u.title), 1)
|
|
243
269
|
]),
|
|
244
270
|
_: 2
|
|
245
271
|
}, 1024)
|
|
246
272
|
]),
|
|
247
273
|
_: 1
|
|
248
|
-
})
|
|
274
|
+
}, 8, ["items"])
|
|
249
275
|
]),
|
|
250
276
|
_: 1
|
|
251
277
|
}, 8, ["disabled"]),
|
|
252
|
-
|
|
278
|
+
l(s).user ? (h(), b(fe, {
|
|
253
279
|
key: 0,
|
|
254
|
-
image:
|
|
255
|
-
}, null, 8, ["image"])) :
|
|
280
|
+
image: l(n).avatar || l(s).user.picture || ""
|
|
281
|
+
}, null, 8, ["image"])) : K("", !0)
|
|
256
282
|
]),
|
|
257
283
|
_: 1
|
|
258
284
|
}, 8, ["loading"]));
|
|
259
285
|
}
|
|
260
286
|
});
|
|
261
|
-
const
|
|
262
|
-
const s =
|
|
263
|
-
for (const [n,
|
|
264
|
-
s[n] =
|
|
287
|
+
const X = (o, t) => {
|
|
288
|
+
const s = o.__vccOpts || o;
|
|
289
|
+
for (const [n, a] of t)
|
|
290
|
+
s[n] = a;
|
|
265
291
|
return s;
|
|
266
|
-
}, ke = /* @__PURE__ */
|
|
292
|
+
}, ke = /* @__PURE__ */ X(Se, [["__scopeId", "data-v-aeb16535"]]), Ie = { class: "text-center mb-6" }, Ae = /* @__PURE__ */ V({
|
|
267
293
|
__name: "VoAuthDialog",
|
|
268
|
-
setup(
|
|
269
|
-
const t =
|
|
270
|
-
return (e,
|
|
294
|
+
setup(o) {
|
|
295
|
+
const t = w(), { mdAndDown: s, lgAndUp: n } = ve(), a = he();
|
|
296
|
+
return (e, p) => !l(t).user && !l(t).isLoading ? (h(), b(_e, {
|
|
271
297
|
key: 0,
|
|
272
298
|
"max-width": "480"
|
|
273
299
|
}, {
|
|
274
|
-
activator:
|
|
275
|
-
|
|
276
|
-
...
|
|
277
|
-
[`${
|
|
278
|
-
text:
|
|
300
|
+
activator: f(({ props: u }) => [
|
|
301
|
+
d(W, Q({
|
|
302
|
+
...u,
|
|
303
|
+
[`${l(n) ? "append-" : ""}icon`]: `svg:${l(le)}`,
|
|
304
|
+
text: l(n) ? "Login" : void 0
|
|
279
305
|
}, {
|
|
280
|
-
rounded:
|
|
306
|
+
rounded: l(s),
|
|
281
307
|
class: "text-none",
|
|
282
308
|
color: "primary",
|
|
283
309
|
variant: "outlined"
|
|
284
310
|
}), null, 16, ["rounded"])
|
|
285
311
|
]),
|
|
286
|
-
default:
|
|
287
|
-
|
|
288
|
-
default:
|
|
289
|
-
|
|
290
|
-
src: `https://cdn.vuetifyjs.com/docs/images/logos/vuetify-logo-v3-slim-text-${a
|
|
312
|
+
default: f(() => [
|
|
313
|
+
d(ye, { class: "pt-6 pb-1 pb-sm-4 px-4 px-sm-8" }, {
|
|
314
|
+
default: f(() => [
|
|
315
|
+
d(we, {
|
|
316
|
+
src: `https://cdn.vuetifyjs.com/docs/images/logos/vuetify-logo-v3-slim-text-${l(a).name.value}.svg`,
|
|
291
317
|
class: "mb-4",
|
|
292
318
|
height: "30"
|
|
293
319
|
}, null, 8, ["src"]),
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
default:
|
|
297
|
-
|
|
320
|
+
k("div", Ie, [
|
|
321
|
+
d(ge, { class: "text-h5 mb-1 text-md-h4 font-weight-bold" }, {
|
|
322
|
+
default: f(() => [
|
|
323
|
+
S(B(l(t).lastLoginProvider() ? "Welcome Back" : "Log in to Vuetify"), 1)
|
|
298
324
|
]),
|
|
299
325
|
_: 1
|
|
300
326
|
}),
|
|
301
|
-
|
|
302
|
-
default:
|
|
303
|
-
|
|
327
|
+
d(be, { class: "text-wrap" }, {
|
|
328
|
+
default: f(() => [
|
|
329
|
+
S(" Sign in with GitHub or Discord to save your settings and unlock exclusive subscriber perks. ")
|
|
304
330
|
]),
|
|
305
331
|
_: 1
|
|
306
332
|
})
|
|
307
333
|
]),
|
|
308
|
-
|
|
334
|
+
d(J, {
|
|
309
335
|
class: "mx-auto",
|
|
310
336
|
"max-width": "300",
|
|
311
337
|
width: "100%"
|
|
312
338
|
}, {
|
|
313
|
-
default:
|
|
314
|
-
|
|
315
|
-
|
|
339
|
+
default: f(() => [
|
|
340
|
+
d($e, { class: "mb-3" }),
|
|
341
|
+
d(Ve)
|
|
316
342
|
]),
|
|
317
343
|
_: 1
|
|
318
344
|
})
|
|
@@ -321,24 +347,23 @@ const q = (i, t) => {
|
|
|
321
347
|
})
|
|
322
348
|
]),
|
|
323
349
|
_: 1
|
|
324
|
-
})) : (
|
|
350
|
+
})) : (h(), b(ke, { key: 1 }));
|
|
325
351
|
}
|
|
326
|
-
}),
|
|
327
|
-
class: "
|
|
328
|
-
href: "https://vuetifyjs.com/",
|
|
329
|
-
target: "_blank",
|
|
330
|
-
title: "Vuetify Documentation",
|
|
331
|
-
rel: "noopener noreferrer"
|
|
332
|
-
}, De = ["href", "title"], Ce = {
|
|
333
|
-
class: "text-caption",
|
|
352
|
+
}), je = (o) => (se("data-v-b66944c0"), o = o(), ne(), o), De = ["href", "title"], Ce = {
|
|
353
|
+
class: "text-caption text-disabled",
|
|
334
354
|
style: { position: "absolute", right: "16px" }
|
|
335
|
-
},
|
|
355
|
+
}, Oe = /* @__PURE__ */ je(() => /* @__PURE__ */ k("span", { class: "d-none d-sm-inline-block" }, "Vuetify, LLC", -1)), Te = /* @__PURE__ */ V({
|
|
336
356
|
__name: "VoFooter",
|
|
337
|
-
setup(
|
|
357
|
+
setup(o) {
|
|
338
358
|
const t = [
|
|
359
|
+
{
|
|
360
|
+
title: "Vuetify Documentation",
|
|
361
|
+
icon: "$vuetify",
|
|
362
|
+
href: "https://vuetifyjs.com/"
|
|
363
|
+
},
|
|
339
364
|
{
|
|
340
365
|
title: "Vuetify Support",
|
|
341
|
-
icon: `svg:${
|
|
366
|
+
icon: `svg:${ce}`,
|
|
342
367
|
href: "https://support.vuetifyjs.com/"
|
|
343
368
|
},
|
|
344
369
|
{
|
|
@@ -348,139 +373,169 @@ const q = (i, t) => {
|
|
|
348
373
|
},
|
|
349
374
|
{
|
|
350
375
|
title: "Vuetify GitHub",
|
|
351
|
-
icon: `svg:${
|
|
376
|
+
icon: `svg:${G}`,
|
|
352
377
|
href: "https://github.com/vuetifyjs/vuetify"
|
|
353
378
|
},
|
|
354
379
|
{
|
|
355
380
|
title: "Vuetify Discord",
|
|
356
|
-
icon: `svg:${
|
|
381
|
+
icon: `svg:${M}`,
|
|
357
382
|
href: "https://community.vuetifyjs.com/"
|
|
358
383
|
},
|
|
359
384
|
{
|
|
360
385
|
title: "Vuetify Reddit",
|
|
361
|
-
icon: `svg:${
|
|
386
|
+
icon: `svg:${ue}`,
|
|
362
387
|
href: "https://reddit.com/r/vuetifyjs"
|
|
363
388
|
}
|
|
364
389
|
];
|
|
365
|
-
return (s, n) => (
|
|
390
|
+
return (s, n) => (h(), b(Le, {
|
|
366
391
|
class: "vo-footer",
|
|
367
392
|
theme: "dark",
|
|
368
393
|
height: "40"
|
|
369
394
|
}, {
|
|
370
|
-
default:
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
width: "32"
|
|
376
|
-
})
|
|
377
|
-
]),
|
|
378
|
-
(m(), te(oe, null, ie(t, (r) => b("a", {
|
|
379
|
-
key: r.title,
|
|
380
|
-
href: r.href,
|
|
381
|
-
title: r.title,
|
|
395
|
+
default: f(() => [
|
|
396
|
+
(h(), ee(te, null, oe(t, (a) => k("a", {
|
|
397
|
+
key: a.title,
|
|
398
|
+
href: a.href,
|
|
399
|
+
title: a.title,
|
|
382
400
|
class: "d-inline-block mx-2 social-link",
|
|
383
401
|
target: "_blank",
|
|
384
402
|
rel: "noopener noreferrer"
|
|
385
403
|
}, [
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
_: 2
|
|
391
|
-
}, 1024)
|
|
404
|
+
d(xe, {
|
|
405
|
+
icon: a.icon,
|
|
406
|
+
size: a.icon === "$vuetify" ? 24 : 16
|
|
407
|
+
}, null, 8, ["icon", "size"])
|
|
392
408
|
], 8, De)), 64)),
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
409
|
+
k("div", Ce, [
|
|
410
|
+
S(" © 2016-" + B((/* @__PURE__ */ new Date()).getFullYear()) + " ", 1),
|
|
411
|
+
Oe
|
|
396
412
|
])
|
|
397
413
|
]),
|
|
398
414
|
_: 1
|
|
399
415
|
}));
|
|
400
416
|
}
|
|
401
417
|
});
|
|
402
|
-
const
|
|
403
|
-
const
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
418
|
+
const He = /* @__PURE__ */ X(Te, [["__scopeId", "data-v-b66944c0"]]), Ze = $("bins", () => {
|
|
419
|
+
const o = w(), t = N(), s = O([]), n = O(), a = T(-1), e = x(() => !o.user || !n.value ? !1 : o.user.id === n.value.owner.id);
|
|
420
|
+
H(() => n, () => {
|
|
421
|
+
window.clearTimeout(a.value), a.value = window.setTimeout(() => {
|
|
422
|
+
!n.value || !e.value || y(n.value, n.value.id);
|
|
423
|
+
}, 100);
|
|
424
|
+
}, { deep: !0 });
|
|
425
|
+
async function p() {
|
|
426
|
+
const r = await t.get("/one/bins");
|
|
427
|
+
return s.value = r.bins, r.bins;
|
|
428
|
+
}
|
|
429
|
+
async function u(r) {
|
|
430
|
+
const c = await t.delete(`/one/bins/${r}`);
|
|
431
|
+
return s.value = s.value.filter((m) => m.id !== r), c;
|
|
432
|
+
}
|
|
433
|
+
async function _(r) {
|
|
434
|
+
const c = await t.post("/one/bins", { bin: r });
|
|
435
|
+
return s.value.push(c.bin), n.value = c.bin, c;
|
|
436
|
+
}
|
|
437
|
+
async function y(r, c) {
|
|
438
|
+
const m = await t.post(`/one/bins/${c}`, { bin: r }), I = s.value.findIndex((A) => A.id === c);
|
|
439
|
+
return s.value.splice(I, 1, m.bin), m;
|
|
440
|
+
}
|
|
441
|
+
async function g(r, c) {
|
|
442
|
+
const m = c ? await y(r, c) : await _(r);
|
|
443
|
+
return n.value = m.bin, m;
|
|
444
|
+
}
|
|
445
|
+
async function i(r) {
|
|
446
|
+
const c = await t.get(`/one/bins/${r}`);
|
|
447
|
+
return n.value = c.bin, c;
|
|
448
|
+
}
|
|
449
|
+
return {
|
|
450
|
+
isOwner: e,
|
|
451
|
+
all: s,
|
|
452
|
+
create: _,
|
|
453
|
+
delete: u,
|
|
454
|
+
current: n,
|
|
455
|
+
find: i,
|
|
456
|
+
get: p,
|
|
457
|
+
update: y,
|
|
458
|
+
updateOrCreate: g
|
|
459
|
+
};
|
|
460
|
+
}), Ke = $("one", () => {
|
|
461
|
+
const t = new URLSearchParams(window.location.search).get("session_id"), s = w(), n = N(), a = T(!1), e = x(() => {
|
|
462
|
+
var i;
|
|
463
|
+
return (i = s.user) == null ? void 0 : i.sponsorships.find((r) => r.platform === "stripe" && r.tierName.startsWith("sub_"));
|
|
464
|
+
}), p = x(() => {
|
|
465
|
+
var i;
|
|
466
|
+
return (i = e.value) == null ? void 0 : i.isActive;
|
|
409
467
|
});
|
|
410
|
-
|
|
411
|
-
t && await
|
|
412
|
-
}),
|
|
413
|
-
|
|
468
|
+
ie(async () => {
|
|
469
|
+
t && await u();
|
|
470
|
+
}), H(p, (i) => {
|
|
471
|
+
i && g();
|
|
414
472
|
});
|
|
415
|
-
async function
|
|
473
|
+
async function u() {
|
|
416
474
|
try {
|
|
417
|
-
|
|
418
|
-
const
|
|
419
|
-
|
|
420
|
-
credentials: "include",
|
|
421
|
-
headers: {
|
|
422
|
-
"Content-Type": "application/json"
|
|
423
|
-
},
|
|
424
|
-
body: JSON.stringify({ sessionId: t })
|
|
425
|
-
}).then((l) => l.json());
|
|
426
|
-
s.user = o.user;
|
|
475
|
+
a.value = !0;
|
|
476
|
+
const i = await n.post("/one/activate", { sessionId: t });
|
|
477
|
+
s.user = i.user;
|
|
427
478
|
} catch {
|
|
428
479
|
} finally {
|
|
429
|
-
|
|
480
|
+
a.value = !1;
|
|
430
481
|
}
|
|
431
482
|
}
|
|
432
|
-
async function
|
|
433
|
-
|
|
483
|
+
async function _() {
|
|
484
|
+
a.value = !0, window.location.href = `${n.url}/one/subscribe`;
|
|
434
485
|
}
|
|
435
|
-
async function
|
|
436
|
-
var
|
|
437
|
-
if (
|
|
486
|
+
async function y() {
|
|
487
|
+
var i;
|
|
488
|
+
if (e.value)
|
|
438
489
|
try {
|
|
439
|
-
|
|
440
|
-
const
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
s.user = l.user;
|
|
490
|
+
a.value = !0;
|
|
491
|
+
const r = await n.post(
|
|
492
|
+
`/one/cancel?subscriptionId=${(i = e.value) == null ? void 0 : i.tierName}`
|
|
493
|
+
);
|
|
494
|
+
s.user = r.user;
|
|
445
495
|
} catch {
|
|
446
496
|
} finally {
|
|
447
|
-
|
|
497
|
+
a.value = !1;
|
|
448
498
|
}
|
|
449
499
|
}
|
|
450
|
-
async function
|
|
451
|
-
var
|
|
452
|
-
if (
|
|
500
|
+
async function g() {
|
|
501
|
+
var i;
|
|
502
|
+
if (e.value)
|
|
453
503
|
try {
|
|
454
|
-
|
|
455
|
-
const
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
s.user = l.user;
|
|
504
|
+
a.value = !0;
|
|
505
|
+
const r = await n.post(
|
|
506
|
+
`/one/verify?subscriptionId=${(i = e.value) == null ? void 0 : i.tierName}`
|
|
507
|
+
);
|
|
508
|
+
s.user = r.user;
|
|
460
509
|
} catch {
|
|
461
510
|
} finally {
|
|
462
|
-
|
|
511
|
+
a.value = !1;
|
|
463
512
|
}
|
|
464
513
|
}
|
|
465
514
|
return {
|
|
466
|
-
activate:
|
|
467
|
-
cancel:
|
|
468
|
-
subscribe:
|
|
469
|
-
verify:
|
|
470
|
-
subscription:
|
|
471
|
-
isLoading:
|
|
472
|
-
isSubscriber:
|
|
515
|
+
activate: u,
|
|
516
|
+
cancel: y,
|
|
517
|
+
subscribe: _,
|
|
518
|
+
verify: g,
|
|
519
|
+
subscription: e,
|
|
520
|
+
isLoading: a,
|
|
521
|
+
isSubscriber: p
|
|
473
522
|
};
|
|
474
523
|
});
|
|
475
524
|
function Qe() {
|
|
476
|
-
function
|
|
477
|
-
t.component("VoAuthDialog",
|
|
525
|
+
function o(t) {
|
|
526
|
+
t.component("VoAuthDialog", Ae), t.component("VoFooter", He);
|
|
478
527
|
}
|
|
479
|
-
return { install:
|
|
528
|
+
return { install: o };
|
|
529
|
+
}
|
|
530
|
+
function et(o) {
|
|
531
|
+
o.store.url = "https://api.vuetifyjs.com";
|
|
480
532
|
}
|
|
481
533
|
export {
|
|
482
534
|
Qe as createOne,
|
|
483
|
-
|
|
535
|
+
et as one,
|
|
536
|
+
w as useAuthStore,
|
|
537
|
+
Ze as useBinsStore,
|
|
538
|
+
N as useHttpStore,
|
|
484
539
|
Ke as useOneStore,
|
|
485
|
-
|
|
540
|
+
q as useUserStore
|
|
486
541
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.vo-user-btn[data-v-
|
|
1
|
+
.vo-user-btn[data-v-aeb16535] .v-skeleton-loader__avatar{min-height:40px;height:40px;width:40px;max-height:40px;min-width:40px;max-width:40px}.social-link[data-v-b66944c0] .v-icon{color:rgba(var(--v-theme-on-background),var(--v-disabled-opacity));text-decoration:none;transition:.2s ease-in-out}.social-link[data-v-b66944c0] .v-icon:hover{color:#1976d2}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuetify/one",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,10 +21,13 @@
|
|
|
21
21
|
"scripts": {
|
|
22
22
|
"dev": "vite",
|
|
23
23
|
"build": "vite build --config vite.build.config.ts && yarn build:types",
|
|
24
|
+
"build:dev": "vite build --mode development --config vite.build.config.ts ",
|
|
24
25
|
"build:types": "rimraf types-temp && vue-tsc --pretty -p tsconfig.json && rollup --config rollup.types.config.js && rimraf types-temp",
|
|
25
|
-
"watch": "yarn build --
|
|
26
|
+
"watch": "yarn build:dev --watch",
|
|
26
27
|
"preview": "vite preview",
|
|
27
|
-
"lint": "eslint . --ext .ts,.vue --fix --ignore-path .gitignore"
|
|
28
|
+
"lint": "eslint . --ext .ts,.vue --fix --ignore-path .gitignore",
|
|
29
|
+
"test": "vitest",
|
|
30
|
+
"coverage": "vitest run --coverage"
|
|
28
31
|
},
|
|
29
32
|
"peerDependencies": {
|
|
30
33
|
"@mdi/js": "6.2.95",
|
|
@@ -51,6 +54,7 @@
|
|
|
51
54
|
"eslint-plugin-node": "^11.1.0",
|
|
52
55
|
"eslint-plugin-promise": "^6.1.1",
|
|
53
56
|
"eslint-plugin-vue": "^9.16.1",
|
|
57
|
+
"jsdom": "^23.0.1",
|
|
54
58
|
"lodash-es": "^4.17.21",
|
|
55
59
|
"pinia": "^2.0.0",
|
|
56
60
|
"rimraf": "^5.0.5",
|
|
@@ -65,6 +69,7 @@
|
|
|
65
69
|
"vite": "^4.2.0",
|
|
66
70
|
"vite-plugin-vue-layouts": "^0.8.0",
|
|
67
71
|
"vite-plugin-vuetify": "^1.0.0",
|
|
72
|
+
"vitest": "^1.1.0",
|
|
68
73
|
"vue": "^3.2.0",
|
|
69
74
|
"vue-router": "^4.0.0",
|
|
70
75
|
"vue-tsc": "^1.2.0",
|