vueless 1.3.6 → 1.3.7-beta.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.
@@ -12,7 +12,7 @@ import { DEFAULT_VUELESS_CONFIG_CONTENT } from "../constants.js";
12
12
  import {
13
13
  JAVASCRIPT_EXT,
14
14
  TYPESCRIPT_EXT,
15
- VUELESS_CONFIG_DIR,
15
+ VUELESS_APP_DIR,
16
16
  CONFIG_INDEX_FILE_NAME,
17
17
  VUELESS_CONFIG_FILE_NAME,
18
18
  } from "../../constants.js";
@@ -51,8 +51,8 @@ export async function vuelessInit(options) {
51
51
  /* Create a default config file. */
52
52
  await createVuelessConfig(destPath);
53
53
 
54
- /* Create a vueless config directory and index file. */
55
- await createVuelessConfigDir(fileExt);
54
+ /* Create a vueless app directory and index file. */
55
+ await createVuelessAppDir(fileExt);
56
56
 
57
57
  /* Create pnpm package manager config. */
58
58
  if (options.includes("--pnpm")) {
@@ -111,17 +111,17 @@ async function createVuelessConfig(destPath) {
111
111
  }
112
112
 
113
113
  /**
114
- * Creates a Vueless config directory and index file.
114
+ * Creates a Vueless app directory and index file.
115
115
  * @param {string} fileExt - The file extension to use for the index file.
116
116
  */
117
- async function createVuelessConfigDir(fileExt) {
118
- const vuelessDir = path.join(cwd(), VUELESS_CONFIG_DIR);
117
+ async function createVuelessAppDir(fileExt) {
118
+ const vuelessDir = path.join(cwd(), VUELESS_APP_DIR);
119
119
 
120
120
  if (existsSync(vuelessDir)) return;
121
121
 
122
122
  mkdirSync(vuelessDir);
123
123
  console.log(
124
- styleText("green", `The '${VUELESS_CONFIG_DIR}' directory was created in the project root.`),
124
+ styleText("green", `The '${VUELESS_APP_DIR}' directory was created in the project root.`),
125
125
  );
126
126
 
127
127
  const indexFileContent = await generateConfigIndexContent();
package/constants.d.ts CHANGED
@@ -339,7 +339,8 @@ export const VUELESS_CONFIGS_CACHED_DIR: "node_modules/.cache/vueless/configs";
339
339
  export const VUELESS_MERGED_CONFIGS_CACHED_DIR: "node_modules/.cache/vueless/mergedConfigs";
340
340
  export const VUELESS_CONFIG_FILE_NAME: "vueless.config";
341
341
  export const CONFIG_INDEX_FILE_NAME: "index";
342
- export const VUELESS_CONFIG_DIR: ".vueless";
342
+ export const VUELESS_APP_DIR: ".vueless";
343
+ export const VUELESS_APP_CONFIGS_DIR: ".vueless/configs";
343
344
  export const VUELESS_USER_COMPONENTS_DIR: ".vueless/components";
344
345
  export const SRC_USER_COMPONENTS_DIR: "src/components";
345
346
  export const DEFAULT_EXIT_CODE: 0;
package/constants.js CHANGED
@@ -420,8 +420,9 @@ export const VUELESS_CONFIGS_CACHED_DIR = `${VUELESS_CACHE_DIR}/configs`;
420
420
  export const VUELESS_MERGED_CONFIGS_CACHED_DIR = `${VUELESS_CACHE_DIR}/mergedConfigs`;
421
421
  export const VUELESS_CONFIG_FILE_NAME = "vueless.config";
422
422
  export const CONFIG_INDEX_FILE_NAME = "index";
423
- export const VUELESS_CONFIG_DIR = ".vueless";
424
- export const VUELESS_USER_COMPONENTS_DIR = `${VUELESS_CONFIG_DIR}/components`;
423
+ export const VUELESS_APP_DIR = ".vueless";
424
+ export const VUELESS_APP_CONFIGS_DIR = `${VUELESS_APP_DIR}/configs`;
425
+ export const VUELESS_USER_COMPONENTS_DIR = `${VUELESS_APP_DIR}/components`;
425
426
  export const SRC_USER_COMPONENTS_DIR = `${SRC_DIR}/components`;
426
427
 
427
428
  /* System error codes */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "1.3.6",
3
+ "version": "1.3.7-beta.1",
4
4
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
5
5
  "author": "Johnny Grid <hello@vueless.com> (https://vueless.com)",
6
6
  "homepage": "https://vueless.com",
package/plugin-vite.js CHANGED
@@ -24,7 +24,7 @@ import { overrideComponents, restoreComponents } from "./utils/node/componentOve
24
24
  import {
25
25
  getNuxtDirs,
26
26
  getVueDirs,
27
- getVuelessConfigDirs,
27
+ getVuelessAppDirs,
28
28
  cacheMergedConfigs,
29
29
  autoImportUserConfigs,
30
30
  } from "./utils/node/helper.js";
@@ -77,7 +77,7 @@ export const Vueless = function (options = {}) {
77
77
 
78
78
  const targetFiles = [
79
79
  ...(include || []),
80
- ...getVuelessConfigDirs(),
80
+ ...getVuelessAppDirs(),
81
81
  ...(isNuxtModuleEnv ? getNuxtDirs() : getVueDirs()),
82
82
  ];
83
83
 
@@ -32,33 +32,39 @@ export default /*tw*/ {
32
32
  },
33
33
  gap: {
34
34
  none: "gap-0",
35
+ "3xs": "gap-0.5",
35
36
  "2xs": "gap-1",
36
37
  xs: "gap-2",
37
38
  sm: "gap-3",
38
39
  md: "gap-4",
39
40
  lg: "gap-5",
40
41
  xl: "gap-6",
41
- "2xl": "gap-8",
42
+ "2xl": "gap-7",
43
+ "3xl": "gap-8",
42
44
  },
43
45
  rowGap: {
44
46
  none: "gap-y-0",
47
+ "3xs": "gap-y-0.5",
45
48
  "2xs": "gap-y-1",
46
49
  xs: "gap-y-2",
47
50
  sm: "gap-y-3",
48
51
  md: "gap-y-4",
49
52
  lg: "gap-y-5",
50
53
  xl: "gap-y-6",
51
- "2xl": "gap-y-8",
54
+ "2xl": "gap-y-7",
55
+ "3xl": "gap-y-8",
52
56
  },
53
57
  colGap: {
54
58
  none: "gap-x-0",
59
+ "3xs": "gap-x-0.5",
55
60
  "2xs": "gap-x-1",
56
61
  xs: "gap-x-2",
57
62
  sm: "gap-x-3",
58
63
  md: "gap-x-4",
59
64
  lg: "gap-x-5",
60
65
  xl: "gap-x-6",
61
- "2xl": "gap-x-8",
66
+ "2xl": "gap-x-7",
67
+ "3xl": "gap-x-8",
62
68
  },
63
69
  align: {
64
70
  start: "items-start",
@@ -64,13 +64,15 @@ describe("UGrid.vue", () => {
64
64
  it("Gap – applies the correct gap class", () => {
65
65
  const gapClasses = {
66
66
  none: "gap-0",
67
+ "3xs": "gap-0.5",
67
68
  "2xs": "gap-1",
68
69
  xs: "gap-2",
69
70
  sm: "gap-3",
70
71
  md: "gap-4",
71
72
  lg: "gap-5",
72
73
  xl: "gap-6",
73
- "2xl": "gap-8",
74
+ "2xl": "gap-7",
75
+ "3xl": "gap-8",
74
76
  };
75
77
 
76
78
  Object.entries(gapClasses).forEach(([gap, classes]) => {
@@ -87,13 +89,15 @@ describe("UGrid.vue", () => {
87
89
  it("Row Gap – applies the correct row gap class", () => {
88
90
  const rowGapClasses = {
89
91
  none: "gap-y-0",
92
+ "3xs": "gap-y-0.5",
90
93
  "2xs": "gap-y-1",
91
94
  xs: "gap-y-2",
92
95
  sm: "gap-y-3",
93
96
  md: "gap-y-4",
94
97
  lg: "gap-y-5",
95
98
  xl: "gap-y-6",
96
- "2xl": "gap-y-8",
99
+ "2xl": "gap-y-7",
100
+ "3xl": "gap-y-8",
97
101
  };
98
102
 
99
103
  Object.entries(rowGapClasses).forEach(([rowGap, classes]) => {
@@ -110,13 +114,15 @@ describe("UGrid.vue", () => {
110
114
  it("Col Gap – applies the correct col gap class", () => {
111
115
  const colGapClasses = {
112
116
  none: "gap-x-0",
117
+ "3xs": "gap-x-0.5",
113
118
  "2xs": "gap-x-1",
114
119
  xs: "gap-x-2",
115
120
  sm: "gap-x-3",
116
121
  md: "gap-x-4",
117
122
  lg: "gap-x-5",
118
123
  xl: "gap-x-6",
119
- "2xl": "gap-x-8",
124
+ "2xl": "gap-x-7",
125
+ "3xl": "gap-x-8",
120
126
  };
121
127
 
122
128
  Object.entries(colGapClasses).forEach(([colGap, classes]) => {
@@ -18,17 +18,17 @@ export interface Props {
18
18
  /**
19
19
  * Gap between items.
20
20
  */
21
- gap?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
21
+ gap?: "none" | "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
22
22
 
23
23
  /**
24
24
  * Vertical gap override.
25
25
  */
26
- rowGap?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
26
+ rowGap?: "none" | "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
27
27
 
28
28
  /**
29
29
  * Horizontal gap override.
30
30
  */
31
- colGap?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
31
+ colGap?: "none" | "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
32
32
 
33
33
  /**
34
34
  * Vertical alignment (align-items).
@@ -20,13 +20,15 @@ export default /*tw*/ {
20
20
  },
21
21
  gap: {
22
22
  none: "gap-0",
23
+ "3xs": "gap-0.5",
23
24
  "2xs": "gap-1",
24
25
  xs: "gap-2",
25
26
  sm: "gap-3",
26
27
  md: "gap-4",
27
28
  lg: "gap-5",
28
29
  xl: "gap-6",
29
- "2xl": "gap-8",
30
+ "2xl": "gap-7",
31
+ "3xl": "gap-8",
30
32
  },
31
33
  align: {
32
34
  end: "items-end",
@@ -10,13 +10,15 @@ describe("URow.vue", () => {
10
10
  it("Gap – applies the correct gap class", () => {
11
11
  const gapClasses = {
12
12
  none: "gap-0",
13
+ "3xs": "gap-0.5",
13
14
  "2xs": "gap-1",
14
15
  xs: "gap-2",
15
16
  sm: "gap-3",
16
17
  md: "gap-4",
17
18
  lg: "gap-5",
18
19
  xl: "gap-6",
19
- "2xl": "gap-8",
20
+ "2xl": "gap-7",
21
+ "3xl": "gap-8",
20
22
  };
21
23
 
22
24
  Object.entries(gapClasses).forEach(([gap, classes]) => {
@@ -8,7 +8,7 @@ export interface Props {
8
8
  /**
9
9
  * The distance between nested elements.
10
10
  */
11
- gap?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
11
+ gap?: "none" | "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
12
12
 
13
13
  /**
14
14
  * Items vertical align (align-items).
@@ -4,7 +4,7 @@ export function getDirFiles(dirPath: string, ext: string, { recursive, exclude }
4
4
  }): Promise<string[]>;
5
5
  export function getNuxtDirs(): string[];
6
6
  export function getVueDirs(): string[];
7
- export function getVuelessConfigDirs(): string[];
7
+ export function getVuelessAppDirs(): string[];
8
8
  export function getMergedComponentConfig(name: string): Promise<Object>;
9
9
  export function getDefaultComponentConfig(name: string, configDir: string): Promise<Object>;
10
10
  export function cacheMergedConfigs({ vuelessSrcDir, basePath }?: {
@@ -12,7 +12,8 @@ import {
12
12
  JAVASCRIPT_EXT,
13
13
  TYPESCRIPT_EXT,
14
14
  SUPPRESS_TS_CHECK,
15
- VUELESS_CONFIG_DIR,
15
+ VUELESS_APP_DIR,
16
+ VUELESS_APP_CONFIGS_DIR,
16
17
  COMPONENTS_INDEX_EXPORT,
17
18
  COMPONENTS_INDEX_COMMENT,
18
19
  VUELESS_CONFIGS_CACHED_DIR,
@@ -108,8 +109,8 @@ export function getVueDirs() {
108
109
  * Retrieves an array of directory paths and specific file paths within the current working directory related to a Vueless project.
109
110
  * @return {string[]}.
110
111
  */
111
- export function getVuelessConfigDirs() {
112
- return [path.join(cwd(), VUELESS_CONFIG_DIR)];
112
+ export function getVuelessAppDirs() {
113
+ return [path.join(cwd(), VUELESS_APP_DIR)];
113
114
  }
114
115
 
115
116
  /**
@@ -251,7 +252,7 @@ export async function detectTypeScript() {
251
252
  * @return {Promise<void>} A promise that resolves when the configuration import and index file generation is completed.
252
253
  */
253
254
  export async function autoImportUserConfigs(basePath = "") {
254
- const vuelessConfigDir = path.join(cwd(), basePath, VUELESS_CONFIG_DIR);
255
+ const vuelessConfigDir = path.join(cwd(), basePath, VUELESS_APP_CONFIGS_DIR);
255
256
 
256
257
  const indexTsPath = path.join(vuelessConfigDir, `${CONFIG_INDEX_FILE_NAME}${TYPESCRIPT_EXT}`);
257
258
  const indexJsPath = path.join(vuelessConfigDir, `${CONFIG_INDEX_FILE_NAME}${JAVASCRIPT_EXT}`);