@kimesh/pinia 0.2.40 → 0.2.41

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.
@@ -0,0 +1,2 @@
1
+ import { n as useKimeshPinia, t as tryUseKimeshPinia } from "../index-CwVpYEog.mjs";
2
+ export { tryUseKimeshPinia, useKimeshPinia };
@@ -0,0 +1,3 @@
1
+ import { n as useKimeshPinia, t as tryUseKimeshPinia } from "../composables-B7jw3q9w.mjs";
2
+
3
+ export { tryUseKimeshPinia, useKimeshPinia };
@@ -19,4 +19,4 @@ function tryUseKimeshPinia() {
19
19
  }
20
20
 
21
21
  //#endregion
22
- export { tryUseKimeshPinia, useKimeshPinia };
22
+ export { useKimeshPinia as n, tryUseKimeshPinia as t };
@@ -1,7 +1,6 @@
1
1
  import { Pinia } from "pinia";
2
2
 
3
3
  //#region src/composables/use-pinia.d.ts
4
-
5
4
  /**
6
5
  * Get the Pinia instance from Kimesh app context.
7
6
  * @throws Error if @kimesh/pinia module is not installed
@@ -12,4 +11,4 @@ declare function useKimeshPinia(): Pinia;
12
11
  */
13
12
  declare function tryUseKimeshPinia(): Pinia | undefined;
14
13
  //#endregion
15
- export { tryUseKimeshPinia as tryUseKimeshPinia$1, useKimeshPinia as useKimeshPinia$1 };
14
+ export { useKimeshPinia as n, tryUseKimeshPinia as t };
@@ -1,10 +1,9 @@
1
- import { tryUseKimeshPinia$1 as tryUseKimeshPinia, useKimeshPinia$1 as useKimeshPinia } from "./index-CAUlXznX.js";
2
- import { PiniaPluginOptions, piniaPlugin$1 as piniaPlugin } from "./plugin-BE8kPeGM.js";
1
+ import { n as useKimeshPinia, t as tryUseKimeshPinia } from "./index-CwVpYEog.mjs";
2
+ import piniaPlugin, { PiniaPluginOptions } from "./plugin.mjs";
3
3
  import * as _kimesh_kit0 from "@kimesh/kit";
4
4
  import { Pinia, PiniaPlugin, PiniaPlugin as PiniaPlugin$1, Store, StoreDefinition } from "pinia";
5
5
 
6
6
  //#region src/types.d.ts
7
-
8
7
  /**
9
8
  * Configuration options for the Kimesh Pinia module.
10
9
  */
@@ -1,10 +1,15 @@
1
- import { piniaPlugin } from "./plugin-CIfIwAj8.js";
2
- import { tryUseKimeshPinia, useKimeshPinia } from "./composables-DRL29fIt.js";
1
+ import piniaPlugin from "./plugin.mjs";
2
+ import { n as useKimeshPinia, t as tryUseKimeshPinia } from "./composables-B7jw3q9w.mjs";
3
3
  import { existsSync } from "node:fs";
4
4
  import { join } from "node:path";
5
5
  import { addImportsDir, addImportsPreset, addRuntimePlugin, addVitePlugin, createResolver, defineKimeshModule } from "@kimesh/kit";
6
6
 
7
7
  //#region src/module.ts
8
+ /**
9
+ * @kimesh/pinia - Module Implementation
10
+ *
11
+ * Pinia state management integration for Kimesh.
12
+ */
8
13
  const PINIA_IMPORTS = [
9
14
  "defineStore",
10
15
  "acceptHMRUpdate",
@@ -34,8 +39,7 @@ var module_default = defineKimeshModule({
34
39
  },
35
40
  async setup(options, kimesh) {
36
41
  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 });
42
+ addRuntimePlugin(createResolver(import.meta.url).resolve("./plugin.mjs"), { append: false });
39
43
  if (autoImports) {
40
44
  addImportsPreset({
41
45
  from: "pinia",
@@ -66,13 +70,10 @@ var module_default = defineKimeshModule({
66
70
  addVitePlugin({
67
71
  name: "@kimesh/pinia:inject-options",
68
72
  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
- }
73
+ if (id.includes("@kimesh/pinia") && id.includes("plugin")) return {
74
+ code: `globalThis.__KIMESH_PINIA_OPTIONS__ = { devtools: ${devtools}, plugins: [] };\n` + code,
75
+ map: null
76
+ };
76
77
  return null;
77
78
  }
78
79
  });
@@ -1,14 +1,13 @@
1
- import { Pinia as Pinia$1, PiniaPlugin as PiniaPlugin$1 } from "pinia";
1
+ import { Pinia, PiniaPlugin } from "pinia";
2
2
  import * as _kimesh_router_runtime0 from "@kimesh/router-runtime";
3
3
 
4
4
  //#region src/plugin.d.ts
5
-
6
5
  interface PiniaPluginOptions {
7
6
  devtools?: boolean;
8
- plugins?: PiniaPlugin$1[];
7
+ plugins?: PiniaPlugin[];
9
8
  }
10
9
  declare const piniaPlugin: _kimesh_router_runtime0.KimeshRuntimePlugin<{
11
- $pinia: Pinia$1;
10
+ $pinia: Pinia;
12
11
  }>;
13
12
  //#endregion
14
- export { type Pinia$1 as Pinia, type PiniaPlugin$1 as PiniaPlugin, PiniaPluginOptions, piniaPlugin as piniaPlugin$1 };
13
+ export { type Pinia, type PiniaPlugin, PiniaPluginOptions, piniaPlugin as default, piniaPlugin };
@@ -2,6 +2,11 @@ import { createPinia } from "pinia";
2
2
  import { defineKimeshRuntimePlugin } from "@kimesh/router-runtime";
3
3
 
4
4
  //#region src/plugin.ts
5
+ /**
6
+ * @kimesh/pinia - Runtime Plugin
7
+ *
8
+ * Registers Pinia with Vue at application startup.
9
+ */
5
10
  function getOptions() {
6
11
  return globalThis.__KIMESH_PINIA_OPTIONS__ ?? {
7
12
  devtools: true,
@@ -21,7 +26,6 @@ const piniaPlugin = defineKimeshRuntimePlugin({
21
26
  return { provide: { $pinia: pinia } };
22
27
  }
23
28
  });
24
- var plugin_default = piniaPlugin;
25
29
 
26
30
  //#endregion
27
- export { piniaPlugin, plugin_default };
31
+ export { piniaPlugin as default, piniaPlugin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kimesh/pinia",
3
- "version": "0.2.40",
3
+ "version": "0.2.41",
4
4
  "description": "Pinia state management module for Kimesh framework",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,23 +11,23 @@
11
11
  "augment.d.ts"
12
12
  ],
13
13
  "type": "module",
14
- "main": "./dist/index.js",
15
- "types": "./dist/index.d.ts",
14
+ "main": "./dist/index.mjs",
15
+ "types": "./dist/index.d.mts",
16
16
  "exports": {
17
17
  ".": {
18
- "types": "./dist/index.d.ts",
19
- "import": "./dist/index.js",
20
- "default": "./dist/index.js"
18
+ "types": "./dist/index.d.mts",
19
+ "import": "./dist/index.mjs",
20
+ "default": "./dist/index.mjs"
21
21
  },
22
22
  "./plugin": {
23
- "types": "./dist/plugin.d.ts",
24
- "import": "./dist/plugin.js",
25
- "default": "./dist/plugin.js"
23
+ "types": "./dist/plugin.d.mts",
24
+ "import": "./dist/plugin.mjs",
25
+ "default": "./dist/plugin.mjs"
26
26
  },
27
27
  "./composables": {
28
- "types": "./dist/composables/index.d.ts",
29
- "import": "./dist/composables/index.js",
30
- "default": "./dist/composables/index.js"
28
+ "types": "./dist/composables/index.d.mts",
29
+ "import": "./dist/composables/index.mjs",
30
+ "default": "./dist/composables/index.mjs"
31
31
  }
32
32
  },
33
33
  "scripts": {
@@ -39,19 +39,19 @@
39
39
  },
40
40
  "dependencies": {},
41
41
  "devDependencies": {
42
- "@kimesh/kit": "0.2.40",
43
- "@kimesh/router-runtime": "0.2.40",
42
+ "@kimesh/kit": "0.2.41",
43
+ "@kimesh/router-runtime": "0.2.41",
44
44
  "pinia": "^3.0.4",
45
- "tsdown": "^0.11.6",
46
- "typescript": "^5.8.3",
47
- "vite": "^8.0.0-beta.8",
45
+ "tsdown": "^0.20.3",
46
+ "typescript": "^5.9.3",
47
+ "vite": "^8.0.0-beta.15",
48
48
  "vue": "^3.5.29"
49
49
  },
50
50
  "peerDependencies": {
51
- "@kimesh/kit": "0.2.40",
52
- "@kimesh/router-runtime": "0.2.40",
51
+ "@kimesh/kit": "0.2.41",
52
+ "@kimesh/router-runtime": "0.2.41",
53
53
  "pinia": "^2.3.0 || ^3.0.0",
54
- "vite": "^8.0.0-beta.8",
54
+ "vite": "^8.0.0-beta.15",
55
55
  "vue": "^3.5.0"
56
56
  }
57
57
  }
@@ -1,2 +0,0 @@
1
- import { tryUseKimeshPinia$1 as tryUseKimeshPinia, useKimeshPinia$1 as useKimeshPinia } from "../index-CAUlXznX.js";
2
- export { tryUseKimeshPinia, useKimeshPinia };
@@ -1,3 +0,0 @@
1
- import { tryUseKimeshPinia, useKimeshPinia } from "../composables-DRL29fIt.js";
2
-
3
- export { tryUseKimeshPinia, useKimeshPinia };
package/dist/plugin.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import { Pinia, PiniaPlugin, PiniaPluginOptions, piniaPlugin$1 as piniaPlugin } from "./plugin-BE8kPeGM.js";
2
- export { Pinia, PiniaPlugin, PiniaPluginOptions, piniaPlugin as default, piniaPlugin };
package/dist/plugin.js DELETED
@@ -1,3 +0,0 @@
1
- import { piniaPlugin, plugin_default } from "./plugin-CIfIwAj8.js";
2
-
3
- export { plugin_default as default, piniaPlugin };