@pubinfo/core 2.1.0 → 2.1.1
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/{AppSetting-Dzj6YBgW.js → AppSetting-CmT5_15W.js} +15 -15
- package/dist/{HCheckList.vue_vue_type_script_setup_true_lang-OWv01eXk.js → HCheckList.vue_vue_type_script_setup_true_lang-CHzkJth7.js} +1 -1
- package/dist/{HToggle-BnESuuPG.js → HToggle-DpDYLh8y.js} +1 -1
- package/dist/HeaderThinMenu-D6jF8yl1.js +4 -0
- package/dist/{PreferencesContent-DBKQJ8Ob.js → PreferencesContent-AXqWatOF.js} +4 -4
- package/dist/{SettingBreadcrumb-DmP1nJLZ.js → SettingBreadcrumb-CBWdS_nO.js} +3 -3
- package/dist/{SettingCopyright-C8_F7BB2.js → SettingCopyright-D5Jhdu1J.js} +2 -2
- package/dist/{SettingEnableTransition-BeJMq6ny.js → SettingEnableTransition-DQJozSZH.js} +2 -2
- package/dist/{SettingHome-yGmbxzJm.js → SettingHome-DAwn9Ypx.js} +2 -2
- package/dist/{SettingMenu-yWnqZqmz.js → SettingMenu-DEQRAtWl.js} +3 -3
- package/dist/{SettingMode-B8fgUhvi.js → SettingMode-bh3I8UBZ.js} +1 -1
- package/dist/{SettingNavSearch--yQEXqEL.js → SettingNavSearch-iYc-eRzY.js} +2 -2
- package/dist/{SettingOther-CSs1_D9L.js → SettingOther-C2TS6okv.js} +2 -2
- package/dist/{SettingPage-Pm7KblGG.js → SettingPage-B2_SNyn5.js} +2 -2
- package/dist/{SettingTabbar-DM5hdlQf.js → SettingTabbar-BETdKJxz.js} +3 -3
- package/dist/{SettingThemes-DqygGgDK.js → SettingThemes-ComNCP3P.js} +12 -11
- package/dist/{SettingToolbar-BP-yWiKo.js → SettingToolbar-D0DTBbbb.js} +2 -2
- package/dist/{SettingTopbar-Dd_SXy2e.js → SettingTopbar-BcO5Hcxm.js} +3 -3
- package/dist/{SettingWidthMode-DOtJg5uB.js → SettingWidthMode-wzTMq96A.js} +1 -1
- package/dist/built-in/pinia-plugin/plugins/persist.d.ts +2 -2
- package/dist/built-in/pinia-plugin/plugins/persistedstate/index.d.ts +3 -0
- package/dist/built-in/pinia-plugin/plugins/persistedstate/persistedstate.d.ts +15 -0
- package/dist/built-in/pinia-plugin/plugins/persistedstate/types.d.ts +150 -0
- package/dist/built-in/pinia-plugin/plugins/persistedstate/utils.d.ts +17 -0
- package/dist/core/ctx.d.ts +1 -0
- package/dist/core/interface.d.ts +26 -1
- package/dist/core/utils/index.d.ts +2 -0
- package/dist/features/composables/index.d.ts +1 -0
- package/dist/features/composables/partyLogin.d.ts +7 -1
- package/dist/{index-npW0xuOi.js → index-6W8u4oWQ.js} +1 -1
- package/dist/{index-igxVB1m3.js → index-B9i7R1pn.js} +2 -2
- package/dist/{index-C88VclMA.js → index-BXLF9xfN.js} +16300 -15834
- package/dist/{index-CnbD4YWA.js → index-C5X0cH7a.js} +3 -3
- package/dist/{index--xVOZLmn.js → index-CMSPnrUx.js} +1 -1
- package/dist/index-DSKHePRb.js +4 -0
- package/dist/{index-D8kKHmiD.js → index-FATjHAwl.js} +1 -1
- package/dist/{index-BSTB6EhQ.js → index-_VKoUSGo.js} +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +13 -12
- package/dist/{pick-l2RrF3SE.js → pick-BvMRfqim.js} +1 -1
- package/dist/utils/index.d.ts +0 -1
- package/package.json +9 -8
- package/src/built-in/pinia-plugin/index.ts +2 -2
- package/src/built-in/pinia-plugin/plugins/persist.ts +15 -4
- package/src/built-in/pinia-plugin/plugins/persistedstate/README.md +551 -0
- package/src/built-in/pinia-plugin/plugins/persistedstate/index.ts +3 -0
- package/src/built-in/pinia-plugin/plugins/persistedstate/persistedstate.ts +575 -0
- package/src/built-in/pinia-plugin/plugins/persistedstate/types.ts +162 -0
- package/src/built-in/pinia-plugin/plugins/persistedstate/utils.ts +46 -0
- package/src/core/ctx.ts +24 -1
- package/src/core/interface.ts +31 -1
- package/src/core/resolver/icon.ts +1 -1
- package/src/core/utils/index.ts +2 -0
- package/src/features/composables/index.ts +1 -0
- package/src/features/composables/partyLogin.ts +180 -38
- package/src/features/context/index.ts +1 -1
- package/src/index.ts +7 -5
- package/src/utils/index.ts +0 -1
- package/src/utils/proxy.ts +1 -1
- package/types/index.d.ts +1 -0
- package/types/pinia.d.ts +94 -0
- package/dist/HeaderThinMenu-Co2S6vIB.js +0 -4
- package/dist/index-GSKGoyv_.js +0 -4
- /package/dist/{utils → core/utils}/global.d.ts +0 -0
- /package/dist/core/{utils.d.ts → utils/utils.d.ts} +0 -0
- /package/src/{utils → core/utils}/global.ts +0 -0
- /package/src/core/{utils.ts → utils/utils.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cK as k, cQ as B, cR as H, _ as w, b as A } from "./index-
|
|
1
|
+
import { cK as k, cQ as B, cR as H, _ as w, b as A } from "./index-BXLF9xfN.js";
|
|
2
2
|
import { markRaw as E, createElementBlock as h, openBlock as a, createElementVNode as i, defineComponent as N, defineAsyncComponent as t, useModel as z, computed as u, watch as g, createBlock as S, createSlots as O, withCtx as p, Fragment as P, renderList as R, unref as c, resolveDynamicComponent as W, createVNode as f, createTextVNode as $ } from "vue";
|
|
3
3
|
import D from "vue-m-message";
|
|
4
4
|
import { useRoute as I } from "vue-router";
|
|
@@ -18,20 +18,20 @@ function J(l, o) {
|
|
|
18
18
|
const K = E({ name: "ep-document-copy", render: J }), L = { class: "settong-warp" }, Q = /* @__PURE__ */ N({
|
|
19
19
|
name: "AppSetting",
|
|
20
20
|
components: {
|
|
21
|
-
SettingThemes: t(() => import("./SettingThemes-
|
|
22
|
-
SettingsMode: t(() => import("./SettingMode-
|
|
23
|
-
SettingWidthMode: t(() => import("./SettingWidthMode-
|
|
24
|
-
SettingEnableTransition: t(() => import("./SettingEnableTransition-
|
|
25
|
-
SettingMenu: t(() => import("./SettingMenu-
|
|
26
|
-
SettingTopbar: t(() => import("./SettingTopbar-
|
|
27
|
-
SettingTabbar: t(() => import("./SettingTabbar-
|
|
28
|
-
SettingToolbar: t(() => import("./SettingToolbar-
|
|
29
|
-
SettingBreadcrumb: t(() => import("./SettingBreadcrumb-
|
|
30
|
-
SettingPage: t(() => import("./SettingPage-
|
|
31
|
-
SettingNavSearch: t(() => import("./SettingNavSearch
|
|
32
|
-
SettingCopyright: t(() => import("./SettingCopyright-
|
|
33
|
-
SettingHome: t(() => import("./SettingHome-
|
|
34
|
-
SettingOther: t(() => import("./SettingOther-
|
|
21
|
+
SettingThemes: t(() => import("./SettingThemes-ComNCP3P.js")),
|
|
22
|
+
SettingsMode: t(() => import("./SettingMode-bh3I8UBZ.js")),
|
|
23
|
+
SettingWidthMode: t(() => import("./SettingWidthMode-wzTMq96A.js")),
|
|
24
|
+
SettingEnableTransition: t(() => import("./SettingEnableTransition-DQJozSZH.js")),
|
|
25
|
+
SettingMenu: t(() => import("./SettingMenu-DEQRAtWl.js")),
|
|
26
|
+
SettingTopbar: t(() => import("./SettingTopbar-BcO5Hcxm.js")),
|
|
27
|
+
SettingTabbar: t(() => import("./SettingTabbar-BETdKJxz.js")),
|
|
28
|
+
SettingToolbar: t(() => import("./SettingToolbar-D0DTBbbb.js")),
|
|
29
|
+
SettingBreadcrumb: t(() => import("./SettingBreadcrumb-CBWdS_nO.js")),
|
|
30
|
+
SettingPage: t(() => import("./SettingPage-B2_SNyn5.js")),
|
|
31
|
+
SettingNavSearch: t(() => import("./SettingNavSearch-iYc-eRzY.js")),
|
|
32
|
+
SettingCopyright: t(() => import("./SettingCopyright-D5Jhdu1J.js")),
|
|
33
|
+
SettingHome: t(() => import("./SettingHome-DAwn9Ypx.js")),
|
|
34
|
+
SettingOther: t(() => import("./SettingOther-C2TS6okv.js"))
|
|
35
35
|
},
|
|
36
36
|
__name: "AppSetting",
|
|
37
37
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as c, watch as u, createElementBlock as n, openBlock as a, Fragment as s, renderList as m, normalizeClass as p, createBlock as b, unref as f, createTextVNode as h, toDisplayString as k } from "vue";
|
|
2
|
-
import { cC as y } from "./index-
|
|
2
|
+
import { cC as y } from "./index-BXLF9xfN.js";
|
|
3
3
|
import "pinia";
|
|
4
4
|
const _ = { class: "inline-flex select-none items-center justify-center of-hidden rounded-md bg-stone-3 dark:bg-stone-7" }, g = ["disabled", "onClick"], w = /* @__PURE__ */ c({
|
|
5
5
|
__name: "HCheckList",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as u, computed as c, createElementBlock as m, openBlock as r, withDirectives as i, createElementVNode as n, isRef as _, vModelCheckbox as f, unref as b } from "vue";
|
|
2
|
-
import { b as g } from "./index-
|
|
2
|
+
import { b as g } from "./index-BXLF9xfN.js";
|
|
3
3
|
const V = { class: "switch" }, k = /* @__PURE__ */ u({
|
|
4
4
|
__name: "HToggle",
|
|
5
5
|
props: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { _ as re } from "./HCheckList.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { y as ue, A as me, e as E, E as ce, aG as be, P as k, g as pe, cF as ye, cG as ge, cH as ve, cI as fe, cv as he, aY as we, cJ as Me, cw as Pe, m as Oe, ap as Ce, i as $e, p as ke, X as xe, j as ne, bb as Se, cK as Ve, cL as Te, cs as _e, cg as Ie, cM as Be, N as Ue, b as Ae } from "./index-
|
|
3
|
-
import { _ as He } from "./HToggle-
|
|
1
|
+
import { _ as re } from "./HCheckList.vue_vue_type_script_setup_true_lang-CHzkJth7.js";
|
|
2
|
+
import { y as ue, A as me, e as E, E as ce, aG as be, P as k, g as pe, cF as ye, cG as ge, cH as ve, cI as fe, cv as he, aY as we, cJ as Me, cw as Pe, m as Oe, ap as Ce, i as $e, p as ke, X as xe, j as ne, bb as Se, cK as Ve, cL as Te, cs as _e, cg as Ie, cM as Be, N as Ue, b as Ae } from "./index-BXLF9xfN.js";
|
|
3
|
+
import { _ as He } from "./HToggle-DpDYLh8y.js";
|
|
4
4
|
import { defineComponent as te, shallowRef as U, computed as K, createVNode as a, Transition as Ee, withDirectives as ze, vShow as Le, ref as Re, createElementBlock as d, openBlock as r, createCommentVNode as u, createElementVNode as s, unref as e, isRef as je, Fragment as De, renderList as Fe, normalizeClass as v, normalizeStyle as Ne, withCtx as b, createTextVNode as V } from "vue";
|
|
5
5
|
import { getThemes as Ge } from "@pubinfo/config/themes";
|
|
6
6
|
import { E as X, a as J } from "./right-aIVrXLnr.js";
|
|
7
7
|
import { R as A } from "./question-line-DCMVyZ3e.js";
|
|
8
|
-
import { p as $ } from "./pick-
|
|
8
|
+
import { p as $ } from "./pick-BvMRfqim.js";
|
|
9
9
|
const H = (i, o, n, p, f) => ({
|
|
10
10
|
backgroundColor: i,
|
|
11
11
|
border: `${p.lineWidth}px ${p.lineType} ${o}`,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { _ as r } from "./HDivider.vue_vue_type_script_setup_true_lang-DIHR-9Yv.js";
|
|
2
|
-
import { _ as p } from "./HCheckList.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { _ } from "./HToggle-
|
|
2
|
+
import { _ as p } from "./HCheckList.vue_vue_type_script_setup_true_lang-CHzkJth7.js";
|
|
3
|
+
import { _ } from "./HToggle-DpDYLh8y.js";
|
|
4
4
|
import { defineComponent as b, toRefs as f, createBlock as c, openBlock as g, withCtx as V, createElementVNode as n, createVNode as s, unref as t } from "vue";
|
|
5
|
-
import { cK as v } from "./index-
|
|
5
|
+
import { cK as v } from "./index-BXLF9xfN.js";
|
|
6
6
|
const M = { class: "setting-item" }, x = { class: "setting-item" }, B = { class: "setting-item" }, $ = /* @__PURE__ */ b({
|
|
7
7
|
name: "SettingBreadcrumb",
|
|
8
8
|
__name: "SettingBreadcrumb",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { _ as u } from "./HDivider.vue_vue_type_script_setup_true_lang-DIHR-9Yv.js";
|
|
2
2
|
import { _ as p } from "./HInput.vue_vue_type_script_setup_true_lang-DBqCXRnn.js";
|
|
3
|
-
import { _ as r } from "./HToggle-
|
|
3
|
+
import { _ as r } from "./HToggle-DpDYLh8y.js";
|
|
4
4
|
import { defineComponent as b, toRef as V, createBlock as g, openBlock as _, withCtx as f, createElementVNode as o, createVNode as n, unref as t } from "vue";
|
|
5
|
-
import { cK as v } from "./index-
|
|
5
|
+
import { cK as v } from "./index-BXLF9xfN.js";
|
|
6
6
|
const y = { class: "setting-item" }, C = { class: "setting-item" }, U = { class: "setting-item" }, x = { class: "setting-item" }, w = { class: "setting-item" }, D = /* @__PURE__ */ b({
|
|
7
7
|
name: "SettingCopyright",
|
|
8
8
|
__name: "SettingCopyright",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as g } from "./HDivider.vue_vue_type_script_setup_true_lang-DIHR-9Yv.js";
|
|
2
|
-
import { cK as k, cM as x, b as C } from "./index-
|
|
3
|
-
import { _ as T } from "./HToggle-
|
|
2
|
+
import { cK as k, cM as x, b as C } from "./index-BXLF9xfN.js";
|
|
3
|
+
import { _ as T } from "./HToggle-DpDYLh8y.js";
|
|
4
4
|
import { defineComponent as V, toRefs as h, reactive as E, createBlock as c, openBlock as o, withCtx as l, createElementVNode as d, createElementBlock as r, createCommentVNode as y, createVNode as H, unref as s, isRef as S, Fragment as B, renderList as M, normalizeClass as N } from "vue";
|
|
5
5
|
const $ = { class: "flex items-center justify-center pb-4" }, L = {
|
|
6
6
|
key: 0,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as p } from "./HDivider.vue_vue_type_script_setup_true_lang-DIHR-9Yv.js";
|
|
2
2
|
import { _ as u } from "./HInput.vue_vue_type_script_setup_true_lang-DBqCXRnn.js";
|
|
3
|
-
import { _ as c } from "./HToggle-
|
|
4
|
-
import { cK as f, cM as g } from "./index-
|
|
3
|
+
import { _ as c } from "./HToggle-DpDYLh8y.js";
|
|
4
|
+
import { cK as f, cM as g } from "./index-BXLF9xfN.js";
|
|
5
5
|
import { defineComponent as V, toRefs as x, createBlock as H, openBlock as b, withCtx as i, createElementVNode as n, createVNode as s, createTextVNode as v, unref as e } from "vue";
|
|
6
6
|
import { R as C } from "./question-line-DCMVyZ3e.js";
|
|
7
7
|
const N = { class: "setting-item" }, R = { class: "label" }, S = { class: "setting-item" }, K = /* @__PURE__ */ V({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as v } from "./HDivider.vue_vue_type_script_setup_true_lang-DIHR-9Yv.js";
|
|
2
|
-
import { _ as M } from "./HCheckList.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { _ } from "./HToggle-
|
|
4
|
-
import { cK as g, cM as y } from "./index-
|
|
2
|
+
import { _ as M } from "./HCheckList.vue_vue_type_script_setup_true_lang-CHzkJth7.js";
|
|
3
|
+
import { _ } from "./HToggle-DpDYLh8y.js";
|
|
4
|
+
import { cK as g, cM as y } from "./index-BXLF9xfN.js";
|
|
5
5
|
import { defineComponent as f, toRef as c, createBlock as U, openBlock as b, withCtx as i, createElementVNode as s, createElementBlock as C, createCommentVNode as k, createVNode as d, createTextVNode as a, unref as l } from "vue";
|
|
6
6
|
import { R as m } from "./question-line-DCMVyZ3e.js";
|
|
7
7
|
const x = { class: "setting-item" }, H = { class: "label" }, S = { class: "setting-item" }, O = { class: "label" }, B = { class: "setting-item" }, R = { class: "label" }, w = { class: "setting-item" }, A = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as u } from "./HDivider.vue_vue_type_script_setup_true_lang-DIHR-9Yv.js";
|
|
2
|
-
import { cK as v, cM as f, b } from "./index-
|
|
2
|
+
import { cK as v, cM as f, b } from "./index-BXLF9xfN.js";
|
|
3
3
|
import { defineComponent as g, toRef as k, reactive as x, createBlock as a, openBlock as n, withCtx as s, createElementVNode as o, createElementBlock as C, Fragment as M, renderList as S, unref as l, normalizeClass as h } from "vue";
|
|
4
4
|
const y = { class: "menu-mode" }, $ = ["onClick"], B = /* @__PURE__ */ g({
|
|
5
5
|
name: "SettingMode",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ } from "./HDivider.vue_vue_type_script_setup_true_lang-DIHR-9Yv.js";
|
|
2
|
-
import { _ as c } from "./HToggle-
|
|
3
|
-
import { cK as p, cM as u } from "./index-
|
|
2
|
+
import { _ as c } from "./HToggle-DpDYLh8y.js";
|
|
3
|
+
import { cK as p, cM as u } from "./index-BXLF9xfN.js";
|
|
4
4
|
import { defineComponent as f, toRef as b, createBlock as g, openBlock as v, withCtx as i, createElementVNode as n, createVNode as s, createTextVNode as V, unref as t } from "vue";
|
|
5
5
|
import { R as S } from "./question-line-DCMVyZ3e.js";
|
|
6
6
|
const x = { class: "setting-item" }, H = { class: "label" }, N = { class: "setting-item" }, $ = /* @__PURE__ */ f({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as c } from "./HDivider.vue_vue_type_script_setup_true_lang-DIHR-9Yv.js";
|
|
2
2
|
import { _ as x } from "./HInput.vue_vue_type_script_setup_true_lang-DBqCXRnn.js";
|
|
3
|
-
import { cK as b, cM as S } from "./index-
|
|
4
|
-
import { _ as H } from "./HToggle-
|
|
3
|
+
import { cK as b, cM as S } from "./index-BXLF9xfN.js";
|
|
4
|
+
import { _ as H } from "./HToggle-DpDYLh8y.js";
|
|
5
5
|
import { defineComponent as R, toRefs as T, createBlock as U, openBlock as C, withCtx as s, createElementVNode as o, createVNode as t, unref as n, isRef as i, createTextVNode as p } from "vue";
|
|
6
6
|
import { R as f } from "./question-line-DCMVyZ3e.js";
|
|
7
7
|
const N = { class: "setting-item" }, P = { class: "setting-item" }, $ = { class: "label" }, k = { class: "setting-item" }, B = { class: "label" }, D = { class: "setting-item" }, O = { class: "label" }, j = /* @__PURE__ */ R({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as l } from "./HDivider.vue_vue_type_script_setup_true_lang-DIHR-9Yv.js";
|
|
2
|
-
import { _ as r } from "./HToggle-
|
|
2
|
+
import { _ as r } from "./HToggle-DpDYLh8y.js";
|
|
3
3
|
import { defineComponent as _, toRef as p, createBlock as c, openBlock as d, withCtx as u, createElementVNode as o, createVNode as g, unref as n } from "vue";
|
|
4
|
-
import { cK as f } from "./index-
|
|
4
|
+
import { cK as f } from "./index-BXLF9xfN.js";
|
|
5
5
|
const V = { class: "setting-item" }, C = /* @__PURE__ */ _({
|
|
6
6
|
name: "SettingPage",
|
|
7
7
|
__name: "SettingPage",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { _ as k } from "./HDivider.vue_vue_type_script_setup_true_lang-DIHR-9Yv.js";
|
|
2
|
-
import { cK as w, cM as y } from "./index-
|
|
2
|
+
import { cK as w, cM as y } from "./index-BXLF9xfN.js";
|
|
3
3
|
import { markRaw as x, createElementBlock as p, openBlock as r, createElementVNode as o, defineComponent as v, computed as $, resolveComponent as C, createBlock as V, mergeProps as h, withCtx as u, toDisplayString as g, unref as t, createVNode as a, Fragment as H, renderList as B, normalizeClass as M, toRef as S, createTextVNode as T } from "vue";
|
|
4
|
-
import { _ as U } from "./HCheckList.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { _ as L } from "./HToggle-
|
|
4
|
+
import { _ as U } from "./HCheckList.vue_vue_type_script_setup_true_lang-CHzkJth7.js";
|
|
5
|
+
import { _ as L } from "./HToggle-DpDYLh8y.js";
|
|
6
6
|
import { R as N } from "./question-line-DCMVyZ3e.js";
|
|
7
7
|
const R = {
|
|
8
8
|
viewBox: "0 0 32 32",
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { _ as T } from "./HDivider.vue_vue_type_script_setup_true_lang-DIHR-9Yv.js";
|
|
2
2
|
import { markRaw as g, createElementBlock as r, openBlock as n, createElementVNode as s, defineComponent as k, useModel as V, withDirectives as S, createStaticVNode as $, vModelCheckbox as w, toRef as D, computed as B, createBlock as N, withCtx as j, createVNode as u, unref as o, isRef as L, Fragment as b, renderList as _, normalizeClass as M, normalizeStyle as h, toDisplayString as z } from "vue";
|
|
3
3
|
import { getThemes as F } from "@pubinfo/config/themes";
|
|
4
|
-
import { b as x, cS as R, cK as A } from "./index-
|
|
4
|
+
import { b as x, cS as R, cK as A } from "./index-BXLF9xfN.js";
|
|
5
|
+
import "pinia";
|
|
5
6
|
const E = {
|
|
6
7
|
viewBox: "-5 -2 24 24",
|
|
7
8
|
width: "1.2em",
|
|
8
9
|
height: "1.2em"
|
|
9
10
|
};
|
|
10
|
-
function H(
|
|
11
|
+
function H(p, e) {
|
|
11
12
|
return n(), r("svg", E, [...e[0] || (e[0] = [
|
|
12
13
|
s("path", {
|
|
13
14
|
fill: "currentColor",
|
|
@@ -20,7 +21,7 @@ const I = g({ name: "jam-bookmark-f", render: H }), U = {
|
|
|
20
21
|
width: "1.2em",
|
|
21
22
|
height: "1.2em"
|
|
22
23
|
};
|
|
23
|
-
function W(
|
|
24
|
+
function W(p, e) {
|
|
24
25
|
return n(), r("svg", U, [...e[0] || (e[0] = [
|
|
25
26
|
s("path", {
|
|
26
27
|
fill: "currentColor",
|
|
@@ -42,13 +43,13 @@ const J = g({ name: "pajamas-check-circle-filled", render: W }), K = {
|
|
|
42
43
|
modelModifiers: {}
|
|
43
44
|
},
|
|
44
45
|
emits: ["update:modelValue"],
|
|
45
|
-
setup(
|
|
46
|
-
const e = V(
|
|
46
|
+
setup(p) {
|
|
47
|
+
const e = V(p, "modelValue");
|
|
47
48
|
return (v, l) => (n(), r("div", K, [
|
|
48
49
|
s("div", O, [
|
|
49
50
|
S(s("input", {
|
|
50
51
|
id: "dn",
|
|
51
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
52
|
+
"onUpdate:modelValue": l[0] || (l[0] = (f) => e.value = f),
|
|
52
53
|
type: "checkbox",
|
|
53
54
|
class: "dn"
|
|
54
55
|
}, null, 512), [
|
|
@@ -65,8 +66,8 @@ const J = g({ name: "pajamas-check-circle-filled", render: W }), K = {
|
|
|
65
66
|
}, Y = { class: "theme-point" }, Z = { class: "explosion" }, ee = /* @__PURE__ */ k({
|
|
66
67
|
name: "SettingThemes",
|
|
67
68
|
__name: "SettingThemes",
|
|
68
|
-
setup(
|
|
69
|
-
const { isDark: e } = R(), { settingsStore: v } = A(), l = D(v.settings, "app"),
|
|
69
|
+
setup(p) {
|
|
70
|
+
const { isDark: e } = R(), { settingsStore: v } = A(), l = D(v.settings, "app"), f = [
|
|
70
71
|
"--ui-primary",
|
|
71
72
|
"--ui-text",
|
|
72
73
|
"--g-bg",
|
|
@@ -76,7 +77,7 @@ const J = g({ name: "pajamas-check-circle-filled", render: W }), K = {
|
|
|
76
77
|
], y = B(() => {
|
|
77
78
|
const c = F();
|
|
78
79
|
return Object.keys(c).map((t) => {
|
|
79
|
-
const i = c[t], a =
|
|
80
|
+
const i = c[t], a = f.map((m) => i[m].startsWith("#") ? i[m] : `rgb(${i[m]})`), d = c[t].label;
|
|
80
81
|
return {
|
|
81
82
|
label: t,
|
|
82
83
|
value: i,
|
|
@@ -136,7 +137,7 @@ const J = g({ name: "pajamas-check-circle-filled", render: W }), K = {
|
|
|
136
137
|
});
|
|
137
138
|
};
|
|
138
139
|
}
|
|
139
|
-
}),
|
|
140
|
+
}), re = /* @__PURE__ */ x(ee, [["__scopeId", "data-v-0ba0f196"]]);
|
|
140
141
|
export {
|
|
141
|
-
|
|
142
|
+
re as default
|
|
142
143
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as f } from "./HDivider.vue_vue_type_script_setup_true_lang-DIHR-9Yv.js";
|
|
2
|
-
import { _ as c } from "./HToggle-
|
|
3
|
-
import { cK as b, cM as V } from "./index-
|
|
2
|
+
import { _ as c } from "./HToggle-DpDYLh8y.js";
|
|
3
|
+
import { cK as b, cM as V } from "./index-BXLF9xfN.js";
|
|
4
4
|
import { defineComponent as g, toRef as v, createBlock as x, openBlock as _, withCtx as i, createElementVNode as s, createElementBlock as C, createCommentVNode as N, createVNode as o, createTextVNode as m, unref as t } from "vue";
|
|
5
5
|
import { R as r } from "./question-line-DCMVyZ3e.js";
|
|
6
6
|
const R = { class: "setting-item" }, S = { class: "label" }, T = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as c } from "./HDivider.vue_vue_type_script_setup_true_lang-DIHR-9Yv.js";
|
|
2
|
-
import { _ as u } from "./HToggle-
|
|
3
|
-
import { cK as b, cM as f } from "./index-
|
|
4
|
-
import { _ as g } from "./HCheckList.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as u } from "./HToggle-DpDYLh8y.js";
|
|
3
|
+
import { cK as b, cM as f } from "./index-BXLF9xfN.js";
|
|
4
|
+
import { _ as g } from "./HCheckList.vue_vue_type_script_setup_true_lang-CHzkJth7.js";
|
|
5
5
|
import { defineComponent as T, toRefs as V, createBlock as v, openBlock as x, withCtx as l, createElementVNode as n, createVNode as s, unref as t, createTextVNode as k } from "vue";
|
|
6
6
|
import { R as C } from "./question-line-DCMVyZ3e.js";
|
|
7
7
|
const H = { class: "setting-item" }, w = { class: "setting-item" }, N = { class: "label" }, D = /* @__PURE__ */ T({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as v } from "./HDivider.vue_vue_type_script_setup_true_lang-DIHR-9Yv.js";
|
|
2
|
-
import { cK as u, cM as k, b as w } from "./index-
|
|
2
|
+
import { cK as u, cM as k, b as w } from "./index-BXLF9xfN.js";
|
|
3
3
|
import { defineComponent as x, toRef as g, reactive as b, createBlock as o, openBlock as t, withCtx as n, createElementVNode as s, createElementBlock as d, Fragment as r, renderList as C, unref as c, normalizeClass as M, createCommentVNode as E, createVNode as l } from "vue";
|
|
4
4
|
import { E as y, a as B } from "./right-aIVrXLnr.js";
|
|
5
5
|
const S = { class: "app-width-mode" }, H = ["onClick"], N = /* @__PURE__ */ x({
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Serializer, SyncedPersistedStateOptions } from './persistedstate';
|
|
2
2
|
export declare function customSerializer(): Serializer;
|
|
3
|
-
export declare function createPersistedStateOptions():
|
|
3
|
+
export declare function createPersistedStateOptions(): SyncedPersistedStateOptions;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PiniaPluginContext } from 'pinia';
|
|
2
|
+
import { SyncedPersistedStateOptions } from './types';
|
|
3
|
+
export type { PersistenceOptions, Serializer, StorageLike, SyncedPersistedStateOptions, } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* 解析存储区域类型
|
|
6
|
+
* @param storage - Storage 实例
|
|
7
|
+
* @returns 存储区域类型或 undefined
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* 创建同步持久化状态插件
|
|
11
|
+
* 该插件支持跨标签页状态同步,并提供完整的持久化控制
|
|
12
|
+
* @param options - 插件配置选项
|
|
13
|
+
* @returns Pinia 插件函数
|
|
14
|
+
*/
|
|
15
|
+
export declare function createSyncedPersistedState(options?: SyncedPersistedStateOptions): (context: PiniaPluginContext) => void;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { PiniaPluginContext, StateTree } from 'pinia';
|
|
2
|
+
/**
|
|
3
|
+
* 存储区域类型:本地存储或会话存储
|
|
4
|
+
*/
|
|
5
|
+
export type StorageArea = 'local' | 'session';
|
|
6
|
+
/**
|
|
7
|
+
* 类似 Storage 的接口,用于抽象存储操作
|
|
8
|
+
*/
|
|
9
|
+
export interface StorageLike {
|
|
10
|
+
/** 获取指定键的值 */
|
|
11
|
+
getItem: (key: string) => string | null;
|
|
12
|
+
/** 设置指定键的值 */
|
|
13
|
+
setItem: (key: string, value: string) => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 序列化器接口,用于状态的序列化和反序列化
|
|
17
|
+
*/
|
|
18
|
+
export interface Serializer {
|
|
19
|
+
/** 将状态对象序列化为字符串 */
|
|
20
|
+
serialize: (data: StateTree) => string;
|
|
21
|
+
/** 将字符串反序列化为状态对象 */
|
|
22
|
+
deserialize: (data: string) => StateTree;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 持久化配置接口
|
|
26
|
+
*/
|
|
27
|
+
export interface Persistence<State extends StateTree = StateTree> {
|
|
28
|
+
/** 存储键名 */
|
|
29
|
+
key: string;
|
|
30
|
+
/** 是否开启调试模式 */
|
|
31
|
+
debug: boolean;
|
|
32
|
+
/** 存储实例 */
|
|
33
|
+
storage: StorageLike;
|
|
34
|
+
/** 序列化器 */
|
|
35
|
+
serializer: Serializer;
|
|
36
|
+
/** 恢复数据前的钩子 */
|
|
37
|
+
beforeHydrate?: (context: PiniaPluginContext) => void;
|
|
38
|
+
/** 恢复数据后的钩子 */
|
|
39
|
+
afterHydrate?: (context: PiniaPluginContext) => void;
|
|
40
|
+
/** 要持久化的状态字段(白名单) */
|
|
41
|
+
pick?: string[];
|
|
42
|
+
/** 不需要持久化的状态字段(黑名单) */
|
|
43
|
+
omit?: string[];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* 插件基础配置选项
|
|
47
|
+
*/
|
|
48
|
+
export interface BasePluginOptions {
|
|
49
|
+
/** 存储实例 */
|
|
50
|
+
storage?: StorageLike;
|
|
51
|
+
/** 序列化器 */
|
|
52
|
+
serializer?: Serializer;
|
|
53
|
+
/** 是否开启调试模式 */
|
|
54
|
+
debug?: boolean;
|
|
55
|
+
/** 存储键名生成函数 */
|
|
56
|
+
key?: (storeKey: string) => string;
|
|
57
|
+
/** 是否自动为所有 store 启用持久化 */
|
|
58
|
+
auto?: boolean;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* 持久化选项类型(提供给 store 使用)
|
|
62
|
+
*/
|
|
63
|
+
export type PersistenceOptions<State extends StateTree = StateTree> = Partial<Omit<Persistence<State>, 'key'>> & {
|
|
64
|
+
/** 自定义存储键名 */
|
|
65
|
+
key?: string;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* 扩展的持久化选项,包含存储区域配置
|
|
69
|
+
*/
|
|
70
|
+
export type ExtendedPersistenceOptions<State extends StateTree = StateTree> = PersistenceOptions<State> & {
|
|
71
|
+
/** 存储区域类型 */
|
|
72
|
+
storageArea?: StorageArea;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* 自定义存储事件详情
|
|
76
|
+
*/
|
|
77
|
+
export interface CustomStorageEventDetail {
|
|
78
|
+
/** 变化的键名,null 表示清空操作 */
|
|
79
|
+
key: string | null;
|
|
80
|
+
/** 新值 */
|
|
81
|
+
newValue: string | null;
|
|
82
|
+
/** 旧值 */
|
|
83
|
+
oldValue: string | null;
|
|
84
|
+
/** 存储区域 */
|
|
85
|
+
storageArea: StorageArea;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* 标准化后的全局配置选项
|
|
89
|
+
*/
|
|
90
|
+
export interface NormalizedGlobalOptions {
|
|
91
|
+
/** 键名生成函数 */
|
|
92
|
+
key: (storeKey: string) => string;
|
|
93
|
+
/** 序列化器 */
|
|
94
|
+
serializer: Serializer;
|
|
95
|
+
/** 存储实例 */
|
|
96
|
+
storage?: StorageLike;
|
|
97
|
+
/** 存储区域 */
|
|
98
|
+
storageArea?: StorageArea;
|
|
99
|
+
/** 是否开启调试 */
|
|
100
|
+
debug: boolean;
|
|
101
|
+
/** 是否自动持久化 */
|
|
102
|
+
auto: boolean;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* 持久化条目,包含完整的配置信息
|
|
106
|
+
*/
|
|
107
|
+
export interface PersistenceEntry<State extends StateTree = StateTree> {
|
|
108
|
+
/** 存储键名 */
|
|
109
|
+
key: string;
|
|
110
|
+
/** 存储实例 */
|
|
111
|
+
storage: StorageLike;
|
|
112
|
+
/** 序列化器 */
|
|
113
|
+
serializer: Serializer;
|
|
114
|
+
/** 存储区域 */
|
|
115
|
+
storageArea?: StorageArea;
|
|
116
|
+
/** 完整的存储键名(用于同步监听) */
|
|
117
|
+
fullKey?: string;
|
|
118
|
+
/** 是否开启调试 */
|
|
119
|
+
debug: boolean;
|
|
120
|
+
/** 恢复前钩子 */
|
|
121
|
+
beforeHydrate?: (context: PiniaPluginContext) => void;
|
|
122
|
+
/** 恢复后钩子 */
|
|
123
|
+
afterHydrate?: (context: PiniaPluginContext) => void;
|
|
124
|
+
/** 白名单字段 */
|
|
125
|
+
pick?: PersistenceOptions<State>['pick'];
|
|
126
|
+
/** 黑名单字段 */
|
|
127
|
+
omit?: PersistenceOptions<State>['omit'];
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* 存储绑定,关联 store 和持久化配置
|
|
131
|
+
*/
|
|
132
|
+
export interface StorageBinding<State extends StateTree = StateTree> {
|
|
133
|
+
/** Pinia 插件上下文 */
|
|
134
|
+
context: PiniaPluginContext;
|
|
135
|
+
/** 持久化条目 */
|
|
136
|
+
entry: PersistenceEntry<State>;
|
|
137
|
+
/** 跳过持久化次数(用于避免循环) */
|
|
138
|
+
skipPersist: number;
|
|
139
|
+
/** 停止订阅的函数 */
|
|
140
|
+
stopSubscription: () => void;
|
|
141
|
+
/** 初始状态快照 */
|
|
142
|
+
initialState: StateTree;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* 同步持久化状态插件的配置选项
|
|
146
|
+
*/
|
|
147
|
+
export interface SyncedPersistedStateOptions extends BasePluginOptions {
|
|
148
|
+
/** 存储区域 */
|
|
149
|
+
storageArea?: StorageArea;
|
|
150
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CustomStorageEventDetail, StorageArea } from './types';
|
|
2
|
+
/** 自定义事件名称,用于跨标签页通信 */
|
|
3
|
+
export declare const CUSTOM_EVENT = "pubinfo:persistedstate:local";
|
|
4
|
+
/**
|
|
5
|
+
* 调度微任务,优先使用原生 queueMicrotask
|
|
6
|
+
*/
|
|
7
|
+
export declare const scheduleMicrotask: typeof queueMicrotask;
|
|
8
|
+
/**
|
|
9
|
+
* 解析存储区域类型
|
|
10
|
+
* @param storage - Storage 实例
|
|
11
|
+
* @returns 存储区域类型或 undefined
|
|
12
|
+
*/
|
|
13
|
+
export declare function resolveStorageArea(storage: Storage | null | undefined): StorageArea | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* 分发本地 storage 变更事件
|
|
16
|
+
*/
|
|
17
|
+
export declare function dispatchLocalMutation(detail: CustomStorageEventDetail): void;
|
package/dist/core/ctx.d.ts
CHANGED
package/dist/core/interface.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AdapterCreateOptions, AlovaAxiosRequestConfig } from '@alova/adapter-axios';
|
|
2
2
|
import { Alova, AlovaGenerics, AlovaOptions, Method, ResponseCompleteHandler, ResponseErrorHandler } from 'alova';
|
|
3
3
|
import { AxiosResponse, AxiosResponseHeaders } from 'axios';
|
|
4
|
-
import { Pinia } from 'pinia';
|
|
4
|
+
import { Pinia, StateTree } from 'pinia';
|
|
5
5
|
import { App, Component } from 'vue';
|
|
6
6
|
import { Router, RouterOptions as VueRouterOptions } from 'vue-router';
|
|
7
7
|
import { MenuData, RouteData } from '../features';
|
|
@@ -79,6 +79,10 @@ export interface Hooks {
|
|
|
79
79
|
'menu:transform': (menuData: MenuData[]) => MenuData[] | Promise<MenuData[]>;
|
|
80
80
|
/** 路由数据转换 */
|
|
81
81
|
'route:transform': (routeData: RouteData[]) => RouteData[] | Promise<RouteData[]>;
|
|
82
|
+
/** Pinia 持久化写入前处理(需同步返回) */
|
|
83
|
+
'pinia:persist:write': (payload: PiniaPersistWriteHookPayload) => PiniaPersistWriteHookPayload;
|
|
84
|
+
/** Pinia 持久化读取前处理(需同步返回) */
|
|
85
|
+
'pinia:persist:read': (payload: PiniaPersistReadHookPayload) => PiniaPersistReadHookPayload;
|
|
82
86
|
}
|
|
83
87
|
type Fn = () => void;
|
|
84
88
|
export type RespondedHandler<AG extends AlovaGenerics> = (response: AG['Response'], methodInstance: Method<AG>, stop: Fn) => any;
|
|
@@ -87,4 +91,25 @@ export interface RespondedHandlerRecord<AG extends AlovaGenerics> {
|
|
|
87
91
|
onError?: ResponseErrorHandler<AG>;
|
|
88
92
|
onComplete?: ResponseCompleteHandler<AG>;
|
|
89
93
|
}
|
|
94
|
+
export interface PiniaPersistHookBasePayload {
|
|
95
|
+
storeId: string;
|
|
96
|
+
/** 实际存储键 */
|
|
97
|
+
key: string;
|
|
98
|
+
/** local 或 session */
|
|
99
|
+
storageArea?: 'local' | 'session';
|
|
100
|
+
/** 仅在 localStorage 同步时可用 */
|
|
101
|
+
fullKey?: string;
|
|
102
|
+
}
|
|
103
|
+
export interface PiniaPersistWriteHookPayload extends PiniaPersistHookBasePayload {
|
|
104
|
+
/** 序列化后的字符串 */
|
|
105
|
+
value: string;
|
|
106
|
+
/** 过滤后的状态对象 */
|
|
107
|
+
state: StateTree;
|
|
108
|
+
}
|
|
109
|
+
export interface PiniaPersistReadHookPayload extends PiniaPersistHookBasePayload {
|
|
110
|
+
/** 从存储读取的原始字符串 */
|
|
111
|
+
value: string;
|
|
112
|
+
/** 实际读取数据的键 */
|
|
113
|
+
sourceKey?: string;
|
|
114
|
+
}
|
|
90
115
|
export {};
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
import { Pinia } from 'pinia';
|
|
1
2
|
import { PartyLoginConfig } from '../components/PartyLogin/type';
|
|
3
|
+
export { PartyLoginConfig, };
|
|
4
|
+
export interface UsePartyLoginOptions {
|
|
5
|
+
execute?: boolean;
|
|
6
|
+
pinia?: Pinia;
|
|
7
|
+
}
|
|
2
8
|
/**
|
|
3
9
|
* Party Login Hook
|
|
4
10
|
* 处理第三方登录的多步骤流程
|
|
5
11
|
* @param config Party Login 配置
|
|
6
12
|
* @param targetUrl 目标跳转 URL (来自 meta.link 或 meta.iframe)
|
|
7
13
|
*/
|
|
8
|
-
export declare function usePartyLogin(config: PartyLoginConfig, targetUrl: string): Promise<{
|
|
14
|
+
export declare function usePartyLogin(config: PartyLoginConfig, targetUrl: string, options?: UsePartyLoginOptions): Promise<{
|
|
9
15
|
url: import('vue').Ref<string, string>;
|
|
10
16
|
loading: import('vue').Ref<boolean, boolean>;
|
|
11
17
|
error: import('vue').Ref<Error | null, Error | null>;
|