@pubinfo/config 2.0.0-rc.2 → 2.0.0-rc.3
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.
- package/dist/{index-DFGyu9wF.d.ts → index-jFh6rAwb.d.ts} +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/unocss/index.d.ts +1 -1
- package/dist/unocss/index.js +1 -1
- package/dist/{unocss-Be8qA77X.js → unocss-DsWPiycw.js} +3 -4
- package/package.json +1 -1
- package/src/unocss/index.ts +14 -13
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { pubinfo } from "./index-BlfMIrXI.js";
|
|
2
2
|
import { _default as _default$1 } from "./stylelint-9CMQiIxC.js";
|
|
3
3
|
import { colorScheme, cssVarKey, customColorKey, defineTheme, getThemes, globalTheme, themeOptions } from "./index-xzslCJW7.js";
|
|
4
|
-
import { _default } from "./index-
|
|
4
|
+
import { _default } from "./index-jFh6rAwb.js";
|
|
5
5
|
export { colorScheme, cssVarKey, customColorKey, defineTheme, pubinfo as eslint, getThemes, globalTheme, _default as presetPubinfo, _default$1 as stylelint, themeOptions };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { eslint_default } from "./eslint-B0bQR0lJ.js";
|
|
2
2
|
import { stylelint_default } from "./stylelint-QHUuft1u.js";
|
|
3
3
|
import { customColorKey, defineTheme, getThemes } from "./themes-CL2YKvqM.js";
|
|
4
|
-
import { unocss_default } from "./unocss-
|
|
4
|
+
import { unocss_default } from "./unocss-DsWPiycw.js";
|
|
5
5
|
|
|
6
6
|
export { customColorKey, defineTheme, eslint_default as eslint, getThemes, unocss_default as presetPubinfo, stylelint_default as stylelint };
|
package/dist/unocss/index.d.ts
CHANGED
package/dist/unocss/index.js
CHANGED
|
@@ -53,11 +53,11 @@ const presetThemes = definePreset$1((options) => {
|
|
|
53
53
|
//#endregion
|
|
54
54
|
//#region src/unocss/index.ts
|
|
55
55
|
var unocss_default = definePreset((options) => {
|
|
56
|
+
const { themes, type = "app" } = options ?? {};
|
|
56
57
|
return {
|
|
57
58
|
name: "preset-pubinfo",
|
|
58
59
|
presets: [
|
|
59
|
-
presetThemes({ themes:
|
|
60
|
-
presetUno(),
|
|
60
|
+
type === "app" ? [presetThemes({ themes }), presetUno({ preflight: true })] : [presetUno({ preflight: false })],
|
|
61
61
|
presetAttributify(),
|
|
62
62
|
presetTypography(),
|
|
63
63
|
presetIcons({ extraProperties: {
|
|
@@ -83,8 +83,7 @@ var unocss_default = definePreset((options) => {
|
|
|
83
83
|
"xl": "1600px",
|
|
84
84
|
"2xl": "1920px"
|
|
85
85
|
}
|
|
86
|
-
}
|
|
87
|
-
content: { pipeline: { include: [/\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/, "src/routes/**/*.ts"] } }
|
|
86
|
+
}
|
|
88
87
|
};
|
|
89
88
|
});
|
|
90
89
|
|
package/package.json
CHANGED
package/src/unocss/index.ts
CHANGED
|
@@ -9,12 +9,23 @@ import {
|
|
|
9
9
|
} from 'unocss';
|
|
10
10
|
import { presetThemes } from './presetThemes';
|
|
11
11
|
|
|
12
|
-
export default definePreset<{ themes?: globalTheme[] }>((options) => {
|
|
12
|
+
export default definePreset<{ themes?: globalTheme[], type?: 'app' | 'module' }>((options) => {
|
|
13
|
+
const {
|
|
14
|
+
themes,
|
|
15
|
+
type = 'app',
|
|
16
|
+
} = options ?? {};
|
|
17
|
+
|
|
13
18
|
return {
|
|
14
19
|
name: 'preset-pubinfo',
|
|
15
20
|
presets: [
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
type === 'app'
|
|
22
|
+
? [
|
|
23
|
+
presetThemes({ themes }),
|
|
24
|
+
presetUno({ preflight: true }),
|
|
25
|
+
]
|
|
26
|
+
: [
|
|
27
|
+
presetUno({ preflight: false }),
|
|
28
|
+
],
|
|
18
29
|
presetAttributify(),
|
|
19
30
|
presetTypography(),
|
|
20
31
|
presetIcons({
|
|
@@ -47,15 +58,5 @@ export default definePreset<{ themes?: globalTheme[] }>((options) => {
|
|
|
47
58
|
'2xl': '1920px',
|
|
48
59
|
},
|
|
49
60
|
},
|
|
50
|
-
|
|
51
|
-
// TOFIX 此文件中该配置不生效
|
|
52
|
-
content: {
|
|
53
|
-
pipeline: {
|
|
54
|
-
include: [
|
|
55
|
-
/\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/,
|
|
56
|
-
'src/routes/**/*.ts',
|
|
57
|
-
],
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
61
|
};
|
|
61
62
|
});
|