@delta-comic/core 0.3.2 → 1.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/LICENSE +1 -1
- package/dist/index.js +4268 -25
- package/dist/index.js.map +1 -1
- package/dist/pack.tgz +0 -0
- package/package.json +17 -13
- package/dist/index.umd.cjs +0 -2
- package/dist/index.umd.cjs.map +0 -1
- package/dist/lib/fc.d.ts +0 -6
- package/dist/lib/index.d.ts +0 -3
- package/dist/lib/ipc.d.ts +0 -44
- package/dist/lib/temp.d.ts +0 -23
package/dist/pack.tgz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@delta-comic/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "空阙虱楼",
|
|
5
|
-
"homepage": "https://github.com/delta-comic/delta-comic
|
|
5
|
+
"homepage": "https://github.com/delta-comic/delta-comic",
|
|
6
6
|
"license": "AGPL-3.0-only",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "wenxig",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
|
-
"url": "https://github.com/delta-comic/delta-comic
|
|
13
|
+
"url": "https://github.com/delta-comic/delta-comic.git"
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
16
|
"dist"
|
|
@@ -29,11 +29,22 @@
|
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@aptabase/tauri": "^0.4.1",
|
|
34
|
+
"@sentry/vue": "^10.45.0",
|
|
35
|
+
"tauri-plugin-sentry-api": "^0.5.0",
|
|
36
|
+
"vue": "^3.5.30"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
|
|
40
|
+
"vite-plus": "latest",
|
|
41
|
+
"vue-component-type-helpers": "^3.2.6"
|
|
42
|
+
},
|
|
32
43
|
"peerDependencies": {
|
|
33
44
|
"pinia": "^3.0",
|
|
34
45
|
"vue": "^3.5",
|
|
35
|
-
"@delta-comic/model": "
|
|
36
|
-
"@delta-comic/utils": "
|
|
46
|
+
"@delta-comic/model": "1.3.0",
|
|
47
|
+
"@delta-comic/utils": "1.3.0"
|
|
37
48
|
},
|
|
38
49
|
"release": {
|
|
39
50
|
"tagFormat": "core-${version}"
|
|
@@ -42,14 +53,7 @@
|
|
|
42
53
|
"tarball": "./dist/pack.tgz"
|
|
43
54
|
},
|
|
44
55
|
"readme": "./README.md",
|
|
45
|
-
"devDependencies": {
|
|
46
|
-
"vite": "8.0.0-beta.15",
|
|
47
|
-
"vue-component-type-helpers": "^3.2.4"
|
|
48
|
-
},
|
|
49
56
|
"scripts": {
|
|
50
|
-
"build": "
|
|
51
|
-
"version:major": "pnpm version major --no-git-tag-version || true",
|
|
52
|
-
"version:minor": "pnpm version minor --no-git-tag-version || true",
|
|
53
|
-
"version:patch": "pnpm version patch --no-git-tag-version || true"
|
|
57
|
+
"build": "vp build && pnpm pack --out ./dist/pack.tgz"
|
|
54
58
|
}
|
|
55
59
|
}
|
package/dist/index.umd.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`@delta-comic/utils`),require(`pinia`),require(`vue`)):typeof define==`function`&&define.amd?define([`exports`,`@delta-comic/utils`,`pinia`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.DcCore={},e.window.$$lib$$.DcUtils,e.window.$$lib$$.Pinia,e.window.$$lib$$.Vue))})(this,function(e,t,n,r){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var i=(0,t.useGlobalVar)((0,n.defineStore)(`core:temp`,e=>{let t=(0,r.shallowReactive)(new Map);return{$apply:(e,n)=>(e=`reactive:${e}`,t.has(e)||t.set(e,(0,r.reactive)(n())),t.get(e)),$has:e.action(e=>(e=`reactive:${e}`,t.has(e)),`has`),$onlyGet:e.action(e=>(e=`reactive:${e}`,t.get(e)),`onlyGet`),$applyRaw:e.action((e,n)=>(e=`raw:${e}`,t.has(e)||t.set(e,n()),t.get(e)),`applyRaw`),$hasRaw:e.action(e=>(e=`raw:${e}`,t.has(e)),`hasRaw`),$onlyGetRaw:e.action(e=>(e=`raw:${e}`,t.get(e)),`onlyGetRaw`)}}),`store/temp`);let a=()=>i(window.$api.piniaInstance);function o(e,t){if(t??(t=e,e=0),e>=t)throw Error(`Invalid input: The maximum value must be greater than the minimum value.`);return Math.random()*(t-e)+e}function s(e,t){return Math.floor(o(e,t))}function c(e,t,n){return n==null?Math.min(e,t):Math.min(Math.max(e,t),n)}function l(e,t,n){return Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),c(e,t,n)}function u(...e){let t=0,n=1,r=!1;switch(e.length){case 1:typeof e[0]==`boolean`?r=e[0]:n=e[0];break;case 2:typeof e[1]==`boolean`?(n=e[0],r=e[1]):(t=e[0],n=e[1]);case 3:typeof e[2]==`object`&&e[2]!=null&&e[2][e[1]]===e[0]?(t=0,n=e[0],r=!1):(t=e[0],n=e[1],r=e[2])}return typeof t!=`number`&&(t=Number(t)),typeof n!=`number`&&(t=Number(n)),t||=0,n||=0,t>n&&([t,n]=[n,t]),t=l(t,-(2**53-1),2**53-1),n=l(n,-(2**53-1),2**53-1),t===n?t:r?o(t,n+1):s(t,n+1)}var d=class{static sharedFunctions=(0,t.useGlobalVar)(new Map,`utils/SharedFunction/sharedFunctions`);static define(e,t,n){return console.debug(`[SharedFunction.define] defined new function`,t,`:`,n,`->`,e),this.sharedFunctions.set(n,[...this.sharedFunctions.get(n)??[],{fn:e,plugin:t}]),e}static call(e,...t){let n=this.sharedFunctions.get(e)?.map(e=>({result:e.fn(...t),...e}))??[],r=Promise.all(n.map(async e=>({...e,result:await e.result})));return Object.assign(n,r)}static callRandom(e,...t){let n=this.sharedFunctions.get(e)??[],r=u(0,n.length-1),i=n[r];if(!i)throw Error(`[SharedFunction.callRandom] call ${e}, but not resigner any function.`);console.log(`[SharedFunction.callRandom] call index: ${r} in ${n.length}`,i);let a=i.fn(...t),o={result:a,...i},s=(async()=>({...i,result:await a}))();return Object.assign(o,s)}static callWitch(e,t,...n){let r=(this.sharedFunctions.get(e)??[]).filter(e=>e.plugin===t);if(!r.length)throw Error(`[SharedFunction.callWitch] not found plugin function (plugin: ${t}, name: ${e})`);let i=r.map(e=>({result:e.fn(...n),...e})),a=Promise.all(i.map(async e=>({...e,result:await e.result})));return Object.assign(i,a)}},f=(0,t.useGlobalVar)((()=>{let e=(0,r.shallowRef)(!!document.fullscreenElement);return document.addEventListener(`fullscreenchange`,()=>{e.value=!!document.fullscreenElement}),e})(),`core/isFc`);e.SharedFunction=d,e.useFullscreen=()=>({isFullscreen:f,entry(){f.value=!0},exit(){f.value=!1},toggle(){f.value=!f.value}}),e.useTemp=a});
|
|
2
|
-
//# sourceMappingURL=index.umd.cjs.map
|
package/dist/index.umd.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.cjs","names":["random","random","clamp"],"sources":["../lib/temp.ts","../../../node_modules/.pnpm/es-toolkit@1.40.0/node_modules/es-toolkit/dist/math/random.mjs","../../../node_modules/.pnpm/es-toolkit@1.40.0/node_modules/es-toolkit/dist/math/randomInt.mjs","../../../node_modules/.pnpm/es-toolkit@1.40.0/node_modules/es-toolkit/dist/math/clamp.mjs","../../../node_modules/.pnpm/es-toolkit@1.40.0/node_modules/es-toolkit/dist/compat/math/clamp.mjs","../../../node_modules/.pnpm/es-toolkit@1.40.0/node_modules/es-toolkit/dist/compat/math/random.mjs","../lib/ipc.ts","../lib/fc.ts"],"sourcesContent":["import { useGlobalVar } from '@delta-comic/utils'\nimport { defineStore } from 'pinia'\nimport { reactive, shallowReactive, type Reactive } from 'vue'\n\nconst _useTemp = useGlobalVar(\n defineStore('core:temp', helper => {\n const tempBase = shallowReactive(new Map<string, any>())\n const $apply = <T extends object>(id: string, def: () => T) => {\n id = `reactive:${id}`\n if (!tempBase.has(id)) tempBase.set(id, reactive(def()))\n const store: Reactive<T> = tempBase.get(id)\n return store\n }\n const $has = helper.action((id: string): boolean => {\n id = `reactive:${id}`\n return tempBase.has(id)\n }, 'has')\n const $onlyGet = helper.action(<T extends object>(id: string): Reactive<T> => {\n id = `reactive:${id}`\n return tempBase.get(id)\n }, 'onlyGet')\n const $applyRaw = helper.action(<T extends object>(id: string, def: () => T) => {\n id = `raw:${id}`\n if (!tempBase.has(id)) tempBase.set(id, def())\n const store: T = tempBase.get(id)\n return store\n }, 'applyRaw')\n const $hasRaw = helper.action((id: string): boolean => {\n id = `raw:${id}`\n return tempBase.has(id)\n }, 'hasRaw')\n const $onlyGetRaw = helper.action(<T extends object>(id: string): Reactive<T> => {\n id = `raw:${id}`\n return tempBase.get(id)\n }, 'onlyGetRaw')\n return { $apply, $has, $onlyGet, $applyRaw, $hasRaw, $onlyGetRaw }\n }),\n 'store/temp'\n)\n\nexport const useTemp = () => _useTemp(window.$api.piniaInstance)","function random(minimum, maximum) {\n if (maximum == null) {\n maximum = minimum;\n minimum = 0;\n }\n if (minimum >= maximum) {\n throw new Error('Invalid input: The maximum value must be greater than the minimum value.');\n }\n return Math.random() * (maximum - minimum) + minimum;\n}\n\nexport { random };\n","import { random } from './random.mjs';\n\nfunction randomInt(minimum, maximum) {\n return Math.floor(random(minimum, maximum));\n}\n\nexport { randomInt };\n","function clamp(value, bound1, bound2) {\n if (bound2 == null) {\n return Math.min(value, bound1);\n }\n return Math.min(Math.max(value, bound1), bound2);\n}\n\nexport { clamp };\n","import { clamp as clamp$1 } from '../../math/clamp.mjs';\n\nfunction clamp(value, bound1, bound2) {\n if (Number.isNaN(bound1)) {\n bound1 = 0;\n }\n if (Number.isNaN(bound2)) {\n bound2 = 0;\n }\n return clamp$1(value, bound1, bound2);\n}\n\nexport { clamp };\n","import { clamp } from './clamp.mjs';\nimport { random as random$1 } from '../../math/random.mjs';\nimport { randomInt } from '../../math/randomInt.mjs';\n\nfunction random(...args) {\n let minimum = 0;\n let maximum = 1;\n let floating = false;\n switch (args.length) {\n case 1: {\n if (typeof args[0] === 'boolean') {\n floating = args[0];\n }\n else {\n maximum = args[0];\n }\n break;\n }\n case 2: {\n if (typeof args[1] === 'boolean') {\n maximum = args[0];\n floating = args[1];\n }\n else {\n minimum = args[0];\n maximum = args[1];\n }\n }\n case 3: {\n if (typeof args[2] === 'object' && args[2] != null && args[2][args[1]] === args[0]) {\n minimum = 0;\n maximum = args[0];\n floating = false;\n }\n else {\n minimum = args[0];\n maximum = args[1];\n floating = args[2];\n }\n }\n }\n if (typeof minimum !== 'number') {\n minimum = Number(minimum);\n }\n if (typeof maximum !== 'number') {\n minimum = Number(maximum);\n }\n if (!minimum) {\n minimum = 0;\n }\n if (!maximum) {\n maximum = 0;\n }\n if (minimum > maximum) {\n [minimum, maximum] = [maximum, minimum];\n }\n minimum = clamp(minimum, -Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER);\n maximum = clamp(maximum, -Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER);\n if (minimum === maximum) {\n return minimum;\n }\n if (floating) {\n return random$1(minimum, maximum + 1);\n }\n else {\n return randomInt(minimum, maximum + 1);\n }\n}\n\nexport { random };\n","import type { uni } from '@delta-comic/model'\nimport { useGlobalVar } from '@delta-comic/utils'\nimport { random } from 'es-toolkit/compat'\n\nexport interface SharedFunctions {\n getRandomProvide(signal?: AbortSignal): PromiseLike<uni.item.Item[]>\n\n addRecent(item: uni.item.Item): PromiseLike<any>\n routeToContent(\n contentType_: uni.content.ContentType_,\n id: string,\n ep: string,\n preload?: uni.content.PreloadValue\n ): PromiseLike<any>\n routeToSearch(\n input: string,\n source?: [plugin: string, name: string],\n sort?: string\n ): PromiseLike<any>\n\n addAuthorSubscribe(author: uni.item.Author, plugin: string): PromiseLike<void>\n removeAuthorSubscribe(author: uni.item.Author, plugin: string): PromiseLike<void>\n getIsAuthorSubscribe(author: uni.item.Author, plugin: string): PromiseLike<boolean>\n\n triggerSharePopup(page: uni.content.ContentPage): PromiseLike<void>\n triggerShareToken(token: string): PromiseLike<void>\n pushShareToken(token: string): PromiseLike<void>\n}\n\nexport class SharedFunction {\n private static sharedFunctions = useGlobalVar(\n new Map<string, { fn: SharedFunctions[keyof SharedFunctions]; plugin: string }[]>(),\n 'utils/SharedFunction/sharedFunctions'\n )\n public static define<TKey extends keyof SharedFunctions>(\n fn: SharedFunctions[TKey],\n plugin: string,\n name: TKey\n ) {\n console.debug('[SharedFunction.define] defined new function', plugin, ':', name, '->', fn)\n this.sharedFunctions.set(name, [...(this.sharedFunctions.get(name) ?? []), { fn, plugin }])\n return fn\n }\n public static call<TKey extends keyof SharedFunctions>(\n name: TKey,\n ...args: Parameters<SharedFunctions[TKey]>\n ) {\n const ins =\n this.sharedFunctions.get(name)?.map(v => {\n const result: ReturnType<SharedFunctions[TKey]> = (<any>v.fn)(...args)\n return { result, ...v }\n }) ?? []\n const results = Promise.all(ins.map(async v => ({ ...v, result: await v.result })))\n return Object.assign(ins, results)\n }\n public static callRandom<TKey extends keyof SharedFunctions>(\n name: TKey,\n ...args: Parameters<SharedFunctions[TKey]>\n ) {\n const all = this.sharedFunctions.get(name) ?? []\n const index = random(0, all.length - 1)\n const it = all[index]\n if (!it)\n throw new Error(`[SharedFunction.callRandom] call ${name}, but not resigner any function.`)\n console.log(`[SharedFunction.callRandom] call index: ${index} in ${all.length}`, it)\n const result: ReturnType<SharedFunctions[TKey]> = (<any>it.fn)(...args)\n const ins = { result, ...it }\n const results = (async () => ({ ...it, result: await result }))()\n return Object.assign(ins, results)\n }\n public static callWitch<TKey extends keyof SharedFunctions>(\n name: TKey,\n plugin: string,\n ...args: Parameters<SharedFunctions[TKey]>\n ) {\n const all = this.sharedFunctions.get(name) ?? []\n const them = all.filter(c => c.plugin === plugin)\n if (!them.length)\n throw new Error(\n `[SharedFunction.callWitch] not found plugin function (plugin: ${plugin}, name: ${name})`\n )\n\n const ins = them.map(v => {\n const result: ReturnType<SharedFunctions[TKey]> = (<any>v.fn)(...args)\n return { result, ...v }\n })\n const results = Promise.all(ins.map(async v => ({ ...v, result: await v.result })))\n return Object.assign(ins, results)\n }\n}","import { useGlobalVar } from '@delta-comic/utils'\nimport { shallowRef } from 'vue'\n\nconst isFullscreen = useGlobalVar(\n (() => {\n const isFc = shallowRef(!!document.fullscreenElement)\n document.addEventListener('fullscreenchange', () => {\n isFc.value = !!document.fullscreenElement\n })\n return isFc\n })(),\n 'core/isFc'\n)\n\nexport const useFullscreen = () => ({\n isFullscreen,\n entry() {\n isFullscreen.value = true\n },\n exit() {\n isFullscreen.value = false\n },\n toggle() {\n isFullscreen.value = !isFullscreen.value\n }\n})"],"x_google_ignoreList":[1,2,3,4,5],"mappings":"0bAIA,IAAM,GAAA,EAAA,EAAA,eAAA,EAAA,EAAA,aACQ,YAAa,GAAU,CACjC,IAAM,GAAA,EAAA,EAAA,iBAA2B,IAAI,IAAmB,CA6BxD,MAAO,CAAE,QA5ByB,EAAY,KAC5C,EAAK,YAAY,IACZ,EAAS,IAAI,EAAG,EAAE,EAAS,IAAI,GAAA,EAAA,EAAA,UAAa,GAAK,CAAC,CAAC,CAC7B,EAAS,IAAI,EAAG,EAyB5B,KAtBJ,EAAO,OAAQ,IAC1B,EAAK,YAAY,IACV,EAAS,IAAI,EAAG,EACtB,MAAM,CAmBc,SAlBN,EAAO,OAA0B,IAChD,EAAK,YAAY,IACV,EAAS,IAAI,EAAG,EACtB,UAAU,CAeoB,UAdf,EAAO,QAA0B,EAAY,KAC7D,EAAK,OAAO,IACP,EAAS,IAAI,EAAG,EAAE,EAAS,IAAI,EAAI,GAAK,CAAC,CAC7B,EAAS,IAAI,EAAG,EAEhC,WAAW,CAS8B,QAR5B,EAAO,OAAQ,IAC7B,EAAK,OAAO,IACL,EAA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ACvB,GAAW,UAAa,CAAE,GAAG,EAAI,OAAQ,MAAM,EAAQ,IAAI,CACjE,OAAO,OAAO,OAAO,EAAK,EAAQ,CAEpC,OAAc,UACZ,EACA,EACA,GAAG,EACH,CAEA,IAAM,GADM,KAAK,gBAAgB,IAAI,EAAK,EAAI,EAAE,EAC/B,OAAO,GAAK,EAAE,SAAW,EAAO,CACjD,GAAI,CAAC,EAAK,OACR,MAAU,MACR,iEAAiE,EAAO,UAAU,EAAK,GACxF,CAEH,IAAM,EAAM,EAAK,IAAI,IAEZ,CAAE,OAD+C,EAAE,GAAI,GAAG,EAAK,CACrD,GAAG,EAAG,EACvB,CACI,EAAU,QAAQ,IAAI,EAAI,IAAI,KAAM,KAAM,CAAE,GAAG,EAAG,OAAQ,MAAM,EAAE,OAAQ,EAAE,CAAC,CACnF,OAAO,OAAO,OAAO,EAAK,EAAQ,GCpFhC,GAAA,EAAA,EAAA,mBACG,CACL,IAAM,GAAA,EAAA,EAAA,YAAkB,CAAC,CAAC,SAAS,kBAAkB,CAIrD,OAHA,SAAS,iBAAiB,uBAA0B,CAClD,EAAK,MAAQ,CAAC,CAAC,SAAS,mBACxB,CACK,KACL,CACJ,YACD,yCAEmC,CAClC,eACA,OAAQ,CACN,EAAa,MAAQ,IAEvB,MAAO,CACL,EAAa,MAAQ,IAEvB,QAAS,CACP,EAAa,MAAQ,CAAC,EAAa,OAEtC"}
|
package/dist/lib/fc.d.ts
DELETED
package/dist/lib/index.d.ts
DELETED
package/dist/lib/ipc.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { uni } from '@delta-comic/model';
|
|
2
|
-
export interface SharedFunctions {
|
|
3
|
-
getRandomProvide(signal?: AbortSignal): PromiseLike<uni.item.Item[]>;
|
|
4
|
-
addRecent(item: uni.item.Item): PromiseLike<any>;
|
|
5
|
-
routeToContent(contentType_: uni.content.ContentType_, id: string, ep: string, preload?: uni.content.PreloadValue): PromiseLike<any>;
|
|
6
|
-
routeToSearch(input: string, source?: [plugin: string, name: string], sort?: string): PromiseLike<any>;
|
|
7
|
-
addAuthorSubscribe(author: uni.item.Author, plugin: string): PromiseLike<void>;
|
|
8
|
-
removeAuthorSubscribe(author: uni.item.Author, plugin: string): PromiseLike<void>;
|
|
9
|
-
getIsAuthorSubscribe(author: uni.item.Author, plugin: string): PromiseLike<boolean>;
|
|
10
|
-
triggerSharePopup(page: uni.content.ContentPage): PromiseLike<void>;
|
|
11
|
-
triggerShareToken(token: string): PromiseLike<void>;
|
|
12
|
-
pushShareToken(token: string): PromiseLike<void>;
|
|
13
|
-
}
|
|
14
|
-
export declare class SharedFunction {
|
|
15
|
-
private static sharedFunctions;
|
|
16
|
-
static define<TKey extends keyof SharedFunctions>(fn: SharedFunctions[TKey], plugin: string, name: TKey): SharedFunctions[TKey];
|
|
17
|
-
static call<TKey extends keyof SharedFunctions>(name: TKey, ...args: Parameters<SharedFunctions[TKey]>): {
|
|
18
|
-
fn: SharedFunctions[keyof SharedFunctions];
|
|
19
|
-
plugin: string;
|
|
20
|
-
result: ReturnType<SharedFunctions[TKey]>;
|
|
21
|
-
}[] & Promise<{
|
|
22
|
-
result: Awaited<ReturnType<SharedFunctions[TKey]>>;
|
|
23
|
-
fn: SharedFunctions[keyof SharedFunctions];
|
|
24
|
-
plugin: string;
|
|
25
|
-
}[]>;
|
|
26
|
-
static callRandom<TKey extends keyof SharedFunctions>(name: TKey, ...args: Parameters<SharedFunctions[TKey]>): {
|
|
27
|
-
fn: SharedFunctions[keyof SharedFunctions];
|
|
28
|
-
plugin: string;
|
|
29
|
-
result: ReturnType<SharedFunctions[TKey]>;
|
|
30
|
-
} & Promise<{
|
|
31
|
-
result: Awaited<ReturnType<SharedFunctions[TKey]>>;
|
|
32
|
-
fn: SharedFunctions[keyof SharedFunctions];
|
|
33
|
-
plugin: string;
|
|
34
|
-
}>;
|
|
35
|
-
static callWitch<TKey extends keyof SharedFunctions>(name: TKey, plugin: string, ...args: Parameters<SharedFunctions[TKey]>): {
|
|
36
|
-
fn: SharedFunctions[keyof SharedFunctions];
|
|
37
|
-
plugin: string;
|
|
38
|
-
result: ReturnType<SharedFunctions[TKey]>;
|
|
39
|
-
}[] & Promise<{
|
|
40
|
-
result: Awaited<ReturnType<SharedFunctions[TKey]>>;
|
|
41
|
-
fn: SharedFunctions[keyof SharedFunctions];
|
|
42
|
-
plugin: string;
|
|
43
|
-
}[]>;
|
|
44
|
-
}
|
package/dist/lib/temp.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Reactive } from 'vue';
|
|
2
|
-
export declare const useTemp: () => import('pinia').Store<"core:temp", Pick<{
|
|
3
|
-
$apply: <T extends object>(id: string, def: () => T) => Reactive<T>;
|
|
4
|
-
$has: (id: string) => boolean;
|
|
5
|
-
$onlyGet: <T extends object>(id: string) => Reactive<T>;
|
|
6
|
-
$applyRaw: <T extends object>(id: string, def: () => T) => T;
|
|
7
|
-
$hasRaw: (id: string) => boolean;
|
|
8
|
-
$onlyGetRaw: <T extends object>(id: string) => Reactive<T>;
|
|
9
|
-
}, never>, Pick<{
|
|
10
|
-
$apply: <T extends object>(id: string, def: () => T) => Reactive<T>;
|
|
11
|
-
$has: (id: string) => boolean;
|
|
12
|
-
$onlyGet: <T extends object>(id: string) => Reactive<T>;
|
|
13
|
-
$applyRaw: <T extends object>(id: string, def: () => T) => T;
|
|
14
|
-
$hasRaw: (id: string) => boolean;
|
|
15
|
-
$onlyGetRaw: <T extends object>(id: string) => Reactive<T>;
|
|
16
|
-
}, never>, Pick<{
|
|
17
|
-
$apply: <T extends object>(id: string, def: () => T) => Reactive<T>;
|
|
18
|
-
$has: (id: string) => boolean;
|
|
19
|
-
$onlyGet: <T extends object>(id: string) => Reactive<T>;
|
|
20
|
-
$applyRaw: <T extends object>(id: string, def: () => T) => T;
|
|
21
|
-
$hasRaw: (id: string) => boolean;
|
|
22
|
-
$onlyGetRaw: <T extends object>(id: string) => Reactive<T>;
|
|
23
|
-
}, "$apply" | "$has" | "$onlyGet" | "$applyRaw" | "$hasRaw" | "$onlyGetRaw">>;
|