@pubinfo/config 2.0.0-beta.9 → 2.0.0-rc.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.
Files changed (57) hide show
  1. package/dist/eslint/index.d.ts +2 -6
  2. package/dist/eslint/index.js +3 -0
  3. package/dist/eslint-B0bQR0lJ.js +121 -0
  4. package/dist/index-BlfMIrXI.d.ts +6 -0
  5. package/dist/index-DFGyu9wF.d.ts +9 -0
  6. package/dist/{themes/index.d.mts → index-xzslCJW7.d.ts} +9 -10
  7. package/dist/index.d.ts +5 -6
  8. package/dist/index.js +6 -0
  9. package/dist/stylelint-9CMQiIxC.d.ts +107 -0
  10. package/dist/stylelint-QHUuft1u.js +114 -0
  11. package/dist/stylelint.d.ts +2 -106
  12. package/dist/stylelint.js +3 -0
  13. package/dist/themes/index.d.ts +2 -29
  14. package/dist/themes/index.js +3 -0
  15. package/dist/themes-CL2YKvqM.js +558 -0
  16. package/dist/unocss/index.d.ts +3 -5
  17. package/dist/unocss/index.js +4 -0
  18. package/dist/unocss-Be8qA77X.js +92 -0
  19. package/package.json +25 -25
  20. package/src/eslint/config/ignores.ts +10 -0
  21. package/src/eslint/config/stylistic.ts +21 -0
  22. package/src/eslint/config/vue.ts +54 -0
  23. package/src/eslint/factory.ts +20 -0
  24. package/src/eslint/globs.ts +86 -0
  25. package/src/eslint/index.ts +3 -0
  26. package/src/index.ts +4 -0
  27. package/src/stylelint.ts +134 -0
  28. package/src/themes/index.ts +3 -0
  29. package/src/themes/system/dark/dark.ts +47 -0
  30. package/src/themes/system/dark/dracula.ts +47 -0
  31. package/src/themes/system/dark/luxury.ts +47 -0
  32. package/src/themes/system/dark/night.ts +47 -0
  33. package/src/themes/system/dark/stone.ts +47 -0
  34. package/src/themes/system/dark/synthwave.ts +47 -0
  35. package/src/themes/system/light/barbie.ts +47 -0
  36. package/src/themes/system/light/classic.ts +47 -0
  37. package/src/themes/system/light/cyberpunk.ts +47 -0
  38. package/src/themes/system/light/light.ts +47 -0
  39. package/src/themes/system/light/naive.ts +47 -0
  40. package/src/themes/system/light/winter.ts +47 -0
  41. package/src/themes/theme.ts +18 -0
  42. package/src/themes/unocss-utils.ts +52 -0
  43. package/src/themes/utils.ts +81 -0
  44. package/src/unocss/index.ts +61 -0
  45. package/src/unocss/presetThemes.ts +57 -0
  46. package/dist/eslint/index.d.mts +0 -6
  47. package/dist/eslint/index.mjs +0 -6
  48. package/dist/index.d.mts +0 -6
  49. package/dist/index.mjs +0 -7
  50. package/dist/shared/config.CSqBb4YU.d.mts +0 -5
  51. package/dist/shared/config.CSqBb4YU.d.ts +0 -5
  52. package/dist/shared/config.DPEra-Xx.mjs +0 -141
  53. package/dist/stylelint.d.mts +0 -106
  54. package/dist/stylelint.mjs +0 -137
  55. package/dist/themes/index.mjs +0 -626
  56. package/dist/unocss/index.d.mts +0 -5
  57. package/dist/unocss/index.mjs +0 -99
@@ -1,99 +0,0 @@
1
- import { definePreset as definePreset$1, transformerDirectives, presetUno, presetAttributify, presetTypography, presetIcons } from 'unocss';
2
- import { definePreset, entriesToCss, toArray } from '@unocss/core';
3
- import { themes } 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 normalizePreflights() {
23
- return {
24
- getCSS: () => {
25
- const injectionCss = [];
26
- Object.keys(themes).forEach((key) => {
27
- delete themes[key].label;
28
- const css = entriesToCss(Object.entries(themes[key]));
29
- const themeColorScheme = themes[key]["color-scheme"];
30
- const roots = toArray(
31
- createCssVar(themeColorScheme, key)
32
- );
33
- injectionCss.push(roots.map((root) => `${root}{${css}}`).join(""));
34
- });
35
- return injectionCss.join("");
36
- }
37
- };
38
- }
39
- const presetThemes = definePreset(() => {
40
- return {
41
- name: "@wsys/preset-themes",
42
- preflights: [
43
- normalizePreflights()
44
- ]
45
- };
46
- });
47
-
48
- const index = definePreset$1(() => {
49
- return {
50
- name: "preset-pubinfo",
51
- presets: [
52
- presetThemes(),
53
- presetUno(),
54
- presetAttributify(),
55
- presetTypography(),
56
- presetIcons({
57
- extraProperties: {
58
- "display": "inline-block",
59
- "vertical-align": "middle"
60
- }
61
- })
62
- ],
63
- transformers: [
64
- transformerDirectives()
65
- ],
66
- shortcuts: [
67
- {
68
- "flex-center": "flex justify-center items-center",
69
- "flex-col-center": "flex flex-col justify-center items-center"
70
- }
71
- ],
72
- theme: {
73
- colors: {
74
- "ui-primary": "rgb(var(--ui-primary))",
75
- "ui-text": "rgb(var(--ui-text))"
76
- },
77
- breakpoints: {
78
- "sm": "768px",
79
- "smd": "1024px",
80
- "md": "1366px",
81
- "lg": "1440px",
82
- "xl": "1600px",
83
- "2xl": "1920px"
84
- }
85
- },
86
- // TOFIX 此文件中该配置不生效
87
- content: {
88
- pipeline: {
89
- include: [
90
- /\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/,
91
- "src/routes/**/*.ts"
92
- ]
93
- }
94
- }
95
- // configDeps: themesPath,
96
- };
97
- });
98
-
99
- export { index as default };