@vixt/vue 0.1.37 → 0.2.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/dist/index.d.mts CHANGED
@@ -1,9 +1,10 @@
1
1
  import * as vite from 'vite';
2
2
  import * as _vixt_core from '@vixt/core';
3
- import { Vixt, PluginOptions, VixtOptions } from '@vixt/core';
4
- import { PluginOptions as PluginOptions$1 } from 'pinia-plugin-persistedstate';
3
+ import { Vixt, PluginOptions as PluginOptions$1, VixtOptions } from '@vixt/core';
4
+ import { PluginOptions } from 'pinia-plugin-persistedstate';
5
5
  import { RouterOptions } from 'vue-router';
6
6
  import Vue from '@vitejs/plugin-vue';
7
+ import VueJsx from '@vitejs/plugin-vue-jsx';
7
8
  import UnoCSS from 'unocss/vite';
8
9
  import AutoImport from 'unplugin-auto-import/vite';
9
10
  import Components from 'unplugin-vue-components/vite';
@@ -55,34 +56,40 @@ declare function generateMainTs(options: AppOptions, vixt: Vixt): string;
55
56
 
56
57
  declare function generatePlugins(vixt: Vixt): string;
57
58
 
59
+ declare module '@vixt/core' {
60
+ interface VixtOptions {
61
+ app?: AppOptions;
62
+ }
63
+ }
64
+ declare module '@vixt/core/client' {
65
+ interface VixtAppConfig {
66
+ router?: Partial<RouterOptions>;
67
+ /** https://github.com/prazdevs/pinia-plugin-persistedstate */
68
+ piniaPersistedState?: PluginOptions;
69
+ }
70
+ }
58
71
  declare const appVue: _vixt_core.VixtModule<AppOptions>;
59
72
 
60
73
  declare module '@vixt/core' {
61
74
  interface VixtOptions {
62
- vue?: PluginOptions<typeof Vue>;
75
+ vue?: PluginOptions$1<typeof Vue>;
76
+ vueJsx?: PluginOptions$1<typeof VueJsx>;
63
77
  /** https://github.com/posva/unplugin-vue-router */
64
- router?: PluginOptions<typeof VueRouter>;
78
+ router?: PluginOptions$1<typeof VueRouter>;
65
79
  /** https://github.com/JohnCampionJr/vite-plugin-vue-layouts */
66
- layouts?: PluginOptions<typeof Layouts>;
80
+ layouts?: PluginOptions$1<typeof Layouts>;
67
81
  /** https://github.com/antfu/unplugin-vue-components */
68
- components?: PluginOptions<typeof Components>;
82
+ components?: PluginOptions$1<typeof Components>;
69
83
  /** https://github.com/antfu/unplugin-auto-import */
70
- imports?: PluginOptions<typeof AutoImport>;
84
+ imports?: PluginOptions$1<typeof AutoImport>;
71
85
  /** https://github.com/antfu/unocss */
72
- unocss?: PluginOptions<typeof UnoCSS>;
86
+ unocss?: PluginOptions$1<typeof UnoCSS>;
73
87
  /** https://github.com/webfansplz/vite-plugin-vue-devtools */
74
- devtools?: PluginOptions<typeof VueDevTools> & {
88
+ devtools?: PluginOptions$1<typeof VueDevTools> & {
75
89
  enabled?: boolean;
76
90
  };
77
91
  }
78
92
  }
79
- declare module '@vixt/core/client' {
80
- interface VixtAppConfig {
81
- router?: Partial<RouterOptions>;
82
- /** https://github.com/prazdevs/pinia-plugin-persistedstate */
83
- piniaPersistedState?: PluginOptions$1;
84
- }
85
- }
86
93
  declare const presetVue: _vixt_core.VixtModule<VixtOptions>;
87
94
 
88
95
  declare const _default: (options?: VixtOptions | undefined) => vite.PluginOption;
package/dist/index.d.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  import * as vite from 'vite';
2
2
  import * as _vixt_core from '@vixt/core';
3
- import { Vixt, PluginOptions, VixtOptions } from '@vixt/core';
4
- import { PluginOptions as PluginOptions$1 } from 'pinia-plugin-persistedstate';
3
+ import { Vixt, PluginOptions as PluginOptions$1, VixtOptions } from '@vixt/core';
4
+ import { PluginOptions } from 'pinia-plugin-persistedstate';
5
5
  import { RouterOptions } from 'vue-router';
6
6
  import Vue from '@vitejs/plugin-vue';
7
+ import VueJsx from '@vitejs/plugin-vue-jsx';
7
8
  import UnoCSS from 'unocss/vite';
8
9
  import AutoImport from 'unplugin-auto-import/vite';
9
10
  import Components from 'unplugin-vue-components/vite';
@@ -55,34 +56,40 @@ declare function generateMainTs(options: AppOptions, vixt: Vixt): string;
55
56
 
56
57
  declare function generatePlugins(vixt: Vixt): string;
57
58
 
59
+ declare module '@vixt/core' {
60
+ interface VixtOptions {
61
+ app?: AppOptions;
62
+ }
63
+ }
64
+ declare module '@vixt/core/client' {
65
+ interface VixtAppConfig {
66
+ router?: Partial<RouterOptions>;
67
+ /** https://github.com/prazdevs/pinia-plugin-persistedstate */
68
+ piniaPersistedState?: PluginOptions;
69
+ }
70
+ }
58
71
  declare const appVue: _vixt_core.VixtModule<AppOptions>;
59
72
 
60
73
  declare module '@vixt/core' {
61
74
  interface VixtOptions {
62
- vue?: PluginOptions<typeof Vue>;
75
+ vue?: PluginOptions$1<typeof Vue>;
76
+ vueJsx?: PluginOptions$1<typeof VueJsx>;
63
77
  /** https://github.com/posva/unplugin-vue-router */
64
- router?: PluginOptions<typeof VueRouter>;
78
+ router?: PluginOptions$1<typeof VueRouter>;
65
79
  /** https://github.com/JohnCampionJr/vite-plugin-vue-layouts */
66
- layouts?: PluginOptions<typeof Layouts>;
80
+ layouts?: PluginOptions$1<typeof Layouts>;
67
81
  /** https://github.com/antfu/unplugin-vue-components */
68
- components?: PluginOptions<typeof Components>;
82
+ components?: PluginOptions$1<typeof Components>;
69
83
  /** https://github.com/antfu/unplugin-auto-import */
70
- imports?: PluginOptions<typeof AutoImport>;
84
+ imports?: PluginOptions$1<typeof AutoImport>;
71
85
  /** https://github.com/antfu/unocss */
72
- unocss?: PluginOptions<typeof UnoCSS>;
86
+ unocss?: PluginOptions$1<typeof UnoCSS>;
73
87
  /** https://github.com/webfansplz/vite-plugin-vue-devtools */
74
- devtools?: PluginOptions<typeof VueDevTools> & {
88
+ devtools?: PluginOptions$1<typeof VueDevTools> & {
75
89
  enabled?: boolean;
76
90
  };
77
91
  }
78
92
  }
79
- declare module '@vixt/core/client' {
80
- interface VixtAppConfig {
81
- router?: Partial<RouterOptions>;
82
- /** https://github.com/prazdevs/pinia-plugin-persistedstate */
83
- piniaPersistedState?: PluginOptions$1;
84
- }
85
- }
86
93
  declare const presetVue: _vixt_core.VixtModule<VixtOptions>;
87
94
 
88
95
  declare const _default: (options?: VixtOptions | undefined) => vite.PluginOption;
package/dist/index.mjs CHANGED
@@ -2,6 +2,7 @@ import { defineVixtModule, resolveLayersDirs, createVixtPlugin } from '@vixt/cor
2
2
  import path from 'pathe';
3
3
  import fs from 'fs-extra';
4
4
  import Vue from '@vitejs/plugin-vue';
5
+ import VueJsx from '@vitejs/plugin-vue-jsx';
5
6
  import defu from 'defu';
6
7
  import UnoCSS from 'unocss/vite';
7
8
  import AutoImport from 'unplugin-auto-import/vite';
@@ -226,6 +227,7 @@ const presetVue = defineVixtModule({
226
227
  const { buildTypesDir, buildImportsDir } = vixt.options;
227
228
  const defaultOptions = {
228
229
  vue: {},
230
+ vueJsx: {},
229
231
  router: {
230
232
  dts: `${buildTypesDir}/typed-router.d.ts`,
231
233
  routesFolder: pages,
@@ -235,8 +237,8 @@ const presetVue = defineVixtModule({
235
237
  const overrides = node._overrides;
236
238
  if (overrides.size <= 1)
237
239
  return;
238
- for (const layer of vixt._layers) {
239
- const matched = overrides.keys().find((e) => e.match(layer.cwd));
240
+ for (const pageDir of pages) {
241
+ const matched = overrides.keys().find((e) => e.match(pageDir));
240
242
  if (matched) {
241
243
  node.components.set("default", matched);
242
244
  return;
@@ -264,6 +266,7 @@ const presetVue = defineVixtModule({
264
266
  const plugins = [
265
267
  VueRouter(options.router),
266
268
  Vue(options.vue),
269
+ VueJsx(options.vueJsx),
267
270
  Layouts(options.layouts),
268
271
  Components(options.components),
269
272
  AutoImport(options.imports),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vixt/vue",
3
3
  "type": "module",
4
- "version": "0.1.37",
4
+ "version": "0.2.0",
5
5
  "author": "SoulLyoko<https://github.com/SoulLyoko>",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/SoulLyoko/vixt#readme",
@@ -21,18 +21,18 @@
21
21
  "@vitejs/plugin-vue": "^5.2.1",
22
22
  "@vitejs/plugin-vue-jsx": "^4.1.1",
23
23
  "@vue/compiler-sfc": "^3.5.13",
24
- "@vueuse/core": "^12.7.0",
24
+ "@vueuse/core": "^13.0.0",
25
25
  "pinia": "^3.0.1",
26
26
  "pinia-plugin-persistedstate": "^4.2.0",
27
27
  "unocss": "^66.0.0",
28
- "unplugin-auto-import": "^19.1.0",
28
+ "unplugin-auto-import": "^19.1.1",
29
29
  "unplugin-vue-components": "28.0.0",
30
- "unplugin-vue-router": "^0.11.2",
30
+ "unplugin-vue-router": "^0.12.0",
31
31
  "vite-plugin-vue-devtools": "^7.7.2",
32
32
  "vite-plugin-vue-layouts": "^0.11.0",
33
33
  "vue": "^3.5.13",
34
34
  "vue-router": "^4.5.0",
35
- "@vixt/core": "0.1.37"
35
+ "@vixt/core": "0.2.0"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "unbuild"