@pubinfo/config 2.0.0-beta.5 → 2.0.0-beta.7

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.
@@ -1,147 +0,0 @@
1
- 'use strict';
2
-
3
- const antfu = require('@antfu/eslint-config');
4
-
5
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
6
-
7
- const antfu__default = /*#__PURE__*/_interopDefaultCompat(antfu);
8
-
9
- const GLOB_EXCLUDE = [
10
- "**/node_modules",
11
- "**/dist",
12
- "**/package-lock.json",
13
- "**/yarn.lock",
14
- "**/pnpm-lock.yaml",
15
- "**/bun.lockb",
16
- "**/output",
17
- "**/coverage",
18
- "**/temp",
19
- "**/.temp",
20
- "**/tmp",
21
- "**/.tmp",
22
- "**/.history",
23
- "**/.vitepress/cache",
24
- "**/.nuxt",
25
- "**/.next",
26
- "**/.vercel",
27
- "**/.changeset",
28
- "**/.idea",
29
- "**/.cache",
30
- "**/.output",
31
- "**/.vite-inspect",
32
- "**/es",
33
- "**/lib",
34
- "**/CHANGELOG*.md",
35
- "**/*.min.*",
36
- "**/LICENSE*",
37
- "**/__snapshots__",
38
- "**/auto-import?(s).d.ts",
39
- "**/components.d.ts",
40
- "**/*.cjs",
41
- "**/*.mjs",
42
- "**/assets/**/*.json"
43
- ];
44
-
45
- async function ignores() {
46
- return [
47
- {
48
- ignores: GLOB_EXCLUDE
49
- }
50
- ];
51
- }
52
-
53
- async function stylistic() {
54
- return [
55
- {
56
- rules: {
57
- "eslint-comments/no-unlimited-disable": "off",
58
- "curly": ["error", "all"],
59
- "antfu/consistent-list-newline": "off",
60
- "regexp/no-unused-capturing-group": "off",
61
- "unused-imports/no-unused-vars": "off",
62
- "unicorn/consistent-function-scoping": "off"
63
- }
64
- },
65
- {
66
- rules: {
67
- "style/semi": ["error", "always"]
68
- }
69
- },
70
- {
71
- // files: [
72
- // '**/plop-templates/**/*.js',
73
- // ],
74
- rules: {
75
- "style/arrow-parens": ["off"]
76
- }
77
- }
78
- ];
79
- }
80
-
81
- async function vue() {
82
- return [
83
- {
84
- files: [
85
- "**/*.vue"
86
- ],
87
- rules: {
88
- "vue/block-order": ["error", {
89
- order: [
90
- "route",
91
- "i18n",
92
- "script",
93
- "template",
94
- "style"
95
- ]
96
- }],
97
- "vue/component-api-style": [
98
- "error",
99
- ["script-setup", "composition"]
100
- ],
101
- "vue/match-component-import-name": ["error"],
102
- "vue/new-line-between-multi-line-property": ["error"],
103
- "vue/no-empty-component-block": ["error"],
104
- "vue/no-potential-component-option-typo": ["error", {
105
- presets: ["all"]
106
- }],
107
- "vue/prefer-define-options": ["error"],
108
- "vue/valid-define-options": ["error"],
109
- "vue/require-macro-variable-name": ["error", {
110
- defineProps: "props",
111
- defineEmits: "emit",
112
- defineSlots: "slots",
113
- useSlots: "slots",
114
- useAttrs: "attrs"
115
- }],
116
- "vue/no-unused-emit-declarations": ["error"],
117
- "vue/attribute-hyphenation": [
118
- "warn",
119
- "always",
120
- {}
121
- ]
122
- }
123
- },
124
- {
125
- files: [
126
- "**/views/**/*.vue"
127
- ],
128
- rules: {
129
- "vue/no-multiple-template-root": ["error"]
130
- }
131
- }
132
- ];
133
- }
134
-
135
- async function pubinfo(...userConfigs) {
136
- return antfu__default(
137
- {
138
- unocss: false
139
- },
140
- vue(),
141
- stylistic(),
142
- ignores(),
143
- ...userConfigs
144
- );
145
- }
146
-
147
- exports.pubinfo = pubinfo;
@@ -1,139 +0,0 @@
1
- 'use strict';
2
-
3
- const stylelint = {
4
- extends: [
5
- "stylelint-config-recess-order"
6
- ],
7
- plugins: [
8
- "stylelint-scss",
9
- "@stylistic/stylelint-plugin"
10
- ],
11
- overrides: [
12
- {
13
- files: ["**/*.(css|html|vue)"],
14
- customSyntax: "postcss-html"
15
- },
16
- {
17
- files: ["*.less", "**/*.less"],
18
- customSyntax: "postcss-less",
19
- extends: ["stylelint-config-standard-less", "stylelint-config-standard-vue"]
20
- },
21
- {
22
- files: ["*.scss", "**/*.scss"],
23
- customSyntax: "postcss-scss",
24
- extends: ["stylelint-config-standard-scss", "stylelint-config-standard-vue/scss"],
25
- rule: {
26
- "scss/double-slash-comment-empty-line-before": null,
27
- "scss/no-global-function-names": null
28
- }
29
- }
30
- ],
31
- rules: {
32
- "at-rule-no-unknown": null,
33
- "no-descending-specificity": null,
34
- "property-no-unknown": null,
35
- "font-family-no-missing-generic-family-keyword": null,
36
- "selector-class-pattern": null,
37
- "function-no-unknown": [
38
- true,
39
- {
40
- ignoreFunctions: [
41
- "v-bind",
42
- "map-get",
43
- "lighten",
44
- "darken"
45
- ]
46
- }
47
- ],
48
- "selector-pseudo-element-no-unknown": [
49
- true,
50
- {
51
- ignorePseudoElements: [
52
- "/^view-transition/"
53
- ]
54
- }
55
- ],
56
- // 提取自 https://github.com/elirasza/stylelint-stylistic/blob/main/config/index.js
57
- "@stylistic/at-rule-name-case": "lower",
58
- "@stylistic/at-rule-name-space-after": "always-single-line",
59
- "@stylistic/at-rule-semicolon-newline-after": "always",
60
- "@stylistic/block-closing-brace-empty-line-before": "never",
61
- "@stylistic/block-closing-brace-newline-before": "always-multi-line",
62
- "@stylistic/block-closing-brace-space-before": "always-single-line",
63
- "@stylistic/block-opening-brace-newline-after": "always-multi-line",
64
- "@stylistic/block-opening-brace-space-after": "always-single-line",
65
- "@stylistic/block-opening-brace-space-before": "always",
66
- "@stylistic/color-hex-case": "lower",
67
- "@stylistic/declaration-bang-space-after": "never",
68
- "@stylistic/declaration-bang-space-before": "always",
69
- "@stylistic/declaration-block-semicolon-newline-after": "always-multi-line",
70
- "@stylistic/declaration-block-semicolon-space-after": "always-single-line",
71
- "@stylistic/declaration-block-semicolon-space-before": "never",
72
- "@stylistic/declaration-block-trailing-semicolon": "always",
73
- "@stylistic/declaration-colon-newline-after": "always-multi-line",
74
- "@stylistic/declaration-colon-space-after": "always-single-line",
75
- "@stylistic/declaration-colon-space-before": "never",
76
- "@stylistic/function-comma-newline-after": "always-multi-line",
77
- "@stylistic/function-comma-space-after": "always-single-line",
78
- "@stylistic/function-comma-space-before": "never",
79
- "@stylistic/function-max-empty-lines": 0,
80
- "@stylistic/function-parentheses-newline-inside": "always-multi-line",
81
- "@stylistic/function-parentheses-space-inside": "never-single-line",
82
- "@stylistic/function-whitespace-after": "always",
83
- "@stylistic/indentation": 2,
84
- "@stylistic/max-empty-lines": 1,
85
- "@stylistic/media-feature-colon-space-after": "always",
86
- "@stylistic/media-feature-colon-space-before": "never",
87
- "@stylistic/media-feature-name-case": "lower",
88
- "@stylistic/media-feature-parentheses-space-inside": "never",
89
- "@stylistic/media-feature-range-operator-space-after": "always",
90
- "@stylistic/media-feature-range-operator-space-before": "always",
91
- "@stylistic/media-query-list-comma-newline-after": "always-multi-line",
92
- "@stylistic/media-query-list-comma-space-after": "always-single-line",
93
- "@stylistic/media-query-list-comma-space-before": "never",
94
- "@stylistic/no-empty-first-line": true,
95
- "@stylistic/no-eol-whitespace": true,
96
- "@stylistic/no-extra-semicolons": true,
97
- "@stylistic/no-missing-end-of-source-newline": true,
98
- "@stylistic/number-leading-zero": "always",
99
- "@stylistic/number-no-trailing-zeros": true,
100
- "@stylistic/property-case": "lower",
101
- "@stylistic/selector-attribute-brackets-space-inside": "never",
102
- "@stylistic/selector-attribute-operator-space-after": "never",
103
- "@stylistic/selector-attribute-operator-space-before": "never",
104
- "@stylistic/selector-combinator-space-after": "always",
105
- "@stylistic/selector-combinator-space-before": "always",
106
- "@stylistic/selector-descendant-combinator-no-non-space": true,
107
- "@stylistic/selector-list-comma-newline-after": "always",
108
- "@stylistic/selector-list-comma-space-before": "never",
109
- "@stylistic/selector-max-empty-lines": 0,
110
- "@stylistic/selector-pseudo-class-case": "lower",
111
- "@stylistic/selector-pseudo-class-parentheses-space-inside": "never",
112
- "@stylistic/selector-pseudo-element-case": "lower",
113
- "@stylistic/string-quotes": "double",
114
- "@stylistic/unit-case": "lower",
115
- "@stylistic/value-list-comma-newline-after": "always-multi-line",
116
- "@stylistic/value-list-comma-space-after": "always-single-line",
117
- "@stylistic/value-list-comma-space-before": "never",
118
- "@stylistic/value-list-max-empty-lines": 0,
119
- // 根据需要覆盖部分规则
120
- "@stylistic/max-line-length": null,
121
- "@stylistic/block-closing-brace-newline-after": [
122
- "always",
123
- {
124
- ignoreAtRules: ["if", "else"]
125
- }
126
- ]
127
- },
128
- allowEmptyInput: true,
129
- ignoreFiles: [
130
- "**/node_modules/**/*",
131
- "**/dist*/**/*",
132
- "**/src/assets/fonts/**/*",
133
- "**/*.cjs",
134
- "**/*.ejs",
135
- "**/.pubinfo/**/*"
136
- ]
137
- };
138
-
139
- module.exports = stylelint;
@@ -1,106 +0,0 @@
1
- declare const _default: {
2
- extends: string[];
3
- plugins: string[];
4
- overrides: ({
5
- files: string[];
6
- customSyntax: string;
7
- extends?: undefined;
8
- rule?: undefined;
9
- } | {
10
- files: string[];
11
- customSyntax: string;
12
- extends: string[];
13
- rule?: undefined;
14
- } | {
15
- files: string[];
16
- customSyntax: string;
17
- extends: string[];
18
- rule: {
19
- 'scss/double-slash-comment-empty-line-before': null;
20
- 'scss/no-global-function-names': null;
21
- };
22
- })[];
23
- rules: {
24
- 'at-rule-no-unknown': null;
25
- 'no-descending-specificity': null;
26
- 'property-no-unknown': null;
27
- 'font-family-no-missing-generic-family-keyword': null;
28
- 'selector-class-pattern': null;
29
- 'function-no-unknown': (boolean | {
30
- ignoreFunctions: string[];
31
- })[];
32
- 'selector-pseudo-element-no-unknown': (boolean | {
33
- ignorePseudoElements: string[];
34
- })[];
35
- '@stylistic/at-rule-name-case': string;
36
- '@stylistic/at-rule-name-space-after': string;
37
- '@stylistic/at-rule-semicolon-newline-after': string;
38
- '@stylistic/block-closing-brace-empty-line-before': string;
39
- '@stylistic/block-closing-brace-newline-before': string;
40
- '@stylistic/block-closing-brace-space-before': string;
41
- '@stylistic/block-opening-brace-newline-after': string;
42
- '@stylistic/block-opening-brace-space-after': string;
43
- '@stylistic/block-opening-brace-space-before': string;
44
- '@stylistic/color-hex-case': string;
45
- '@stylistic/declaration-bang-space-after': string;
46
- '@stylistic/declaration-bang-space-before': string;
47
- '@stylistic/declaration-block-semicolon-newline-after': string;
48
- '@stylistic/declaration-block-semicolon-space-after': string;
49
- '@stylistic/declaration-block-semicolon-space-before': string;
50
- '@stylistic/declaration-block-trailing-semicolon': string;
51
- '@stylistic/declaration-colon-newline-after': string;
52
- '@stylistic/declaration-colon-space-after': string;
53
- '@stylistic/declaration-colon-space-before': string;
54
- '@stylistic/function-comma-newline-after': string;
55
- '@stylistic/function-comma-space-after': string;
56
- '@stylistic/function-comma-space-before': string;
57
- '@stylistic/function-max-empty-lines': number;
58
- '@stylistic/function-parentheses-newline-inside': string;
59
- '@stylistic/function-parentheses-space-inside': string;
60
- '@stylistic/function-whitespace-after': string;
61
- '@stylistic/indentation': number;
62
- '@stylistic/max-empty-lines': number;
63
- '@stylistic/media-feature-colon-space-after': string;
64
- '@stylistic/media-feature-colon-space-before': string;
65
- '@stylistic/media-feature-name-case': string;
66
- '@stylistic/media-feature-parentheses-space-inside': string;
67
- '@stylistic/media-feature-range-operator-space-after': string;
68
- '@stylistic/media-feature-range-operator-space-before': string;
69
- '@stylistic/media-query-list-comma-newline-after': string;
70
- '@stylistic/media-query-list-comma-space-after': string;
71
- '@stylistic/media-query-list-comma-space-before': string;
72
- '@stylistic/no-empty-first-line': boolean;
73
- '@stylistic/no-eol-whitespace': boolean;
74
- '@stylistic/no-extra-semicolons': boolean;
75
- '@stylistic/no-missing-end-of-source-newline': boolean;
76
- '@stylistic/number-leading-zero': string;
77
- '@stylistic/number-no-trailing-zeros': boolean;
78
- '@stylistic/property-case': string;
79
- '@stylistic/selector-attribute-brackets-space-inside': string;
80
- '@stylistic/selector-attribute-operator-space-after': string;
81
- '@stylistic/selector-attribute-operator-space-before': string;
82
- '@stylistic/selector-combinator-space-after': string;
83
- '@stylistic/selector-combinator-space-before': string;
84
- '@stylistic/selector-descendant-combinator-no-non-space': boolean;
85
- '@stylistic/selector-list-comma-newline-after': string;
86
- '@stylistic/selector-list-comma-space-before': string;
87
- '@stylistic/selector-max-empty-lines': number;
88
- '@stylistic/selector-pseudo-class-case': string;
89
- '@stylistic/selector-pseudo-class-parentheses-space-inside': string;
90
- '@stylistic/selector-pseudo-element-case': string;
91
- '@stylistic/string-quotes': string;
92
- '@stylistic/unit-case': string;
93
- '@stylistic/value-list-comma-newline-after': string;
94
- '@stylistic/value-list-comma-space-after': string;
95
- '@stylistic/value-list-comma-space-before': string;
96
- '@stylistic/value-list-max-empty-lines': number;
97
- '@stylistic/max-line-length': null;
98
- '@stylistic/block-closing-brace-newline-after': (string | {
99
- ignoreAtRules: string[];
100
- })[];
101
- };
102
- allowEmptyInput: boolean;
103
- ignoreFiles: string[];
104
- };
105
-
106
- export = _default;
@@ -1,13 +0,0 @@
1
- 'use strict';
2
-
3
- const presetThemes = require('../shared/config.YMrrkzU5.cjs');
4
- require('@unocss/core');
5
- require('@unocss/preset-mini/utils');
6
-
7
-
8
-
9
- exports.customColorKey = presetThemes.customColorKey;
10
- exports.defineTheme = presetThemes.defineTheme;
11
- exports.mergeTheme = presetThemes.mergeTheme;
12
- exports.presetThemes = presetThemes.presetThemes;
13
- exports.themes = presetThemes.themes;
@@ -1,33 +0,0 @@
1
- import * as unocss from 'unocss';
2
-
3
- declare const presetThemes: unocss.PresetFactory<object, undefined>;
4
-
5
- type CSSColorValue = string;
6
- type manColor = 'bg' | 'container-bg' | 'border-color';
7
- type headerColor = 'header-bg' | 'header-color' | 'header-menu-color' | 'header-menu-hover-bg' | 'header-menu-hover-color' | 'header-menu-active-bg' | 'header-menu-active-color';
8
- type mainSidebarColor = 'main-sidebar-bg' | 'main-sidebar-menu-color' | 'main-sidebar-menu-hover-bg' | 'main-sidebar-menu-hover-color' | 'main-sidebar-menu-active-bg' | 'main-sidebar-menu-active-color';
9
- type subSidebarColor = 'sub-sidebar-bg' | 'sub-sidebar-logo-bg' | 'sub-sidebar-logo-color' | 'sub-sidebar-menu-color' | 'sub-sidebar-menu-hover-bg' | 'sub-sidebar-menu-hover-color' | 'sub-sidebar-menu-active-bg' | 'sub-sidebar-menu-active-color';
10
- type tabbarColor = 'tabbar-dividers-bg' | 'tabbar-tab-color' | 'tabbar-tab-hover-bg' | 'tabbar-tab-hover-color' | 'tabbar-tab-active-color';
11
- type themeScheme = 'light' | 'dark';
12
- type customColor = typeof customColorKey[number];
13
- type benchmark = `--g-${manColor | headerColor | mainSidebarColor | subSidebarColor | tabbarColor}`;
14
- type cssVarKey = customColor | benchmark;
15
- type colorScheme = Record<cssVarKey, CSSColorValue> & {
16
- 'color-scheme': themeScheme;
17
- } & {
18
- label?: string;
19
- };
20
- interface themeOptions {
21
- name: string;
22
- colors: colorScheme;
23
- }
24
- declare const customColorKey: readonly ["--ui-primary", "--ui-text"];
25
- interface globalTheme {
26
- [key: string]: colorScheme;
27
- }
28
- declare function mergeTheme(themes: globalTheme[]): globalTheme;
29
- declare function defineTheme(theme: themeOptions): globalTheme;
30
-
31
- declare const themes: globalTheme;
32
-
33
- export { type colorScheme, type cssVarKey, customColorKey, defineTheme, type globalTheme, mergeTheme, presetThemes, type themeOptions, themes };
package/dist/unocss.cjs DELETED
@@ -1,59 +0,0 @@
1
- 'use strict';
2
-
3
- const unocss$1 = require('unocss');
4
- const presetThemes = require('./shared/config.YMrrkzU5.cjs');
5
- require('@unocss/preset-mini/utils');
6
- require('@unocss/core');
7
-
8
- const unocss = unocss$1.definePreset(() => {
9
- return {
10
- name: "preset-pubinfo",
11
- presets: [
12
- presetThemes.presetThemes(),
13
- unocss$1.presetUno(),
14
- unocss$1.presetAttributify(),
15
- unocss$1.presetTypography(),
16
- unocss$1.presetIcons({
17
- extraProperties: {
18
- "display": "inline-block",
19
- "vertical-align": "middle"
20
- }
21
- })
22
- ],
23
- transformers: [
24
- unocss$1.transformerDirectives()
25
- ],
26
- shortcuts: [
27
- {
28
- "flex-center": "flex justify-center items-center",
29
- "flex-col-center": "flex flex-col justify-center items-center"
30
- }
31
- ],
32
- theme: {
33
- colors: {
34
- "ui-primary": "rgb(var(--ui-primary))",
35
- "ui-text": "rgb(var(--ui-text))"
36
- },
37
- breakpoints: {
38
- "sm": "768px",
39
- "smd": "1024px",
40
- "md": "1366px",
41
- "lg": "1440px",
42
- "xl": "1600px",
43
- "2xl": "1920px"
44
- }
45
- },
46
- // TOFIX 此文件中该配置不生效
47
- content: {
48
- pipeline: {
49
- include: [
50
- /\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/,
51
- "src/routes/**/*.ts"
52
- ]
53
- }
54
- }
55
- // configDeps: themesPath,
56
- };
57
- });
58
-
59
- module.exports = unocss;
package/dist/unocss.d.cts DELETED
@@ -1,5 +0,0 @@
1
- import * as unocss from 'unocss';
2
-
3
- declare const _default: unocss.PresetFactory<object, undefined>;
4
-
5
- export = _default;
package/dist/unocss.mjs DELETED
@@ -1,57 +0,0 @@
1
- import { definePreset, transformerDirectives, presetUno, presetAttributify, presetTypography, presetIcons } from 'unocss';
2
- import { p as presetThemes } from './shared/config.BDKVPKTO.mjs';
3
- import '@unocss/preset-mini/utils';
4
- import '@unocss/core';
5
-
6
- const unocss = definePreset(() => {
7
- return {
8
- name: "preset-pubinfo",
9
- presets: [
10
- presetThemes(),
11
- presetUno(),
12
- presetAttributify(),
13
- presetTypography(),
14
- presetIcons({
15
- extraProperties: {
16
- "display": "inline-block",
17
- "vertical-align": "middle"
18
- }
19
- })
20
- ],
21
- transformers: [
22
- transformerDirectives()
23
- ],
24
- shortcuts: [
25
- {
26
- "flex-center": "flex justify-center items-center",
27
- "flex-col-center": "flex flex-col justify-center items-center"
28
- }
29
- ],
30
- theme: {
31
- colors: {
32
- "ui-primary": "rgb(var(--ui-primary))",
33
- "ui-text": "rgb(var(--ui-text))"
34
- },
35
- breakpoints: {
36
- "sm": "768px",
37
- "smd": "1024px",
38
- "md": "1366px",
39
- "lg": "1440px",
40
- "xl": "1600px",
41
- "2xl": "1920px"
42
- }
43
- },
44
- // TOFIX 此文件中该配置不生效
45
- content: {
46
- pipeline: {
47
- include: [
48
- /\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/,
49
- "src/routes/**/*.ts"
50
- ]
51
- }
52
- }
53
- // configDeps: themesPath,
54
- };
55
- });
56
-
57
- export { unocss as default };
File without changes