@pubinfo/config 2.0.0-beta.3 → 2.0.0-beta.30

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 (57) hide show
  1. package/dist/eslint/index.d.ts +1 -1
  2. package/dist/eslint/index.mjs +1 -1
  3. package/dist/index.d.mts +2 -2
  4. package/dist/index.d.ts +2 -2
  5. package/dist/index.mjs +4 -5
  6. package/dist/shared/{config.DPEra-Xx.mjs → config.D4FYsBnQ.mjs} +0 -8
  7. package/dist/stylelint.d.ts +1 -1
  8. package/dist/themes/index.d.mts +2 -8
  9. package/dist/themes/index.d.ts +2 -8
  10. package/dist/themes/index.mjs +610 -3
  11. package/dist/unocss/index.d.mts +8 -0
  12. package/dist/unocss/index.d.ts +8 -0
  13. package/dist/unocss/index.mjs +103 -0
  14. package/package.json +16 -21
  15. package/src/eslint/config/ignores.ts +10 -0
  16. package/src/eslint/config/stylistic.ts +21 -0
  17. package/src/eslint/config/vue.ts +54 -0
  18. package/src/eslint/factory.ts +20 -0
  19. package/src/eslint/globs.ts +86 -0
  20. package/src/eslint/index.ts +3 -0
  21. package/src/index.ts +4 -0
  22. package/src/stylelint.ts +135 -0
  23. package/src/themes/index.ts +3 -0
  24. package/src/themes/system/dark/dark.ts +47 -0
  25. package/src/themes/system/dark/dracula.ts +47 -0
  26. package/src/themes/system/dark/luxury.ts +47 -0
  27. package/src/themes/system/dark/night.ts +47 -0
  28. package/src/themes/system/dark/stone.ts +47 -0
  29. package/src/themes/system/dark/synthwave.ts +47 -0
  30. package/src/themes/system/light/barbie.ts +47 -0
  31. package/src/themes/system/light/classic.ts +47 -0
  32. package/src/themes/system/light/cyberpunk.ts +47 -0
  33. package/src/themes/system/light/light.ts +47 -0
  34. package/src/themes/system/light/naive.ts +47 -0
  35. package/src/themes/system/light/winter.ts +47 -0
  36. package/src/themes/theme.ts +18 -0
  37. package/src/themes/unocss-utils.ts +52 -0
  38. package/src/themes/utils.ts +81 -0
  39. package/src/unocss/index.ts +61 -0
  40. package/src/unocss/presetThemes.ts +57 -0
  41. package/dist/eslint/index.cjs +0 -8
  42. package/dist/eslint/index.d.cts +0 -6
  43. package/dist/index.cjs +0 -21
  44. package/dist/index.d.cts +0 -6
  45. package/dist/shared/config.BDKVPKTO.mjs +0 -635
  46. package/dist/shared/config.CSqBb4YU.d.cts +0 -5
  47. package/dist/shared/config.YMrrkzU5.cjs +0 -641
  48. package/dist/shared/config.wdnazHMp.cjs +0 -147
  49. package/dist/stylelint.cjs +0 -139
  50. package/dist/stylelint.d.cts +0 -106
  51. package/dist/themes/index.cjs +0 -13
  52. package/dist/themes/index.d.cts +0 -33
  53. package/dist/unocss.cjs +0 -59
  54. package/dist/unocss.d.cts +0 -5
  55. package/dist/unocss.d.mts +0 -5
  56. package/dist/unocss.d.ts +0 -5
  57. package/dist/unocss.mjs +0 -57
@@ -0,0 +1,103 @@
1
+ import { definePreset as definePreset$1, transformerDirectives, presetUno, presetAttributify, presetTypography, presetIcons } from 'unocss';
2
+ import { definePreset, entriesToCss, toArray } from '@unocss/core';
3
+ import { getThemes } from '../themes/index.mjs';
4
+
5
+ const suffix = [["", " *", "::before", "::after"], ["::backdrop"]];
6
+ function createCssVar(key, themeName) {
7
+ function createSuffixScheme(preSuffix, suffixMap = suffix) {
8
+ return suffixMap.reduce((acc, suffix2) => acc.concat(suffix2.map((s) => `${preSuffix}${s}`).join(",")), []);
9
+ }
10
+ const map = {
11
+ light(key2) {
12
+ const preSuffix = `[data-theme="${key2}"]`;
13
+ return createSuffixScheme(preSuffix);
14
+ },
15
+ dark(key2) {
16
+ const preSuffix = `html.dark [data-theme="${key2}"]`;
17
+ return createSuffixScheme(preSuffix);
18
+ }
19
+ };
20
+ return map[key](themeName);
21
+ }
22
+ function mergeTheme(themes) {
23
+ const themeColor = Object.assign({}, ...themes);
24
+ return themeColor;
25
+ }
26
+ function normalizePreflights(_themes = []) {
27
+ return {
28
+ getCSS: () => {
29
+ const injectionCss = [];
30
+ const themes = Object.assign(getThemes(), mergeTheme(_themes));
31
+ Object.keys(themes).forEach((key) => {
32
+ delete themes[key].label;
33
+ const css = entriesToCss(Object.entries(themes[key]));
34
+ const themeColorScheme = themes[key]["color-scheme"];
35
+ const roots = toArray(
36
+ createCssVar(themeColorScheme, key)
37
+ );
38
+ injectionCss.push(roots.map((root) => `${root}{${css}}`).join(""));
39
+ });
40
+ return injectionCss.join("");
41
+ }
42
+ };
43
+ }
44
+ const presetThemes = definePreset((options) => {
45
+ return {
46
+ name: "@wsys/preset-themes",
47
+ preflights: [
48
+ normalizePreflights(options?.themes)
49
+ ]
50
+ };
51
+ });
52
+
53
+ const index = definePreset$1((options) => {
54
+ return {
55
+ name: "preset-pubinfo",
56
+ presets: [
57
+ presetThemes({ themes: options?.themes }),
58
+ presetUno(),
59
+ presetAttributify(),
60
+ presetTypography(),
61
+ presetIcons({
62
+ extraProperties: {
63
+ "display": "inline-block",
64
+ "vertical-align": "middle"
65
+ }
66
+ })
67
+ ],
68
+ transformers: [
69
+ transformerDirectives()
70
+ ],
71
+ shortcuts: [
72
+ {
73
+ "flex-center": "flex justify-center items-center",
74
+ "flex-col-center": "flex flex-col justify-center items-center"
75
+ }
76
+ ],
77
+ theme: {
78
+ colors: {
79
+ "ui-primary": "rgb(var(--ui-primary))",
80
+ "ui-text": "rgb(var(--ui-text))"
81
+ },
82
+ breakpoints: {
83
+ "sm": "768px",
84
+ "smd": "1024px",
85
+ "md": "1366px",
86
+ "lg": "1440px",
87
+ "xl": "1600px",
88
+ "2xl": "1920px"
89
+ }
90
+ },
91
+ // TOFIX 此文件中该配置不生效
92
+ content: {
93
+ pipeline: {
94
+ include: [
95
+ /\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/,
96
+ "src/routes/**/*.ts"
97
+ ]
98
+ }
99
+ }
100
+ };
101
+ });
102
+
103
+ export { index as default };
package/package.json CHANGED
@@ -1,61 +1,56 @@
1
1
  {
2
2
  "name": "@pubinfo/config",
3
3
  "type": "module",
4
- "version": "2.0.0-beta.3",
4
+ "version": "2.0.0-beta.30",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
8
- "import": "./dist/index.mjs",
9
- "require": "./dist/index.cjs"
8
+ "default": "./dist/index.mjs"
10
9
  },
11
10
  "./eslint": {
12
11
  "types": "./dist/eslint/index.d.ts",
13
- "import": "./dist/eslint/index.mjs",
14
- "require": "./dist/eslint/index.cjs"
12
+ "default": "./dist/eslint/index.mjs"
15
13
  },
16
14
  "./themes": {
17
15
  "types": "./dist/themes/index.d.ts",
18
- "import": "./dist/themes/index.mjs",
19
- "require": "./dist/themes/index.cjs"
16
+ "default": "./dist/themes/index.mjs"
20
17
  },
21
18
  "./stylelint": {
22
19
  "types": "./dist/stylelint.d.ts",
23
- "import": "./dist/stylelint.mjs",
24
- "require": "./dist/stylelint.cjs"
20
+ "default": "./dist/stylelint.mjs"
25
21
  },
26
22
  "./unocss": {
27
- "types": "./dist/unocss.d.ts",
28
- "import": "./dist/unocss.mjs",
29
- "require": "./dist/unocss.cjs"
23
+ "types": "./dist/unocss/index.d.ts",
24
+ "default": "./dist/unocss/index.mjs"
30
25
  }
31
26
  },
32
- "main": "./dist/index.cjs",
27
+ "main": "./dist/index.mjs",
33
28
  "module": "./dist/index.mjs",
34
29
  "types": "./dist/index.d.ts",
35
30
  "files": [
36
- "dist"
31
+ "dist",
32
+ "src"
37
33
  ],
38
34
  "peerDependencies": {
39
- "eslint": "^9.21.0",
40
- "stylelint": "^16.15.0",
35
+ "eslint": "^9.27.0",
36
+ "stylelint": "^16.20.0",
41
37
  "unocss": "^65.5.0"
42
38
  },
43
39
  "dependencies": {
44
40
  "@antfu/eslint-config": "^3.16.0",
45
41
  "@stylistic/stylelint-plugin": "^2.1.3",
46
42
  "@unocss/core": "^65.5.0",
47
- "@unocss/preset-mini": "^65.5.0",
48
43
  "postcss-html": "^1.8.0",
49
- "postcss-preset-env": "^10.1.5",
44
+ "postcss-preset-env": "^10.2.0",
50
45
  "stylelint-config-recess-order": "^5.1.1",
51
46
  "stylelint-config-standard-less": "^3.0.1",
52
47
  "stylelint-config-standard-scss": "^13.1.0",
53
48
  "stylelint-config-standard-vue": "^1.0.0",
54
- "stylelint-scss": "^6.11.1"
49
+ "stylelint-scss": "^6.12.0"
55
50
  },
56
51
  "devDependencies": {
57
- "eslint": "^9.21.0",
58
- "stylelint": "^16.15.0",
52
+ "eslint": "^9.27.0",
53
+ "stylelint": "^16.20.0",
59
54
  "unbuild": "^3.5.0",
60
55
  "unocss": "^65.5.0"
61
56
  },
@@ -0,0 +1,10 @@
1
+ import type { TypedFlatConfigItem } from '@antfu/eslint-config';
2
+ import { GLOB_EXCLUDE } from '../globs';
3
+
4
+ export async function ignores(): Promise<TypedFlatConfigItem[]> {
5
+ return [
6
+ {
7
+ ignores: GLOB_EXCLUDE,
8
+ },
9
+ ];
10
+ }
@@ -0,0 +1,21 @@
1
+ import type { TypedFlatConfigItem } from '@antfu/eslint-config';
2
+
3
+ export async function stylistic(): Promise<TypedFlatConfigItem[]> {
4
+ return [
5
+ {
6
+ rules: {
7
+ 'eslint-comments/no-unlimited-disable': 'off',
8
+ 'curly': ['error', 'all'],
9
+ 'antfu/consistent-list-newline': 'off',
10
+ 'regexp/no-unused-capturing-group': 'off',
11
+ 'unused-imports/no-unused-vars': 'off',
12
+ 'unicorn/consistent-function-scoping': 'off',
13
+ },
14
+ },
15
+ {
16
+ rules: {
17
+ 'style/semi': ['error', 'always'],
18
+ },
19
+ },
20
+ ];
21
+ }
@@ -0,0 +1,54 @@
1
+ import type { TypedFlatConfigItem } from '@antfu/eslint-config';
2
+
3
+ export async function vue(): Promise<TypedFlatConfigItem[]> {
4
+ return [
5
+ {
6
+ files: [
7
+ '**/*.vue',
8
+ ],
9
+ rules: {
10
+ 'vue/block-order': ['error', {
11
+ order: [
12
+ 'route',
13
+ 'i18n',
14
+ 'script',
15
+ 'template',
16
+ 'style',
17
+ ],
18
+ }],
19
+ 'vue/component-api-style': ['error',
20
+ ['script-setup', 'composition'],
21
+ ],
22
+ 'vue/match-component-import-name': ['error'],
23
+ 'vue/new-line-between-multi-line-property': ['error'],
24
+ 'vue/no-empty-component-block': ['error'],
25
+ 'vue/no-potential-component-option-typo': ['error', {
26
+ presets: ['all'],
27
+ }],
28
+ 'vue/prefer-define-options': ['error'],
29
+ 'vue/valid-define-options': ['error'],
30
+ 'vue/require-macro-variable-name': ['error', {
31
+ defineProps: 'props',
32
+ defineEmits: 'emit',
33
+ defineSlots: 'slots',
34
+ useSlots: 'slots',
35
+ useAttrs: 'attrs',
36
+ }],
37
+ 'vue/no-unused-emit-declarations': ['error'],
38
+ 'vue/attribute-hyphenation': [
39
+ 'warn',
40
+ 'always',
41
+ {},
42
+ ],
43
+ },
44
+ },
45
+ {
46
+ files: [
47
+ '**/views/**/*.vue',
48
+ ],
49
+ rules: {
50
+ 'vue/no-multiple-template-root': ['error'],
51
+ },
52
+ },
53
+ ];
54
+ }
@@ -0,0 +1,20 @@
1
+ import type { TypedFlatConfigItem } from '@antfu/eslint-config';
2
+
3
+ import antfu from '@antfu/eslint-config';
4
+ import { ignores } from './config/ignores';
5
+ import { stylistic } from './config/stylistic';
6
+ import { vue } from './config/vue';
7
+
8
+ export async function pubinfo(
9
+ ...userConfigs: Parameters<typeof antfu>[1][]
10
+ ): Promise<TypedFlatConfigItem[]> {
11
+ return antfu(
12
+ {
13
+ unocss: false,
14
+ },
15
+ vue(),
16
+ stylistic(),
17
+ ignores(),
18
+ ...userConfigs,
19
+ );
20
+ }
@@ -0,0 +1,86 @@
1
+ export const GLOB_SRC_EXT = '?([cm])[jt]s?(x)';
2
+ export const GLOB_SRC = '**/*.?([cm])[jt]s?(x)';
3
+
4
+ export const GLOB_JS = '**/*.?([cm])js';
5
+ export const GLOB_JSX = '**/*.?([cm])jsx';
6
+
7
+ export const GLOB_TS = '**/*.?([cm])ts';
8
+ export const GLOB_TSX = '**/*.?([cm])tsx';
9
+
10
+ export const GLOB_STYLE = '**/*.{c,le,sc}ss';
11
+ export const GLOB_CSS = '**/*.css';
12
+ export const GLOB_POSTCSS = '**/*.{p,post}css';
13
+ export const GLOB_LESS = '**/*.less';
14
+ export const GLOB_SCSS = '**/*.scss';
15
+
16
+ export const GLOB_JSON = '**/*.json';
17
+ export const GLOB_JSON5 = '**/*.json5';
18
+ export const GLOB_JSONC = '**/*.jsonc';
19
+
20
+ export const GLOB_MARKDOWN = '**/*.md';
21
+ export const GLOB_MARKDOWN_IN_MARKDOWN = '**/*.md/*.md';
22
+ export const GLOB_SVELTE = '**/*.svelte';
23
+ export const GLOB_VUE = '**/*.vue';
24
+ export const GLOB_YAML = '**/*.y?(a)ml';
25
+ export const GLOB_TOML = '**/*.toml';
26
+ export const GLOB_HTML = '**/*.htm?(l)';
27
+
28
+ export const GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
29
+
30
+ export const GLOB_TESTS = [
31
+ `**/__tests__/**/*.${GLOB_SRC_EXT}`,
32
+ `**/*.spec.${GLOB_SRC_EXT}`,
33
+ `**/*.test.${GLOB_SRC_EXT}`,
34
+ `**/*.bench.${GLOB_SRC_EXT}`,
35
+ `**/*.benchmark.${GLOB_SRC_EXT}`,
36
+ ];
37
+
38
+ export const GLOB_ALL_SRC = [
39
+ GLOB_SRC,
40
+ GLOB_STYLE,
41
+ GLOB_JSON,
42
+ GLOB_JSON5,
43
+ GLOB_MARKDOWN,
44
+ GLOB_SVELTE,
45
+ GLOB_VUE,
46
+ GLOB_YAML,
47
+ GLOB_HTML,
48
+ ];
49
+
50
+ export const GLOB_EXCLUDE = [
51
+ '**/node_modules',
52
+ '**/dist',
53
+ '**/package-lock.json',
54
+ '**/yarn.lock',
55
+ '**/pnpm-lock.yaml',
56
+ '**/bun.lockb',
57
+
58
+ '**/output',
59
+ '**/coverage',
60
+ '**/temp',
61
+ '**/.temp',
62
+ '**/tmp',
63
+ '**/.tmp',
64
+ '**/.history',
65
+ '**/.vitepress/cache',
66
+ '**/.nuxt',
67
+ '**/.next',
68
+ '**/.vercel',
69
+ '**/.changeset',
70
+ '**/.idea',
71
+ '**/.cache',
72
+ '**/.output',
73
+ '**/.vite-inspect',
74
+ '**/es',
75
+ '**/lib',
76
+
77
+ '**/CHANGELOG*.md',
78
+ '**/*.min.*',
79
+ '**/LICENSE*',
80
+ '**/__snapshots__',
81
+ '**/auto-import?(s).d.ts',
82
+ '**/components.d.ts',
83
+ '**/*.cjs',
84
+ '**/*.mjs',
85
+ '**/assets/**/*.json',
86
+ ];
@@ -0,0 +1,3 @@
1
+ import { pubinfo } from './factory';
2
+
3
+ export default pubinfo;
package/src/index.ts ADDED
@@ -0,0 +1,4 @@
1
+ export { default as eslint } from './eslint';
2
+ export { default as stylelint } from './stylelint';
3
+ export * from './themes';
4
+ export { default as presetPubinfo } from './unocss';
@@ -0,0 +1,135 @@
1
+ export default {
2
+ extends: [
3
+ 'stylelint-config-recess-order',
4
+ ],
5
+ plugins: [
6
+ 'stylelint-scss',
7
+ '@stylistic/stylelint-plugin',
8
+ ],
9
+ overrides: [
10
+ {
11
+ files: ['**/*.(css|html|vue)'],
12
+ customSyntax: 'postcss-html',
13
+ },
14
+ {
15
+ files: ['*.less', '**/*.less'],
16
+ customSyntax: 'postcss-less',
17
+ extends: ['stylelint-config-standard-less', 'stylelint-config-standard-vue'],
18
+ },
19
+ {
20
+ files: ['*.scss', '**/*.scss'],
21
+ customSyntax: 'postcss-scss',
22
+ extends: ['stylelint-config-standard-scss', 'stylelint-config-standard-vue/scss'],
23
+ rule: {
24
+ 'scss/double-slash-comment-empty-line-before': null,
25
+ 'scss/no-global-function-names': null,
26
+ },
27
+ },
28
+ ],
29
+ rules: {
30
+ 'at-rule-no-unknown': null,
31
+ 'no-descending-specificity': null,
32
+ 'property-no-unknown': null,
33
+ 'font-family-no-missing-generic-family-keyword': null,
34
+ 'selector-class-pattern': null,
35
+ 'function-no-unknown': [
36
+ true,
37
+ {
38
+ ignoreFunctions: [
39
+ 'v-bind',
40
+ 'map-get',
41
+ 'lighten',
42
+ 'darken',
43
+ ],
44
+ },
45
+ ],
46
+ 'selector-pseudo-element-no-unknown': [
47
+ true,
48
+ {
49
+ ignorePseudoElements: [
50
+ '/^view-transition/',
51
+ ],
52
+ },
53
+ ],
54
+ // 提取自 https://github.com/elirasza/stylelint-stylistic/blob/main/config/index.js
55
+ '@stylistic/at-rule-name-case': 'lower',
56
+ '@stylistic/at-rule-name-space-after': 'always-single-line',
57
+ '@stylistic/at-rule-semicolon-newline-after': 'always',
58
+ '@stylistic/block-closing-brace-empty-line-before': 'never',
59
+ '@stylistic/block-closing-brace-newline-before': 'always-multi-line',
60
+ '@stylistic/block-closing-brace-space-before': 'always-single-line',
61
+ '@stylistic/block-opening-brace-newline-after': 'always-multi-line',
62
+ '@stylistic/block-opening-brace-space-after': 'always-single-line',
63
+ '@stylistic/block-opening-brace-space-before': 'always',
64
+ '@stylistic/color-hex-case': 'lower',
65
+ '@stylistic/declaration-bang-space-after': 'never',
66
+ '@stylistic/declaration-bang-space-before': 'always',
67
+ '@stylistic/declaration-block-semicolon-newline-after': 'always-multi-line',
68
+ '@stylistic/declaration-block-semicolon-space-after': 'always-single-line',
69
+ '@stylistic/declaration-block-semicolon-space-before': 'never',
70
+ '@stylistic/declaration-block-trailing-semicolon': 'always',
71
+ '@stylistic/declaration-colon-newline-after': 'always-multi-line',
72
+ '@stylistic/declaration-colon-space-after': 'always-single-line',
73
+ '@stylistic/declaration-colon-space-before': 'never',
74
+ '@stylistic/function-comma-newline-after': 'always-multi-line',
75
+ '@stylistic/function-comma-space-after': 'always-single-line',
76
+ '@stylistic/function-comma-space-before': 'never',
77
+ '@stylistic/function-max-empty-lines': 0,
78
+ '@stylistic/function-parentheses-newline-inside': 'always-multi-line',
79
+ '@stylistic/function-parentheses-space-inside': 'never-single-line',
80
+ '@stylistic/function-whitespace-after': 'always',
81
+ '@stylistic/indentation': 2,
82
+ '@stylistic/max-empty-lines': 1,
83
+ '@stylistic/media-feature-colon-space-after': 'always',
84
+ '@stylistic/media-feature-colon-space-before': 'never',
85
+ '@stylistic/media-feature-name-case': 'lower',
86
+ '@stylistic/media-feature-parentheses-space-inside': 'never',
87
+ '@stylistic/media-feature-range-operator-space-after': 'always',
88
+ '@stylistic/media-feature-range-operator-space-before': 'always',
89
+ '@stylistic/media-query-list-comma-newline-after': 'always-multi-line',
90
+ '@stylistic/media-query-list-comma-space-after': 'always-single-line',
91
+ '@stylistic/media-query-list-comma-space-before': 'never',
92
+ '@stylistic/no-empty-first-line': true,
93
+ '@stylistic/no-eol-whitespace': true,
94
+ '@stylistic/no-extra-semicolons': true,
95
+ '@stylistic/no-missing-end-of-source-newline': true,
96
+ '@stylistic/number-leading-zero': 'always',
97
+ '@stylistic/number-no-trailing-zeros': true,
98
+ '@stylistic/property-case': 'lower',
99
+ '@stylistic/selector-attribute-brackets-space-inside': 'never',
100
+ '@stylistic/selector-attribute-operator-space-after': 'never',
101
+ '@stylistic/selector-attribute-operator-space-before': 'never',
102
+ '@stylistic/selector-combinator-space-after': 'always',
103
+ '@stylistic/selector-combinator-space-before': 'always',
104
+ '@stylistic/selector-descendant-combinator-no-non-space': true,
105
+ '@stylistic/selector-list-comma-newline-after': 'always',
106
+ '@stylistic/selector-list-comma-space-before': 'never',
107
+ '@stylistic/selector-max-empty-lines': 0,
108
+ '@stylistic/selector-pseudo-class-case': 'lower',
109
+ '@stylistic/selector-pseudo-class-parentheses-space-inside': 'never',
110
+ '@stylistic/selector-pseudo-element-case': 'lower',
111
+ '@stylistic/string-quotes': 'double',
112
+ '@stylistic/unit-case': 'lower',
113
+ '@stylistic/value-list-comma-newline-after': 'always-multi-line',
114
+ '@stylistic/value-list-comma-space-after': 'always-single-line',
115
+ '@stylistic/value-list-comma-space-before': 'never',
116
+ '@stylistic/value-list-max-empty-lines': 0,
117
+ // 根据需要覆盖部分规则
118
+ '@stylistic/max-line-length': null,
119
+ '@stylistic/block-closing-brace-newline-after': [
120
+ 'always',
121
+ {
122
+ ignoreAtRules: ['if', 'else'],
123
+ },
124
+ ],
125
+ },
126
+ allowEmptyInput: true,
127
+ ignoreFiles: [
128
+ '**/node_modules/**/*',
129
+ '**/dist*/**/*',
130
+ '**/src/assets/fonts/**/*',
131
+ '**/*.cjs',
132
+ '**/*.ejs',
133
+ '**/.pubinfo/**/*',
134
+ ],
135
+ };
@@ -0,0 +1,3 @@
1
+ import './theme';
2
+
3
+ export * from './utils';
@@ -0,0 +1,47 @@
1
+ import { defineTheme } from '../../utils';
2
+
3
+ export default defineTheme({
4
+ name: 'dark',
5
+ colors: {
6
+ 'label': '墨夜幽',
7
+ // 颜色主题
8
+ 'color-scheme': 'dark',
9
+ // 内置 UI
10
+ '--ui-primary': '#e5e5e5',
11
+ '--ui-text': '#0f0f0f',
12
+ // 主体
13
+ '--g-bg': '#0a0a0a',
14
+ '--g-container-bg': '#141414',
15
+ '--g-border-color': '#15191e',
16
+ // 头部
17
+ '--g-header-bg': '#141414',
18
+ '--g-header-color': '#e5e5e5',
19
+ '--g-header-menu-color': '#a8a29e',
20
+ '--g-header-menu-hover-bg': '#141414',
21
+ '--g-header-menu-hover-color': '#e5e5e5',
22
+ '--g-header-menu-active-bg': '#2d2c2c',
23
+ '--g-header-menu-active-color': '#ffffff',
24
+ // 主导航
25
+ '--g-main-sidebar-bg': '#101010',
26
+ '--g-main-sidebar-menu-color': '#a8a29e',
27
+ '--g-main-sidebar-menu-hover-bg': '#141414',
28
+ '--g-main-sidebar-menu-hover-color': '#e5e5e5',
29
+ '--g-main-sidebar-menu-active-bg': '#1D1D1D',
30
+ '--g-main-sidebar-menu-active-color': '#ffffff',
31
+ // 次导航
32
+ '--g-sub-sidebar-bg': '#202020',
33
+ '--g-sub-sidebar-logo-bg': '#0f0f0f',
34
+ '--g-sub-sidebar-logo-color': '#e5e5e5',
35
+ '--g-sub-sidebar-menu-color': '#a8a29e',
36
+ '--g-sub-sidebar-menu-hover-bg': '#0a0a0a',
37
+ '--g-sub-sidebar-menu-hover-color': '#e5e5e5',
38
+ '--g-sub-sidebar-menu-active-bg': '#0a0a0a',
39
+ '--g-sub-sidebar-menu-active-color': '#fff',
40
+ // 标签栏
41
+ '--g-tabbar-dividers-bg': '#a8a29e',
42
+ '--g-tabbar-tab-color': '#a8a29e',
43
+ '--g-tabbar-tab-hover-bg': '#1b1b1b',
44
+ '--g-tabbar-tab-hover-color': '#e5e5e5',
45
+ '--g-tabbar-tab-active-color': '#e5e5e5',
46
+ },
47
+ });
@@ -0,0 +1,47 @@
1
+ import { defineTheme } from '../../utils';
2
+
3
+ export default defineTheme({
4
+ name: 'dracula',
5
+ colors: {
6
+ 'label': '暗蓝秘',
7
+ // 颜色主题
8
+ 'color-scheme': 'dark',
9
+ // 内置 UI
10
+ '--ui-primary': '#a6adbb',
11
+ '--ui-text': '#242b33',
12
+ // 主体
13
+ '--g-bg': '#272935',
14
+ '--g-container-bg': '#1d232a',
15
+ '--g-border-color': '#191E24',
16
+ // 头部
17
+ '--g-header-bg': '#191E24',
18
+ '--g-header-color': '#f8f8f2',
19
+ '--g-header-menu-color': '#a6adbb',
20
+ '--g-header-menu-hover-color': '#f8f8f2',
21
+ '--g-header-menu-hover-bg': '#181920',
22
+ '--g-header-menu-active-color': '#f8f8f2',
23
+ '--g-header-menu-active-bg': '#414558',
24
+ // 主导航
25
+ '--g-main-sidebar-bg': '#191E24',
26
+ '--g-main-sidebar-menu-color': '#a6adbb',
27
+ '--g-main-sidebar-menu-hover-color': '#f8f8f2',
28
+ '--g-main-sidebar-menu-hover-bg': '#181920',
29
+ '--g-main-sidebar-menu-active-color': '#f8f8f2',
30
+ '--g-main-sidebar-menu-active-bg': '#414558',
31
+ // 次导航
32
+ '--g-sub-sidebar-bg': '#1d232a',
33
+ '--g-sub-sidebar-logo-color': '#1d232a',
34
+ '--g-sub-sidebar-logo-bg': '#a6adbb',
35
+ '--g-sub-sidebar-menu-color': '#a6adbb',
36
+ '--g-sub-sidebar-menu-hover-color': '#f8f8f2',
37
+ '--g-sub-sidebar-menu-hover-bg': '#181920',
38
+ '--g-sub-sidebar-menu-active-color': '#f8f8f2',
39
+ '--g-sub-sidebar-menu-active-bg': '#414558',
40
+ // 标签栏
41
+ '--g-tabbar-dividers-bg': '#a6adbb',
42
+ '--g-tabbar-tab-color': '#a6adbb',
43
+ '--g-tabbar-tab-hover-color': '#f8f8f2',
44
+ '--g-tabbar-tab-hover-bg': '#242b33',
45
+ '--g-tabbar-tab-active-color': '#f8f8f2',
46
+ },
47
+ });
@@ -0,0 +1,47 @@
1
+ import { defineTheme } from '../../utils';
2
+
3
+ export default defineTheme({
4
+ name: 'luxury',
5
+ colors: {
6
+ 'label': '金华丽',
7
+ // 颜色主题
8
+ 'color-scheme': 'dark',
9
+ // 内置 UI
10
+ '--ui-primary': '#dca54c',
11
+ '--ui-text': '#242b33',
12
+ // 主体
13
+ '--g-bg': '#09090b',
14
+ '--g-container-bg': '#171618',
15
+ '--g-border-color': '#191E24',
16
+ // 头部
17
+ '--g-header-bg': '#09090b',
18
+ '--g-header-color': '#dca54c',
19
+ '--g-header-menu-color': '#dca54c',
20
+ '--g-header-menu-hover-color': '#dca54c',
21
+ '--g-header-menu-hover-bg': '#331800',
22
+ '--g-header-menu-active-color': '#ffe7a3',
23
+ '--g-header-menu-active-bg': '#331800',
24
+ // 主导航
25
+ '--g-main-sidebar-bg': '#09090b',
26
+ '--g-main-sidebar-menu-color': '#dca54c',
27
+ '--g-main-sidebar-menu-hover-color': '#dca54c',
28
+ '--g-main-sidebar-menu-hover-bg': '#331800',
29
+ '--g-main-sidebar-menu-active-color': '#ffe7a3',
30
+ '--g-main-sidebar-menu-active-bg': '#331800',
31
+ // 次导航
32
+ '--g-sub-sidebar-bg': '#171618',
33
+ '--g-sub-sidebar-logo-color': '#e3d664',
34
+ '--g-sub-sidebar-logo-bg': '#09090b',
35
+ '--g-sub-sidebar-menu-color': '#dca54c',
36
+ '--g-sub-sidebar-menu-hover-color': '#dca54c',
37
+ '--g-sub-sidebar-menu-hover-bg': '#331800',
38
+ '--g-sub-sidebar-menu-active-color': '#ffe7a3',
39
+ '--g-sub-sidebar-menu-active-bg': '#331800',
40
+ // 标签栏
41
+ '--g-tabbar-dividers-bg': '#a6adbb',
42
+ '--g-tabbar-tab-color': '#a6adbb',
43
+ '--g-tabbar-tab-hover-color': '#c8cad0',
44
+ '--g-tabbar-tab-hover-bg': '#242b33',
45
+ '--g-tabbar-tab-active-color': '#c8cad0',
46
+ },
47
+ });