@vef-framework/dev 2.0.10 → 2.1.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.
Files changed (104) hide show
  1. package/dist/cjs/_internal/_rolldown/runtime.cjs +1 -0
  2. package/dist/cjs/index.cjs +1 -1
  3. package/dist/cjs/lint/commitlint.cjs +1 -1
  4. package/dist/cjs/lint/eslint.cjs +1 -1
  5. package/dist/cjs/lint/index.cjs +1 -1
  6. package/dist/cjs/lint/local-react-plugin.cjs +1 -0
  7. package/dist/cjs/lint/stylelint.cjs +1 -1
  8. package/dist/cjs/vite/chunks.cjs +1 -1
  9. package/dist/cjs/vite/config.cjs +1 -1
  10. package/dist/cjs/vite/constants.cjs +1 -1
  11. package/dist/cjs/vite/define.cjs +10 -11
  12. package/dist/cjs/vite/index.cjs +1 -1
  13. package/dist/cjs/vite/plugin-app-config.cjs +1 -1
  14. package/dist/cjs/vite/plugin-auto-enhance/core.cjs +1 -1
  15. package/dist/cjs/vite/plugin-auto-enhance/index.cjs +1 -1
  16. package/dist/cjs/vite/plugin-auto-enhance/plugins/index.cjs +1 -1
  17. package/dist/cjs/vite/plugin-auto-enhance/plugins/operation-column-width.cjs +1 -1
  18. package/dist/cjs/vite/plugin-conventional-config.cjs +1 -1
  19. package/dist/cjs/vite/plugin-eslint.cjs +1 -1
  20. package/dist/cjs/vite/plugin-html.cjs +2 -2
  21. package/dist/cjs/vite/plugin-icons.cjs +1 -1
  22. package/dist/cjs/vite/plugin-injection.cjs +1 -1
  23. package/dist/cjs/vite/plugin-inspect.cjs +1 -1
  24. package/dist/cjs/vite/plugin-react.cjs +1 -1
  25. package/dist/cjs/vite/plugin-router.cjs +3 -3
  26. package/dist/cjs/vite/plugin-stylelint.cjs +1 -1
  27. package/dist/cjs/vite/plugin-svgr.cjs +1 -1
  28. package/dist/cjs/vite/plugin-tsconfig-paths.cjs +1 -1
  29. package/dist/cjs/vite/postcss.cjs +1 -1
  30. package/dist/cli/index.js +5 -5
  31. package/dist/es/index.js +8 -10
  32. package/dist/es/lint/commitlint.js +5 -4
  33. package/dist/es/lint/eslint.js +650 -931
  34. package/dist/es/lint/index.js +3 -8
  35. package/dist/es/lint/local-react-plugin.js +42 -0
  36. package/dist/es/lint/stylelint.js +55 -74
  37. package/dist/es/vite/chunks.js +19 -16
  38. package/dist/es/vite/config.js +59 -66
  39. package/dist/es/vite/constants.js +9 -9
  40. package/dist/es/vite/define.js +16 -16
  41. package/dist/es/vite/index.js +1 -4
  42. package/dist/es/vite/plugin-app-config.js +10 -14
  43. package/dist/es/vite/plugin-auto-enhance/core.js +85 -85
  44. package/dist/es/vite/plugin-auto-enhance/index.js +13 -14
  45. package/dist/es/vite/plugin-auto-enhance/plugins/index.js +1 -4
  46. package/dist/es/vite/plugin-auto-enhance/plugins/operation-column-width.js +174 -108
  47. package/dist/es/vite/plugin-conventional-config.js +28 -42
  48. package/dist/es/vite/plugin-eslint.js +9 -4
  49. package/dist/es/vite/plugin-html.js +50 -53
  50. package/dist/es/vite/plugin-icons.js +6 -5
  51. package/dist/es/vite/plugin-injection.js +1 -11
  52. package/dist/es/vite/plugin-react.js +21 -63
  53. package/dist/es/vite/plugin-router.js +38 -31
  54. package/dist/es/vite/plugin-stylelint.js +9 -4
  55. package/dist/es/vite/plugin-svgr.js +2 -7
  56. package/dist/es/vite/plugin-tsconfig-paths.js +3 -6
  57. package/dist/types/src/lint/commitlint.d.ts +2 -0
  58. package/dist/types/src/lint/local-react-plugin.d.ts +29 -0
  59. package/dist/types/src/lint/stylelint.d.ts +2 -0
  60. package/dist/types/{vite → src/vite}/chunks.d.ts +0 -5
  61. package/dist/types/src/vite/config.d.ts +12 -0
  62. package/dist/types/src/vite/constants.d.ts +12 -0
  63. package/dist/types/src/vite/define.d.ts +4 -0
  64. package/dist/types/src/vite/plugin-app-config.d.ts +19 -0
  65. package/dist/types/{vite → src/vite}/plugin-auto-enhance/core.d.ts +6 -21
  66. package/dist/types/src/vite/plugin-auto-enhance/index.d.ts +10 -0
  67. package/dist/types/src/vite/plugin-auto-enhance/plugins/operation-column-width.d.ts +5 -0
  68. package/dist/types/{vite → src/vite}/plugin-auto-enhance/types.d.ts +7 -9
  69. package/dist/types/{vite → src/vite}/plugin-conventional-config.d.ts +1 -14
  70. package/dist/types/src/vite/plugin-eslint.d.ts +7 -0
  71. package/dist/types/src/vite/plugin-html.d.ts +7 -0
  72. package/dist/types/{vite → src/vite}/plugin-icons.d.ts +3 -3
  73. package/dist/types/src/vite/plugin-injection.d.ts +5 -0
  74. package/dist/types/src/vite/plugin-inspect.d.ts +5 -0
  75. package/dist/types/{vite → src/vite}/plugin-react.d.ts +10 -5
  76. package/dist/types/src/vite/plugin-router.d.ts +14 -0
  77. package/dist/types/src/vite/plugin-stylelint.d.ts +7 -0
  78. package/dist/types/src/vite/plugin-svgr.d.ts +7 -0
  79. package/dist/types/src/vite/plugin-tsconfig-paths.d.ts +8 -0
  80. package/dist/types/{vite → src/vite}/postcss.d.ts +0 -5
  81. package/package.json +66 -66
  82. package/tsconfig.base.json +0 -1
  83. package/dist/types/lint/commitlint.d.ts +0 -8
  84. package/dist/types/lint/stylelint.d.ts +0 -7
  85. package/dist/types/vite/config.d.ts +0 -39
  86. package/dist/types/vite/constants.d.ts +0 -48
  87. package/dist/types/vite/define.d.ts +0 -12
  88. package/dist/types/vite/plugin-app-config.d.ts +0 -28
  89. package/dist/types/vite/plugin-auto-enhance/index.d.ts +0 -30
  90. package/dist/types/vite/plugin-auto-enhance/plugins/operation-column-width.d.ts +0 -14
  91. package/dist/types/vite/plugin-eslint.d.ts +0 -7
  92. package/dist/types/vite/plugin-html.d.ts +0 -7
  93. package/dist/types/vite/plugin-injection.d.ts +0 -7
  94. package/dist/types/vite/plugin-inspect.d.ts +0 -7
  95. package/dist/types/vite/plugin-router.d.ts +0 -9
  96. package/dist/types/vite/plugin-stylelint.d.ts +0 -7
  97. package/dist/types/vite/plugin-svgr.d.ts +0 -7
  98. package/dist/types/vite/plugin-tsconfig-paths.d.ts +0 -8
  99. package/dist/types/{cli → src/cli}/index.d.ts +0 -0
  100. package/dist/types/{index.d.ts → src/index.d.ts} +0 -0
  101. package/dist/types/{lint → src/lint}/eslint.d.ts +0 -0
  102. package/dist/types/{lint → src/lint}/index.d.ts +0 -0
  103. package/dist/types/{vite → src/vite}/index.d.ts +1 -1
  104. /package/dist/types/{vite → src/vite}/plugin-auto-enhance/plugins/index.d.ts +0 -0
@@ -1,27 +1,24 @@
1
- import { createChunksConfig as u } from "./chunks.js";
2
- import { DEFAULT_SERVER_PORT as p, ASSETS_DIR as e, VEF_FRAMEWORK_VERSION as m, DEFAULT_OUTPUT_DIR as c, ENV_BUILD_PREFIX as f, ENV_APP_PREFIX as v, ENV_DIR as h, PUBLIC_DIR as D } from "./constants.js";
3
- import { defineConstants as d } from "./define.js";
4
- import { createPostcssConfig as E } from "./postcss.js";
5
- function g({
6
- appName: t,
7
- appVersion: s,
8
- basePublicPath: r,
9
- projectDir: o,
10
- outputDir: i,
11
- serverPort: n,
12
- proxies: a
13
- }) {
1
+ import { ASSETS_DIR as t, ENV_APP_PREFIX as m, ENV_BUILD_PREFIX as p, PUBLIC_DIR as f, VEF_FRAMEWORK_VERSION as v } from "./constants.js";
2
+ import { createChunksConfig as d } from "./chunks.js";
3
+ import { defineConstants as h } from "./define.js";
4
+ import { createPostcssConfig as D } from "./postcss.js";
5
+ function E(e) {
6
+ const s = `VEF Framework v${v}`, r = e ? ` App version v${e}.` : "", o = (/* @__PURE__ */ new Date()).toISOString();
7
+ return `/*! Powered by ${s}.${r} Built at ${o} */`;
8
+ }
9
+ function g({ appName: e, appVersion: s, basePublicPath: r, projectDir: o, outputDir: n, serverPort: i, proxies: a }) {
14
10
  return {
15
11
  name: "vef-framework:conventional-config",
16
- config(_, { command: l }) {
12
+ config(P, { command: u }) {
13
+ const c = u === "serve", l = n ?? "dist";
17
14
  return {
18
15
  appType: "spa",
19
16
  root: o,
20
17
  base: r,
21
- publicDir: D,
22
- envDir: h,
23
- envPrefix: [f, v],
24
- define: d(t, s, l === "serve"),
18
+ publicDir: f,
19
+ envDir: "env",
20
+ envPrefix: [p, m],
21
+ define: h(e, s, c),
25
22
  css: {
26
23
  transformer: "postcss",
27
24
  modules: {
@@ -30,24 +27,15 @@ function g({
30
27
  exportGlobals: !0,
31
28
  hashPrefix: "vef"
32
29
  },
33
- postcss: E(),
34
- preprocessorOptions: {
35
- scss: {}
36
- }
37
- },
38
- resolve: {
39
- dedupe: ["react", "react-dom"]
40
- },
41
- optimizeDeps: {
42
- exclude: [],
43
- esbuildOptions: {
44
- plugins: []
45
- }
30
+ postcss: D(),
31
+ preprocessorOptions: { scss: {} }
46
32
  },
33
+ resolve: { dedupe: ["react", "react-dom"] },
34
+ optimizeDeps: {},
47
35
  build: {
48
- outDir: i ?? c,
36
+ outDir: l,
49
37
  target: "es2024",
50
- assetsDir: e,
38
+ assetsDir: t,
51
39
  assetsInlineLimit: 10240,
52
40
  reportCompressedSize: !1,
53
41
  chunkSizeWarningLimit: 5120,
@@ -56,20 +44,18 @@ function g({
56
44
  cssMinify: !0,
57
45
  sourcemap: !1,
58
46
  rollupOptions: {
59
- input: {
60
- main: "index.html"
61
- },
47
+ input: { main: "index.html" },
62
48
  output: {
63
- banner: `/*! Powered by VEF Framework v${m}.${s ? ` App version v${s}.` : ""} Built at ${(/* @__PURE__ */ new Date()).toISOString()} */`,
64
- chunkFileNames: `${e}/js/[name]-[hash].js`,
65
- entryFileNames: `${e}/js/[name]-[hash].js`,
66
- assetFileNames: `${e}/[ext]/[name]-[hash].[ext]`,
67
- manualChunks: u()
49
+ banner: E(s),
50
+ chunkFileNames: `${t}/js/[name]-[hash].js`,
51
+ entryFileNames: `${t}/js/[name]-[hash].js`,
52
+ assetFileNames: `${t}/[ext]/[name]-[hash].[ext]`,
53
+ manualChunks: d()
68
54
  }
69
55
  }
70
56
  },
71
57
  server: {
72
- port: n || p,
58
+ port: i || 3833,
73
59
  strictPort: !0,
74
60
  host: !0,
75
61
  allowedHosts: !0,
@@ -1,5 +1,10 @@
1
1
  import e from "vite-plugin-eslint2";
2
- function r() {
2
+ var r = ["*.{js,ts,json,yaml,md}", "src/**/*.{ts,tsx,json,yaml,md}"], t = [
3
+ "node_modules",
4
+ "virtual:",
5
+ "vef:"
6
+ ];
7
+ function s() {
3
8
  return e({
4
9
  fix: !1,
5
10
  test: !1,
@@ -7,13 +12,13 @@ function r() {
7
12
  build: !1,
8
13
  cache: !0,
9
14
  cacheLocation: "node_modules/.cache/.eslintcache",
10
- include: ["*.{js,ts,json,yaml,md}", "src/**/*.{ts,tsx,json,yaml,md}"],
11
- exclude: ["node_modules", "virtual:", "vef:"],
15
+ include: r,
16
+ exclude: t,
12
17
  emitError: !0,
13
18
  emitWarning: !0,
14
19
  emitWarningAsError: !0
15
20
  });
16
21
  }
17
22
  export {
18
- r as createEslintPlugin
23
+ s as createEslintPlugin
19
24
  };
@@ -1,5 +1,5 @@
1
1
  import { minify as o } from "html-minifier-terser";
2
- const i = "index.html", a = `
2
+ var t = "index.html", a = `
3
3
  <!doctype html>
4
4
  <html lang="en">
5
5
  <head>
@@ -142,60 +142,57 @@ const i = "index.html", a = `
142
142
  <script type="module" src="src/main.ts"><\/script>
143
143
  </body>
144
144
  </html>
145
- `;
146
- function l() {
147
- return [
148
- {
149
- name: "vef-framework:html",
150
- resolveId(t) {
151
- return t === i ? i : null;
152
- },
153
- load(t) {
154
- return t === i ? a : null;
155
- },
156
- transformIndexHtml: {
157
- order: "pre",
158
- handler: () => a
159
- }
145
+ `, r = {
146
+ collapseBooleanAttributes: !0,
147
+ collapseInlineTagWhitespace: !0,
148
+ collapseWhitespace: !0,
149
+ conservativeCollapse: !1,
150
+ html5: !0,
151
+ keepClosingSlash: !0,
152
+ minifyCSS: !0,
153
+ minifyJS: !0,
154
+ minifyURLs: !0,
155
+ noNewlinesBeforeTagClose: !0,
156
+ quoteCharacter: '"',
157
+ removeAttributeQuotes: !1,
158
+ removeComments: !0,
159
+ removeEmptyAttributes: !0,
160
+ removeEmptyElements: !1,
161
+ removeOptionalTags: !1,
162
+ removeRedundantAttributes: !0,
163
+ removeScriptTypeAttributes: !1,
164
+ removeStyleLinkTypeAttributes: !1,
165
+ removeTagWhitespace: !1,
166
+ sortAttributes: !0,
167
+ sortClassName: !0,
168
+ trimCustomFragments: !0,
169
+ useShortDoctype: !0
170
+ };
171
+ function l(e) {
172
+ return e.type === "asset" && typeof e.source == "string" && e.fileName === t;
173
+ }
174
+ function d() {
175
+ return [{
176
+ name: "vef-framework:html",
177
+ resolveId(e) {
178
+ return e === t ? t : null;
160
179
  },
161
- {
162
- name: "vef-framework:html-minify",
163
- enforce: "post",
164
- async generateBundle(t, n) {
165
- for (const e of Object.values(n))
166
- e.type === "asset" && typeof e.source == "string" && e.fileName === i && (e.source = await o(
167
- e.source,
168
- {
169
- collapseBooleanAttributes: !0,
170
- collapseInlineTagWhitespace: !0,
171
- collapseWhitespace: !0,
172
- conservativeCollapse: !1,
173
- keepClosingSlash: !0,
174
- minifyCSS: !0,
175
- minifyJS: !0,
176
- minifyURLs: !0,
177
- noNewlinesBeforeTagClose: !0,
178
- quoteCharacter: '"',
179
- removeAttributeQuotes: !1,
180
- removeComments: !0,
181
- removeEmptyAttributes: !0,
182
- removeOptionalTags: !1,
183
- removeRedundantAttributes: !0,
184
- removeScriptTypeAttributes: !1,
185
- removeTagWhitespace: !1,
186
- removeEmptyElements: !1,
187
- removeStyleLinkTypeAttributes: !1,
188
- sortAttributes: !0,
189
- sortClassName: !0,
190
- trimCustomFragments: !0,
191
- useShortDoctype: !0,
192
- html5: !0
193
- }
194
- ));
195
- }
180
+ load(e) {
181
+ return e === t ? a : null;
182
+ },
183
+ transformIndexHtml: {
184
+ order: "pre",
185
+ handler: () => a
186
+ }
187
+ }, {
188
+ name: "vef-framework:html-minify",
189
+ enforce: "post",
190
+ async generateBundle(e, n) {
191
+ for (const i of Object.values(n))
192
+ l(i) && (i.source = await o(i.source, r));
196
193
  }
197
- ];
194
+ }];
198
195
  }
199
196
  export {
200
- l as createHtmlPlugin
197
+ d as createHtmlPlugin
201
198
  };
@@ -1,16 +1,17 @@
1
- import { resolve as e, dirname as l } from "node:path";
2
- import { fileURLToPath as r } from "node:url";
1
+ import { dirname as e, resolve as r } from "node:path";
2
+ import { fileURLToPath as l } from "node:url";
3
3
  import t from "unplugin-icons/vite";
4
- function n(o) {
4
+ var a = e(l(import.meta.url));
5
+ function c(o) {
5
6
  return t({
6
7
  autoInstall: !1,
7
8
  compiler: "jsx",
8
9
  jsx: "react",
9
10
  defaultClass: "inline-block",
10
11
  scale: 1.2,
11
- collectionsNodeResolvePath: [o, e(l(r(import.meta.url)), "..")]
12
+ collectionsNodeResolvePath: [o, r(a, "..")]
12
13
  });
13
14
  }
14
15
  export {
15
- n as createIconsPlugin
16
+ c as createIconsPlugin
16
17
  };
@@ -1,15 +1,5 @@
1
1
  function e() {
2
- return {
3
- name: "vef-framework:injection"
4
- // transform(code, id) {
5
- // if (basename(dirname(id)) === "src" && basename(id).startsWith("main.ts")) {
6
- // return `import "@vef-react/components/styles.layer.css";
7
- // import "@vef-react/starter/styles.layer.css";
8
- // ${code}`;
9
- // }
10
- // return null;
11
- // }
12
- };
2
+ return { name: "vef-framework:injection" };
13
3
  }
14
4
  export {
15
5
  e as createInjectionPlugin
@@ -1,66 +1,24 @@
1
- import c from "@vitejs/plugin-react";
2
- import e from "chalk";
3
- function d({
4
- useEmotion: i = !1,
5
- useCompiler: a = !0,
6
- babelPlugins: t
7
- } = {}) {
8
- return c({
9
- babel: {
10
- plugins: [
11
- ...i ? [
12
- [
13
- "@emotion",
14
- {
15
- sourceMap: !0,
16
- autoLabel: "never",
17
- cssPropOptimization: !0
18
- }
19
- ]
20
- ] : [],
21
- ...a ? [
22
- [
23
- "react-compiler",
24
- {
25
- /**
26
- * `annotation`: Only compile functions that are explicitly marked with "use memo"
27
- * `infer`: Use smart heuristics to identify React components and hooks
28
- * Compilation conditions:
29
- * Functions explicitly marked with "use memo"
30
- * Functions named according to component or hook conventions (PascalCase or use prefix) that create JSX or call other hooks
31
- */
32
- compilationMode: "infer",
33
- panicThreshold: "none",
34
- target: "19",
35
- logger: {
36
- logEvent(l, o) {
37
- switch (o.kind) {
38
- case "CompileSuccess":
39
- break;
40
- case "CompileError": {
41
- if (console.error(`${e.blueBright("[Compiler]")} ❌ ${e.redBright(`Skipped: ${l}`)}`), console.error(e.red(`Reason: ${o.detail.reason}`)), o.detail.description && console.error(e.red(`Details: ${o.detail.description}`)), o.detail.loc) {
42
- const { line: r, column: s } = o.detail.loc.start;
43
- console.error(e.red(`Location: Line ${r}, Column ${s}`));
44
- }
45
- o.detail.suggestions && console.error(e.yellow(`Suggestions: ${o.detail.suggestions.map((r) => r.description).join(" | ")}`));
46
- break;
47
- }
48
- case "CompileSkip":
49
- console.info(`${e.blueBright("[Compiler]")} ℹ️ ${e.gray(`Skipped: ${l}`)}`, o);
50
- }
51
- }
52
- }
53
- }
54
- ]
55
- ] : [],
56
- "jotai/babel/plugin-debug-label",
57
- "jotai/babel/plugin-react-refresh",
58
- ...t ?? []
59
- ]
60
- },
61
- jsxImportSource: i ? "@emotion/react" : void 0
62
- });
1
+ import i from "@rolldown/plugin-babel";
2
+ import n, { reactCompilerPreset as u } from "@vitejs/plugin-react";
3
+ import o from "jotai-babel/preset";
4
+ var a = ["@emotion", {
5
+ sourceMap: !0,
6
+ autoLabel: "never",
7
+ cssPropOptimization: !0
8
+ }];
9
+ function s(e, t) {
10
+ const r = [];
11
+ return e && r.push(a), t && r.push(...t), r;
12
+ }
13
+ function l(e) {
14
+ return e ? [o, u()] : [o];
15
+ }
16
+ function f({ useEmotion: e = !1, useCompiler: t = !0, babelPlugins: r } = {}) {
17
+ return [n({ jsxImportSource: e ? "@emotion/react" : void 0 }), i({
18
+ plugins: s(e, r),
19
+ presets: l(t)
20
+ })];
63
21
  }
64
22
  export {
65
- d as createReactPlugin
23
+ f as createReactPlugin
66
24
  };
@@ -1,44 +1,51 @@
1
- import { resolve as t } from "node:path";
2
- import { tanstackRouter as n } from "@tanstack/router-plugin/vite";
3
- import { SRC_DIR as r, ROUTER_DIR as s, PAGES_DIR as u } from "./constants.js";
4
- function c(e, o = "browser") {
5
- return n({
6
- routesDirectory: t(e, r, u),
7
- generatedRouteTree: t(e, r, s, "router.gen.ts"),
8
- quoteStyle: "double",
9
- semicolons: !0,
10
- disableTypes: !1,
11
- addExtensions: !1,
12
- disableLogging: !1,
13
- routeFileIgnorePattern: "components|hooks|helpers|store|states|types|styles",
14
- indexToken: "index",
15
- routeToken: "route",
16
- enableRouteGeneration: !0,
17
- autoCodeSplitting: !0,
18
- routeTreeFileHeader: [
19
- "/* eslint-disable */",
20
- "// @ts-nocheck",
21
- "// noinspection JSUnusedGlobalSymbols",
22
- 'import { createRouter } from "@vef-framework/starter";',
23
- 'import { routerContext as context } from "./context";'
24
- ],
25
- routeTreeFileFooter: [
26
- `const router = createRouter({
27
- history: "${o}",
1
+ import { PAGES_DIR as o, ROUTER_DIR as n } from "./constants.js";
2
+ import { resolve as r } from "node:path";
3
+ import { tanstackRouter as u } from "@tanstack/router-plugin/vite";
4
+ var s = "components|hooks|helpers|store|states|types|styles";
5
+ function a() {
6
+ return [
7
+ "/* eslint-disable */",
8
+ "// @ts-nocheck",
9
+ "// noinspection JSUnusedGlobalSymbols",
10
+ 'import { createRouter } from "@vef-framework/starter";',
11
+ 'import { routerContext as context } from "./context";'
12
+ ];
13
+ }
14
+ function i(e) {
15
+ return [
16
+ `const router = createRouter({
17
+ history: "${e}",
28
18
  routeTree,
29
19
  context
30
20
  });
31
21
  `,
32
- `declare module "@tanstack/react-router" {
22
+ `declare module "@tanstack/react-router" {
33
23
  interface Register {
34
24
  router: typeof router;
35
25
  }
36
26
  }
37
27
  `,
38
- "export default router;"
39
- ]
28
+ "export default router;"
29
+ ];
30
+ }
31
+ function R(e, t = "browser") {
32
+ return u({
33
+ routesDirectory: r(e, "src", o),
34
+ generatedRouteTree: r(e, "src", n, "router.gen.ts"),
35
+ quoteStyle: "double",
36
+ semicolons: !0,
37
+ disableTypes: !1,
38
+ addExtensions: !1,
39
+ disableLogging: !1,
40
+ routeFileIgnorePattern: s,
41
+ indexToken: "index",
42
+ routeToken: "route",
43
+ enableRouteGeneration: !0,
44
+ autoCodeSplitting: !0,
45
+ routeTreeFileHeader: a(),
46
+ routeTreeFileFooter: i(t)
40
47
  });
41
48
  }
42
49
  export {
43
- c as createRouterPlugin
50
+ R as createRouterPlugin
44
51
  };
@@ -1,5 +1,10 @@
1
1
  import e from "vite-plugin-stylelint";
2
- function r() {
2
+ var r = ["src/**/*.{css,scss}"], t = [
3
+ "node_modules",
4
+ "virtual:",
5
+ "vef:"
6
+ ];
7
+ function i() {
3
8
  return e({
4
9
  fix: !1,
5
10
  test: !1,
@@ -7,13 +12,13 @@ function r() {
7
12
  build: !1,
8
13
  cache: !0,
9
14
  cacheLocation: "node_modules/.cache/.stylelintcache",
10
- include: ["src/**/*.{css,scss}"],
11
- exclude: ["node_modules", "virtual:", "vef:"],
15
+ include: r,
16
+ exclude: t,
12
17
  emitError: !0,
13
18
  emitWarning: !0,
14
19
  emitWarningAsError: !0
15
20
  });
16
21
  }
17
22
  export {
18
- r as createStylelintPlugin
23
+ i as createStylelintPlugin
19
24
  };
@@ -8,10 +8,7 @@ function s() {
8
8
  jsx: "automatic"
9
9
  },
10
10
  svgrOptions: {
11
- plugins: [
12
- "@svgr/plugin-svgo",
13
- "@svgr/plugin-jsx"
14
- ],
11
+ plugins: ["@svgr/plugin-svgo", "@svgr/plugin-jsx"],
15
12
  icon: !1,
16
13
  dimensions: !1,
17
14
  prettier: !0,
@@ -31,9 +28,7 @@ function s() {
31
28
  "preset-default",
32
29
  {
33
30
  name: "prefixIds",
34
- params: {
35
- prefix: "vef"
36
- }
31
+ params: { prefix: "vef" }
37
32
  },
38
33
  {
39
34
  name: "cleanupIds",
@@ -1,9 +1,6 @@
1
- import o from "vite-tsconfig-paths";
2
- function n(t) {
3
- return o({
4
- root: t
5
- });
1
+ function t() {
2
+ return { tsconfigPaths: !0 };
6
3
  }
7
4
  export {
8
- n as createTsconfigPathsPlugin
5
+ t as createTsconfigPathsResolveConfig
9
6
  };
@@ -0,0 +1,2 @@
1
+ import { UserConfig } from '@commitlint/types';
2
+ export declare function defineCommitlintConfig(): UserConfig;
@@ -0,0 +1,29 @@
1
+ import { Linter, Rule } from 'eslint';
2
+ export declare const localReactPlugin: {
3
+ rules: {
4
+ "jsx-no-duplicate-props": {
5
+ create(context: Rule.RuleContext): {
6
+ JSXOpeningElement(node: unknown): void;
7
+ };
8
+ meta: {
9
+ docs: {
10
+ description: string;
11
+ };
12
+ messages: {
13
+ noDuplicateProps: string;
14
+ };
15
+ schema: {
16
+ additionalProperties: false;
17
+ properties: {
18
+ ignoreCase: {
19
+ type: "boolean";
20
+ };
21
+ };
22
+ type: "object";
23
+ }[];
24
+ type: "problem";
25
+ };
26
+ };
27
+ };
28
+ };
29
+ export declare const localReactRules: Linter.RulesRecord;
@@ -0,0 +1,2 @@
1
+ import { Config } from 'stylelint';
2
+ export declare function defineStylelintConfig(): Config;
@@ -1,10 +1,5 @@
1
1
  import { UnionToTuple } from 'type-fest';
2
2
  import { BuildEnvironmentOptions } from 'vite';
3
3
  type ManualChunksOption = NonNullable<UnionToTuple<NonNullable<NonNullable<BuildEnvironmentOptions["rollupOptions"]>["output"]>>[0]["manualChunks"]>;
4
- /**
5
- * Create the chunks config
6
- *
7
- * @returns The chunks config
8
- */
9
4
  export declare function createChunksConfig(): ManualChunksOption;
10
5
  export {};
@@ -0,0 +1,12 @@
1
+ import { PluginOption, ProxyOptions, UserConfig, UserConfigExport } from 'vite';
2
+ import { AutoEnhancePlugin } from './plugin-auto-enhance';
3
+ import { ReactPluginOptions } from './plugin-react';
4
+ export interface DefineConfigOptions {
5
+ resolve?: Pick<NonNullable<UserConfig["resolve"]>, "alias" | "conditions">;
6
+ plugins?: PluginOption[];
7
+ autoEnhancePlugins?: AutoEnhancePlugin[];
8
+ routerHistory?: "hash" | "browser";
9
+ react?: ReactPluginOptions;
10
+ proxies?: Record<string, string | ProxyOptions>;
11
+ }
12
+ export declare function defineViteConfig(options?: DefineConfigOptions): UserConfigExport;
@@ -0,0 +1,12 @@
1
+ export declare const VEF_FRAMEWORK_VERSION = "1.0.0";
2
+ export declare const PUBLIC_DIR = "public";
3
+ export declare const ENV_DIR = "env";
4
+ export declare const ASSETS_DIR = "assets";
5
+ export declare const ENV_APP_PREFIX = "VEF_APP_";
6
+ export declare const ENV_BUILD_PREFIX = "VEF_BUILD_";
7
+ export declare const SRC_DIR = "src";
8
+ export declare const DEFAULT_OUTPUT_DIR = "dist";
9
+ export declare const DEFAULT_SERVER_PORT = 3833;
10
+ export declare const DEFAULT_APP_NAME = "APP";
11
+ export declare const PAGES_DIR = "pages";
12
+ export declare const ROUTER_DIR = "router";
@@ -0,0 +1,4 @@
1
+ import { UserConfig } from 'vite';
2
+ type DefineConfig = NonNullable<UserConfig["define"]>;
3
+ export declare function defineConstants(appName: string | undefined, appVersion: string, isDev: boolean): DefineConfig;
4
+ export {};
@@ -0,0 +1,19 @@
1
+ import { PluginOption } from 'vite';
2
+ export interface PluginAppConfigOptions {
3
+ /**
4
+ * The base public path
5
+ */
6
+ basePublicPath?: string;
7
+ /**
8
+ * The output directory of the build
9
+ */
10
+ outputDir?: string;
11
+ /**
12
+ * The name of the app
13
+ */
14
+ appName?: string;
15
+ }
16
+ /**
17
+ * Create the app config plugin for runtime configuration injection
18
+ */
19
+ export declare function createAppConfigPlugin({ basePublicPath, outputDir, appName }: PluginAppConfigOptions): PluginOption;
@@ -8,28 +8,13 @@ export declare class AutoEnhanceCore {
8
8
  private plugins;
9
9
  private options;
10
10
  constructor(options?: Except<AutoEnhanceOptions, "plugins">);
11
- /**
12
- * Register a sub-plugin
13
- */
14
11
  registerPlugin(plugin: AutoEnhancePlugin): void;
15
- /**
16
- * Register multiple sub-plugins
17
- */
18
12
  registerPlugins(plugins: AutoEnhancePlugin[]): void;
19
- /**
20
- * Check if file should be processed
21
- */
22
- private shouldProcessFile;
23
- /**
24
- * Create processing context
25
- */
26
- private createTransformationContext;
27
- /**
28
- * Execute transformation
29
- */
30
- transform(code: string, id: string): TransformResult | null;
31
- /**
32
- * Get registered plugin information
33
- */
34
13
  getRegisteredPlugins(): Array<Pick<AutoEnhancePlugin, "name" | "description">>;
14
+ transform(code: string, id: string): TransformResult | null;
15
+ private shouldProcessFile;
16
+ private buildTransformInfo;
17
+ private executeTransform;
18
+ private getActivePlugins;
19
+ private runPlugins;
35
20
  }