@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.
Files changed (190) hide show
  1. package/README.md +6 -3
  2. package/es/ActionIcon/index.d.ts +28 -10
  3. package/es/ActionIcon/index.js +29 -50
  4. package/es/ActionIcon/style.d.ts +6 -0
  5. package/es/ActionIcon/style.js +12 -0
  6. package/es/CopyButton/index.d.ts +34 -0
  7. package/es/CopyButton/index.js +49 -0
  8. package/es/DraggablePanel/index.d.ts +64 -4
  9. package/es/DraggablePanel/index.js +4 -4
  10. package/es/DraggablePanel/style.js +1 -1
  11. package/es/DraggablePanel/utils.d.ts +1 -1
  12. package/es/EditableText/ControlInput.d.ts +9 -0
  13. package/es/EditableText/ControlInput.js +88 -0
  14. package/es/EditableText/index.d.ts +5 -0
  15. package/es/EditableText/index.js +35 -0
  16. package/es/Highlighter/SyntaxHighlighter/Prism.d.ts +7 -0
  17. package/es/Highlighter/SyntaxHighlighter/Prism.js +40 -0
  18. package/es/Highlighter/SyntaxHighlighter/index.d.ts +5 -0
  19. package/es/Highlighter/SyntaxHighlighter/index.js +58 -0
  20. package/es/Highlighter/SyntaxHighlighter/style.d.ts +5 -0
  21. package/es/Highlighter/SyntaxHighlighter/style.js +15 -0
  22. package/es/Highlighter/index.d.ts +36 -0
  23. package/es/Highlighter/index.js +42 -0
  24. package/es/Highlighter/style.d.ts +5 -0
  25. package/es/Highlighter/style.js +18 -0
  26. package/es/Icon/index.d.ts +20 -0
  27. package/es/Icon/index.js +36 -0
  28. package/es/Logo/Divider.d.ts +3 -0
  29. package/es/Logo/Divider.js +22 -0
  30. package/es/Logo/Logo3D.d.ts +3 -4
  31. package/es/Logo/Logo3D.js +6 -4
  32. package/es/Logo/LogoFlat.d.ts +3 -4
  33. package/es/Logo/LogoFlat.js +6 -5
  34. package/es/Logo/LogoHighContrast.d.ts +3 -4
  35. package/es/Logo/LogoHighContrast.js +6 -5
  36. package/es/Logo/LogoText.d.ts +3 -4
  37. package/es/Logo/LogoText.js +6 -4
  38. package/es/Logo/index.d.ts +16 -4
  39. package/es/Logo/index.js +53 -9
  40. package/es/Logo/style.d.ts +4 -0
  41. package/es/Logo/style.js +10 -0
  42. package/es/Markdown/Code.d.ts +3 -0
  43. package/es/Markdown/Code.js +12 -0
  44. package/es/Markdown/CodeBlock.d.ts +3 -0
  45. package/es/Markdown/CodeBlock.js +27 -0
  46. package/es/Markdown/index.d.ts +13 -0
  47. package/es/Markdown/index.js +28 -0
  48. package/es/Markdown/style.d.ts +4 -0
  49. package/es/Markdown/style.js +12 -0
  50. package/es/MessageInput/index.d.ts +35 -0
  51. package/es/MessageInput/index.js +63 -0
  52. package/es/SearchBar/index.d.ts +5 -0
  53. package/es/SearchBar/index.js +27 -0
  54. package/es/SideNav/index.d.ts +15 -6
  55. package/es/SideNav/index.js +17 -20
  56. package/es/SideNav/style.d.ts +1 -0
  57. package/es/SideNav/style.js +8 -0
  58. package/es/Snippet/index.d.ts +29 -0
  59. package/es/Snippet/index.js +39 -0
  60. package/es/Snippet/style.d.ts +1 -0
  61. package/es/Snippet/style.js +9 -0
  62. package/es/StroyBook/index.d.ts +17 -0
  63. package/es/StroyBook/index.js +47 -0
  64. package/es/StroyBook/style.d.ts +8 -0
  65. package/es/StroyBook/style.js +14 -0
  66. package/es/Swatches/index.d.ts +8 -0
  67. package/es/Swatches/index.js +44 -0
  68. package/es/TabsNav/index.d.ts +22 -0
  69. package/es/{Template → TabsNav}/index.js +14 -9
  70. package/es/TabsNav/style.d.ts +3 -0
  71. package/es/TabsNav/style.js +14 -0
  72. package/es/ThemeProvider/GlobalStyle.js +1 -1
  73. package/es/ThemeProvider/index.d.ts +15 -0
  74. package/es/ThemeProvider/index.js +4 -0
  75. package/es/ThemeSwitch/index.d.ts +27 -0
  76. package/es/ThemeSwitch/index.js +60 -0
  77. package/es/Tooltip/index.d.ts +5 -0
  78. package/es/Tooltip/index.js +20 -0
  79. package/es/Tooltip/style.d.ts +3 -0
  80. package/es/Tooltip/style.js +10 -0
  81. package/es/hooks/useCopied.d.ts +4 -0
  82. package/es/hooks/useCopied.js +26 -0
  83. package/es/hooks/useHighlight.d.ts +36 -0
  84. package/es/hooks/useHighlight.js +63 -0
  85. package/es/index.d.ts +15 -3
  86. package/es/index.js +14 -2
  87. package/es/styles/theme/base.d.ts +2 -0
  88. package/es/styles/theme/base.js +15 -0
  89. package/es/styles/theme/dark.js +6 -14
  90. package/es/styles/theme/light.js +11 -12
  91. package/es/types/index.d.ts +14 -5
  92. package/lib/ActionIcon/index.d.ts +28 -10
  93. package/lib/ActionIcon/index.js +41 -83
  94. package/lib/ActionIcon/style.d.ts +6 -0
  95. package/lib/ActionIcon/style.js +64 -0
  96. package/lib/CopyButton/index.d.ts +34 -0
  97. package/lib/CopyButton/index.js +70 -0
  98. package/lib/DraggablePanel/index.d.ts +64 -4
  99. package/lib/DraggablePanel/index.js +160 -158
  100. package/lib/DraggablePanel/style.js +0 -1
  101. package/lib/DraggablePanel/utils.d.ts +1 -1
  102. package/lib/EditableText/ControlInput.d.ts +9 -0
  103. package/lib/EditableText/ControlInput.js +101 -0
  104. package/lib/EditableText/index.d.ts +5 -0
  105. package/lib/EditableText/index.js +52 -0
  106. package/lib/Highlighter/SyntaxHighlighter/Prism.d.ts +7 -0
  107. package/lib/Highlighter/SyntaxHighlighter/Prism.js +41 -0
  108. package/lib/Highlighter/SyntaxHighlighter/index.d.ts +5 -0
  109. package/lib/Highlighter/SyntaxHighlighter/index.js +55 -0
  110. package/lib/Highlighter/SyntaxHighlighter/style.d.ts +5 -0
  111. package/lib/Highlighter/SyntaxHighlighter/style.js +58 -0
  112. package/lib/Highlighter/index.d.ts +36 -0
  113. package/lib/Highlighter/index.js +62 -0
  114. package/lib/Highlighter/style.d.ts +5 -0
  115. package/lib/Highlighter/style.js +107 -0
  116. package/lib/Icon/index.d.ts +20 -0
  117. package/lib/Icon/index.js +49 -0
  118. package/lib/Logo/Divider.d.ts +3 -0
  119. package/lib/Logo/Divider.js +41 -0
  120. package/lib/Logo/Logo3D.d.ts +3 -4
  121. package/lib/Logo/Logo3D.js +4 -14
  122. package/lib/Logo/LogoFlat.d.ts +3 -4
  123. package/lib/Logo/LogoFlat.js +18 -28
  124. package/lib/Logo/LogoHighContrast.d.ts +3 -4
  125. package/lib/Logo/LogoHighContrast.js +8 -31
  126. package/lib/Logo/LogoText.d.ts +3 -4
  127. package/lib/Logo/LogoText.js +5 -15
  128. package/lib/Logo/index.d.ts +16 -4
  129. package/lib/Logo/index.js +18 -8
  130. package/lib/Logo/style.d.ts +4 -0
  131. package/lib/Logo/style.js +41 -0
  132. package/lib/Markdown/Code.d.ts +3 -0
  133. package/lib/Markdown/Code.js +33 -0
  134. package/lib/Markdown/CodeBlock.d.ts +3 -0
  135. package/lib/Markdown/CodeBlock.js +64 -0
  136. package/lib/Markdown/index.d.ts +13 -0
  137. package/lib/Markdown/index.js +48 -0
  138. package/lib/Markdown/style.d.ts +4 -0
  139. package/lib/Markdown/style.js +64 -0
  140. package/lib/MessageInput/index.d.ts +35 -0
  141. package/lib/MessageInput/index.js +58 -0
  142. package/lib/SearchBar/index.d.ts +5 -0
  143. package/lib/SearchBar/index.js +42 -0
  144. package/lib/SideNav/index.d.ts +15 -6
  145. package/lib/SideNav/index.js +7 -31
  146. package/lib/SideNav/style.d.ts +1 -0
  147. package/lib/SideNav/style.js +46 -0
  148. package/lib/Snippet/index.d.ts +29 -0
  149. package/lib/{Template → Snippet}/index.js +16 -10
  150. package/lib/Snippet/style.d.ts +1 -0
  151. package/lib/Snippet/style.js +71 -0
  152. package/lib/StroyBook/index.d.ts +17 -0
  153. package/lib/StroyBook/index.js +65 -0
  154. package/lib/StroyBook/style.d.ts +8 -0
  155. package/lib/StroyBook/style.js +81 -0
  156. package/lib/Swatches/index.d.ts +8 -0
  157. package/lib/Swatches/index.js +68 -0
  158. package/lib/TabsNav/index.d.ts +22 -0
  159. package/lib/TabsNav/index.js +34 -0
  160. package/lib/TabsNav/style.d.ts +3 -0
  161. package/lib/TabsNav/style.js +65 -0
  162. package/lib/ThemeProvider/GlobalStyle.js +10 -4
  163. package/lib/ThemeProvider/index.d.ts +15 -0
  164. package/lib/ThemeProvider/index.js +1 -1
  165. package/lib/ThemeSwitch/index.d.ts +27 -0
  166. package/lib/ThemeSwitch/index.js +50 -0
  167. package/lib/Tooltip/index.d.ts +5 -0
  168. package/lib/Tooltip/index.js +34 -0
  169. package/lib/Tooltip/style.d.ts +3 -0
  170. package/lib/Tooltip/style.js +51 -0
  171. package/lib/hooks/useCopied.d.ts +4 -0
  172. package/lib/hooks/useCopied.js +44 -0
  173. package/lib/hooks/useHighlight.d.ts +36 -0
  174. package/lib/hooks/useHighlight.js +76 -0
  175. package/lib/index.d.ts +15 -3
  176. package/lib/index.js +47 -5
  177. package/lib/styles/theme/base.d.ts +2 -0
  178. package/lib/styles/theme/base.js +43 -0
  179. package/lib/styles/theme/dark.js +5 -12
  180. package/lib/styles/theme/light.js +10 -10
  181. package/lib/types/index.d.ts +14 -5
  182. package/package.json +18 -9
  183. package/es/Template/index.d.ts +0 -7
  184. package/es/ThemeProvider/token.d.ts +0 -3
  185. package/es/ThemeProvider/token.js +0 -45
  186. package/es/types/index.js +0 -1
  187. package/lib/Template/index.d.ts +0 -7
  188. package/lib/ThemeProvider/token.d.ts +0 -3
  189. package/lib/ThemeProvider/token.js +0 -73
  190. 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
- Template: () => import_Template.default,
37
- ThemeProvider: () => import_ThemeProvider.default
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 import_Template = __toESM(require("./Template"));
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
- Template,
53
- ThemeProvider
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,2 @@
1
+ import { ThemeConfig } from 'antd';
2
+ export declare const baseTheme: ThemeConfig;
@@ -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
+ });
@@ -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: darkColorPalettes.primary[7],
122
- colorLink: darkColorPalettes.primary[6],
123
- colorLinkActive: darkColorPalettes.primary[5]
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: "#ffffff",
33
- colorBgContainer: "#fafafa",
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: lightColorPalettes.primary[5],
52
- colorLink: lightColorPalettes.primary[6],
53
- colorLinkActive: lightColorPalettes.primary[7]
51
+ colorLinkHover: "#3291ff",
52
+ colorLink: "#0070f3",
53
+ colorLinkActive: "#0761d1"
54
54
  },
55
55
  algorithm: (seedToken, mapToken) => ({
56
56
  ...mapToken,
@@ -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
- interface DefaultTheme extends AntdStyleTheme {
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.1.0",
4
- "description": "ui kit for lobehub",
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
- "npm",
7
- "template"
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": "^13",
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": "^7",
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": "^2",
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": "^20",
116
+ "semantic-release": "^21",
108
117
  "semantic-release-config-gitmoji": "^1",
109
- "stylelint": "^14",
118
+ "stylelint": "^15",
110
119
  "typescript": "^5",
111
120
  "vitest": "latest"
112
121
  },
@@ -1,7 +0,0 @@
1
- import { DivProps } from "../types";
2
- import React from 'react';
3
- export interface TemplateProps extends DivProps {
4
- children?: React.ReactNode;
5
- }
6
- declare const _default: React.NamedExoticComponent<TemplateProps>;
7
- export default _default;
@@ -1,3 +0,0 @@
1
- import { AliasToken } from 'antd/es/theme/interface';
2
- export declare const darkToken: Partial<AliasToken>;
3
- export declare const lightToken: Partial<AliasToken>;
@@ -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 {};
@@ -1,7 +0,0 @@
1
- import { DivProps } from "../types";
2
- import React from 'react';
3
- export interface TemplateProps extends DivProps {
4
- children?: React.ReactNode;
5
- }
6
- declare const _default: React.NamedExoticComponent<TemplateProps>;
7
- export default _default;
@@ -1,3 +0,0 @@
1
- import { AliasToken } from 'antd/es/theme/interface';
2
- export declare const darkToken: Partial<AliasToken>;
3
- export declare const lightToken: Partial<AliasToken>;
@@ -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
- });
@@ -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);