@lobehub/ui 1.1.0

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 (111) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +144 -0
  3. package/es/ActionIcon/index.d.ts +15 -0
  4. package/es/ActionIcon/index.js +84 -0
  5. package/es/DraggablePanel/index.d.ts +26 -0
  6. package/es/DraggablePanel/index.js +197 -0
  7. package/es/DraggablePanel/style.d.ts +18 -0
  8. package/es/DraggablePanel/style.js +30 -0
  9. package/es/DraggablePanel/utils.d.ts +2 -0
  10. package/es/DraggablePanel/utils.js +12 -0
  11. package/es/Logo/Logo3D.d.ts +4 -0
  12. package/es/Logo/Logo3D.js +11 -0
  13. package/es/Logo/LogoFlat.d.ts +4 -0
  14. package/es/Logo/LogoFlat.js +104 -0
  15. package/es/Logo/LogoHighContrast.d.ts +4 -0
  16. package/es/Logo/LogoHighContrast.js +26 -0
  17. package/es/Logo/LogoText.d.ts +4 -0
  18. package/es/Logo/LogoText.js +18 -0
  19. package/es/Logo/index.d.ts +8 -0
  20. package/es/Logo/index.js +54 -0
  21. package/es/SideNav/index.d.ts +9 -0
  22. package/es/SideNav/index.js +44 -0
  23. package/es/Template/index.d.ts +7 -0
  24. package/es/Template/index.js +15 -0
  25. package/es/ThemeProvider/GlobalStyle.d.ts +3 -0
  26. package/es/ThemeProvider/GlobalStyle.js +19 -0
  27. package/es/ThemeProvider/index.d.ts +11 -0
  28. package/es/ThemeProvider/index.js +40 -0
  29. package/es/ThemeProvider/token.d.ts +3 -0
  30. package/es/ThemeProvider/token.js +45 -0
  31. package/es/index.d.ts +6 -0
  32. package/es/index.js +6 -0
  33. package/es/styles/algorithms/colorRelationship.d.ts +6 -0
  34. package/es/styles/algorithms/colorRelationship.js +88 -0
  35. package/es/styles/algorithms/index.d.ts +15 -0
  36. package/es/styles/algorithms/index.js +67 -0
  37. package/es/styles/algorithms/paletteGenerator.d.ts +51 -0
  38. package/es/styles/algorithms/paletteGenerator.js +74 -0
  39. package/es/styles/antdTheme.d.ts +2 -0
  40. package/es/styles/antdTheme.js +4 -0
  41. package/es/styles/customStylish.d.ts +17 -0
  42. package/es/styles/customStylish.js +19 -0
  43. package/es/styles/customToken.d.ts +65 -0
  44. package/es/styles/customToken.js +24 -0
  45. package/es/styles/index.d.ts +3 -0
  46. package/es/styles/index.js +3 -0
  47. package/es/styles/theme/dark.d.ts +4 -0
  48. package/es/styles/theme/dark.js +82 -0
  49. package/es/styles/theme/index.d.ts +2 -0
  50. package/es/styles/theme/index.js +2 -0
  51. package/es/styles/theme/light.d.ts +4 -0
  52. package/es/styles/theme/light.js +36 -0
  53. package/es/types/index.d.ts +9 -0
  54. package/es/types/index.js +1 -0
  55. package/es/utils/colorUtils.d.ts +1 -0
  56. package/es/utils/colorUtils.js +10 -0
  57. package/lib/ActionIcon/index.d.ts +15 -0
  58. package/lib/ActionIcon/index.js +110 -0
  59. package/lib/DraggablePanel/index.d.ts +26 -0
  60. package/lib/DraggablePanel/index.js +217 -0
  61. package/lib/DraggablePanel/style.d.ts +18 -0
  62. package/lib/DraggablePanel/style.js +287 -0
  63. package/lib/DraggablePanel/utils.d.ts +2 -0
  64. package/lib/DraggablePanel/utils.js +40 -0
  65. package/lib/Logo/Logo3D.d.ts +4 -0
  66. package/lib/Logo/Logo3D.js +45 -0
  67. package/lib/Logo/LogoFlat.d.ts +4 -0
  68. package/lib/Logo/LogoFlat.js +130 -0
  69. package/lib/Logo/LogoHighContrast.d.ts +4 -0
  70. package/lib/Logo/LogoHighContrast.js +58 -0
  71. package/lib/Logo/LogoText.d.ts +4 -0
  72. package/lib/Logo/LogoText.js +49 -0
  73. package/lib/Logo/index.d.ts +8 -0
  74. package/lib/Logo/index.js +54 -0
  75. package/lib/SideNav/index.d.ts +9 -0
  76. package/lib/SideNav/index.js +58 -0
  77. package/lib/Template/index.d.ts +7 -0
  78. package/lib/Template/index.js +41 -0
  79. package/lib/ThemeProvider/GlobalStyle.d.ts +3 -0
  80. package/lib/ThemeProvider/GlobalStyle.js +80 -0
  81. package/lib/ThemeProvider/index.d.ts +11 -0
  82. package/lib/ThemeProvider/index.js +68 -0
  83. package/lib/ThemeProvider/token.d.ts +3 -0
  84. package/lib/ThemeProvider/token.js +73 -0
  85. package/lib/index.d.ts +6 -0
  86. package/lib/index.js +54 -0
  87. package/lib/styles/algorithms/colorRelationship.d.ts +6 -0
  88. package/lib/styles/algorithms/colorRelationship.js +87 -0
  89. package/lib/styles/algorithms/index.d.ts +15 -0
  90. package/lib/styles/algorithms/index.js +81 -0
  91. package/lib/styles/algorithms/paletteGenerator.d.ts +51 -0
  92. package/lib/styles/algorithms/paletteGenerator.js +91 -0
  93. package/lib/styles/antdTheme.d.ts +2 -0
  94. package/lib/styles/antdTheme.js +30 -0
  95. package/lib/styles/customStylish.d.ts +17 -0
  96. package/lib/styles/customStylish.js +117 -0
  97. package/lib/styles/customToken.d.ts +65 -0
  98. package/lib/styles/customToken.js +54 -0
  99. package/lib/styles/index.d.ts +3 -0
  100. package/lib/styles/index.js +21 -0
  101. package/lib/styles/theme/dark.d.ts +4 -0
  102. package/lib/styles/theme/dark.js +131 -0
  103. package/lib/styles/theme/index.d.ts +2 -0
  104. package/lib/styles/theme/index.js +32 -0
  105. package/lib/styles/theme/light.d.ts +4 -0
  106. package/lib/styles/theme/light.js +64 -0
  107. package/lib/types/index.d.ts +9 -0
  108. package/lib/types/index.js +17 -0
  109. package/lib/utils/colorUtils.d.ts +1 -0
  110. package/lib/utils/colorUtils.js +52 -0
  111. package/package.json +122 -0
@@ -0,0 +1,91 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/styles/algorithms/paletteGenerator.ts
30
+ var paletteGenerator_exports = {};
31
+ __export(paletteGenerator_exports, {
32
+ generateColorPalette: () => generateColorPalette,
33
+ generateNeutralPalette: () => generateNeutralPalette
34
+ });
35
+ module.exports = __toCommonJS(paletteGenerator_exports);
36
+ var import_chroma_js = __toESM(require("chroma-js"));
37
+ var import_lodash = require("lodash");
38
+ var defaultLight = {
39
+ steps: 6,
40
+ targetBrightness: 0.98,
41
+ saturationAdjustment: 0.4,
42
+ saturationScale: 1.6,
43
+ hueAdjustment: 1
44
+ };
45
+ var defaultDark = {
46
+ steps: 4,
47
+ targetBrightness: 0.3,
48
+ saturationAdjustment: 0.6,
49
+ saturationScale: 1.6,
50
+ hueAdjustment: 1.03
51
+ };
52
+ var generateColorPalette = (baseColorHex, options = {}) => {
53
+ const lighter = (0, import_lodash.merge)({}, defaultLight, options.lighter);
54
+ const darker = (0, import_lodash.merge)({}, defaultDark, options.darker);
55
+ const baseColor = (0, import_chroma_js.default)(baseColorHex);
56
+ const baseColorOKLCH = baseColor.oklch();
57
+ const colorPalette = [];
58
+ for (let i = lighter.steps; i > 0; i--) {
59
+ const lightness = baseColorOKLCH[0] + (lighter.targetBrightness - baseColorOKLCH[0]) / lighter.steps * i;
60
+ const chromaValue = baseColorOKLCH[1] - (1 - lighter.saturationAdjustment) * lighter.saturationScale * baseColorOKLCH[1] / lighter.steps * i;
61
+ const newColor = import_chroma_js.default.oklch(lightness, chromaValue, baseColorOKLCH[2]);
62
+ colorPalette.push({ hex: newColor.hex(), oklch: newColor.oklch() });
63
+ }
64
+ colorPalette.push({ hex: baseColorHex, oklch: baseColorOKLCH });
65
+ for (let i = 1; i <= darker.steps; i++) {
66
+ const lightness = baseColorOKLCH[0] - (baseColorOKLCH[0] - darker.targetBrightness) / darker.steps * i;
67
+ const chromaValue = baseColorOKLCH[1] - (1 - darker.saturationAdjustment) * darker.saturationScale * baseColorOKLCH[1] / darker.steps * i;
68
+ let hue = baseColorOKLCH[2] * darker.hueAdjustment;
69
+ if (hue > 360) {
70
+ hue = hue % 360;
71
+ } else if (hue < 0) {
72
+ hue = 360 + hue % 360;
73
+ }
74
+ const newColor = import_chroma_js.default.oklch(lightness, chromaValue, hue);
75
+ colorPalette.push({ hex: newColor.hex(), oklch: newColor.oklch() });
76
+ }
77
+ return options.reverse ? colorPalette.reverse() : colorPalette;
78
+ };
79
+ var generateNeutralPalette = (baseColorHex, options = {}) => {
80
+ const baseColor = (0, import_chroma_js.default)(baseColorHex);
81
+ const baseColorOKLCH = baseColor.oklch();
82
+ const neutralHue = baseColorOKLCH[2];
83
+ const neutralChromaValue = options.neutral ? baseColorOKLCH[1] * 0.2 : 0;
84
+ const neutralBaseColor = import_chroma_js.default.oklch(baseColorOKLCH[0], neutralChromaValue, neutralHue);
85
+ return generateColorPalette(neutralBaseColor.hex(), options);
86
+ };
87
+ // Annotate the CommonJS export names for ESM import in node:
88
+ 0 && (module.exports = {
89
+ generateColorPalette,
90
+ generateNeutralPalette
91
+ });
@@ -0,0 +1,2 @@
1
+ import { GetAntdTheme } from 'antd-style';
2
+ export declare const getAntdTheme: GetAntdTheme;
@@ -0,0 +1,30 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/styles/antdTheme.ts
20
+ var antdTheme_exports = {};
21
+ __export(antdTheme_exports, {
22
+ getAntdTheme: () => getAntdTheme
23
+ });
24
+ module.exports = __toCommonJS(antdTheme_exports);
25
+ var import_theme = require("./theme");
26
+ var getAntdTheme = (appearance) => appearance === "dark" ? import_theme.darkTheme : import_theme.lightTheme;
27
+ // Annotate the CommonJS export names for ESM import in node:
28
+ 0 && (module.exports = {
29
+ getAntdTheme
30
+ });
@@ -0,0 +1,17 @@
1
+ import { GetCustomStylish } from 'antd-style';
2
+ declare module 'antd-style' {
3
+ interface CustomStylish extends SiteStylish {
4
+ }
5
+ }
6
+ export interface SiteStylish {
7
+ clickableText: string;
8
+ resetLinkColor: string;
9
+ heroButtonGradient: string;
10
+ heroGradient: string;
11
+ heroTextShadow: string;
12
+ heroGradientFlow: string;
13
+ heroBlurBall: string;
14
+ iconGradientDefault: string;
15
+ blur: string;
16
+ }
17
+ export declare const getCustomStylish: GetCustomStylish<SiteStylish>;
@@ -0,0 +1,117 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/styles/customStylish.ts
20
+ var customStylish_exports = {};
21
+ __export(customStylish_exports, {
22
+ getCustomStylish: () => getCustomStylish
23
+ });
24
+ module.exports = __toCommonJS(customStylish_exports);
25
+ var import_polished = require("polished");
26
+ var getCustomStylish = ({ css, token, isDarkMode }) => {
27
+ return {
28
+ clickableText: css`
29
+ cursor: pointer;
30
+ color: ${token.colorTextSecondary};
31
+
32
+ &:hover {
33
+ color: ${token.colorText};
34
+ }
35
+ `,
36
+ resetLinkColor: css`
37
+ color: inherit;
38
+
39
+ &:hover,
40
+ &:active {
41
+ color: inherit;
42
+ }
43
+ `,
44
+ heroButtonGradient: css`
45
+ background: linear-gradient(90deg, ${token.gradientColor1} 0%, ${token.gradientColor2} 100%);
46
+ `,
47
+ heroGradient: css`
48
+ background-image: ${token.gradientHeroBgG};
49
+ background-size: 300% 300%;
50
+ `,
51
+ heroGradientFlow: css`
52
+ animation: flow 5s ease infinite;
53
+
54
+ @keyframes flow {
55
+ 0% {
56
+ background-position: 0 0;
57
+ }
58
+
59
+ 50% {
60
+ background-position: 100% 100%;
61
+ }
62
+
63
+ 100% {
64
+ background-position: 0 0;
65
+ }
66
+ }
67
+ `,
68
+ heroTextShadow: css`
69
+ will-change: transform;
70
+
71
+ text-shadow: 0 8px 20px ${(0, import_polished.rgba)(token.gradientColor2, 0.2)},
72
+ 0 8px 60px ${(0, import_polished.rgba)(token.gradientColor3, 0.2)},
73
+ 0 8px 80px ${(0, import_polished.rgba)(token.cyan, isDarkMode ? 0.2 : 0.4)};
74
+ `,
75
+ heroBlurBall: css`
76
+ filter: blur(69px);
77
+ will-change: transform;
78
+ background: linear-gradient(
79
+ 135deg,
80
+ ${token.gradientColor3} 0%,
81
+ ${token.gradientColor1} 30%,
82
+ ${token.red} 70%,
83
+ ${token.cyan} 100%
84
+ );
85
+ background-size: 200% 200%;
86
+ animation: glow 10s ease infinite;
87
+
88
+ @keyframes glow {
89
+ 0% {
90
+ background-position: 0 -100%;
91
+ }
92
+
93
+ 50% {
94
+ background-position: 200% 50%;
95
+ }
96
+
97
+ 100% {
98
+ background-position: 0 -100%;
99
+ }
100
+ }
101
+ `,
102
+ iconGradientDefault: css`
103
+ radial-gradient(
104
+ 100% 100% at 50% 0,
105
+ ${(0, import_polished.rgba)(token.colorSolid, 0.2)} 0,
106
+ ${(0, import_polished.rgba)(token.colorSolid, 0.1)} 100%
107
+ )`,
108
+ blur: css`
109
+ backdrop-filter: blur(7px);
110
+ // background: ${(0, import_polished.rgba)(token.colorBgBase, 0.5)};
111
+ `
112
+ };
113
+ };
114
+ // Annotate the CommonJS export names for ESM import in node:
115
+ 0 && (module.exports = {
116
+ getCustomStylish
117
+ });
@@ -0,0 +1,65 @@
1
+ import type { GetCustomToken } from 'antd-style';
2
+ declare module 'antd-style' {
3
+ interface CustomToken extends SiteToken {
4
+ }
5
+ }
6
+ /**
7
+ * @title 站点主题 Token
8
+ * @description 站点的一些基础配置信息
9
+ */
10
+ export interface SiteToken {
11
+ /**
12
+ * @title 头部高度
13
+ */
14
+ headerHeight: number;
15
+ /**
16
+ * @title 底部高度
17
+ */
18
+ footerHeight: number;
19
+ /**
20
+ * @title 侧边栏宽度
21
+ */
22
+ sidebarWidth: number;
23
+ /**
24
+ * @title 目录宽度
25
+ */
26
+ tocWidth: number;
27
+ /**
28
+ * @title 内容最大宽度
29
+ * @description 文本内容的最大宽度 1152
30
+ */
31
+ contentMaxWidth: number | string;
32
+ /**
33
+ * @title 渐变色1
34
+ */
35
+ gradientColor1: string;
36
+ /**
37
+ * @title 渐变色2
38
+ */
39
+ gradientColor2: string;
40
+ /**
41
+ * @title 渐变色3
42
+ */
43
+ gradientColor3: string;
44
+ /**
45
+ * @title 渐变背景色
46
+ */
47
+ gradientHeroBgG: string;
48
+ /**
49
+ * @title 默认图标渐变色
50
+ */
51
+ gradientIconDefault: string;
52
+ /**
53
+ * @title 实色
54
+ */
55
+ colorSolid: string;
56
+ /**
57
+ * @title 代码高亮字体
58
+ */
59
+ fontFamilyHighlighter: string;
60
+ /**
61
+ * 是否让 Demo 继承站点主题
62
+ */
63
+ demoInheritSiteTheme: boolean;
64
+ }
65
+ export declare const createCustomToken: GetCustomToken<SiteToken>;
@@ -0,0 +1,54 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/styles/customToken.ts
20
+ var customToken_exports = {};
21
+ __export(customToken_exports, {
22
+ createCustomToken: () => createCustomToken
23
+ });
24
+ module.exports = __toCommonJS(customToken_exports);
25
+ var import_polished = require("polished");
26
+ var createCustomToken = ({ isDarkMode, token }) => {
27
+ const gradientColor1 = token.blue;
28
+ const gradientColor2 = isDarkMode ? token.pink : token.cyan;
29
+ const gradientColor3 = token.purple;
30
+ const colorSolid = isDarkMode ? token.colorWhite : "#000";
31
+ return {
32
+ headerHeight: 64,
33
+ footerHeight: 300,
34
+ sidebarWidth: 240,
35
+ tocWidth: 176,
36
+ contentMaxWidth: 1152,
37
+ fontFamilyHighlighter: "'Fira Code', 'Fira Mono', Menlo, Consolas, 'DejaVu Sans Mono', monospace",
38
+ colorSolid,
39
+ gradientColor1,
40
+ gradientColor2,
41
+ gradientColor3,
42
+ gradientHeroBgG: `radial-gradient(at 80% 20%, ${gradientColor1} 0%, ${gradientColor2} 80%, ${gradientColor3} 130%)`,
43
+ gradientIconDefault: `radial-gradient(
44
+ 100% 100% at 50% 0,
45
+ ${(0, import_polished.rgba)(colorSolid, isDarkMode ? 0.2 : 0.2)} 0,
46
+ ${(0, import_polished.rgba)(colorSolid, isDarkMode ? 0.1 : 0.4)} 100%
47
+ )`,
48
+ demoInheritSiteTheme: false
49
+ };
50
+ };
51
+ // Annotate the CommonJS export names for ESM import in node:
52
+ 0 && (module.exports = {
53
+ createCustomToken
54
+ });
@@ -0,0 +1,3 @@
1
+ export * from './antdTheme';
2
+ export * from './customStylish';
3
+ export * from './customToken';
@@ -0,0 +1,21 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/styles/index.ts
17
+ var styles_exports = {};
18
+ module.exports = __toCommonJS(styles_exports);
19
+ __reExport(styles_exports, require("./antdTheme"), module.exports);
20
+ __reExport(styles_exports, require("./customStylish"), module.exports);
21
+ __reExport(styles_exports, require("./customToken"), module.exports);
@@ -0,0 +1,4 @@
1
+ import { ThemeConfig } from 'antd';
2
+ import { ColorPalettes } from '../algorithms';
3
+ export declare const darkColorPalettes: ColorPalettes;
4
+ export declare const darkTheme: ThemeConfig;
@@ -0,0 +1,131 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/styles/theme/dark.ts
20
+ var dark_exports = {};
21
+ __export(dark_exports, {
22
+ darkColorPalettes: () => darkColorPalettes,
23
+ darkTheme: () => darkTheme
24
+ });
25
+ module.exports = __toCommonJS(dark_exports);
26
+ var import_antd = require("antd");
27
+ var import_algorithms = require("../algorithms");
28
+ var cyanColors = [
29
+ "rgba(0, 225, 242, 0.12)",
30
+ "rgba(0, 232, 245, 0.22)",
31
+ "rgba(0, 237, 250, 0.32)",
32
+ "rgba(0, 243, 255, 0.42)",
33
+ "rgba(0, 247, 255, 0.53)",
34
+ "rgba(0, 246, 254, 0.65)",
35
+ "rgba(0, 247, 253, 0.77)",
36
+ "rgba(0, 245, 255, 0.75)",
37
+ "rgba(0, 244, 255, 0.73)",
38
+ "rgba(0, 239, 253, 0.72)",
39
+ "rgba(0, 237, 253, 0.7)"
40
+ ];
41
+ var darkModeRelationship = (type) => {
42
+ const key = type.toUpperCase()[0] + type.slice(1);
43
+ return {
44
+ [`color${key}Bg`]: 1,
45
+ [`color${key}BgHover`]: 2,
46
+ [`color${key}Border`]: 3,
47
+ [`color${key}BorderHover`]: 4,
48
+ [`color${key}Hover`]: 7,
49
+ [`color${key}`]: 6,
50
+ [`color${key}Active`]: 5,
51
+ [`color${key}TextHover`]: 8,
52
+ [`color${key}Text`]: 9,
53
+ [`color${key}TextActive`]: 10
54
+ };
55
+ };
56
+ var darkMode = (0, import_algorithms.genMapTokenAlgorithm)("dark", {
57
+ lighter: {
58
+ steps: 4,
59
+ // 减少较亮颜色的数量
60
+ targetBrightness: 0.8,
61
+ // 降低最大亮度值
62
+ saturationAdjustment: 0.6
63
+ // 减小较亮颜色的饱和度调整
64
+ // saturationScale: 1,
65
+ },
66
+ darker: {
67
+ steps: 6,
68
+ // 增加较暗颜色的数量
69
+ targetBrightness: 0.2,
70
+ // 降低最小亮度值
71
+ saturationAdjustment: 0.4,
72
+ // 增加较暗颜色的饱和度调整
73
+ hueAdjustment: 1,
74
+ // 保持暗色调的色相调整因子
75
+ saturationScale: 1
76
+ },
77
+ reverse: true,
78
+ relationship: darkModeRelationship
79
+ });
80
+ var darkColorPalettes = darkMode.palettes;
81
+ var darkAlgorithm = (seedToken, mapToken) => ({
82
+ ...import_antd.theme.darkAlgorithm(seedToken, mapToken),
83
+ ...darkMode.tokens,
84
+ "cyan-1": cyanColors[1],
85
+ "cyan-2": cyanColors[2],
86
+ "cyan-3": cyanColors[3],
87
+ "cyan-4": cyanColors[4],
88
+ "cyan-5": cyanColors[5],
89
+ "cyan-6": cyanColors[6],
90
+ "cyan-7": cyanColors[7],
91
+ "cyan-8": cyanColors[8],
92
+ "cyan-9": cyanColors[9],
93
+ "cyan-10": cyanColors[10]
94
+ });
95
+ var darkTheme = {
96
+ token: {
97
+ colorTextLightSolid: "#000000",
98
+ colorBgLayout: "#000000",
99
+ colorBgContainer: "#111111",
100
+ colorBgElevated: "#222222",
101
+ colorBgSpotlight: "#444444",
102
+ colorBorder: "#333333",
103
+ colorBorderSecondary: "#333333",
104
+ colorText: "#ffffff",
105
+ colorTextSecondary: "#999999",
106
+ colorTextTertiary: "#888888",
107
+ colorTextQuaternary: "#666666",
108
+ colorPrimary: "#ffffff",
109
+ colorInfo: "#0070f3",
110
+ colorSuccess: "#50e3c2",
111
+ colorWarning: "#f5a623",
112
+ colorError: "#ee0000",
113
+ colorFillQuaternary: "rgba(0,0,0,0)",
114
+ borderRadius: 5,
115
+ borderRadiusXS: 3,
116
+ borderRadiusSM: 3,
117
+ borderRadiusLG: 8,
118
+ controlHeight: 36,
119
+ boxShadow: "0 12px 20px 6px rgb(0 0 0 / 0.08)",
120
+ boxShadowSecondary: "0 2px 8px 2px rgb(0 0 0 / 0.07), 0 2px 4px -1px rgb(0 0 0 / 0.04)",
121
+ colorLinkHover: darkColorPalettes.primary[7],
122
+ colorLink: darkColorPalettes.primary[6],
123
+ colorLinkActive: darkColorPalettes.primary[5]
124
+ },
125
+ algorithm: darkAlgorithm
126
+ };
127
+ // Annotate the CommonJS export names for ESM import in node:
128
+ 0 && (module.exports = {
129
+ darkColorPalettes,
130
+ darkTheme
131
+ });
@@ -0,0 +1,2 @@
1
+ export { darkTheme } from './dark';
2
+ export { lightTheme } from './light';
@@ -0,0 +1,32 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/styles/theme/index.ts
20
+ var theme_exports = {};
21
+ __export(theme_exports, {
22
+ darkTheme: () => import_dark.darkTheme,
23
+ lightTheme: () => import_light.lightTheme
24
+ });
25
+ module.exports = __toCommonJS(theme_exports);
26
+ var import_dark = require("./dark");
27
+ var import_light = require("./light");
28
+ // Annotate the CommonJS export names for ESM import in node:
29
+ 0 && (module.exports = {
30
+ darkTheme,
31
+ lightTheme
32
+ });
@@ -0,0 +1,4 @@
1
+ import { ThemeConfig } from 'antd';
2
+ import { ColorPalettes } from '../algorithms';
3
+ export declare const lightColorPalettes: ColorPalettes;
4
+ export declare const lightTheme: ThemeConfig;
@@ -0,0 +1,64 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/styles/theme/light.ts
20
+ var light_exports = {};
21
+ __export(light_exports, {
22
+ lightColorPalettes: () => lightColorPalettes,
23
+ lightTheme: () => lightTheme
24
+ });
25
+ module.exports = __toCommonJS(light_exports);
26
+ var import_algorithms = require("../algorithms");
27
+ var lightMode = (0, import_algorithms.genMapTokenAlgorithm)("light");
28
+ var lightColorPalettes = lightMode.palettes;
29
+ var lightTheme = {
30
+ token: {
31
+ colorTextLightSolid: "#ffffff",
32
+ colorBgLayout: "#ffffff",
33
+ colorBgContainer: "#fafafa",
34
+ colorBgElevated: "#f2f2f2",
35
+ colorBgSpotlight: "#999999",
36
+ colorBorder: "#eaeaea",
37
+ colorBorderSecondary: "#eaeaea",
38
+ colorText: "#000000",
39
+ colorTextSecondary: "#444444",
40
+ colorTextTertiary: "#666666",
41
+ colorTextQuaternary: "#888888",
42
+ colorPrimary: "#000000",
43
+ colorFillQuaternary: "rgba(0,0,0,0)",
44
+ borderRadius: 5,
45
+ borderRadiusXS: 3,
46
+ borderRadiusSM: 3,
47
+ borderRadiusLG: 8,
48
+ controlHeight: 36,
49
+ boxShadow: "0 12px 20px 6px rgb(104 112 118 / 0.08)",
50
+ boxShadowSecondary: "0 2px 8px 2px rgb(104 112 118 / 0.07), 0 2px 4px -1px rgb(104 112 118 / 0.04)",
51
+ colorLinkHover: lightColorPalettes.primary[5],
52
+ colorLink: lightColorPalettes.primary[6],
53
+ colorLinkActive: lightColorPalettes.primary[7]
54
+ },
55
+ algorithm: (seedToken, mapToken) => ({
56
+ ...mapToken,
57
+ ...lightMode.tokens
58
+ })
59
+ };
60
+ // Annotate the CommonJS export names for ESM import in node:
61
+ 0 && (module.exports = {
62
+ lightColorPalettes,
63
+ lightTheme
64
+ });
@@ -0,0 +1,9 @@
1
+ import { Theme as AntdStyleTheme } from 'antd-style';
2
+ import React from 'react';
3
+ declare module 'styled-components' {
4
+ interface DefaultTheme extends AntdStyleTheme {
5
+ }
6
+ }
7
+ export declare type DivProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
8
+ export declare type SvgProps = React.DetailedHTMLProps<React.HTMLAttributes<SVGSVGElement>, SVGSVGElement>;
9
+ export declare type ImgProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLImageElement>, HTMLImageElement>;
@@ -0,0 +1,17 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+
15
+ // src/types/index.ts
16
+ var types_exports = {};
17
+ module.exports = __toCommonJS(types_exports);