@kimesh/pinia 0.0.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/README.md +3 -0
- package/augment.d.ts +26 -0
- package/dist/composables/index.d.ts +2 -0
- package/dist/composables/index.js +3 -0
- package/dist/composables-DRL29fIt.js +23 -0
- package/dist/composables-DRL29fIt.js.map +1 -0
- package/dist/index-BI7uRRJC.d.ts +17 -0
- package/dist/index-BI7uRRJC.d.ts.map +1 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +84 -0
- package/dist/index.js.map +1 -0
- package/dist/plugin-CIfIwAj8.js +28 -0
- package/dist/plugin-CIfIwAj8.js.map +1 -0
- package/dist/plugin-C_cuPpfH.d.ts +12 -0
- package/dist/plugin-C_cuPpfH.d.ts.map +1 -0
- package/dist/plugin.d.ts +2 -0
- package/dist/plugin.js +3 -0
- package/package.json +52 -0
package/README.md
ADDED
package/augment.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @kimesh/pinia - Type Augmentation
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { Pinia } from "pinia";
|
|
6
|
+
import type { KimeshPiniaConfig } from "./src/types.js";
|
|
7
|
+
|
|
8
|
+
declare module "@kimesh/kit" {
|
|
9
|
+
interface KimeshModuleOptions {
|
|
10
|
+
pinia?: KimeshPiniaConfig;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare module "@kimesh/router-runtime" {
|
|
15
|
+
interface KimeshAppContext {
|
|
16
|
+
$pinia: Pinia;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare module "vue" {
|
|
21
|
+
interface ComponentCustomProperties {
|
|
22
|
+
$pinia: Pinia;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { tryUseKimeshApp, useKimeshApp } from "@kimesh/router-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/composables/use-pinia.ts
|
|
4
|
+
/**
|
|
5
|
+
* Get the Pinia instance from Kimesh app context.
|
|
6
|
+
* @throws Error if @kimesh/pinia module is not installed
|
|
7
|
+
*/
|
|
8
|
+
function useKimeshPinia() {
|
|
9
|
+
const app = useKimeshApp();
|
|
10
|
+
if (!("$pinia" in app)) throw new Error("[Kimesh] useKimeshPinia() requires @kimesh/pinia module. Add the pinia module to your kimesh.config.ts");
|
|
11
|
+
return app.$pinia;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Try to get the Pinia instance without throwing.
|
|
15
|
+
*/
|
|
16
|
+
function tryUseKimeshPinia() {
|
|
17
|
+
const app = tryUseKimeshApp();
|
|
18
|
+
return app && "$pinia" in app ? app.$pinia : void 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
export { tryUseKimeshPinia, useKimeshPinia };
|
|
23
|
+
//# sourceMappingURL=composables-DRL29fIt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composables-DRL29fIt.js","names":[],"sources":["../src/composables/use-pinia.ts"],"sourcesContent":["/**\n * @kimesh/pinia - useKimeshPinia Composable\n */\n\nimport type { Pinia } from \"pinia\";\nimport { useKimeshApp, tryUseKimeshApp } from \"@kimesh/router-runtime\";\n\n/**\n * Get the Pinia instance from Kimesh app context.\n * @throws Error if @kimesh/pinia module is not installed\n */\nexport function useKimeshPinia(): Pinia {\n const app = useKimeshApp();\n\n if (!(\"$pinia\" in app)) {\n throw new Error(\n \"[Kimesh] useKimeshPinia() requires @kimesh/pinia module. \" +\n \"Add the pinia module to your kimesh.config.ts\",\n );\n }\n\n return (app as { $pinia: Pinia }).$pinia;\n}\n\n/**\n * Try to get the Pinia instance without throwing.\n */\nexport function tryUseKimeshPinia(): Pinia | undefined {\n const app = tryUseKimeshApp();\n return app && \"$pinia\" in app ? (app as { $pinia: Pinia }).$pinia : undefined;\n}\n"],"mappings":";;;;;;;AAWA,SAAgB,iBAAwB;CACtC,MAAM,MAAM,cAAc;AAE1B,OAAM,YAAY,KAChB,OAAM,IAAI,MACR;AAKJ,QAAQ,IAA0B;AACnC;;;;AAKD,SAAgB,oBAAuC;CACrD,MAAM,MAAM,iBAAiB;AAC7B,QAAO,OAAO,YAAY,MAAO,IAA0B;AAC5D"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Pinia } from "pinia";
|
|
2
|
+
|
|
3
|
+
//#region src/composables/use-pinia.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Get the Pinia instance from Kimesh app context.
|
|
7
|
+
* @throws Error if @kimesh/pinia module is not installed
|
|
8
|
+
*/
|
|
9
|
+
declare function useKimeshPinia(): Pinia;
|
|
10
|
+
/**
|
|
11
|
+
* Try to get the Pinia instance without throwing.
|
|
12
|
+
*/
|
|
13
|
+
declare function tryUseKimeshPinia(): Pinia | undefined;
|
|
14
|
+
//# sourceMappingURL=use-pinia.d.ts.map
|
|
15
|
+
//#endregion
|
|
16
|
+
export { tryUseKimeshPinia as tryUseKimeshPinia$1, useKimeshPinia as useKimeshPinia$1 };
|
|
17
|
+
//# sourceMappingURL=index-BI7uRRJC.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BI7uRRJC.d.ts","names":[],"sources":["../src/composables/use-pinia.ts"],"sourcesContent":[],"mappings":";;;;AA2BA;;;;iBAhBgB,cAAA,CAAA,GAAkB;;;;iBAgBlB,iBAAA,CAAA,GAAqB"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { tryUseKimeshPinia$1 as tryUseKimeshPinia, useKimeshPinia$1 as useKimeshPinia } from "./index-BI7uRRJC.js";
|
|
2
|
+
import { PiniaPluginOptions, piniaPlugin$1 as piniaPlugin } from "./plugin-C_cuPpfH.js";
|
|
3
|
+
import * as _kimesh_kit0 from "@kimesh/kit";
|
|
4
|
+
import { Pinia, PiniaPlugin, PiniaPlugin as PiniaPlugin$1, Store, StoreDefinition } from "pinia";
|
|
5
|
+
|
|
6
|
+
//#region src/types.d.ts
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Configuration options for the Kimesh Pinia module.
|
|
10
|
+
*/
|
|
11
|
+
interface KimeshPiniaConfig {
|
|
12
|
+
/** Enable auto-imports for defineStore, storeToRefs, etc. @default true */
|
|
13
|
+
autoImports?: boolean;
|
|
14
|
+
/** Directory to scan for store files (relative to project root). @default 'src/stores' */
|
|
15
|
+
storesDir?: string;
|
|
16
|
+
/** Enable Vue DevTools integration. @default true */
|
|
17
|
+
devtools?: boolean;
|
|
18
|
+
/** Additional Pinia plugins to register. */
|
|
19
|
+
plugins?: PiniaPlugin$1[];
|
|
20
|
+
/** Pattern to match store files. @default '*.ts' */
|
|
21
|
+
storePattern?: string;
|
|
22
|
+
/** Whether to auto-scan stores directory. @default true */
|
|
23
|
+
autoScanStores?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Runtime plugin options passed from module to runtime.
|
|
27
|
+
*/
|
|
28
|
+
interface PiniaRuntimePluginOptions {
|
|
29
|
+
devtools: boolean;
|
|
30
|
+
plugins: PiniaPlugin$1[];
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=types.d.ts.map
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/module.d.ts
|
|
35
|
+
declare const _default: _kimesh_kit0.KimeshModule<KimeshPiniaConfig>;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { type KimeshPiniaConfig, type Pinia, type PiniaPlugin, type PiniaPluginOptions, type PiniaRuntimePluginOptions, type Store, type StoreDefinition, _default as default, _default as pinia, piniaPlugin, tryUseKimeshPinia, useKimeshPinia };
|
|
38
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/module.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AASA;AAuBiB,UAvBA,iBAAA,CAuByB;;;;EChBU,SAAA,CAAA,EAAA,MAAA;;;;YDIxC;;;;;;;;;UAYK,yBAAA;;WAEN;;;;;AAzBX,cCOoD,QDPnC,2BAWM,kBAAA,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { piniaPlugin } from "./plugin-CIfIwAj8.js";
|
|
2
|
+
import { tryUseKimeshPinia, useKimeshPinia } from "./composables-DRL29fIt.js";
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import { addImportsDir, addImportsPreset, addRuntimePlugin, addVitePlugin, createResolver, defineKimeshModule } from "@kimesh/kit";
|
|
6
|
+
|
|
7
|
+
//#region src/module.ts
|
|
8
|
+
const PINIA_IMPORTS = [
|
|
9
|
+
"defineStore",
|
|
10
|
+
"acceptHMRUpdate",
|
|
11
|
+
"storeToRefs",
|
|
12
|
+
"mapStores",
|
|
13
|
+
"mapState",
|
|
14
|
+
"mapGetters",
|
|
15
|
+
"mapActions",
|
|
16
|
+
"mapWritableState",
|
|
17
|
+
"createPinia",
|
|
18
|
+
"setActivePinia",
|
|
19
|
+
"getActivePinia"
|
|
20
|
+
];
|
|
21
|
+
var module_default = defineKimeshModule({
|
|
22
|
+
meta: {
|
|
23
|
+
name: "@kimesh/pinia",
|
|
24
|
+
version: "1.0.0",
|
|
25
|
+
configKey: "pinia"
|
|
26
|
+
},
|
|
27
|
+
defaults: {
|
|
28
|
+
autoImports: true,
|
|
29
|
+
storesDir: "src/stores",
|
|
30
|
+
storePattern: "*.ts",
|
|
31
|
+
devtools: true,
|
|
32
|
+
autoScanStores: true,
|
|
33
|
+
plugins: []
|
|
34
|
+
},
|
|
35
|
+
async setup(options, kimesh) {
|
|
36
|
+
const { autoImports = true, storesDir = "src/stores", storePattern = "*.ts", devtools = true, autoScanStores = true } = options;
|
|
37
|
+
const resolver = createResolver(import.meta.url);
|
|
38
|
+
addRuntimePlugin(resolver.resolve("./plugin.js"), { append: false });
|
|
39
|
+
if (autoImports) {
|
|
40
|
+
addImportsPreset({
|
|
41
|
+
from: "pinia",
|
|
42
|
+
imports: [...PINIA_IMPORTS]
|
|
43
|
+
});
|
|
44
|
+
if (autoScanStores) {
|
|
45
|
+
const storesPath = join(kimesh.root, storesDir);
|
|
46
|
+
if (existsSync(storesPath)) addImportsDir({
|
|
47
|
+
path: storesPath,
|
|
48
|
+
pattern: storePattern
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
addVitePlugin({
|
|
53
|
+
name: "@kimesh/pinia:optimize",
|
|
54
|
+
config() {
|
|
55
|
+
return {
|
|
56
|
+
define: {
|
|
57
|
+
__SSR__: "false",
|
|
58
|
+
__HYDRATION__: "false",
|
|
59
|
+
"process.server": "false",
|
|
60
|
+
"import.meta.server": "false"
|
|
61
|
+
},
|
|
62
|
+
optimizeDeps: { include: ["pinia"] }
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
addVitePlugin({
|
|
67
|
+
name: "@kimesh/pinia:inject-options",
|
|
68
|
+
transform(code, id) {
|
|
69
|
+
if (id.includes("@kimesh/pinia") && id.includes("plugin")) {
|
|
70
|
+
const optionsCode = `globalThis.__KIMESH_PINIA_OPTIONS__ = { devtools: ${devtools}, plugins: [] };\n`;
|
|
71
|
+
return {
|
|
72
|
+
code: optionsCode + code,
|
|
73
|
+
map: null
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
//#endregion
|
|
83
|
+
export { module_default as default, module_default as pinia, piniaPlugin, tryUseKimeshPinia, useKimeshPinia };
|
|
84
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/module.ts"],"sourcesContent":["/**\n * @kimesh/pinia - Module Implementation\n *\n * Pinia state management integration for Kimesh.\n */\n\nimport { existsSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport {\n defineKimeshModule,\n addVitePlugin,\n addImportsPreset,\n addImportsDir,\n addRuntimePlugin,\n createResolver,\n} from \"@kimesh/kit\";\nimport type { KimeshPiniaConfig } from \"./types.js\";\n\nconst PINIA_IMPORTS = [\n \"defineStore\",\n \"acceptHMRUpdate\",\n \"storeToRefs\",\n \"mapStores\",\n \"mapState\",\n \"mapGetters\",\n \"mapActions\",\n \"mapWritableState\",\n \"createPinia\",\n \"setActivePinia\",\n \"getActivePinia\",\n] as const;\n\nexport default defineKimeshModule<KimeshPiniaConfig>({\n meta: {\n name: \"@kimesh/pinia\",\n version: \"1.0.0\",\n configKey: \"pinia\",\n },\n\n defaults: {\n autoImports: true,\n storesDir: \"src/stores\",\n storePattern: \"*.ts\",\n devtools: true,\n autoScanStores: true,\n plugins: [],\n },\n\n async setup(options, kimesh) {\n const {\n autoImports = true,\n storesDir = \"src/stores\",\n storePattern = \"*.ts\",\n devtools = true,\n autoScanStores = true,\n } = options;\n\n const resolver = createResolver(import.meta.url);\n\n addRuntimePlugin(resolver.resolve(\"./plugin.js\"), { append: false });\n\n if (autoImports) {\n addImportsPreset({ from: \"pinia\", imports: [...PINIA_IMPORTS] });\n\n if (autoScanStores) {\n const storesPath = join(kimesh.root, storesDir);\n if (existsSync(storesPath)) {\n addImportsDir({ path: storesPath, pattern: storePattern });\n }\n }\n }\n\n addVitePlugin({\n name: \"@kimesh/pinia:optimize\",\n config() {\n return {\n define: {\n __SSR__: \"false\",\n __HYDRATION__: \"false\",\n \"process.server\": \"false\",\n \"import.meta.server\": \"false\",\n },\n optimizeDeps: { include: [\"pinia\"] },\n };\n },\n });\n\n addVitePlugin({\n name: \"@kimesh/pinia:inject-options\",\n transform(code, id) {\n if (id.includes(\"@kimesh/pinia\") && id.includes(\"plugin\")) {\n const optionsCode = `globalThis.__KIMESH_PINIA_OPTIONS__ = { devtools: ${devtools}, plugins: [] };\\n`;\n return { code: optionsCode + code, map: null };\n }\n return null;\n },\n });\n },\n});\n"],"mappings":";;;;;;;AAkBA,MAAM,gBAAgB;CACpB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AAED,qBAAe,mBAAsC;CACnD,MAAM;EACJ,MAAM;EACN,SAAS;EACT,WAAW;CACZ;CAED,UAAU;EACR,aAAa;EACb,WAAW;EACX,cAAc;EACd,UAAU;EACV,gBAAgB;EAChB,SAAS,CAAE;CACZ;CAED,MAAM,MAAM,SAAS,QAAQ;EAC3B,MAAM,EACJ,cAAc,MACd,YAAY,cACZ,eAAe,QACf,WAAW,MACX,iBAAiB,MAClB,GAAG;EAEJ,MAAM,WAAW,eAAe,OAAO,KAAK,IAAI;AAEhD,mBAAiB,SAAS,QAAQ,cAAc,EAAE,EAAE,QAAQ,MAAO,EAAC;AAEpE,MAAI,aAAa;AACf,oBAAiB;IAAE,MAAM;IAAS,SAAS,CAAC,GAAG,aAAc;GAAE,EAAC;AAEhE,OAAI,gBAAgB;IAClB,MAAM,aAAa,KAAK,OAAO,MAAM,UAAU;AAC/C,QAAI,WAAW,WAAW,CACxB,eAAc;KAAE,MAAM;KAAY,SAAS;IAAc,EAAC;GAE7D;EACF;AAED,gBAAc;GACZ,MAAM;GACN,SAAS;AACP,WAAO;KACL,QAAQ;MACN,SAAS;MACT,eAAe;MACf,kBAAkB;MAClB,sBAAsB;KACvB;KACD,cAAc,EAAE,SAAS,CAAC,OAAQ,EAAE;IACrC;GACF;EACF,EAAC;AAEF,gBAAc;GACZ,MAAM;GACN,UAAU,MAAM,IAAI;AAClB,QAAI,GAAG,SAAS,gBAAgB,IAAI,GAAG,SAAS,SAAS,EAAE;KACzD,MAAM,eAAe,oDAAoD,SAAS;AAClF,YAAO;MAAE,MAAM,cAAc;MAAM,KAAK;KAAM;IAC/C;AACD,WAAO;GACR;EACF,EAAC;CACH;AACF,EAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createPinia } from "pinia";
|
|
2
|
+
import { defineKimeshRuntimePlugin } from "@kimesh/router-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/plugin.ts
|
|
5
|
+
function getOptions() {
|
|
6
|
+
return globalThis.__KIMESH_PINIA_OPTIONS__ ?? {
|
|
7
|
+
devtools: true,
|
|
8
|
+
plugins: []
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
const piniaPlugin = defineKimeshRuntimePlugin({
|
|
12
|
+
name: "pinia",
|
|
13
|
+
enforce: "pre",
|
|
14
|
+
setup(appContext) {
|
|
15
|
+
const options = getOptions();
|
|
16
|
+
const pinia = createPinia();
|
|
17
|
+
for (const plugin of options.plugins ?? []) pinia.use(plugin);
|
|
18
|
+
appContext.vueApp.use(pinia);
|
|
19
|
+
appContext.vueApp.config.globalProperties.$pinia = pinia;
|
|
20
|
+
if (import.meta.env.DEV && options.devtools !== false) window.__PINIA__ = pinia;
|
|
21
|
+
return { provide: { $pinia: pinia } };
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
var plugin_default = piniaPlugin;
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
export { piniaPlugin, plugin_default };
|
|
28
|
+
//# sourceMappingURL=plugin-CIfIwAj8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-CIfIwAj8.js","names":[],"sources":["../src/plugin.ts"],"sourcesContent":["/**\n * @kimesh/pinia - Runtime Plugin\n *\n * Registers Pinia with Vue at application startup.\n */\n\nimport { createPinia, type Pinia, type PiniaPlugin } from \"pinia\";\nimport { defineKimeshRuntimePlugin } from \"@kimesh/router-runtime\";\n\nexport interface PiniaPluginOptions {\n devtools?: boolean;\n plugins?: PiniaPlugin[];\n}\n\ndeclare const globalThis: { __KIMESH_PINIA_OPTIONS__?: PiniaPluginOptions };\n\nfunction getOptions(): PiniaPluginOptions {\n return globalThis.__KIMESH_PINIA_OPTIONS__ ?? { devtools: true, plugins: [] };\n}\n\nexport const piniaPlugin = defineKimeshRuntimePlugin<{ $pinia: Pinia }>({\n name: \"pinia\",\n enforce: \"pre\",\n\n setup(appContext) {\n const options = getOptions();\n const pinia = createPinia();\n\n for (const plugin of options.plugins ?? []) {\n pinia.use(plugin);\n }\n\n appContext.vueApp.use(pinia);\n appContext.vueApp.config.globalProperties.$pinia = pinia;\n\n if (import.meta.env.DEV && options.devtools !== false) {\n (window as { __PINIA__?: Pinia }).__PINIA__ = pinia;\n }\n\n return { provide: { $pinia: pinia } };\n },\n});\n\nexport default piniaPlugin;\n\nexport type { Pinia, PiniaPlugin };\n"],"mappings":";;;;AAgBA,SAAS,aAAiC;AACxC,QAAO,WAAW,4BAA4B;EAAE,UAAU;EAAM,SAAS,CAAE;CAAE;AAC9E;AAED,MAAa,cAAc,0BAA6C;CACtE,MAAM;CACN,SAAS;CAET,MAAM,YAAY;EAChB,MAAM,UAAU,YAAY;EAC5B,MAAM,QAAQ,aAAa;AAE3B,OAAK,MAAM,UAAU,QAAQ,WAAW,CAAE,EACxC,OAAM,IAAI,OAAO;AAGnB,aAAW,OAAO,IAAI,MAAM;AAC5B,aAAW,OAAO,OAAO,iBAAiB,SAAS;AAEnD,MAAI,OAAO,KAAK,IAAI,OAAO,QAAQ,aAAa,MAC9C,CAAC,OAAiC,YAAY;AAGhD,SAAO,EAAE,SAAS,EAAE,QAAQ,MAAO,EAAE;CACtC;AACF,EAAC;AAEF,qBAAe"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Pinia as Pinia$1, PiniaPlugin as PiniaPlugin$1 } from "pinia";
|
|
2
|
+
|
|
3
|
+
//#region src/plugin.d.ts
|
|
4
|
+
|
|
5
|
+
interface PiniaPluginOptions {
|
|
6
|
+
devtools?: boolean;
|
|
7
|
+
plugins?: PiniaPlugin$1[];
|
|
8
|
+
}
|
|
9
|
+
declare const piniaPlugin: any;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { type Pinia$1 as Pinia, type PiniaPlugin$1 as PiniaPlugin, PiniaPluginOptions, piniaPlugin as piniaPlugin$1 };
|
|
12
|
+
//# sourceMappingURL=plugin-C_cuPpfH.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-C_cuPpfH.d.ts","names":[],"sources":["../src/plugin.ts"],"sourcesContent":[],"mappings":";;;;UASiB,kBAAA;;YAEL;;cASC"}
|
package/dist/plugin.d.ts
ADDED
package/dist/plugin.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kimesh/pinia",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Pinia state management module for Kimesh framework",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./plugin": {
|
|
15
|
+
"types": "./dist/plugin.d.ts",
|
|
16
|
+
"import": "./dist/plugin.js",
|
|
17
|
+
"default": "./dist/plugin.js"
|
|
18
|
+
},
|
|
19
|
+
"./composables": {
|
|
20
|
+
"types": "./dist/composables/index.d.ts",
|
|
21
|
+
"import": "./dist/composables/index.js",
|
|
22
|
+
"default": "./dist/composables/index.js"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist",
|
|
27
|
+
"augment.d.ts"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "tsdown",
|
|
31
|
+
"dev": "tsdown --watch",
|
|
32
|
+
"test": "vitest run",
|
|
33
|
+
"test:watch": "vitest"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {},
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"@kimesh/kit": "0.0.1",
|
|
38
|
+
"@kimesh/router-runtime": "0.0.1",
|
|
39
|
+
"pinia": "^2.3.0 || ^3.0.0",
|
|
40
|
+
"vite": "^8.0.0-beta.8",
|
|
41
|
+
"vue": "^3.5.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@kimesh/kit": "0.0.1",
|
|
45
|
+
"@kimesh/router-runtime": "0.0.1",
|
|
46
|
+
"pinia": "^3.0.4",
|
|
47
|
+
"tsdown": "^0.11.6",
|
|
48
|
+
"typescript": "^5.8.3",
|
|
49
|
+
"vite": "^8.0.0-beta.8",
|
|
50
|
+
"vue": "^3.5.26"
|
|
51
|
+
}
|
|
52
|
+
}
|