@vef-framework/dev 1.0.128 → 1.0.130

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 (60) hide show
  1. package/cjs/cli.cjs +4 -227
  2. package/cjs/commitlint-config.cjs +1 -13
  3. package/cjs/config.cjs +1 -81
  4. package/cjs/constants.cjs +1 -26
  5. package/cjs/eslint-config.cjs +1 -412
  6. package/cjs/index.cjs +1 -15
  7. package/cjs/json/monaco.nls.json.cjs +15920 -7
  8. package/cjs/json/monaco.theme.github-light.json.cjs +349 -7
  9. package/cjs/modules.d.cjs +0 -2
  10. package/cjs/plugin-app-config.cjs +1 -36
  11. package/cjs/plugin-conventional-config.cjs +3 -107
  12. package/cjs/plugin-eslint.cjs +1 -22
  13. package/cjs/plugin-html.cjs +2 -70
  14. package/cjs/plugin-icons.cjs +1 -20
  15. package/cjs/plugin-initialization.cjs +3 -26
  16. package/cjs/plugin-injection.cjs +2 -19
  17. package/cjs/plugin-inspect.cjs +1 -13
  18. package/cjs/plugin-monaco-nls.cjs +3 -59
  19. package/cjs/plugin-react-swc.cjs +1 -12
  20. package/cjs/plugin-router.cjs +4 -40
  21. package/cjs/plugin-stylelint.cjs +1 -22
  22. package/cjs/plugin-svgr.cjs +1 -57
  23. package/cjs/plugin-tailwind.cjs +1 -10
  24. package/cjs/plugin-tailwindcss.cjs +2 -23
  25. package/cjs/plugin-tsconfig-paths.cjs +1 -12
  26. package/cjs/plugin-visualizer.cjs +1 -14
  27. package/cjs/plugin-webfont.cjs +1 -13
  28. package/cjs/stylelint-config.cjs +1 -66
  29. package/cjs/tailwind-config.cjs +1 -394
  30. package/cjs/types.cjs +0 -2
  31. package/esm/cli.js +4 -225
  32. package/esm/commitlint-config.js +1 -11
  33. package/esm/config.js +1 -79
  34. package/esm/constants.js +1 -14
  35. package/esm/eslint-config.js +1 -410
  36. package/esm/index.js +1 -7
  37. package/esm/json/monaco.nls.json.js +15920 -3
  38. package/esm/json/monaco.theme.github-light.json.js +349 -3
  39. package/esm/plugin-app-config.js +1 -34
  40. package/esm/plugin-conventional-config.js +3 -105
  41. package/esm/plugin-eslint.js +1 -20
  42. package/esm/plugin-html.js +2 -68
  43. package/esm/plugin-icons.js +1 -17
  44. package/esm/plugin-initialization.js +3 -24
  45. package/esm/plugin-injection.js +2 -17
  46. package/esm/plugin-inspect.js +1 -11
  47. package/esm/plugin-monaco-nls.js +3 -56
  48. package/esm/plugin-react-swc.js +1 -10
  49. package/esm/plugin-router.js +4 -38
  50. package/esm/plugin-stylelint.js +1 -20
  51. package/esm/plugin-svgr.js +1 -55
  52. package/esm/plugin-tailwind.js +1 -8
  53. package/esm/plugin-tailwindcss.js +2 -21
  54. package/esm/plugin-tsconfig-paths.js +1 -10
  55. package/esm/plugin-visualizer.js +1 -12
  56. package/esm/plugin-webfont.js +1 -11
  57. package/esm/stylelint-config.js +1 -64
  58. package/esm/tailwind-config.js +1 -392
  59. package/package.json +1 -1
  60. package/template/_package.json +5 -5
@@ -1,20 +1,5 @@
1
1
  "use strict";
2
- import monaco_theme_github_light_default from './json/monaco.theme.github-light.json.js';
3
-
4
- "use strict";
5
- const virtualModuleId = "vef:initialization";
6
- const resolvedVirtualModuleId = `\0${virtualModuleId}`;
7
- function createInitializationPlugin() {
8
- return {
9
- name: "vef-framework:initialization",
10
- resolveId(id) {
11
- if (id === virtualModuleId) {
12
- return resolvedVirtualModuleId;
13
- }
14
- },
15
- load(id) {
16
- if (id === resolvedVirtualModuleId) {
17
- return `import { loader } from "@monaco-editor/react";
2
+ import a from"./json/monaco.theme.github-light.json.js";const t="vef:initialization",n=`\0${t}`;function r(){return{name:"vef-framework:initialization",resolveId(e){if(e===t)return n},load(e){if(e===n)return`import { loader } from "@monaco-editor/react";
18
3
  import * as monaco from "monaco-editor";
19
4
  import EditorWorker from "monaco-editor/esm/vs/editor/editor.worker?worker";
20
5
  import CssWorker from "monaco-editor/esm/vs/language/css/css.worker?worker";
@@ -46,7 +31,7 @@ self.MonacoEnvironment = {
46
31
  };
47
32
 
48
33
  // Theme config
49
- monaco.editor.defineTheme("github-light", ${monaco_theme_github_light_default});
34
+ monaco.editor.defineTheme("github-light", ${a});
50
35
 
51
36
  // Typescript config
52
37
  monaco.languages.typescript.typescriptDefaults.setInlayHintsOptions({
@@ -147,10 +132,4 @@ export function initializeIntellisenseCodeEditor() {
147
132
  });
148
133
  loader.init();
149
134
  }
150
- `;
151
- }
152
- }
153
- };
154
- }
155
-
156
- export { createInitializationPlugin };
135
+ `}}}export{r as createInitializationPlugin};
@@ -1,18 +1,3 @@
1
1
  "use strict";
2
- import { basename, dirname } from 'node:path';
3
-
4
- "use strict";
5
- function createInjectionPlugin() {
6
- return {
7
- name: "vef-framework:injection",
8
- transform(code, id) {
9
- if (basename(dirname(id)) === "src" && basename(id).startsWith("main.ts")) {
10
- return `import "vef:tailwind.css";
11
- ${code}`;
12
- }
13
- return null;
14
- }
15
- };
16
- }
17
-
18
- export { createInjectionPlugin };
2
+ import{basename as t,dirname as n}from"node:path";function i(){return{name:"vef-framework:injection",transform(e,r){return t(n(r))==="src"&&t(r).startsWith("main.ts")?`import "vef:tailwind.css";
3
+ ${e}`:null}}}export{i as createInjectionPlugin};
@@ -1,12 +1,2 @@
1
1
  "use strict";
2
- import inspect from 'vite-plugin-inspect';
3
-
4
- "use strict";
5
- function createInspectPlugin() {
6
- return inspect({
7
- dev: true,
8
- build: false
9
- });
10
- }
11
-
12
- export { createInspectPlugin };
2
+ import e from"vite-plugin-inspect";function t(){return e({dev:!0,build:!1})}export{t as createInspectPlugin};
@@ -1,62 +1,12 @@
1
1
  "use strict";
2
- import { readFile } from 'node:fs/promises';
3
- import monaco_nls_default from './json/monaco.nls.json.js';
4
-
5
- "use strict";
6
- const nlsRegex = /monaco-editor[/\\]esm[/\\]vs[/\\]nls\.js/;
7
- const nlsPathRegex = /monaco-editor[/\\]esm[/\\](?<path>.+)\.js/;
8
- const localizeFnInvocationRegex = /localize\(/g;
9
- function createMonacoNlsEsbuildPlugin() {
10
- return {
11
- name: "vef-framework:monaco-editor-nls",
12
- setup(build) {
13
- build.onLoad({ filter: nlsRegex }, () => ({
14
- contents: buildNlsCode(),
15
- loader: "js"
16
- }));
17
- build.onLoad({ filter: nlsPathRegex }, async ({ path }) => ({
18
- contents: transformLocalizeFnInvocationCode(path, await readFile(path.split("?")[0], "utf8")),
19
- loader: "js"
20
- }));
21
- }
22
- };
23
- }
24
- function createMonacoNlsRollupPlugin() {
25
- return {
26
- name: "vef-framework:monaco-editor-nls",
27
- enforce: "pre",
28
- load(id) {
29
- if (nlsRegex.test(id)) {
30
- return buildNlsCode();
31
- }
32
- },
33
- transform(code, id) {
34
- if (!nlsRegex.test(id)) {
35
- return {
36
- code: transformLocalizeFnInvocationCode(id, code),
37
- map: null
38
- };
39
- }
40
- }
41
- };
42
- }
43
- function transformLocalizeFnInvocationCode(file, code) {
44
- const match = nlsPathRegex.exec(file);
45
- if (match) {
46
- const path = match.groups.path.replace(/\\/g, "/");
47
- return code.replace(localizeFnInvocationRegex, `localize('${path}', `);
48
- }
49
- return code;
50
- }
51
- function buildNlsCode() {
52
- return `/*---------------------------------------------------------------------------------------------
2
+ import{readFile as l}from"node:fs/promises";import g from"./json/monaco.nls.json.js";const s=/monaco-editor[/\\]esm[/\\]vs[/\\]nls\.js/,r=/monaco-editor[/\\]esm[/\\](?<path>.+)\.js/,u=/localize\(/g;function c(){return{name:"vef-framework:monaco-editor-nls",setup(e){e.onLoad({filter:s},()=>({contents:n(),loader:"js"})),e.onLoad({filter:r},async({path:a})=>({contents:o(a,await l(a.split("?")[0],"utf8")),loader:"js"}))}}}function f(){return{name:"vef-framework:monaco-editor-nls",enforce:"pre",load(e){if(s.test(e))return n()},transform(e,a){if(!s.test(a))return{code:o(a,e),map:null}}}}function o(e,a){const t=r.exec(e);if(t){const i=t.groups.path.replace(/\\/g,"/");return a.replace(u,`localize('${i}', `)}return a}function n(){return`/*---------------------------------------------------------------------------------------------
53
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
54
4
  * Licensed under the MIT License. See License.txt in the project root for license information.
55
5
  *--------------------------------------------------------------------------------------------*
56
6
  import { getNLSLanguage, getNLSMessages } from './nls.messages.js';
57
7
  export { getNLSLanguage, getNLSMessages } from './nls.messages.js';
58
8
  const isPseudo = getNLSLanguage() === 'pseudo' || (typeof document !== 'undefined' && document.location && document.location.hash.indexOf('pseudo=true') >= 0);
59
- const nlsData = ${monaco_nls_default} || {};
9
+ const nlsData = ${g} || {};
60
10
  function _format(message, args) {
61
11
  let result;
62
12
  if (args.length === 0) {
@@ -127,7 +77,4 @@ export function localize2(data /* | number when built */, originalMessage, ...ar
127
77
  value,
128
78
  original: originalMessage === message ? value : _format(originalMessage, args)
129
79
  };
130
- }`;
131
- }
132
-
133
- export { createMonacoNlsEsbuildPlugin, createMonacoNlsRollupPlugin };
80
+ }`}export{c as createMonacoNlsEsbuildPlugin,f as createMonacoNlsRollupPlugin};
@@ -1,11 +1,2 @@
1
1
  "use strict";
2
- import react from '@vitejs/plugin-react-swc';
3
-
4
- "use strict";
5
- function createReactSwcPlugin() {
6
- return react({
7
- devTarget: "esnext"
8
- });
9
- }
10
-
11
- export { createReactSwcPlugin };
2
+ import e from"@vitejs/plugin-react-swc";function t(){return e({devTarget:"esnext"})}export{t as createReactSwcPlugin};
@@ -1,45 +1,11 @@
1
1
  "use strict";
2
- import { TanStackRouterVite } from '@tanstack/router-plugin/vite';
3
- import { resolve } from 'node:path';
4
- import { SRC_DIR, ROUTER_DIR, PAGES_DIR } from './constants.js';
5
-
6
- "use strict";
7
- function createRouterPlugin(projectDir, history = "hash", autoCodeSplitting) {
8
- return TanStackRouterVite({
9
- routesDirectory: resolve(projectDir, SRC_DIR, PAGES_DIR),
10
- generatedRouteTree: resolve(projectDir, SRC_DIR, ROUTER_DIR, "router.gen.ts"),
11
- quoteStyle: "double",
12
- semicolons: true,
13
- disableTypes: false,
14
- addExtensions: false,
15
- disableLogging: false,
16
- disableManifestGeneration: false,
17
- routeFileIgnorePattern: "components",
18
- indexToken: "index",
19
- routeToken: "route",
20
- enableRouteGeneration: true,
21
- autoCodeSplitting,
22
- routeTreeFileHeader: [
23
- "/* eslint-disable */",
24
- "// @ts-nocheck",
25
- "// noinspection JSUnusedGlobalSymbols",
26
- `import { createRouter } from "@vef-framework/starter";`
27
- ],
28
- routeTreeFileFooter: [
29
- `const router = createRouter({
2
+ import{TanStackRouterVite as i}from"@tanstack/router-plugin/vite";import{resolve as t}from"node:path";import{SRC_DIR as r,ROUTER_DIR as u,PAGES_DIR as a}from"./constants.js";function s(e,o="hash",n){return i({routesDirectory:t(e,r,a),generatedRouteTree:t(e,r,u,"router.gen.ts"),quoteStyle:"double",semicolons:!0,disableTypes:!1,addExtensions:!1,disableLogging:!1,disableManifestGeneration:!1,routeFileIgnorePattern:"components",indexToken:"index",routeToken:"route",enableRouteGeneration:!0,autoCodeSplitting:n,routeTreeFileHeader:["/* eslint-disable */","// @ts-nocheck","// noinspection JSUnusedGlobalSymbols",'import { createRouter } from "@vef-framework/starter";'],routeTreeFileFooter:[`const router = createRouter({
30
3
  routeTree,
31
- history: "${history}",
4
+ history: "${o}",
32
5
  });
33
- `,
34
- `declare module "@tanstack/react-router" {
6
+ `,`declare module "@tanstack/react-router" {
35
7
  interface Register {
36
8
  router: typeof router;
37
9
  }
38
10
  }
39
- `,
40
- `export default router;`
41
- ]
42
- });
43
- }
44
-
45
- export { createRouterPlugin };
11
+ `,"export default router;"]})}export{s as createRouterPlugin};
@@ -1,21 +1,2 @@
1
1
  "use strict";
2
- import stylelint from 'vite-plugin-stylelint';
3
-
4
- "use strict";
5
- function createStylelintPlugin() {
6
- return stylelint({
7
- fix: true,
8
- test: false,
9
- dev: true,
10
- build: false,
11
- cache: true,
12
- cacheLocation: "node_modules/.cache/.stylelintcache",
13
- include: ["src/**/*.{scss,css}"],
14
- exclude: ["node_modules", "virtual:", "vef:"],
15
- emitError: true,
16
- emitWarning: true,
17
- emitWarningAsError: true
18
- });
19
- }
20
-
21
- export { createStylelintPlugin };
2
+ import e from"vite-plugin-stylelint";function t(){return e({fix:!0,test:!1,dev:!0,build:!1,cache:!0,cacheLocation:"node_modules/.cache/.stylelintcache",include:["src/**/*.{scss,css}"],exclude:["node_modules","virtual:","vef:"],emitError:!0,emitWarning:!0,emitWarningAsError:!0})}export{t as createStylelintPlugin};
@@ -1,56 +1,2 @@
1
1
  "use strict";
2
- import svgr from 'vite-plugin-svgr';
3
-
4
- "use strict";
5
- function createSvgrPlugin() {
6
- return svgr({
7
- include: "**/*.svg?react",
8
- esbuildOptions: {
9
- platform: "browser",
10
- minify: true,
11
- jsx: "automatic"
12
- },
13
- svgrOptions: {
14
- plugins: [
15
- "@svgr/plugin-svgo",
16
- "@svgr/plugin-jsx"
17
- ],
18
- icon: false,
19
- dimensions: false,
20
- prettier: true,
21
- memo: true,
22
- svgo: true,
23
- ref: false,
24
- typescript: true,
25
- jsxRuntime: "automatic",
26
- svgoConfig: {
27
- multipass: true,
28
- datauri: "base64",
29
- js2svg: {
30
- indent: 2,
31
- pretty: true
32
- },
33
- plugins: [
34
- "preset-default",
35
- {
36
- name: "prefixIds",
37
- params: {
38
- prefix: "vef"
39
- }
40
- },
41
- {
42
- name: "cleanupIds",
43
- params: {
44
- force: true,
45
- remove: true,
46
- minify: true
47
- }
48
- }
49
- ]
50
- },
51
- svgProps: {}
52
- }
53
- });
54
- }
55
-
56
- export { createSvgrPlugin };
2
+ import s from"vite-plugin-svgr";function e(){return s({include:"**/*.svg?react",esbuildOptions:{platform:"browser",minify:!0,jsx:"automatic"},svgrOptions:{plugins:["@svgr/plugin-svgo","@svgr/plugin-jsx"],icon:!1,dimensions:!1,prettier:!0,memo:!0,svgo:!0,ref:!1,typescript:!0,jsxRuntime:"automatic",svgoConfig:{multipass:!0,datauri:"base64",js2svg:{indent:2,pretty:!0},plugins:["preset-default",{name:"prefixIds",params:{prefix:"vef"}},{name:"cleanupIds",params:{force:!0,remove:!0,minify:!0}}]},svgProps:{}}})}export{e as createSvgrPlugin};
@@ -1,9 +1,2 @@
1
1
  "use strict";
2
- import tailwindcss from '@tailwindcss/vite';
3
-
4
- "use strict";
5
- function createTailwindPlugin() {
6
- return tailwindcss();
7
- }
8
-
9
- export { createTailwindPlugin };
2
+ import i from"@tailwindcss/vite";function r(){return i()}export{r as createTailwindPlugin};
@@ -1,22 +1,3 @@
1
1
  "use strict";
2
- "use strict";
3
- const virtualModuleId = "vef:tailwind.css";
4
- const resolvedVirtualModuleId = `\0${virtualModuleId}`;
5
- function createTailwindcssPlugin() {
6
- return {
7
- name: "vef-framework:tailwindcss",
8
- resolveId(id) {
9
- if (id === virtualModuleId) {
10
- return resolvedVirtualModuleId;
11
- }
12
- },
13
- load(id) {
14
- if (id === resolvedVirtualModuleId) {
15
- return `@import "tailwindcss";
16
- @config "./tailwind.config.js";`;
17
- }
18
- }
19
- };
20
- }
21
-
22
- export { createTailwindcssPlugin };
2
+ const n="vef:tailwind.css",e=`\0${n}`;function t(){return{name:"vef-framework:tailwindcss",resolveId(i){if(i===n)return e},load(i){if(i===e)return`@import "tailwindcss";
3
+ @config "./tailwind.config.js";`}}}export{t as createTailwindcssPlugin};
@@ -1,11 +1,2 @@
1
1
  "use strict";
2
- import tsconfigPaths from 'vite-tsconfig-paths';
3
-
4
- "use strict";
5
- function createTsconfigPathsPlugin(projectDir) {
6
- return tsconfigPaths({
7
- root: projectDir
8
- });
9
- }
10
-
11
- export { createTsconfigPathsPlugin };
2
+ import o from"vite-tsconfig-paths";function r(t){return o({root:t})}export{r as createTsconfigPathsPlugin};
@@ -1,13 +1,2 @@
1
1
  "use strict";
2
- import { visualizer } from 'rollup-plugin-visualizer';
3
-
4
- "use strict";
5
- function createVisualizerPlugin(projectDir) {
6
- return visualizer({
7
- filename: "dist/stats.html",
8
- title: "Building Visualizer",
9
- projectRoot: projectDir
10
- });
11
- }
12
-
13
- export { createVisualizerPlugin };
2
+ import{visualizer as t}from"rollup-plugin-visualizer";function e(i){return t({filename:"dist/stats.html",title:"Building Visualizer",projectRoot:i})}export{e as createVisualizerPlugin};
@@ -1,12 +1,2 @@
1
1
  "use strict";
2
- import webfont from 'vite-plugin-webfont-dl';
3
-
4
- "use strict";
5
- function createWebfontPlugin() {
6
- return webfont([
7
- "https://fonts.googleapis.com/css2?family=PT+Sans+Caption:wght@400;700&family=PT+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap",
8
- "https://fonts.googleapis.com/css2?family=Martian+Mono:wght@100..800&family=PT+Sans+Caption:wght@400;700&family=PT+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap"
9
- ]);
10
- }
11
-
12
- export { createWebfontPlugin };
2
+ import t from"vite-plugin-webfont-dl";function a(){return t(["https://fonts.googleapis.com/css2?family=PT+Sans+Caption:wght@400;700&family=PT+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap","https://fonts.googleapis.com/css2?family=Martian+Mono:wght@100..800&family=PT+Sans+Caption:wght@400;700&family=PT+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap"])}export{a as createWebfontPlugin};
@@ -1,65 +1,2 @@
1
1
  "use strict";
2
- import propertyGroups from 'stylelint-config-recess-order/groups';
3
-
4
- "use strict";
5
- function defineStylelintConfig() {
6
- return {
7
- extends: [
8
- "stylelint-config-standard-scss",
9
- "stylelint-config-recommended"
10
- ],
11
- plugins: ["stylelint-order"],
12
- rules: {
13
- "order/order": [
14
- "dollar-variables",
15
- "at-variables",
16
- "custom-properties",
17
- "less-mixins",
18
- "declarations",
19
- "at-rules",
20
- "rules"
21
- ],
22
- "order/properties-order": propertyGroups.map((group) => ({
23
- ...group,
24
- emptyLineBefore: "always",
25
- noEmptyLineBetween: true
26
- })),
27
- "declaration-empty-line-before": null,
28
- "at-rule-no-unknown": null,
29
- "function-no-unknown": null,
30
- "number-max-precision": null,
31
- "color-hex-length": "long",
32
- "color-hex-alpha": "never",
33
- "color-named": "never",
34
- "unit-allowed-list": [
35
- "px",
36
- "em",
37
- "rem",
38
- "%",
39
- "vw",
40
- "vh",
41
- "fr",
42
- "deg",
43
- "rad",
44
- "grad",
45
- "turn",
46
- "ms",
47
- "s"
48
- ],
49
- "scss/function-no-unknown": [
50
- true,
51
- {
52
- ignoreFunctions: []
53
- }
54
- ],
55
- "scss/at-rule-no-unknown": [
56
- true,
57
- {
58
- ignoreAtRules: ["config"]
59
- }
60
- ]
61
- }
62
- };
63
- }
64
-
65
- export { defineStylelintConfig };
2
+ import n from"stylelint-config-recess-order/groups";function r(){return{extends:["stylelint-config-standard-scss","stylelint-config-recommended"],plugins:["stylelint-order"],rules:{"order/order":["dollar-variables","at-variables","custom-properties","less-mixins","declarations","at-rules","rules"],"order/properties-order":n.map(e=>({...e,emptyLineBefore:"always",noEmptyLineBetween:!0})),"declaration-empty-line-before":null,"at-rule-no-unknown":null,"function-no-unknown":null,"number-max-precision":null,"color-hex-length":"long","color-hex-alpha":"never","color-named":"never","unit-allowed-list":["px","em","rem","%","vw","vh","fr","deg","rad","grad","turn","ms","s"],"scss/function-no-unknown":[!0,{ignoreFunctions:[]}],"scss/at-rule-no-unknown":[!0,{ignoreAtRules:["config"]}]}}}export{r as defineStylelintConfig};