@lobehub/ui 1.1.0 → 1.3.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.
- package/README.md +6 -3
- package/es/ActionIcon/index.d.ts +28 -10
- package/es/ActionIcon/index.js +29 -50
- package/es/ActionIcon/style.d.ts +6 -0
- package/es/ActionIcon/style.js +12 -0
- package/es/CopyButton/index.d.ts +34 -0
- package/es/CopyButton/index.js +49 -0
- package/es/DraggablePanel/index.d.ts +64 -4
- package/es/DraggablePanel/index.js +4 -4
- package/es/DraggablePanel/style.js +1 -1
- package/es/DraggablePanel/utils.d.ts +1 -1
- package/es/EditableText/ControlInput.d.ts +9 -0
- package/es/EditableText/ControlInput.js +88 -0
- package/es/EditableText/index.d.ts +5 -0
- package/es/EditableText/index.js +35 -0
- package/es/Highlighter/SyntaxHighlighter/Prism.d.ts +7 -0
- package/es/Highlighter/SyntaxHighlighter/Prism.js +40 -0
- package/es/Highlighter/SyntaxHighlighter/index.d.ts +5 -0
- package/es/Highlighter/SyntaxHighlighter/index.js +58 -0
- package/es/Highlighter/SyntaxHighlighter/style.d.ts +5 -0
- package/es/Highlighter/SyntaxHighlighter/style.js +15 -0
- package/es/Highlighter/index.d.ts +36 -0
- package/es/Highlighter/index.js +42 -0
- package/es/Highlighter/style.d.ts +5 -0
- package/es/Highlighter/style.js +18 -0
- package/es/Icon/index.d.ts +20 -0
- package/es/Icon/index.js +36 -0
- package/es/Logo/Divider.d.ts +3 -0
- package/es/Logo/Divider.js +22 -0
- package/es/Logo/Logo3D.d.ts +3 -4
- package/es/Logo/Logo3D.js +6 -4
- package/es/Logo/LogoFlat.d.ts +3 -4
- package/es/Logo/LogoFlat.js +6 -5
- package/es/Logo/LogoHighContrast.d.ts +3 -4
- package/es/Logo/LogoHighContrast.js +6 -5
- package/es/Logo/LogoText.d.ts +3 -4
- package/es/Logo/LogoText.js +6 -4
- package/es/Logo/index.d.ts +16 -4
- package/es/Logo/index.js +53 -9
- package/es/Logo/style.d.ts +4 -0
- package/es/Logo/style.js +10 -0
- package/es/Markdown/Code.d.ts +3 -0
- package/es/Markdown/Code.js +12 -0
- package/es/Markdown/CodeBlock.d.ts +3 -0
- package/es/Markdown/CodeBlock.js +27 -0
- package/es/Markdown/index.d.ts +13 -0
- package/es/Markdown/index.js +28 -0
- package/es/Markdown/style.d.ts +4 -0
- package/es/Markdown/style.js +12 -0
- package/es/MessageInput/index.d.ts +35 -0
- package/es/MessageInput/index.js +63 -0
- package/es/SearchBar/index.d.ts +5 -0
- package/es/SearchBar/index.js +27 -0
- package/es/SideNav/index.d.ts +15 -6
- package/es/SideNav/index.js +17 -20
- package/es/SideNav/style.d.ts +1 -0
- package/es/SideNav/style.js +8 -0
- package/es/Snippet/index.d.ts +29 -0
- package/es/Snippet/index.js +39 -0
- package/es/Snippet/style.d.ts +1 -0
- package/es/Snippet/style.js +9 -0
- package/es/StroyBook/index.d.ts +17 -0
- package/es/StroyBook/index.js +47 -0
- package/es/StroyBook/style.d.ts +8 -0
- package/es/StroyBook/style.js +14 -0
- package/es/Swatches/index.d.ts +8 -0
- package/es/Swatches/index.js +44 -0
- package/es/TabsNav/index.d.ts +22 -0
- package/es/{Template → TabsNav}/index.js +14 -9
- package/es/TabsNav/style.d.ts +3 -0
- package/es/TabsNav/style.js +14 -0
- package/es/ThemeProvider/GlobalStyle.js +1 -1
- package/es/ThemeProvider/index.d.ts +15 -0
- package/es/ThemeProvider/index.js +4 -0
- package/es/ThemeSwitch/index.d.ts +27 -0
- package/es/ThemeSwitch/index.js +60 -0
- package/es/Tooltip/index.d.ts +5 -0
- package/es/Tooltip/index.js +20 -0
- package/es/Tooltip/style.d.ts +3 -0
- package/es/Tooltip/style.js +10 -0
- package/es/hooks/useCopied.d.ts +4 -0
- package/es/hooks/useCopied.js +26 -0
- package/es/hooks/useHighlight.d.ts +36 -0
- package/es/hooks/useHighlight.js +63 -0
- package/es/index.d.ts +15 -3
- package/es/index.js +14 -2
- package/es/styles/theme/base.d.ts +2 -0
- package/es/styles/theme/base.js +15 -0
- package/es/styles/theme/dark.js +6 -14
- package/es/styles/theme/light.js +11 -12
- package/es/types/index.d.ts +14 -5
- package/lib/ActionIcon/index.d.ts +28 -10
- package/lib/ActionIcon/index.js +41 -83
- package/lib/ActionIcon/style.d.ts +6 -0
- package/lib/ActionIcon/style.js +64 -0
- package/lib/CopyButton/index.d.ts +34 -0
- package/lib/CopyButton/index.js +70 -0
- package/lib/DraggablePanel/index.d.ts +64 -4
- package/lib/DraggablePanel/index.js +160 -158
- package/lib/DraggablePanel/style.js +0 -1
- package/lib/DraggablePanel/utils.d.ts +1 -1
- package/lib/EditableText/ControlInput.d.ts +9 -0
- package/lib/EditableText/ControlInput.js +101 -0
- package/lib/EditableText/index.d.ts +5 -0
- package/lib/EditableText/index.js +52 -0
- package/lib/Highlighter/SyntaxHighlighter/Prism.d.ts +7 -0
- package/lib/Highlighter/SyntaxHighlighter/Prism.js +41 -0
- package/lib/Highlighter/SyntaxHighlighter/index.d.ts +5 -0
- package/lib/Highlighter/SyntaxHighlighter/index.js +55 -0
- package/lib/Highlighter/SyntaxHighlighter/style.d.ts +5 -0
- package/lib/Highlighter/SyntaxHighlighter/style.js +58 -0
- package/lib/Highlighter/index.d.ts +36 -0
- package/lib/Highlighter/index.js +62 -0
- package/lib/Highlighter/style.d.ts +5 -0
- package/lib/Highlighter/style.js +107 -0
- package/lib/Icon/index.d.ts +20 -0
- package/lib/Icon/index.js +49 -0
- package/lib/Logo/Divider.d.ts +3 -0
- package/lib/Logo/Divider.js +41 -0
- package/lib/Logo/Logo3D.d.ts +3 -4
- package/lib/Logo/Logo3D.js +4 -14
- package/lib/Logo/LogoFlat.d.ts +3 -4
- package/lib/Logo/LogoFlat.js +18 -28
- package/lib/Logo/LogoHighContrast.d.ts +3 -4
- package/lib/Logo/LogoHighContrast.js +8 -31
- package/lib/Logo/LogoText.d.ts +3 -4
- package/lib/Logo/LogoText.js +5 -15
- package/lib/Logo/index.d.ts +16 -4
- package/lib/Logo/index.js +18 -8
- package/lib/Logo/style.d.ts +4 -0
- package/lib/Logo/style.js +41 -0
- package/lib/Markdown/Code.d.ts +3 -0
- package/lib/Markdown/Code.js +33 -0
- package/lib/Markdown/CodeBlock.d.ts +3 -0
- package/lib/Markdown/CodeBlock.js +64 -0
- package/lib/Markdown/index.d.ts +13 -0
- package/lib/Markdown/index.js +48 -0
- package/lib/Markdown/style.d.ts +4 -0
- package/lib/Markdown/style.js +64 -0
- package/lib/MessageInput/index.d.ts +35 -0
- package/lib/MessageInput/index.js +58 -0
- package/lib/SearchBar/index.d.ts +5 -0
- package/lib/SearchBar/index.js +42 -0
- package/lib/SideNav/index.d.ts +15 -6
- package/lib/SideNav/index.js +7 -31
- package/lib/SideNav/style.d.ts +1 -0
- package/lib/SideNav/style.js +46 -0
- package/lib/Snippet/index.d.ts +29 -0
- package/lib/{Template → Snippet}/index.js +16 -10
- package/lib/Snippet/style.d.ts +1 -0
- package/lib/Snippet/style.js +71 -0
- package/lib/StroyBook/index.d.ts +17 -0
- package/lib/StroyBook/index.js +65 -0
- package/lib/StroyBook/style.d.ts +8 -0
- package/lib/StroyBook/style.js +81 -0
- package/lib/Swatches/index.d.ts +8 -0
- package/lib/Swatches/index.js +68 -0
- package/lib/TabsNav/index.d.ts +22 -0
- package/lib/TabsNav/index.js +34 -0
- package/lib/TabsNav/style.d.ts +3 -0
- package/lib/TabsNav/style.js +65 -0
- package/lib/ThemeProvider/GlobalStyle.js +10 -4
- package/lib/ThemeProvider/index.d.ts +15 -0
- package/lib/ThemeProvider/index.js +1 -1
- package/lib/ThemeSwitch/index.d.ts +27 -0
- package/lib/ThemeSwitch/index.js +50 -0
- package/lib/Tooltip/index.d.ts +5 -0
- package/lib/Tooltip/index.js +34 -0
- package/lib/Tooltip/style.d.ts +3 -0
- package/lib/Tooltip/style.js +51 -0
- package/lib/hooks/useCopied.d.ts +4 -0
- package/lib/hooks/useCopied.js +44 -0
- package/lib/hooks/useHighlight.d.ts +36 -0
- package/lib/hooks/useHighlight.js +76 -0
- package/lib/index.d.ts +15 -3
- package/lib/index.js +47 -5
- package/lib/styles/theme/base.d.ts +2 -0
- package/lib/styles/theme/base.js +43 -0
- package/lib/styles/theme/dark.js +5 -12
- package/lib/styles/theme/light.js +10 -10
- package/lib/types/index.d.ts +14 -5
- package/package.json +18 -9
- package/es/Template/index.d.ts +0 -7
- package/es/ThemeProvider/token.d.ts +0 -3
- package/es/ThemeProvider/token.js +0 -45
- package/es/types/index.js +0 -1
- package/lib/Template/index.d.ts +0 -7
- package/lib/ThemeProvider/token.d.ts +0 -3
- package/lib/ThemeProvider/token.js +0 -73
- package/lib/types/index.js +0 -17
package/lib/index.js
CHANGED
|
@@ -30,25 +30,67 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
var src_exports = {};
|
|
31
31
|
__export(src_exports, {
|
|
32
32
|
ActionIcon: () => import_ActionIcon.default,
|
|
33
|
+
CopyButton: () => import_CopyButton.default,
|
|
33
34
|
DraggablePanel: () => import_DraggablePanel.default,
|
|
35
|
+
EditableText: () => import_EditableText.default,
|
|
36
|
+
Highlighter: () => import_Highlighter.default,
|
|
37
|
+
Icon: () => import_Icon.default,
|
|
34
38
|
Logo: () => import_Logo.default,
|
|
39
|
+
Markdown: () => import_Markdown.default,
|
|
40
|
+
MessageInput: () => import_MessageInput.default,
|
|
41
|
+
SearchBar: () => import_SearchBar.default,
|
|
35
42
|
SideNav: () => import_SideNav.default,
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
Snippet: () => import_Snippet.default,
|
|
44
|
+
StroyBook: () => import_StroyBook.default,
|
|
45
|
+
Swatches: () => import_Swatches.default,
|
|
46
|
+
SyntaxHighlighter: () => import_Highlighter.SyntaxHighlighter,
|
|
47
|
+
TabsNav: () => import_TabsNav.default,
|
|
48
|
+
ThemeProvider: () => import_ThemeProvider.default,
|
|
49
|
+
ThemeSwitch: () => import_ThemeSwitch.default,
|
|
50
|
+
Tooltip: () => import_Tooltip.default,
|
|
51
|
+
useControls: () => import_StroyBook.useControls,
|
|
52
|
+
useCreateStore: () => import_StroyBook.useCreateStore
|
|
38
53
|
});
|
|
39
54
|
module.exports = __toCommonJS(src_exports);
|
|
40
55
|
var import_ActionIcon = __toESM(require("./ActionIcon"));
|
|
56
|
+
var import_CopyButton = __toESM(require("./CopyButton"));
|
|
41
57
|
var import_DraggablePanel = __toESM(require("./DraggablePanel"));
|
|
58
|
+
var import_EditableText = __toESM(require("./EditableText"));
|
|
59
|
+
var import_Highlighter = __toESM(require("./Highlighter"));
|
|
60
|
+
var import_Icon = __toESM(require("./Icon"));
|
|
42
61
|
var import_Logo = __toESM(require("./Logo"));
|
|
62
|
+
var import_Markdown = __toESM(require("./Markdown"));
|
|
63
|
+
var import_MessageInput = __toESM(require("./MessageInput"));
|
|
64
|
+
var import_SearchBar = __toESM(require("./SearchBar"));
|
|
43
65
|
var import_SideNav = __toESM(require("./SideNav"));
|
|
44
|
-
var
|
|
66
|
+
var import_Snippet = __toESM(require("./Snippet"));
|
|
67
|
+
var import_StroyBook = __toESM(require("./StroyBook"));
|
|
68
|
+
var import_Swatches = __toESM(require("./Swatches"));
|
|
69
|
+
var import_TabsNav = __toESM(require("./TabsNav"));
|
|
45
70
|
var import_ThemeProvider = __toESM(require("./ThemeProvider"));
|
|
71
|
+
var import_ThemeSwitch = __toESM(require("./ThemeSwitch"));
|
|
72
|
+
var import_Tooltip = __toESM(require("./Tooltip"));
|
|
46
73
|
// Annotate the CommonJS export names for ESM import in node:
|
|
47
74
|
0 && (module.exports = {
|
|
48
75
|
ActionIcon,
|
|
76
|
+
CopyButton,
|
|
49
77
|
DraggablePanel,
|
|
78
|
+
EditableText,
|
|
79
|
+
Highlighter,
|
|
80
|
+
Icon,
|
|
50
81
|
Logo,
|
|
82
|
+
Markdown,
|
|
83
|
+
MessageInput,
|
|
84
|
+
SearchBar,
|
|
51
85
|
SideNav,
|
|
52
|
-
|
|
53
|
-
|
|
86
|
+
Snippet,
|
|
87
|
+
StroyBook,
|
|
88
|
+
Swatches,
|
|
89
|
+
SyntaxHighlighter,
|
|
90
|
+
TabsNav,
|
|
91
|
+
ThemeProvider,
|
|
92
|
+
ThemeSwitch,
|
|
93
|
+
Tooltip,
|
|
94
|
+
useControls,
|
|
95
|
+
useCreateStore
|
|
54
96
|
});
|
|
@@ -0,0 +1,43 @@
|
|
|
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/base.ts
|
|
20
|
+
var base_exports = {};
|
|
21
|
+
__export(base_exports, {
|
|
22
|
+
baseTheme: () => baseTheme
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(base_exports);
|
|
25
|
+
var baseTheme = {
|
|
26
|
+
token: {
|
|
27
|
+
colorInfo: "#0070f3",
|
|
28
|
+
colorSuccess: "#50e3c2",
|
|
29
|
+
colorWarning: "#f5a623",
|
|
30
|
+
colorError: "#ee0000",
|
|
31
|
+
borderRadius: 5,
|
|
32
|
+
borderRadiusXS: 3,
|
|
33
|
+
borderRadiusSM: 3,
|
|
34
|
+
borderRadiusLG: 8,
|
|
35
|
+
controlHeight: 36,
|
|
36
|
+
fontFamily: `'Segoe UI', SegoeUI, AliPuHui, -apple-system ,BlinkMacSystemFont,Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji'`,
|
|
37
|
+
fontFamilyCode: `'Hack Nerd Font Mono', 'Hack', 'Fira Code', 'Fira Mono', Menlo, Consolas, 'DejaVu Sans Mono', monospace`
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
+
0 && (module.exports = {
|
|
42
|
+
baseTheme
|
|
43
|
+
});
|
package/lib/styles/theme/dark.js
CHANGED
|
@@ -25,6 +25,7 @@ __export(dark_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(dark_exports);
|
|
26
26
|
var import_antd = require("antd");
|
|
27
27
|
var import_algorithms = require("../algorithms");
|
|
28
|
+
var import_base = require("./base");
|
|
28
29
|
var cyanColors = [
|
|
29
30
|
"rgba(0, 225, 242, 0.12)",
|
|
30
31
|
"rgba(0, 232, 245, 0.22)",
|
|
@@ -94,6 +95,7 @@ var darkAlgorithm = (seedToken, mapToken) => ({
|
|
|
94
95
|
});
|
|
95
96
|
var darkTheme = {
|
|
96
97
|
token: {
|
|
98
|
+
...import_base.baseTheme.token,
|
|
97
99
|
colorTextLightSolid: "#000000",
|
|
98
100
|
colorBgLayout: "#000000",
|
|
99
101
|
colorBgContainer: "#111111",
|
|
@@ -106,21 +108,12 @@ var darkTheme = {
|
|
|
106
108
|
colorTextTertiary: "#888888",
|
|
107
109
|
colorTextQuaternary: "#666666",
|
|
108
110
|
colorPrimary: "#ffffff",
|
|
109
|
-
colorInfo: "#0070f3",
|
|
110
|
-
colorSuccess: "#50e3c2",
|
|
111
|
-
colorWarning: "#f5a623",
|
|
112
|
-
colorError: "#ee0000",
|
|
113
111
|
colorFillQuaternary: "rgba(0,0,0,0)",
|
|
114
|
-
borderRadius: 5,
|
|
115
|
-
borderRadiusXS: 3,
|
|
116
|
-
borderRadiusSM: 3,
|
|
117
|
-
borderRadiusLG: 8,
|
|
118
|
-
controlHeight: 36,
|
|
119
112
|
boxShadow: "0 12px 20px 6px rgb(0 0 0 / 0.08)",
|
|
120
113
|
boxShadowSecondary: "0 2px 8px 2px rgb(0 0 0 / 0.07), 0 2px 4px -1px rgb(0 0 0 / 0.04)",
|
|
121
|
-
colorLinkHover:
|
|
122
|
-
colorLink:
|
|
123
|
-
colorLinkActive:
|
|
114
|
+
colorLinkHover: "#3291ff",
|
|
115
|
+
colorLink: "#0070f3",
|
|
116
|
+
colorLinkActive: "#0761d1"
|
|
124
117
|
},
|
|
125
118
|
algorithm: darkAlgorithm
|
|
126
119
|
};
|
|
@@ -24,13 +24,15 @@ __export(light_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(light_exports);
|
|
26
26
|
var import_algorithms = require("../algorithms");
|
|
27
|
+
var import_base = require("./base");
|
|
27
28
|
var lightMode = (0, import_algorithms.genMapTokenAlgorithm)("light");
|
|
28
29
|
var lightColorPalettes = lightMode.palettes;
|
|
29
30
|
var lightTheme = {
|
|
30
31
|
token: {
|
|
32
|
+
...import_base.baseTheme.token,
|
|
31
33
|
colorTextLightSolid: "#ffffff",
|
|
32
|
-
colorBgLayout: "#
|
|
33
|
-
colorBgContainer: "#
|
|
34
|
+
colorBgLayout: "#fafafa",
|
|
35
|
+
colorBgContainer: "#ffffff",
|
|
34
36
|
colorBgElevated: "#f2f2f2",
|
|
35
37
|
colorBgSpotlight: "#999999",
|
|
36
38
|
colorBorder: "#eaeaea",
|
|
@@ -40,17 +42,15 @@ var lightTheme = {
|
|
|
40
42
|
colorTextTertiary: "#666666",
|
|
41
43
|
colorTextQuaternary: "#888888",
|
|
42
44
|
colorPrimary: "#000000",
|
|
45
|
+
colorFill: "rgba(0,0,0,0.1)",
|
|
46
|
+
colorFillSecondary: "rgba(0,0,0,0.075)",
|
|
47
|
+
colorFillTertiary: "rgba(0,0,0,0.05)",
|
|
43
48
|
colorFillQuaternary: "rgba(0,0,0,0)",
|
|
44
|
-
borderRadius: 5,
|
|
45
|
-
borderRadiusXS: 3,
|
|
46
|
-
borderRadiusSM: 3,
|
|
47
|
-
borderRadiusLG: 8,
|
|
48
|
-
controlHeight: 36,
|
|
49
49
|
boxShadow: "0 12px 20px 6px rgb(104 112 118 / 0.08)",
|
|
50
50
|
boxShadowSecondary: "0 2px 8px 2px rgb(104 112 118 / 0.07), 0 2px 4px -1px rgb(104 112 118 / 0.04)",
|
|
51
|
-
colorLinkHover:
|
|
52
|
-
colorLink:
|
|
53
|
-
colorLinkActive:
|
|
51
|
+
colorLinkHover: "#3291ff",
|
|
52
|
+
colorLink: "#0070f3",
|
|
53
|
+
colorLinkActive: "#0761d1"
|
|
54
54
|
},
|
|
55
55
|
algorithm: (seedToken, mapToken) => ({
|
|
56
56
|
...mapToken,
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { Theme as AntdStyleTheme } from 'antd-style';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
|
|
3
4
|
declare module 'styled-components' {
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
6
|
+
export interface DefaultTheme extends AntdStyleTheme {}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type DivProps = React.DetailedHTMLProps<
|
|
10
|
+
React.HTMLAttributes<HTMLDivElement>,
|
|
11
|
+
HTMLDivElement
|
|
12
|
+
>;
|
|
13
|
+
|
|
14
|
+
declare global {
|
|
15
|
+
type SvgProps = React.DetailedHTMLProps<React.HTMLAttributes<SVGSVGElement>, SVGSVGElement>;
|
|
16
|
+
|
|
17
|
+
type ImgProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLImageElement>, HTMLImageElement>;
|
|
6
18
|
}
|
|
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>;
|
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/ui",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.3.0",
|
|
4
|
+
"description": "Lobe UI is an open-source UI component library for building chatbot web apps",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"
|
|
7
|
-
"
|
|
6
|
+
"lobehub",
|
|
7
|
+
"components",
|
|
8
|
+
"chatbot components",
|
|
9
|
+
"react components",
|
|
10
|
+
"react ui"
|
|
8
11
|
],
|
|
9
12
|
"homepage": "https://github.com/lobehub/lobe-ui",
|
|
10
13
|
"bugs": {
|
|
@@ -60,24 +63,30 @@
|
|
|
60
63
|
]
|
|
61
64
|
},
|
|
62
65
|
"dependencies": {
|
|
66
|
+
"@ant-design/icons": "^5",
|
|
63
67
|
"@babel/runtime": "^7",
|
|
64
68
|
"ahooks": "^3",
|
|
65
69
|
"antd-style": "^3",
|
|
66
70
|
"chroma-js": "^2",
|
|
67
71
|
"copy-to-clipboard": "^3",
|
|
72
|
+
"leva": "^0.9.34",
|
|
68
73
|
"lodash": "^4",
|
|
69
74
|
"lucide-react": "latest",
|
|
70
75
|
"polished": "^4",
|
|
76
|
+
"prism-react-renderer": "^2",
|
|
71
77
|
"re-resizable": "^6",
|
|
72
78
|
"react-layout-kit": "^1",
|
|
79
|
+
"react-markdown": "^8",
|
|
73
80
|
"react-rnd": "^10",
|
|
81
|
+
"shiki-es": "^0.2",
|
|
74
82
|
"styled-components": "^6.0.0-rc.1",
|
|
75
83
|
"use-merge-value": "^1",
|
|
76
84
|
"zustand": "^4"
|
|
77
85
|
},
|
|
78
86
|
"devDependencies": {
|
|
87
|
+
"@ant-design/colors": "^7",
|
|
79
88
|
"@commitlint/cli": "^17",
|
|
80
|
-
"@testing-library/react": "^
|
|
89
|
+
"@testing-library/react": "^14",
|
|
81
90
|
"@types/chroma-js": "^2",
|
|
82
91
|
"@types/lodash": "^4",
|
|
83
92
|
"@types/react": "^18",
|
|
@@ -87,14 +96,14 @@
|
|
|
87
96
|
"antd": "^5",
|
|
88
97
|
"commitlint": "^17",
|
|
89
98
|
"commitlint-config-gitmoji": "^2",
|
|
90
|
-
"concurrently": "^
|
|
99
|
+
"concurrently": "^8",
|
|
91
100
|
"cross-env": "^7",
|
|
92
101
|
"dumi": "^2",
|
|
93
102
|
"dumi-assets-types": "^1",
|
|
94
103
|
"dumi-theme-lobehub": "latest",
|
|
95
104
|
"eslint": "^8",
|
|
96
105
|
"eslint-import-resolver-alias": "^1",
|
|
97
|
-
"eslint-import-resolver-typescript": "^
|
|
106
|
+
"eslint-import-resolver-typescript": "^3",
|
|
98
107
|
"father": "^4",
|
|
99
108
|
"husky": "^8",
|
|
100
109
|
"jsdom": "^22",
|
|
@@ -104,9 +113,9 @@
|
|
|
104
113
|
"prettier-plugin-packagejson": "^2",
|
|
105
114
|
"react": "^18",
|
|
106
115
|
"react-dom": "^18",
|
|
107
|
-
"semantic-release": "^
|
|
116
|
+
"semantic-release": "^21",
|
|
108
117
|
"semantic-release-config-gitmoji": "^1",
|
|
109
|
-
"stylelint": "^
|
|
118
|
+
"stylelint": "^15",
|
|
110
119
|
"typescript": "^5",
|
|
111
120
|
"vitest": "latest"
|
|
112
121
|
},
|
package/es/Template/index.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
-
export var darkToken = {
|
|
5
|
-
colorTextLightSolid: '#000000',
|
|
6
|
-
colorBgLayout: '#000000',
|
|
7
|
-
colorBgContainer: '#111111',
|
|
8
|
-
colorBgElevated: '#222222',
|
|
9
|
-
colorBgSpotlight: '#444444',
|
|
10
|
-
colorBorder: '#333333',
|
|
11
|
-
colorBorderSecondary: '#333333',
|
|
12
|
-
colorText: '#ffffff',
|
|
13
|
-
colorTextSecondary: '#999999',
|
|
14
|
-
colorTextTertiary: '#888888',
|
|
15
|
-
colorTextQuaternary: '#666666',
|
|
16
|
-
colorPrimary: '#ffffff',
|
|
17
|
-
colorInfo: '#0070f3',
|
|
18
|
-
colorSuccess: '#50e3c2',
|
|
19
|
-
colorWarning: '#f5a623',
|
|
20
|
-
colorError: '#ee0000',
|
|
21
|
-
colorFillQuaternary: 'rgba(0,0,0,0)',
|
|
22
|
-
borderRadius: 5,
|
|
23
|
-
borderRadiusXS: 3,
|
|
24
|
-
borderRadiusSM: 3,
|
|
25
|
-
borderRadiusLG: 8,
|
|
26
|
-
controlHeight: 36,
|
|
27
|
-
boxShadow: '0 12px 20px 6px rgb(0 0 0 / 0.08)',
|
|
28
|
-
boxShadowSecondary: '0 2px 8px 2px rgb(0 0 0 / 0.07), 0 2px 4px -1px rgb(0 0 0 / 0.04)'
|
|
29
|
-
};
|
|
30
|
-
export var lightToken = _objectSpread(_objectSpread({}, darkToken), {}, {
|
|
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
|
-
boxShadow: '0 12px 20px 6px rgb(104 112 118 / 0.08)',
|
|
44
|
-
boxShadowSecondary: '0 2px 8px 2px rgb(104 112 118 / 0.07), 0 2px 4px -1px rgb(104 112 118 / 0.04)'
|
|
45
|
-
});
|
package/es/types/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/Template/index.d.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
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/ThemeProvider/token.ts
|
|
20
|
-
var token_exports = {};
|
|
21
|
-
__export(token_exports, {
|
|
22
|
-
darkToken: () => darkToken,
|
|
23
|
-
lightToken: () => lightToken
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(token_exports);
|
|
26
|
-
var darkToken = {
|
|
27
|
-
colorTextLightSolid: "#000000",
|
|
28
|
-
colorBgLayout: "#000000",
|
|
29
|
-
colorBgContainer: "#111111",
|
|
30
|
-
colorBgElevated: "#222222",
|
|
31
|
-
colorBgSpotlight: "#444444",
|
|
32
|
-
colorBorder: "#333333",
|
|
33
|
-
colorBorderSecondary: "#333333",
|
|
34
|
-
colorText: "#ffffff",
|
|
35
|
-
colorTextSecondary: "#999999",
|
|
36
|
-
colorTextTertiary: "#888888",
|
|
37
|
-
colorTextQuaternary: "#666666",
|
|
38
|
-
colorPrimary: "#ffffff",
|
|
39
|
-
colorInfo: "#0070f3",
|
|
40
|
-
colorSuccess: "#50e3c2",
|
|
41
|
-
colorWarning: "#f5a623",
|
|
42
|
-
colorError: "#ee0000",
|
|
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(0 0 0 / 0.08)",
|
|
50
|
-
boxShadowSecondary: "0 2px 8px 2px rgb(0 0 0 / 0.07), 0 2px 4px -1px rgb(0 0 0 / 0.04)"
|
|
51
|
-
};
|
|
52
|
-
var lightToken = {
|
|
53
|
-
...darkToken,
|
|
54
|
-
colorTextLightSolid: "#ffffff",
|
|
55
|
-
colorBgLayout: "#ffffff",
|
|
56
|
-
colorBgContainer: "#fafafa",
|
|
57
|
-
colorBgElevated: "#f2f2f2",
|
|
58
|
-
colorBgSpotlight: "#999999",
|
|
59
|
-
colorBorder: "#eaeaea",
|
|
60
|
-
colorBorderSecondary: "#eaeaea",
|
|
61
|
-
colorText: "#000000",
|
|
62
|
-
colorTextSecondary: "#444444",
|
|
63
|
-
colorTextTertiary: "#666666",
|
|
64
|
-
colorTextQuaternary: "#888888",
|
|
65
|
-
colorPrimary: "#000000",
|
|
66
|
-
boxShadow: "0 12px 20px 6px rgb(104 112 118 / 0.08)",
|
|
67
|
-
boxShadowSecondary: "0 2px 8px 2px rgb(104 112 118 / 0.07), 0 2px 4px -1px rgb(104 112 118 / 0.04)"
|
|
68
|
-
};
|
|
69
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
70
|
-
0 && (module.exports = {
|
|
71
|
-
darkToken,
|
|
72
|
-
lightToken
|
|
73
|
-
});
|
package/lib/types/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
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);
|