delta-comic-core 0.0.3 → 0.0.4
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/bundle.css +1 -1
- package/dist/bundle.js +136 -279
- package/dist/bundle.js.map +1 -1
- package/dist/bundle.umd.cjs +2 -2
- package/dist/bundle.umd.cjs.map +1 -1
- package/dist/config/index.d.ts +46 -29
- package/dist/depends/index.d.ts +24 -0
- package/dist/index.d.ts +42 -1324
- package/dist/pack.tgz +0 -0
- package/dist/plugin/define.d.ts +10 -1
- package/dist/plugin/index.d.ts +5 -1
- package/dist/struct/content.d.ts +6 -5
- package/package.json +3 -3
- package/dist/components/content/unitCard.vue.d.ts +0 -2503
package/dist/bundle.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment, Teleport, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, customRef, defineComponent, getCurrentInstance, getCurrentScope, guardReactiveProps, hasInjectionContext, inject, isRef, isVNode, markRaw, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeUnmount, onBeforeUpdate, onDeactivated, onMounted, onScopeDispose, onUnmounted, openBlock, provide, reactive, readonly, ref, renderList, renderSlot, resolveDynamicComponent, shallowReactive, shallowReadonly, shallowRef, toDisplayString, toRef, toValue, unref, useCssVars, useModel, useTemplateRef, vShow, watch, watchEffect, withCtx, withDirectives, withModifiers } from "vue";
|
|
2
|
-
import { onBeforeRouteLeave,
|
|
3
|
-
import { NButton, NEmpty, NIcon, NImage,
|
|
2
|
+
import { onBeforeRouteLeave, useRoute, useRouter } from "vue-router";
|
|
3
|
+
import { NButton, NEmpty, NIcon, NImage, NResult, NVirtualList, useThemeVars } from "naive-ui";
|
|
4
4
|
import { showImagePreview } from "vant";
|
|
5
5
|
import { defineStore } from "pinia";
|
|
6
6
|
import axios, { getAdapter, isAxiosError, isCancel } from "axios";
|
|
@@ -1080,13 +1080,13 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1080
1080
|
}), K();
|
|
1081
1081
|
};
|
|
1082
1082
|
isHidden(a) ? nextTick().then(r) : r();
|
|
1083
|
-
},
|
|
1084
|
-
!e.touchable || n.touches.length > 1 || (l.start(n), c = !1,
|
|
1085
|
-
},
|
|
1083
|
+
}, ul = () => J(s.active), dl, fl = (n) => {
|
|
1084
|
+
!e.touchable || n.touches.length > 1 || (l.start(n), c = !1, dl = Date.now(), W(), k());
|
|
1085
|
+
}, pl = (r) => {
|
|
1086
1086
|
e.touchable && s.swiping && (l.move(r), S.value && (!e.loop && (s.active === 0 && h.value > 0 || s.active === p.value - 1 && h.value < 0) || (preventDefault(r, e.stopPropagation), O({ offset: h.value }), c ||= (n("dragStart", { index: b.value }), !0))));
|
|
1087
|
-
},
|
|
1087
|
+
}, ml = () => {
|
|
1088
1088
|
if (!e.touchable || !s.swiping) return;
|
|
1089
|
-
let r = Date.now() -
|
|
1089
|
+
let r = Date.now() - dl, i = h.value / r;
|
|
1090
1090
|
if ((Math.abs(i) > .25 || Math.abs(h.value) > m.value / 2) && S.value) {
|
|
1091
1091
|
let n = e.vertical ? l.offsetY.value : l.offsetX.value, r = 0;
|
|
1092
1092
|
r = e.loop ? n > 0 ? h.value > 0 ? -1 : 1 : 0 : -Math[h.value > 0 ? "ceil" : "floor"](h.value / m.value), O({
|
|
@@ -1095,7 +1095,7 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1095
1095
|
});
|
|
1096
1096
|
} else h.value && O({ pace: 0 });
|
|
1097
1097
|
c = !1, s.swiping = !1, n("dragEnd", { index: b.value }), K();
|
|
1098
|
-
},
|
|
1098
|
+
}, hl = (n, r = {}) => {
|
|
1099
1099
|
k(), l.reset(), doubleRaf(() => {
|
|
1100
1100
|
let i;
|
|
1101
1101
|
i = e.loop && n === p.value ? s.active === 0 ? 0 : n : n % p.value, r.immediate ? doubleRaf(() => {
|
|
@@ -1105,25 +1105,25 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1105
1105
|
emitChange: !0
|
|
1106
1106
|
});
|
|
1107
1107
|
});
|
|
1108
|
-
},
|
|
1108
|
+
}, gl = (n, r) => {
|
|
1109
1109
|
let i = r === b.value;
|
|
1110
1110
|
return createVNode("i", {
|
|
1111
1111
|
style: i ? { backgroundColor: e.indicatorColor } : void 0,
|
|
1112
1112
|
class: bem$7("indicator", { active: i })
|
|
1113
1113
|
}, null);
|
|
1114
|
-
},
|
|
1114
|
+
}, _l = () => {
|
|
1115
1115
|
if (r.indicator) return r.indicator({
|
|
1116
1116
|
active: b.value,
|
|
1117
1117
|
total: p.value
|
|
1118
1118
|
});
|
|
1119
|
-
if (e.showIndicators && p.value > 1) return createVNode("div", { class: bem$7("indicators", { vertical: e.vertical }) }, [Array(p.value).fill("").map(
|
|
1119
|
+
if (e.showIndicators && p.value > 1) return createVNode("div", { class: bem$7("indicators", { vertical: e.vertical }) }, [Array(p.value).fill("").map(gl)]);
|
|
1120
1120
|
};
|
|
1121
1121
|
return useExpose({
|
|
1122
1122
|
prev: M,
|
|
1123
1123
|
next: V,
|
|
1124
1124
|
state: s,
|
|
1125
|
-
resize:
|
|
1126
|
-
swipeTo:
|
|
1125
|
+
resize: ul,
|
|
1126
|
+
swipeTo: hl
|
|
1127
1127
|
}), f({
|
|
1128
1128
|
size: m,
|
|
1129
1129
|
props: e,
|
|
@@ -1134,19 +1134,19 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1134
1134
|
windowHeight,
|
|
1135
1135
|
() => e.width,
|
|
1136
1136
|
() => e.height
|
|
1137
|
-
],
|
|
1137
|
+
], ul), watch(usePageVisibility(), (e) => {
|
|
1138
1138
|
e === "visible" ? K() : W();
|
|
1139
|
-
}), onMounted(J), onActivated(() => J(s.active)), onPopupReopen(() => J(s.active)), onDeactivated(W), onBeforeUnmount(W), useEventListener("touchmove",
|
|
1139
|
+
}), onMounted(J), onActivated(() => J(s.active)), onPopupReopen(() => J(s.active)), onDeactivated(W), onBeforeUnmount(W), useEventListener("touchmove", pl, { target: o }), () => createVNode("div", {
|
|
1140
1140
|
ref: a,
|
|
1141
1141
|
class: bem$7()
|
|
1142
1142
|
}, [createVNode("div", {
|
|
1143
1143
|
ref: o,
|
|
1144
1144
|
style: C.value,
|
|
1145
1145
|
class: bem$7("track", { vertical: e.vertical }),
|
|
1146
|
-
onTouchstartPassive:
|
|
1147
|
-
onTouchend:
|
|
1148
|
-
onTouchcancel:
|
|
1149
|
-
}, [r.default?.call(r)]),
|
|
1146
|
+
onTouchstartPassive: fl,
|
|
1147
|
+
onTouchend: ml,
|
|
1148
|
+
onTouchcancel: ml
|
|
1149
|
+
}, [r.default?.call(r)]), _l()]);
|
|
1150
1150
|
}
|
|
1151
1151
|
})), [name$6, bem$6] = createNamespace("tabs"), stdin_default$5 = defineComponent({
|
|
1152
1152
|
name: name$6,
|
|
@@ -1283,26 +1283,26 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1283
1283
|
event: a,
|
|
1284
1284
|
disabled: s
|
|
1285
1285
|
});
|
|
1286
|
-
},
|
|
1286
|
+
}, ul = (e) => {
|
|
1287
1287
|
s = e.isFixed, n("scroll", e);
|
|
1288
|
-
},
|
|
1288
|
+
}, dl = (e) => {
|
|
1289
1289
|
nextTick(() => {
|
|
1290
1290
|
W(e), K(!0);
|
|
1291
1291
|
});
|
|
1292
|
-
},
|
|
1292
|
+
}, fl = () => {
|
|
1293
1293
|
for (let e = 0; e < b.length; e++) {
|
|
1294
1294
|
let { top: n } = useRect(b[e].$el);
|
|
1295
1295
|
if (n > M.value) return e === 0 ? 0 : e - 1;
|
|
1296
1296
|
}
|
|
1297
1297
|
return b.length - 1;
|
|
1298
|
-
},
|
|
1299
|
-
e.scrollspy && !o && H(
|
|
1300
|
-
},
|
|
1298
|
+
}, pl = () => {
|
|
1299
|
+
e.scrollspy && !o && H(fl());
|
|
1300
|
+
}, ml = () => {
|
|
1301
1301
|
if (e.type === "line" && b.length) return createVNode("div", {
|
|
1302
1302
|
class: bem$5("line"),
|
|
1303
1303
|
style: C.lineStyle
|
|
1304
1304
|
}, null);
|
|
1305
|
-
},
|
|
1305
|
+
}, hl = () => {
|
|
1306
1306
|
let { type: n, border: i, sticky: a } = e, o = [createVNode("div", {
|
|
1307
1307
|
ref: a ? void 0 : p,
|
|
1308
1308
|
class: [bem$5("wrap"), { [BORDER_TOP_BOTTOM]: n === "line" && i }]
|
|
@@ -1318,11 +1318,11 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1318
1318
|
}, [
|
|
1319
1319
|
r["nav-left"]?.call(r),
|
|
1320
1320
|
b.map((e) => e.renderTitle(J)),
|
|
1321
|
-
|
|
1321
|
+
ml(),
|
|
1322
1322
|
r["nav-right"]?.call(r)
|
|
1323
1323
|
])]), r["nav-bottom"]?.call(r)];
|
|
1324
1324
|
return a ? createVNode("div", { ref: p }, [o]) : o;
|
|
1325
|
-
},
|
|
1325
|
+
}, gl = () => {
|
|
1326
1326
|
B(), nextTick(() => {
|
|
1327
1327
|
var e;
|
|
1328
1328
|
z(!0), (e = m.value?.swipeRef.value) == null || e.resize();
|
|
@@ -1333,20 +1333,20 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1333
1333
|
e.duration,
|
|
1334
1334
|
e.lineWidth,
|
|
1335
1335
|
e.lineHeight
|
|
1336
|
-
], B), watch(windowWidth,
|
|
1336
|
+
], B), watch(windowWidth, gl), watch(() => e.active, (e) => {
|
|
1337
1337
|
e !== k.value && W(e);
|
|
1338
1338
|
}), watch(() => b.length, () => {
|
|
1339
1339
|
C.inited && (W(e.active), B(), nextTick(() => {
|
|
1340
1340
|
z(!0);
|
|
1341
1341
|
}));
|
|
1342
1342
|
}), useExpose({
|
|
1343
|
-
resize:
|
|
1344
|
-
scrollTo:
|
|
1343
|
+
resize: gl,
|
|
1344
|
+
scrollTo: dl
|
|
1345
1345
|
}), onActivated(B), onPopupReopen(B), onMountedOrActivated(() => {
|
|
1346
1346
|
W(e.active, !0), nextTick(() => {
|
|
1347
1347
|
C.inited = !0, p.value && (a = useRect(p.value).height), z(!0);
|
|
1348
1348
|
});
|
|
1349
|
-
}), useVisibilityChange(d, B), useEventListener("scroll",
|
|
1349
|
+
}), useVisibilityChange(d, B), useEventListener("scroll", pl, {
|
|
1350
1350
|
target: g,
|
|
1351
1351
|
passive: !0
|
|
1352
1352
|
}), S({
|
|
@@ -1364,8 +1364,8 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1364
1364
|
}, [e.showHeader ? e.sticky ? createVNode(Sticky, {
|
|
1365
1365
|
container: d.value,
|
|
1366
1366
|
offsetTop: j.value,
|
|
1367
|
-
onScroll:
|
|
1368
|
-
}, { default: () => [
|
|
1367
|
+
onScroll: ul
|
|
1368
|
+
}, { default: () => [hl()] }) : hl() : null, createVNode(stdin_default$5, {
|
|
1369
1369
|
ref: m,
|
|
1370
1370
|
count: b.length,
|
|
1371
1371
|
inited: C.inited,
|
|
@@ -2187,7 +2187,11 @@ function isEmpty(e) {
|
|
|
2187
2187
|
function isError(e) {
|
|
2188
2188
|
return getTag(e) === "[object Error]";
|
|
2189
2189
|
}
|
|
2190
|
-
var
|
|
2190
|
+
var loading_default = /* @__PURE__ */ ((e, n) => {
|
|
2191
|
+
let r = e.__vccOpts || e;
|
|
2192
|
+
for (let [e, i] of n) r[e] = i;
|
|
2193
|
+
return r;
|
|
2194
|
+
})(/* @__PURE__ */ defineComponent({
|
|
2191
2195
|
__name: "loading",
|
|
2192
2196
|
props: {
|
|
2193
2197
|
size: {},
|
|
@@ -2208,11 +2212,7 @@ var loading_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
2208
2212
|
}, 16);
|
|
2209
2213
|
};
|
|
2210
2214
|
}
|
|
2211
|
-
}),
|
|
2212
|
-
let r = e.__vccOpts || e;
|
|
2213
|
-
for (let [e, i] of n) r[e] = i;
|
|
2214
|
-
return r;
|
|
2215
|
-
}, loading_default = /* @__PURE__ */ __plugin_vue_export_helper_default(loading_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-472e17a3"]]);
|
|
2215
|
+
}), [["__scopeId", "data-v-472e17a3"]]);
|
|
2216
2216
|
const useGlobalVar = (e, n) => (window.$api.__core_lib__ ??= {})[n] ??= e;
|
|
2217
2217
|
var layout_exports = /* @__PURE__ */ __export({ useZIndex: () => useZIndex }), allLayers = useGlobalVar(shallowReactive([]), "utils/layers");
|
|
2218
2218
|
const useZIndex = (e) => {
|
|
@@ -2235,24 +2235,7 @@ var localProvidedStateMap = /* @__PURE__ */ new WeakMap(), injectLocal = /* @__N
|
|
|
2235
2235
|
let n = e[0], r = getCurrentInstance()?.proxy;
|
|
2236
2236
|
if (r == null && !hasInjectionContext()) throw Error("injectLocal must be called in setup");
|
|
2237
2237
|
return r && localProvidedStateMap.has(r) && n in localProvidedStateMap.get(r) ? localProvidedStateMap.get(r)[n] : inject(...e);
|
|
2238
|
-
};
|
|
2239
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2240
|
-
function makeDestructurable(e, n) {
|
|
2241
|
-
if (typeof Symbol < "u") {
|
|
2242
|
-
let r = { ...e };
|
|
2243
|
-
return Object.defineProperty(r, Symbol.iterator, {
|
|
2244
|
-
enumerable: !1,
|
|
2245
|
-
value() {
|
|
2246
|
-
let e = 0;
|
|
2247
|
-
return { next: () => ({
|
|
2248
|
-
value: n[e++],
|
|
2249
|
-
done: e > n.length
|
|
2250
|
-
}) };
|
|
2251
|
-
}
|
|
2252
|
-
}), r;
|
|
2253
|
-
} else return Object.assign([...n], e);
|
|
2254
|
-
}
|
|
2255
|
-
var isClient = typeof window < "u" && typeof document < "u";
|
|
2238
|
+
}, isClient = typeof window < "u" && typeof document < "u";
|
|
2256
2239
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
2257
2240
|
var notNullish = (e) => e != null, toString = Object.prototype.toString, isObject = (e) => toString.call(e) === "[object Object]", noop = () => {};
|
|
2258
2241
|
function toRef$1(...e) {
|
|
@@ -2334,11 +2317,6 @@ function pxValue(e) {
|
|
|
2334
2317
|
function toArray(e) {
|
|
2335
2318
|
return Array.isArray(e) ? e : [e];
|
|
2336
2319
|
}
|
|
2337
|
-
function cacheStringFunction(e) {
|
|
2338
|
-
let n = /* @__PURE__ */ Object.create(null);
|
|
2339
|
-
return (r) => n[r] || (n[r] = e(r));
|
|
2340
|
-
}
|
|
2341
|
-
var camelizeRE = /-(\w)/g, camelize = cacheStringFunction((e) => e.replace(camelizeRE, (e, n) => n ? n.toUpperCase() : ""));
|
|
2342
2320
|
function getLifeCycleTarget(e) {
|
|
2343
2321
|
return e || getCurrentInstance();
|
|
2344
2322
|
}
|
|
@@ -2482,36 +2460,6 @@ function computedAsync(e, n, r) {
|
|
|
2482
2460
|
}
|
|
2483
2461
|
}, { flush: s }), o ? computed(() => (d.value = !0, f.value)) : f;
|
|
2484
2462
|
}
|
|
2485
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2486
|
-
function createReusableTemplate(e = {}) {
|
|
2487
|
-
let { inheritAttrs: n = !0 } = e, r = shallowRef(), i = /* @__PURE__ */ defineComponent({ setup(e, { slots: n }) {
|
|
2488
|
-
return () => {
|
|
2489
|
-
r.value = n.default;
|
|
2490
|
-
};
|
|
2491
|
-
} }), a = /* @__PURE__ */ defineComponent({
|
|
2492
|
-
inheritAttrs: n,
|
|
2493
|
-
props: e.props,
|
|
2494
|
-
setup(i, { attrs: a, slots: o }) {
|
|
2495
|
-
return () => {
|
|
2496
|
-
if (!r.value && process.env.NODE_ENV !== "production") throw Error("[VueUse] Failed to find the definition of reusable template");
|
|
2497
|
-
let s = r.value?.call(r, {
|
|
2498
|
-
...e.props == null ? keysToCamelKebabCase(a) : i,
|
|
2499
|
-
$slots: o
|
|
2500
|
-
});
|
|
2501
|
-
return n && s?.length === 1 ? s[0] : s;
|
|
2502
|
-
};
|
|
2503
|
-
}
|
|
2504
|
-
});
|
|
2505
|
-
return /* @__PURE__ */ makeDestructurable({
|
|
2506
|
-
define: i,
|
|
2507
|
-
reuse: a
|
|
2508
|
-
}, [i, a]);
|
|
2509
|
-
}
|
|
2510
|
-
function keysToCamelKebabCase(e) {
|
|
2511
|
-
let n = {};
|
|
2512
|
-
for (let r in e) n[camelize(r)] = e[r];
|
|
2513
|
-
return n;
|
|
2514
|
-
}
|
|
2515
2463
|
var defaultWindow = isClient ? window : void 0;
|
|
2516
2464
|
isClient && window.document, isClient && window.navigator, isClient && window.location;
|
|
2517
2465
|
function unrefElement(e) {
|
|
@@ -2920,7 +2868,7 @@ var floatPopup_default = /* @__PURE__ */ defineComponent({
|
|
|
2920
2868
|
overlay: { type: Boolean }
|
|
2921
2869
|
},
|
|
2922
2870
|
setup(e, { expose: s }) {
|
|
2923
|
-
let l =
|
|
2871
|
+
let l = useRouter(), d = e, f = shallowRef(!1), { height: p } = /* @__PURE__ */ useWindowSize(), m = computed(() => isArray(d.anchors) ? d.anchors : d.anchors === "high" ? [
|
|
2924
2872
|
0,
|
|
2925
2873
|
Math.round(.4 * p.value),
|
|
2926
2874
|
Math.round(.7 * p.value),
|
|
@@ -3513,49 +3461,37 @@ const callbackToPromise = (e) => {
|
|
|
3513
3461
|
let { resolve: n, promise: r } = Promise.withResolvers();
|
|
3514
3462
|
return e(n), r;
|
|
3515
3463
|
};
|
|
3516
|
-
var _hoisted_1$
|
|
3464
|
+
var _hoisted_1$3 = {
|
|
3517
3465
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3518
3466
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
3519
3467
|
viewBox: "0 0 1024 1024"
|
|
3520
3468
|
}, ReloadOutlined_default = defineComponent({
|
|
3521
3469
|
name: "ReloadOutlined",
|
|
3522
3470
|
render: function(e, n) {
|
|
3523
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
3471
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$3, n[0] ||= [createElementVNode("path", {
|
|
3524
3472
|
d: "M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92C290 92 102.3 279.5 102 511.5C101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1c1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 0 0-10.1 4.8c-1.8 5-3.8 10-5.9 14.9c-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 0 1 655.9 829c-42.3 17.9-87.4 27-133.8 27c-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 0 1 279 755.2a342.16 342.16 0 0 1-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4c31.6-31.6 68.4-56.4 109.3-73.8c42.3-17.9 87.4-27 133.8-27c46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 0 1 109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 0 0 3 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z",
|
|
3525
3473
|
fill: "currentColor"
|
|
3526
3474
|
}, null, -1)]);
|
|
3527
3475
|
}
|
|
3528
|
-
}), _hoisted_1$
|
|
3529
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3530
|
-
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
3531
|
-
viewBox: "0 0 24 24"
|
|
3532
|
-
}, MoreVertRound_default = defineComponent({
|
|
3533
|
-
name: "MoreVertRound",
|
|
3534
|
-
render: function(e, n) {
|
|
3535
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$4, n[0] ||= [createElementVNode("path", {
|
|
3536
|
-
d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2s-2 .9-2 2s.9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2z",
|
|
3537
|
-
fill: "currentColor"
|
|
3538
|
-
}, null, -1)]);
|
|
3539
|
-
}
|
|
3540
|
-
}), _hoisted_1$3 = {
|
|
3476
|
+
}), _hoisted_1$2 = {
|
|
3541
3477
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3542
3478
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
3543
3479
|
viewBox: "0 0 24 24"
|
|
3544
3480
|
}, WifiTetheringErrorRound_default = defineComponent({
|
|
3545
3481
|
name: "WifiTetheringErrorRound",
|
|
3546
3482
|
render: function(e, n) {
|
|
3547
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
3483
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$2, n[0] ||= [createElementVNode("path", {
|
|
3548
3484
|
d: "M10.66 7.14c-2.24.48-4.04 2.3-4.52 4.54c-.37 1.75.02 3.38.89 4.66c.34.51 1.08.55 1.51.11c.35-.35.37-.88.1-1.28c-.5-.76-.75-1.71-.61-2.73c.23-1.74 1.67-3.17 3.41-3.4A4.003 4.003 0 0 1 16 13c0 .8-.24 1.54-.64 2.16c-.27.41-.25.95.1 1.29c.43.43 1.17.4 1.51-.11C17.62 15.4 18 14.25 18 13c0-3.75-3.45-6.7-7.34-5.86zm-.41-3.99c-4.05.69-7.19 3.69-8.03 7.72c-.66 3.17.2 6.16 1.97 8.38c.37.46 1.07.49 1.49.07c.36-.36.39-.93.07-1.32a8.004 8.004 0 0 1-1.66-6.28c.55-3.47 3.42-6.24 6.92-6.65c2.76-.33 5.27.74 6.93 2.59c.2.21.47.34.76.34c.85 0 1.34-1.01.77-1.65c-2.19-2.45-5.56-3.82-9.22-3.2zM12 11c-1.1 0-2 .9-2 2c0 .55.23 1.05.59 1.41c.36.36.86.59 1.41.59s1.05-.23 1.41-.59c.36-.36.59-.86.59-1.41c0-1.1-.9-2-2-2zm9-1c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1s-1-.45-1-1v-4c0-.55.45-1 1-1zm0 8c.55 0 1 .45 1 1s-.45 1-1 1s-1-.45-1-1s.45-1 1-1z",
|
|
3549
3485
|
fill: "currentColor"
|
|
3550
3486
|
}, null, -1)]);
|
|
3551
3487
|
}
|
|
3552
|
-
}), _hoisted_1$
|
|
3488
|
+
}), _hoisted_1$1 = { class: "relative size-full overflow-hidden" }, _hoisted_2 = { key: 2 }, _hoisted_3 = {
|
|
3553
3489
|
key: 3,
|
|
3554
3490
|
class: "!size-full"
|
|
3555
|
-
}, _hoisted_4
|
|
3491
|
+
}, _hoisted_4 = {
|
|
3556
3492
|
key: 4,
|
|
3557
3493
|
class: "flex items-center gap-3 justify-around"
|
|
3558
|
-
}, _hoisted_5
|
|
3494
|
+
}, _hoisted_5 = { class: "flex gap-2 flex-col justify-center text-white" }, _hoisted_6 = { class: "text-xs text-wrap" }, content_default = /* @__PURE__ */ defineComponent({
|
|
3559
3495
|
__name: "content",
|
|
3560
3496
|
props: {
|
|
3561
3497
|
retriable: { type: Boolean },
|
|
@@ -3637,7 +3573,7 @@ var _hoisted_1$5 = {
|
|
|
3637
3573
|
opacity: 1,
|
|
3638
3574
|
translateY: "-50%",
|
|
3639
3575
|
width: "70%",
|
|
3640
|
-
|
|
3576
|
+
minHeight: d.retriable ? "22rem" : "20rem",
|
|
3641
3577
|
paddingBlock: "2px",
|
|
3642
3578
|
paddingInline: "2px",
|
|
3643
3579
|
left: "50%",
|
|
@@ -3701,7 +3637,7 @@ var _hoisted_1$5 = {
|
|
|
3701
3637
|
}, h = computed(() => !d.hideLoading && f.value.isLoading ? f.value.isEmpty ? "isLoadingNoData" : "isLoadingData" : !d.hideError && f.value.isError ? f.value.isEmpty ? "isErrorNoData" : "isErrorData" : !d.hideEmpty && f.value.isNoResult ? "isEmpty" : "done"), g = useTemplateRef("cont");
|
|
3702
3638
|
return n({ cont: g }), (n, i) => {
|
|
3703
3639
|
let p = Loading, v = NEmpty, y = NButton, b = NIcon, S = NResult, C = AnimatePresence;
|
|
3704
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3640
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [createElementVNode("div", {
|
|
3705
3641
|
class: normalizeClass(["relative size-full", [d.class]]),
|
|
3706
3642
|
ref_key: "cont",
|
|
3707
3643
|
ref: g
|
|
@@ -3732,12 +3668,12 @@ var _hoisted_1$5 = {
|
|
|
3732
3668
|
}, {
|
|
3733
3669
|
default: withCtx(() => [...i[2] ||= [createTextVNode("加载中", -1)]]),
|
|
3734
3670
|
_: 1
|
|
3735
|
-
})) : h.value === "isEmpty" ? (openBlock(), createElementBlock("div", _hoisted_2
|
|
3671
|
+
})) : h.value === "isEmpty" ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(v, {
|
|
3736
3672
|
description: "无结果",
|
|
3737
3673
|
class: normalizeClass(["w-full !justify-center", [e.classEmpty]]),
|
|
3738
3674
|
style: normalizeStyle([e.style, e.styleEmpty])
|
|
3739
|
-
}, null, 8, ["class", "style"])])) : h.value === "isErrorNoData" ? (openBlock(), createElementBlock("div", _hoisted_3
|
|
3740
|
-
class: normalizeClass(["!items-center !justify-center flex flex-col !size-full", [e.classError]]),
|
|
3675
|
+
}, null, 8, ["class", "style"])])) : h.value === "isErrorNoData" ? (openBlock(), createElementBlock("div", _hoisted_3, [createVNode(S, {
|
|
3676
|
+
class: normalizeClass(["!items-center !justify-center flex flex-col !size-full *:w-full text-wrap", [e.classError]]),
|
|
3741
3677
|
status: "error",
|
|
3742
3678
|
title: "网络错误",
|
|
3743
3679
|
style: normalizeStyle([e.style, e.styleError]),
|
|
@@ -3763,7 +3699,7 @@ var _hoisted_1$5 = {
|
|
|
3763
3699
|
"class",
|
|
3764
3700
|
"style",
|
|
3765
3701
|
"description"
|
|
3766
|
-
])])) : h.value === "isErrorData" ? (openBlock(), createElementBlock("div", _hoisted_4
|
|
3702
|
+
])])) : h.value === "isErrorData" ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
3767
3703
|
createVNode(b, {
|
|
3768
3704
|
size: "3rem",
|
|
3769
3705
|
color: "white"
|
|
@@ -3771,7 +3707,7 @@ var _hoisted_1$5 = {
|
|
|
3771
3707
|
default: withCtx(() => [createVNode(unref(WifiTetheringErrorRound_default))]),
|
|
3772
3708
|
_: 1
|
|
3773
3709
|
}),
|
|
3774
|
-
createElementVNode("div", _hoisted_5
|
|
3710
|
+
createElementVNode("div", _hoisted_5, [i[4] ||= createElementVNode("div", { class: "text-sm" }, "网络错误", -1), createElementVNode("div", _hoisted_6, toDisplayString(f.value.errorCause ?? "未知原因"), 1)]),
|
|
3775
3711
|
createVNode(y, {
|
|
3776
3712
|
circle: "",
|
|
3777
3713
|
type: "error",
|
|
@@ -3983,7 +3919,7 @@ var _hoisted_1$5 = {
|
|
|
3983
3919
|
}),
|
|
3984
3920
|
emits: /* @__PURE__ */ mergeModels(["closed"], ["update:show"]),
|
|
3985
3921
|
setup(e, { expose: n }) {
|
|
3986
|
-
let r =
|
|
3922
|
+
let r = useRouter(), s = e, c = useModel(e, "show"), l = shallowRef(c.value), [u, d] = useZIndex(computed(() => s.useTrulyShow ? l.value : c.value)), f = noop$1;
|
|
3987
3923
|
return watch(c, (e) => {
|
|
3988
3924
|
e ? f = r.beforeEach(() => {
|
|
3989
3925
|
if (console.log("popup:\n", "isLast:", d.value, "show:", c.value), d.value) return c.value ? c.value = !1 : void 0;
|
|
@@ -4022,7 +3958,7 @@ var _hoisted_1$5 = {
|
|
|
4022
3958
|
routerBase: {}
|
|
4023
3959
|
},
|
|
4024
3960
|
setup(n) {
|
|
4025
|
-
let r = n, i = useRoute(), o = ref(decodeURI(i.path.replaceAll(r.routerBase + "/", "").split("/")[0])), c =
|
|
3961
|
+
let r = n, i = useRoute(), o = ref(decodeURI(i.path.replaceAll(r.routerBase + "/", "").split("/")[0])), c = useRouter(), l = useTemplateRef("tab"), u = async (e) => {
|
|
4026
3962
|
let n = "?", i = r.items.find((n) => n.name == e);
|
|
4027
3963
|
for (let e in i.queries ?? {}) if (Object.prototype.hasOwnProperty.call(i.queries ?? {}, e)) {
|
|
4028
3964
|
let r = (i.queries ?? {})[e];
|
|
@@ -4102,7 +4038,7 @@ var _hoisted_1$5 = {
|
|
|
4102
4038
|
}, 1032, ["href"])) : n.mode === "text" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(n.value), 1)], 64)) : createCommentVNode("", !0)], 64))), 256))], 6);
|
|
4103
4039
|
};
|
|
4104
4040
|
}
|
|
4105
|
-
}), _hoisted_1
|
|
4041
|
+
}), _hoisted_1 = { class: "mt-1 text-(--van-text-color-2) text-xs" }, toggleIcon_default = /* @__PURE__ */ defineComponent({
|
|
4106
4042
|
__name: "toggleIcon",
|
|
4107
4043
|
props: /* @__PURE__ */ mergeModels({
|
|
4108
4044
|
icon: {},
|
|
@@ -4143,7 +4079,7 @@ var _hoisted_1$5 = {
|
|
|
4143
4079
|
}, {
|
|
4144
4080
|
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(e.icon)))]),
|
|
4145
4081
|
_: 1
|
|
4146
|
-
}, 8, ["size", "color"]), createElementVNode("span", _hoisted_1
|
|
4082
|
+
}, 8, ["size", "color"]), createElementVNode("span", _hoisted_1, [renderSlot(n.$slots, "default")])], 2);
|
|
4147
4083
|
};
|
|
4148
4084
|
}
|
|
4149
4085
|
}), Z = Object.defineProperty, ee = Object.defineProperties, te = Object.getOwnPropertyDescriptors, I = Object.getOwnPropertySymbols, P = Object.prototype.hasOwnProperty, G = Object.prototype.propertyIsEnumerable, N = (e, n, r) => n in e ? Z(e, n, {
|
|
@@ -5103,154 +5039,7 @@ let uni;
|
|
|
5103
5039
|
(function(e) {
|
|
5104
5040
|
e.user = user_exports, e.comment = comment_exports, e.content = content_exports, e.image = image_exports$1, e.item = item_exports, e.ep = ep_exports;
|
|
5105
5041
|
})(uni ||= {});
|
|
5106
|
-
var
|
|
5107
|
-
let n = shallowReactive(/* @__PURE__ */ new Map()), r = e.action((e, r) => {
|
|
5108
|
-
let i = useLocalStorage(`${e}.config`, fromPairs(Object.entries(r).map(([n, r]) => [`${e}.${n}`, r.defaultValue])));
|
|
5109
|
-
return n.set(e, {
|
|
5110
|
-
form: r,
|
|
5111
|
-
value: i
|
|
5112
|
-
}), i.value;
|
|
5113
|
-
}, "useCustomConfig"), a = r("core", {
|
|
5114
|
-
recordHistory: {
|
|
5115
|
-
type: "switch",
|
|
5116
|
-
defaultValue: !1,
|
|
5117
|
-
info: "记录历史记录"
|
|
5118
|
-
},
|
|
5119
|
-
showAIProject: {
|
|
5120
|
-
type: "switch",
|
|
5121
|
-
defaultValue: !0,
|
|
5122
|
-
info: "展示AI作品"
|
|
5123
|
-
},
|
|
5124
|
-
darkMode: {
|
|
5125
|
-
type: "radio",
|
|
5126
|
-
defaultValue: "system",
|
|
5127
|
-
info: "暗色模式配置",
|
|
5128
|
-
comp: "select",
|
|
5129
|
-
selects: [
|
|
5130
|
-
{
|
|
5131
|
-
label: "浅色",
|
|
5132
|
-
value: "light"
|
|
5133
|
-
},
|
|
5134
|
-
{
|
|
5135
|
-
label: "暗色",
|
|
5136
|
-
value: "dark"
|
|
5137
|
-
},
|
|
5138
|
-
{
|
|
5139
|
-
label: "跟随系统",
|
|
5140
|
-
value: "system"
|
|
5141
|
-
}
|
|
5142
|
-
]
|
|
5143
|
-
},
|
|
5144
|
-
easilyTitle: {
|
|
5145
|
-
type: "switch",
|
|
5146
|
-
defaultValue: !1,
|
|
5147
|
-
info: "简化标题(实验)"
|
|
5148
|
-
}
|
|
5149
|
-
}), o = /* @__PURE__ */ usePreferredDark();
|
|
5150
|
-
return {
|
|
5151
|
-
appConfig: a,
|
|
5152
|
-
isDark: computed(() => {
|
|
5153
|
-
switch (a["core.darkMode"]) {
|
|
5154
|
-
case "light": return !1;
|
|
5155
|
-
case "dark": return !0;
|
|
5156
|
-
case "system": return o.value;
|
|
5157
|
-
default: return !1;
|
|
5158
|
-
}
|
|
5159
|
-
}),
|
|
5160
|
-
form: n,
|
|
5161
|
-
$useCustomConfig: r
|
|
5162
|
-
};
|
|
5163
|
-
});
|
|
5164
|
-
const useConfig = () => _useConfig(window.$api.piniaInstance);
|
|
5165
|
-
var _hoisted_1 = ["disabled"], _hoisted_2 = { class: "flex absolute flex-col w-[calc(70%-14px)] h-[calc(100%-8px)] *:text-justify right-2" }, _hoisted_3 = { class: "van-multi-ellipsis--l2" }, _hoisted_4 = { class: "absolute bottom-2 text-(--van-text-color-2) text-sm" }, _hoisted_5 = ["disabled"], _hoisted_6 = { class: "w-full flex items-center relative" }, _hoisted_7 = { class: "absolute w-full h-6 !text-[10px] text-white bg-[linear-gradient(transparent,rgba(0,0,0,0.9))] bottom-0 flex pb-0.5 gap-1 pl-1 items-end justify-start *:flex *:items-center" }, _hoisted_8 = { class: "w-full overflow-hidden p-1 flex flex-col text-(--van-text-color)" }, _hoisted_9 = { class: "flex flex-nowrap" }, _hoisted_10 = { class: "text-start text-sm" }, _hoisted_11 = { class: "my-1 w-full h-auto flex-nowrap flex items-center" }, unitCard_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
5166
|
-
__name: "unitCard",
|
|
5167
|
-
props: {
|
|
5168
|
-
item: {},
|
|
5169
|
-
freeHeight: { type: Boolean },
|
|
5170
|
-
disabled: { type: Boolean },
|
|
5171
|
-
type: { default: "default" },
|
|
5172
|
-
class: {},
|
|
5173
|
-
style: { type: [
|
|
5174
|
-
Boolean,
|
|
5175
|
-
null,
|
|
5176
|
-
String,
|
|
5177
|
-
Object,
|
|
5178
|
-
Array
|
|
5179
|
-
] }
|
|
5180
|
-
},
|
|
5181
|
-
emits: ["click"],
|
|
5182
|
-
setup(n, { emit: r }) {
|
|
5183
|
-
useCssVars((e) => ({ v0b67184e: h.value }));
|
|
5184
|
-
let d = n, f = r, p = useTemplateRef("cover"), m = computed(() => uni.item.Item.is(d.item) ? d.item.$cover : uni.image.Image.create(d.item.cover)), h = computed(() => p.value?.isLoaded ? "unset" : `${m.value.aspect?.width || 3} / ${m.value.aspect?.height || 4}`), [g, v] = /* @__PURE__ */ createReusableTemplate(), y = () => {
|
|
5185
|
-
uni.item.Item.is(d.item) && SharedFunction.callWitch("addRecent", "core", d.item);
|
|
5186
|
-
}, b = useConfig(), S = computed(() => b.appConfig["core.easilyTitle"] ? d.item.title.replace(/(\([^\)]+\)|\[[^\]]+\]|\([^\)]+\)|\【[^\】]+\】)+?/gi, "").trim() : d.item.title);
|
|
5187
|
-
return (r, i) => {
|
|
5188
|
-
let h = NIcon, b = NButton, C = NPopconfirm;
|
|
5189
|
-
return openBlock(), createElementBlock(Fragment, null, [createVNode(unref(g), null, {
|
|
5190
|
-
default: withCtx(() => [createVNode(C, { onPositiveClick: y }, {
|
|
5191
|
-
trigger: withCtx(() => [createVNode(b, {
|
|
5192
|
-
onClick: i[0] ||= withModifiers(() => {}, ["stop"]),
|
|
5193
|
-
text: "",
|
|
5194
|
-
class: "!absolute bottom-1.5 right-2"
|
|
5195
|
-
}, {
|
|
5196
|
-
default: withCtx(() => [createVNode(h, {
|
|
5197
|
-
color: "var(--van-text-color-2)",
|
|
5198
|
-
size: "1rem"
|
|
5199
|
-
}, {
|
|
5200
|
-
default: withCtx(() => [createVNode(unref(MoreVertRound_default))]),
|
|
5201
|
-
_: 1
|
|
5202
|
-
})]),
|
|
5203
|
-
_: 1
|
|
5204
|
-
})]),
|
|
5205
|
-
default: withCtx(() => [i[3] ||= createTextVNode(" 加入\"稍后再看\"? ", -1)]),
|
|
5206
|
-
_: 1
|
|
5207
|
-
})]),
|
|
5208
|
-
_: 1
|
|
5209
|
-
}), n.type == "small" ? (openBlock(), createElementBlock("div", {
|
|
5210
|
-
key: 1,
|
|
5211
|
-
style: normalizeStyle([{ height: n.freeHeight ? "auto" : "140px" }, n.style]),
|
|
5212
|
-
onClick: i[2] ||= (e) => f("click"),
|
|
5213
|
-
disabled: n.disabled,
|
|
5214
|
-
class: normalizeClass([[{ "van-haptics-feedback": !n.disabled }, d.class], "overflow-hidden w-full rounded-lg block van-hairline--top-bottom bg-center bg-(--van-background-2) text-(--van-text-color) border-none relative p-0 items-center"]),
|
|
5215
|
-
ref: "container"
|
|
5216
|
-
}, [
|
|
5217
|
-
createElementVNode("div", _hoisted_6, [r.$slots.cover ? createCommentVNode("", !0) : (openBlock(), createBlock(image_default, {
|
|
5218
|
-
key: 0,
|
|
5219
|
-
src: m.value,
|
|
5220
|
-
class: "rounded-t-lg w-full image-size",
|
|
5221
|
-
fit: "cover",
|
|
5222
|
-
ref_key: "cover",
|
|
5223
|
-
ref: p
|
|
5224
|
-
}, null, 8, ["src"])), createElementVNode("div", _hoisted_7, [renderSlot(r.$slots, "smallTopInfo", {}, void 0, !0)])]),
|
|
5225
|
-
createElementVNode("div", _hoisted_8, [createElementVNode("div", _hoisted_9, [createElementVNode("span", _hoisted_10, toDisplayString(S.value), 1)]), createElementVNode("div", _hoisted_11, [renderSlot(r.$slots, "default", {}, void 0, !0)])]),
|
|
5226
|
-
createVNode(unref(v))
|
|
5227
|
-
], 14, _hoisted_5)) : (openBlock(), createElementBlock("div", {
|
|
5228
|
-
key: 0,
|
|
5229
|
-
ref: "container",
|
|
5230
|
-
onClick: i[1] ||= (e) => f("click"),
|
|
5231
|
-
disabled: n.disabled,
|
|
5232
|
-
class: normalizeClass(["overflow-hidden w-full van-hairline--top-bottom bg-(--van-background-2) text-(--van-text-color) relative p-2 flex", [{ "van-haptics-feedback": !n.disabled }, d.class]]),
|
|
5233
|
-
style: normalizeStyle([{ height: n.freeHeight ? "auto" : "140px" }, n.style])
|
|
5234
|
-
}, [
|
|
5235
|
-
n.type === "big" ? (openBlock(), createBlock(image_default, {
|
|
5236
|
-
key: 0,
|
|
5237
|
-
src: m.value,
|
|
5238
|
-
class: "blur-lg absolute top-0 left-0 w-full h-full",
|
|
5239
|
-
fit: "cover"
|
|
5240
|
-
}, null, 8, ["src"])) : createCommentVNode("", !0),
|
|
5241
|
-
createVNode(image_default, {
|
|
5242
|
-
src: m.value,
|
|
5243
|
-
class: "!rounded-lg image-size z-2 w-3/10",
|
|
5244
|
-
fit: "contain",
|
|
5245
|
-
ref_key: "cover",
|
|
5246
|
-
ref: p
|
|
5247
|
-
}, null, 8, ["src"]),
|
|
5248
|
-
createElementVNode("div", _hoisted_2, [createElementVNode("span", _hoisted_3, toDisplayString(S.value), 1), createElementVNode("div", _hoisted_4, [renderSlot(r.$slots, "default", {}, void 0, !0)])]),
|
|
5249
|
-
createVNode(unref(v))
|
|
5250
|
-
], 14, _hoisted_1))], 64);
|
|
5251
|
-
};
|
|
5252
|
-
}
|
|
5253
|
-
}), [["__scopeId", "data-v-15d539f3"]]), translate_exports = /* @__PURE__ */ __export({ createDateString: () => createDateString }), import_dayjs_min = /* @__PURE__ */ __toESM(require_dayjs_min(), 1);
|
|
5042
|
+
var translate_exports = /* @__PURE__ */ __export({ createDateString: () => createDateString }), import_dayjs_min = /* @__PURE__ */ __toESM(require_dayjs_min(), 1);
|
|
5254
5043
|
const createDateString = (e = (0, import_dayjs_min.default)()) => {
|
|
5255
5044
|
let n = (0, import_dayjs_min.default)(), r = e.isSame(n, "year"), i = r && e.isSame(n, "month"), a = i && e.date() === n.date(), o = i && e.date() === n.date() - 1, s = "";
|
|
5256
5045
|
return r || (s += "YYYY年 "), a ? s += "今天 " : o ? s += "昨天 " : s += "M月D日 ", s += "HH:mm", e.format(s);
|
|
@@ -5341,6 +5130,73 @@ const createLoadingMessage = (e = "加载中", n = window.$message) => {
|
|
|
5341
5130
|
}
|
|
5342
5131
|
});
|
|
5343
5132
|
return console.log("[createDialog] after const dialog"), i.ins = m, i;
|
|
5133
|
+
};
|
|
5134
|
+
var ConfigPointer = class {
|
|
5135
|
+
constructor(e, n) {
|
|
5136
|
+
this.pluginName = e, this.config = n, this.key = Symbol(e);
|
|
5137
|
+
}
|
|
5138
|
+
key;
|
|
5139
|
+
};
|
|
5140
|
+
const appConfig = new ConfigPointer("core", {
|
|
5141
|
+
recordHistory: {
|
|
5142
|
+
type: "switch",
|
|
5143
|
+
defaultValue: !1,
|
|
5144
|
+
info: "记录历史记录"
|
|
5145
|
+
},
|
|
5146
|
+
showAIProject: {
|
|
5147
|
+
type: "switch",
|
|
5148
|
+
defaultValue: !0,
|
|
5149
|
+
info: "展示AI作品"
|
|
5150
|
+
},
|
|
5151
|
+
darkMode: {
|
|
5152
|
+
type: "radio",
|
|
5153
|
+
defaultValue: "system",
|
|
5154
|
+
info: "暗色模式配置",
|
|
5155
|
+
comp: "select",
|
|
5156
|
+
selects: [
|
|
5157
|
+
{
|
|
5158
|
+
label: "浅色",
|
|
5159
|
+
value: "light"
|
|
5160
|
+
},
|
|
5161
|
+
{
|
|
5162
|
+
label: "暗色",
|
|
5163
|
+
value: "dark"
|
|
5164
|
+
},
|
|
5165
|
+
{
|
|
5166
|
+
label: "跟随系统",
|
|
5167
|
+
value: "system"
|
|
5168
|
+
}
|
|
5169
|
+
]
|
|
5170
|
+
},
|
|
5171
|
+
easilyTitle: {
|
|
5172
|
+
type: "switch",
|
|
5173
|
+
defaultValue: !1,
|
|
5174
|
+
info: "简化标题(实验)"
|
|
5175
|
+
}
|
|
5176
|
+
}), useConfig = defineStore("config", (e) => {
|
|
5177
|
+
let n = shallowReactive(/* @__PURE__ */ new Map()), r = e.action((e) => {
|
|
5178
|
+
let r = n.get(e.key);
|
|
5179
|
+
if (!r) throw Error(`not found config by plugin "${e.pluginName}"`);
|
|
5180
|
+
return r.value;
|
|
5181
|
+
}, "load"), a = /* @__PURE__ */ usePreferredDark();
|
|
5182
|
+
return {
|
|
5183
|
+
isDark: computed(() => {
|
|
5184
|
+
switch (r(appConfig).darkMode) {
|
|
5185
|
+
case "light": return !1;
|
|
5186
|
+
case "dark": return !0;
|
|
5187
|
+
case "system": return a.value;
|
|
5188
|
+
default: return !1;
|
|
5189
|
+
}
|
|
5190
|
+
}),
|
|
5191
|
+
form: n,
|
|
5192
|
+
$load: r
|
|
5193
|
+
};
|
|
5194
|
+
}), resignerConfig = (e) => {
|
|
5195
|
+
let n = useConfig(), r = useLocalStorage(`${e.pluginName}.config`, fromPairs(Object.entries(e.config).map(([e, n]) => [e, n.defaultValue])));
|
|
5196
|
+
n.form.set(e.key, {
|
|
5197
|
+
form: e.config,
|
|
5198
|
+
value: r
|
|
5199
|
+
});
|
|
5344
5200
|
}, definePlugin = (e) => {
|
|
5345
5201
|
if (isFunction(e)) var n = e(window.$$safe$$);
|
|
5346
5202
|
else var n = e;
|
|
@@ -5365,8 +5221,9 @@ const createLoadingMessage = (e = "加载中", n = window.$message) => {
|
|
|
5365
5221
|
for (let e of o.hotPage.topButton ?? []) ContentPage.setTopButton(r, e);
|
|
5366
5222
|
}
|
|
5367
5223
|
}
|
|
5368
|
-
s && User.userEditorBase.set(r, s.edit),
|
|
5369
|
-
|
|
5224
|
+
if (s && User.userEditorBase.set(r, s.edit), n.config) for (let e of n.config) resignerConfig(e);
|
|
5225
|
+
return SharedFunction.call("addPlugin", n);
|
|
5226
|
+
}, declareDependType = (e) => Symbol.for(`expose:${e}`), requireDepend = (e) => _pluginExposes.get(e), _pluginExposes = /* @__PURE__ */ new Map(), coreModule = declareDependType("core"), _ = void 0, Comp = {
|
|
5370
5227
|
Await: await_default,
|
|
5371
5228
|
Loading: loading_default,
|
|
5372
5229
|
Content: content_default,
|
|
@@ -5378,8 +5235,7 @@ const createLoadingMessage = (e = "加载中", n = window.$message) => {
|
|
|
5378
5235
|
Text: text_default,
|
|
5379
5236
|
ToggleIcon: toggleIcon_default,
|
|
5380
5237
|
Var: var_default,
|
|
5381
|
-
Waterfall: waterfall_default
|
|
5382
|
-
content: { UnitCard: unitCard_default }
|
|
5238
|
+
Waterfall: waterfall_default
|
|
5383
5239
|
};
|
|
5384
5240
|
let Utils;
|
|
5385
5241
|
(function(e) {
|
|
@@ -5387,9 +5243,10 @@ let Utils;
|
|
|
5387
5243
|
})(Utils ||= {});
|
|
5388
5244
|
const Store = {
|
|
5389
5245
|
useTemp,
|
|
5390
|
-
useConfig
|
|
5246
|
+
useConfig,
|
|
5247
|
+
appConfig,
|
|
5248
|
+
ConfigPointer
|
|
5391
5249
|
};
|
|
5392
|
-
|
|
5393
|
-
export { Comp, Store, Utils, _, definePlugin, uni };
|
|
5250
|
+
export { Comp, Store, Utils, _, _pluginExposes, coreModule, declareDependType, definePlugin, requireDepend, uni };
|
|
5394
5251
|
|
|
5395
5252
|
//# sourceMappingURL=bundle.js.map
|