x-essential-lib 0.11.10 → 0.11.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +7 -3
- package/dist/index.js +13 -8
- package/dist/{vendor.59wdpcv4.js → vendor.nkww20g1.js} +5 -5
- package/package.json +19 -17
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as EventType, t as Emitter } from "./vendor.
|
|
1
|
+
import { n as EventType, t as Emitter } from "./vendor.nkww20g1.js";
|
|
2
2
|
import { Ref } from "vue";
|
|
3
3
|
import { VuetifyOptions } from "vuetify";
|
|
4
4
|
import { AxiosInstance } from "axios";
|
|
@@ -185,8 +185,12 @@ export declare function useSystem(): {
|
|
|
185
185
|
isMobile: () => boolean;
|
|
186
186
|
compactWidth: import("vue").ComputedRef<string>;
|
|
187
187
|
minimizeApp: () => Promise<void>;
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
safeAreaInset: {
|
|
189
|
+
top: number;
|
|
190
|
+
bottom: number;
|
|
191
|
+
left: number;
|
|
192
|
+
right: number;
|
|
193
|
+
};
|
|
190
194
|
nameList: (entries: string[], instances?: string[]) => string;
|
|
191
195
|
sentenceOfAsk: (verb: string, object: string, name: string) => string;
|
|
192
196
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(){try{document.getElementById(`x-essential-lib`)?.remove();const e = document.createElement(`style`);e.setAttribute(`id`, `x-essential-lib`);const t = document.createTextNode(`.fade-leave-active[data-v-x-essential-lib-c3545c8d]{transition:opacity .5s}.fade-leave-to[data-v-x-essential-lib-c3545c8d]{opacity:0}.x-cont[data-v-x-essential-lib-c3545c8d]{justify-content:center;align-items:center;display:flex;position:absolute;inset:0;overflow:hidden}.lds-spinner[data-v-x-essential-lib-c3545c8d]{color:official;width:40px;height:40px;display:inline-block;position:relative}.lds-spinner div[data-v-x-essential-lib-c3545c8d]{transform-origin:20px 20px;animation:1.2s linear infinite lds-spinner-x-essential-lib-c3545c8d}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:after{content:" ";background:#9e9e9e;border-radius:5%;width:2px;height:6px;display:block;position:absolute;top:3px;left:18px}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:first-child{animation-delay:-1.1s;transform:rotate(0)}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:nth-child(2){animation-delay:-1s;transform:rotate(30deg)}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:nth-child(3){animation-delay:-.9s;transform:rotate(60deg)}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:nth-child(4){animation-delay:-.8s;transform:rotate(90deg)}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:nth-child(5){animation-delay:-.7s;transform:rotate(120deg)}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:nth-child(6){animation-delay:-.6s;transform:rotate(150deg)}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:nth-child(7){animation-delay:-.5s;transform:rotate(180deg)}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:nth-child(8){animation-delay:-.4s;transform:rotate(210deg)}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:nth-child(9){animation-delay:-.3s;transform:rotate(240deg)}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:nth-child(10){animation-delay:-.2s;transform:rotate(270deg)}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:nth-child(11){animation-delay:-.1s;transform:rotate(300deg)}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:nth-child(12){animation-delay:0s;transform:rotate(330deg)}@keyframes lds-spinner-x-essential-lib-c3545c8d{0%{opacity:1}to{opacity:0}}.x-item[data-v-x-essential-lib-cfcda9d9]{width:600px}@media (width<=600px){.x-item[data-v-x-essential-lib-cfcda9d9]{width:calc(100vw - 16px)}}.x-cont[data-v-x-essential-lib-b973907d]{z-index:9999;position:fixed;bottom:50px;left:50%;transform:translate(-50%)}`);e.appendChild(t);document.head.appendChild(e);}catch(e){console.error('rolldown-plugin-inject-css', e);}})()
|
|
2
|
-
import { a as invoke, c as string, d as usePreferredDark, i as debounce, l as api, o as custom, r as toLower, s as email$1, u as mitt_default } from "./vendor.
|
|
3
|
-
import { Fragment, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, inject, isRef, normalizeStyle, onBeforeMount, onBeforeUnmount, onMounted, onUnmounted, openBlock, provide, ref, renderList, resolveComponent, toDisplayString, unref, useTemplateRef, watch, watchEffect, withCtx, withKeys, withModifiers } from "vue";
|
|
2
|
+
import { a as invoke, c as string, d as usePreferredDark, i as debounce, l as api, o as custom, r as toLower, s as email$1, u as mitt_default } from "./vendor.nkww20g1.js";
|
|
3
|
+
import { Fragment, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, inject, isRef, normalizeStyle, onBeforeMount, onBeforeUnmount, onMounted, onUnmounted, openBlock, provide, reactive, ref, renderList, resolveComponent, toDisplayString, unref, useTemplateRef, watch, watchEffect, withCtx, withKeys, withModifiers } from "vue";
|
|
4
4
|
import { useI18n } from "vue-i18n";
|
|
5
5
|
import { useDisplay, useTheme } from "vuetify";
|
|
6
6
|
import axios from "axios";
|
|
@@ -706,15 +706,21 @@ function useSystem() {
|
|
|
706
706
|
navigator.Backbutton?.goHome(() => {}, () => {});
|
|
707
707
|
invoke("goHome");
|
|
708
708
|
}
|
|
709
|
-
const
|
|
710
|
-
|
|
709
|
+
const safeAreaInset = reactive({
|
|
710
|
+
top: 0,
|
|
711
|
+
bottom: 0,
|
|
712
|
+
left: 0,
|
|
713
|
+
right: 0
|
|
714
|
+
});
|
|
711
715
|
function getSafeAreaVar(name) {
|
|
712
716
|
const str = getComputedStyle(document.documentElement).getPropertyValue(name).trim();
|
|
713
717
|
return parseFloat(str) || 0;
|
|
714
718
|
}
|
|
715
719
|
function syncSafeArea() {
|
|
716
|
-
|
|
717
|
-
|
|
720
|
+
safeAreaInset.top = getSafeAreaVar("--safe-area-inset-top");
|
|
721
|
+
safeAreaInset.bottom = getSafeAreaVar("--safe-area-inset-bottom");
|
|
722
|
+
safeAreaInset.left = getSafeAreaVar("--safe-area-inset-left");
|
|
723
|
+
safeAreaInset.right = getSafeAreaVar("--safe-area-inset-right");
|
|
718
724
|
}
|
|
719
725
|
const handleResize = debounce(() => {
|
|
720
726
|
syncSafeArea();
|
|
@@ -754,8 +760,7 @@ function useSystem() {
|
|
|
754
760
|
isMobile,
|
|
755
761
|
compactWidth,
|
|
756
762
|
minimizeApp,
|
|
757
|
-
|
|
758
|
-
insetBottom,
|
|
763
|
+
safeAreaInset,
|
|
759
764
|
nameList,
|
|
760
765
|
sentenceOfAsk
|
|
761
766
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Fragment, computed, defineComponent, getCurrentInstance, getCurrentScope, hasInjectionContext, inject, isRef, onBeforeMount, onBeforeUnmount, onMounted, onUnmounted, provide, ref, shallowRef, toValue, unref, watch, watchEffect } from "vue";
|
|
1
|
+
import { Fragment, computed, defineComponent, getCurrentInstance, getCurrentScope, hasInjectionContext, inject, isRef, onBeforeMount, onBeforeUnmount, onMounted, onUnmounted, provide, reactive, ref, shallowRef, toValue, unref, watch, watchEffect } from "vue";
|
|
2
2
|
|
|
3
|
-
//#region node_modules/.pnpm/@vueuse+shared@
|
|
3
|
+
//#region node_modules/.pnpm/@vueuse+shared@15.0.0_vue@3.5.43_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
|
|
4
4
|
const localProvidedStateMap = /* @__PURE__ */ new WeakMap();
|
|
5
5
|
/**
|
|
6
6
|
* On the basis of `inject`, it is allowed to directly call inject to obtain the value after call provide in the same component.
|
|
@@ -11,9 +11,9 @@ const localProvidedStateMap = /* @__PURE__ */ new WeakMap();
|
|
|
11
11
|
* const injectedValue = injectLocal('MyInjectionKey') // injectedValue === 1
|
|
12
12
|
* ```
|
|
13
13
|
*
|
|
14
|
-
* @
|
|
14
|
+
* @NO_SIDE_EFFECTS
|
|
15
15
|
*/
|
|
16
|
-
const injectLocal = (...args) => {
|
|
16
|
+
const injectLocal = /* @__NO_SIDE_EFFECTS__ */ (...args) => {
|
|
17
17
|
var _getCurrentInstance;
|
|
18
18
|
const key = args[0];
|
|
19
19
|
const instance = (_getCurrentInstance = getCurrentInstance()) === null || _getCurrentInstance === void 0 ? void 0 : _getCurrentInstance.proxy;
|
|
@@ -60,7 +60,7 @@ function watchImmediate(source, cb, options) {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
//#endregion
|
|
63
|
-
//#region node_modules/.pnpm/@vueuse+core@
|
|
63
|
+
//#region node_modules/.pnpm/@vueuse+core@15.0.0_vue@3.5.43_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
|
|
64
64
|
const defaultWindow = isClient ? window : void 0;
|
|
65
65
|
const defaultDocument = isClient ? window.document : void 0;
|
|
66
66
|
const defaultNavigator = isClient ? window.navigator : void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-essential-lib",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.12",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
"lint": "oxlint",
|
|
23
23
|
"fmt": "oxfmt",
|
|
24
24
|
"build": "tsdown",
|
|
25
|
+
"ncu:check": "ncu --dep dev,peer -x typescript",
|
|
26
|
+
"ncu:update": "ncu --dep dev,peer -x typescript -u",
|
|
25
27
|
"lint-staged": "lint-staged",
|
|
26
28
|
"prepare": "husky"
|
|
27
29
|
},
|
|
@@ -29,33 +31,33 @@
|
|
|
29
31
|
"@tauri-apps/api": "^2.12.1",
|
|
30
32
|
"@types/js-cookie": "^3.0.6",
|
|
31
33
|
"@types/lodash-es": "^4.17.12",
|
|
32
|
-
"@types/node": "^26.
|
|
33
|
-
"@vueuse/core": "^
|
|
34
|
+
"@types/node": "^26.6.4",
|
|
35
|
+
"@vueuse/core": "^15.0.0",
|
|
34
36
|
"husky": "^9.1.7",
|
|
35
37
|
"js-cookie": "^3.0.8",
|
|
36
|
-
"lint-staged": "^17.
|
|
38
|
+
"lint-staged": "^17.6.0",
|
|
37
39
|
"lodash-es": "^4.18.1",
|
|
38
40
|
"mitt": "^3.0.1",
|
|
39
|
-
"oxfmt": "^0.
|
|
40
|
-
"oxlint": "^1.
|
|
41
|
-
"oxlint-tsgolint": "^7.0.
|
|
41
|
+
"oxfmt": "^0.71.0",
|
|
42
|
+
"oxlint": "^1.86.0",
|
|
43
|
+
"oxlint-tsgolint": "^7.0.2003",
|
|
42
44
|
"picomatch": "^4.0.7",
|
|
43
|
-
"rolldown": "^1.2.
|
|
44
|
-
"sass": "^1.
|
|
45
|
+
"rolldown": "^1.2.12",
|
|
46
|
+
"sass": "^1.105.1",
|
|
45
47
|
"tsdown": "^0.23.0",
|
|
46
48
|
"typescript": "^6.0.3",
|
|
47
|
-
"vite": "^8.3.
|
|
48
|
-
"vue-tsc": "^3.3.
|
|
49
|
-
"x-config-lib": "^0.1.
|
|
50
|
-
"x-config-oxfmt": "^0.1.
|
|
51
|
-
"x-config-oxlint": "^0.1.
|
|
49
|
+
"vite": "^8.3.2",
|
|
50
|
+
"vue-tsc": "^3.3.12",
|
|
51
|
+
"x-config-lib": "^0.1.10",
|
|
52
|
+
"x-config-oxfmt": "^0.1.7",
|
|
53
|
+
"x-config-oxlint": "^0.1.8",
|
|
52
54
|
"zod": "^4.6.5"
|
|
53
55
|
},
|
|
54
56
|
"peerDependencies": {
|
|
55
57
|
"axios": "^1.20.0",
|
|
56
|
-
"vue": "^3.5.
|
|
57
|
-
"vue-i18n": "^11.4.
|
|
58
|
+
"vue": "^3.5.43",
|
|
59
|
+
"vue-i18n": "^11.4.13",
|
|
58
60
|
"vue-router": "^5.3.1",
|
|
59
|
-
"vuetify": "^4.2.
|
|
61
|
+
"vuetify": "^4.2.3"
|
|
60
62
|
}
|
|
61
63
|
}
|