@lobehub/ui 1.11.0 → 1.11.2

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 (183) hide show
  1. package/package.json +1 -1
  2. package/lib/ActionIcon/index.d.ts +0 -49
  3. package/lib/ActionIcon/index.js +0 -82
  4. package/lib/ActionIcon/style.d.ts +0 -6
  5. package/lib/ActionIcon/style.js +0 -64
  6. package/lib/Avatar/index.d.ts +0 -10
  7. package/lib/Avatar/index.js +0 -74
  8. package/lib/Chat/const.d.ts +0 -1
  9. package/lib/Chat/const.js +0 -29
  10. package/lib/Chat/index.d.ts +0 -2
  11. package/lib/Chat/index.js +0 -31
  12. package/lib/Chat/store/index.d.ts +0 -20
  13. package/lib/Chat/store/index.js +0 -44
  14. package/lib/Chat/store/initialState.d.ts +0 -28
  15. package/lib/Chat/store/initialState.js +0 -37
  16. package/lib/Chat/store/messageReducer.d.ts +0 -37
  17. package/lib/Chat/store/messageReducer.js +0 -82
  18. package/lib/Chat/store/selectors.d.ts +0 -9
  19. package/lib/Chat/store/selectors.js +0 -53
  20. package/lib/Chat/store/store.d.ts +0 -34
  21. package/lib/Chat/store/store.js +0 -119
  22. package/lib/Chat/types.d.ts +0 -77
  23. package/lib/Chat/types.js +0 -17
  24. package/lib/Chat/utils/fetch.d.ts +0 -11
  25. package/lib/Chat/utils/fetch.js +0 -72
  26. package/lib/ContextMenu/MenuItem/icons.d.ts +0 -4
  27. package/lib/ContextMenu/MenuItem/icons.js +0 -100
  28. package/lib/ContextMenu/MenuItem/index.d.ts +0 -12
  29. package/lib/ContextMenu/MenuItem/index.js +0 -72
  30. package/lib/ContextMenu/MenuItem/style.d.ts +0 -7
  31. package/lib/ContextMenu/MenuItem/style.js +0 -94
  32. package/lib/ContextMenu/index.d.ts +0 -9
  33. package/lib/ContextMenu/index.js +0 -254
  34. package/lib/ContextMenu/style.d.ts +0 -4
  35. package/lib/ContextMenu/style.js +0 -88
  36. package/lib/ContextMenu/types/index.d.ts +0 -5
  37. package/lib/ContextMenu/types/index.js +0 -19
  38. package/lib/ContextMenu/types/menuItem.d.ts +0 -21
  39. package/lib/ContextMenu/types/menuItem.js +0 -17
  40. package/lib/Conversation/App.d.ts +0 -13
  41. package/lib/Conversation/App.js +0 -53
  42. package/lib/Conversation/ChatList/MessageItem/Content.d.ts +0 -8
  43. package/lib/Conversation/ChatList/MessageItem/Content.js +0 -104
  44. package/lib/Conversation/ChatList/MessageItem/Toolbar.d.ts +0 -10
  45. package/lib/Conversation/ChatList/MessageItem/Toolbar.js +0 -110
  46. package/lib/Conversation/ChatList/MessageItem/index.d.ts +0 -9
  47. package/lib/Conversation/ChatList/MessageItem/index.js +0 -164
  48. package/lib/Conversation/ChatList/index.d.ts +0 -14
  49. package/lib/Conversation/ChatList/index.js +0 -61
  50. package/lib/Conversation/InputArea/ActionBar.d.ts +0 -4
  51. package/lib/Conversation/InputArea/ActionBar.js +0 -97
  52. package/lib/Conversation/InputArea/index.d.ts +0 -4
  53. package/lib/Conversation/InputArea/index.js +0 -148
  54. package/lib/Conversation/StoreUpdater.d.ts +0 -7
  55. package/lib/Conversation/StoreUpdater.js +0 -52
  56. package/lib/Conversation/index.d.ts +0 -8
  57. package/lib/Conversation/index.js +0 -45
  58. package/lib/CopyButton/index.d.ts +0 -26
  59. package/lib/CopyButton/index.js +0 -66
  60. package/lib/DraggablePanel/index.d.ts +0 -92
  61. package/lib/DraggablePanel/index.js +0 -217
  62. package/lib/DraggablePanel/style.d.ts +0 -18
  63. package/lib/DraggablePanel/style.js +0 -286
  64. package/lib/DraggablePanel/utils.d.ts +0 -2
  65. package/lib/DraggablePanel/utils.js +0 -40
  66. package/lib/EditableMessage/index.d.ts +0 -43
  67. package/lib/EditableMessage/index.js +0 -96
  68. package/lib/EditableMessageList/index.d.ts +0 -9
  69. package/lib/EditableMessageList/index.js +0 -124
  70. package/lib/EditableText/index.d.ts +0 -5
  71. package/lib/EditableText/index.js +0 -56
  72. package/lib/Highlighter/SyntaxHighlighter/Prism.d.ts +0 -7
  73. package/lib/Highlighter/SyntaxHighlighter/Prism.js +0 -41
  74. package/lib/Highlighter/SyntaxHighlighter/index.d.ts +0 -5
  75. package/lib/Highlighter/SyntaxHighlighter/index.js +0 -55
  76. package/lib/Highlighter/SyntaxHighlighter/style.d.ts +0 -5
  77. package/lib/Highlighter/SyntaxHighlighter/style.js +0 -61
  78. package/lib/Highlighter/index.d.ts +0 -36
  79. package/lib/Highlighter/index.js +0 -62
  80. package/lib/Highlighter/style.d.ts +0 -5
  81. package/lib/Highlighter/style.js +0 -104
  82. package/lib/Icon/index.d.ts +0 -21
  83. package/lib/Icon/index.js +0 -52
  84. package/lib/Input/index.d.ts +0 -13
  85. package/lib/Input/index.js +0 -45
  86. package/lib/Input/style.d.ts +0 -6
  87. package/lib/Input/style.js +0 -70
  88. package/lib/List/ListItem/index.d.ts +0 -64
  89. package/lib/List/ListItem/index.js +0 -157
  90. package/lib/List/ListItem/time.d.ts +0 -2
  91. package/lib/List/ListItem/time.js +0 -50
  92. package/lib/List/index.d.ts +0 -5
  93. package/lib/List/index.js +0 -41
  94. package/lib/Logo/Divider.d.ts +0 -3
  95. package/lib/Logo/Divider.js +0 -41
  96. package/lib/Logo/Logo3D.d.ts +0 -3
  97. package/lib/Logo/Logo3D.js +0 -35
  98. package/lib/Logo/LogoFlat.d.ts +0 -3
  99. package/lib/Logo/LogoFlat.js +0 -120
  100. package/lib/Logo/LogoHighContrast.d.ts +0 -3
  101. package/lib/Logo/LogoHighContrast.js +0 -35
  102. package/lib/Logo/LogoText.d.ts +0 -3
  103. package/lib/Logo/LogoText.js +0 -39
  104. package/lib/Logo/index.d.ts +0 -20
  105. package/lib/Logo/index.js +0 -64
  106. package/lib/Logo/style.d.ts +0 -4
  107. package/lib/Logo/style.js +0 -41
  108. package/lib/Markdown/Code.d.ts +0 -3
  109. package/lib/Markdown/Code.js +0 -33
  110. package/lib/Markdown/CodeBlock.d.ts +0 -3
  111. package/lib/Markdown/CodeBlock.js +0 -68
  112. package/lib/Markdown/index.d.ts +0 -13
  113. package/lib/Markdown/index.js +0 -58
  114. package/lib/Markdown/style.d.ts +0 -4
  115. package/lib/Markdown/style.js +0 -134
  116. package/lib/MessageInput/index.d.ts +0 -37
  117. package/lib/MessageInput/index.js +0 -59
  118. package/lib/MessageModal/index.d.ts +0 -11
  119. package/lib/MessageModal/index.js +0 -98
  120. package/lib/SearchBar/index.d.ts +0 -8
  121. package/lib/SearchBar/index.js +0 -77
  122. package/lib/SearchBar/style.d.ts +0 -6
  123. package/lib/SearchBar/style.js +0 -49
  124. package/lib/SideNav/index.d.ts +0 -18
  125. package/lib/SideNav/index.js +0 -34
  126. package/lib/SideNav/style.d.ts +0 -1
  127. package/lib/SideNav/style.js +0 -46
  128. package/lib/Snippet/index.d.ts +0 -29
  129. package/lib/Snippet/index.js +0 -47
  130. package/lib/Snippet/style.d.ts +0 -1
  131. package/lib/Snippet/style.js +0 -74
  132. package/lib/StroyBook/index.d.ts +0 -17
  133. package/lib/StroyBook/index.js +0 -65
  134. package/lib/StroyBook/style.d.ts +0 -8
  135. package/lib/StroyBook/style.js +0 -90
  136. package/lib/Swatches/index.d.ts +0 -8
  137. package/lib/Swatches/index.js +0 -68
  138. package/lib/TabsNav/index.d.ts +0 -22
  139. package/lib/TabsNav/index.js +0 -34
  140. package/lib/TabsNav/style.d.ts +0 -3
  141. package/lib/TabsNav/style.js +0 -65
  142. package/lib/ThemeProvider/GlobalStyle.d.ts +0 -3
  143. package/lib/ThemeProvider/GlobalStyle.js +0 -94
  144. package/lib/ThemeProvider/index.d.ts +0 -22
  145. package/lib/ThemeProvider/index.js +0 -60
  146. package/lib/ThemeSwitch/index.d.ts +0 -27
  147. package/lib/ThemeSwitch/index.js +0 -50
  148. package/lib/Tooltip/index.d.ts +0 -5
  149. package/lib/Tooltip/index.js +0 -34
  150. package/lib/Tooltip/style.d.ts +0 -3
  151. package/lib/Tooltip/style.js +0 -54
  152. package/lib/components/ControlInput.d.ts +0 -9
  153. package/lib/components/ControlInput.js +0 -91
  154. package/lib/hooks/useCopied.d.ts +0 -4
  155. package/lib/hooks/useCopied.js +0 -44
  156. package/lib/hooks/useHighlight.d.ts +0 -36
  157. package/lib/hooks/useHighlight.js +0 -76
  158. package/lib/index.d.ts +0 -27
  159. package/lib/index.js +0 -122
  160. package/lib/styles/algorithms/generateColorPalette.d.ts +0 -11
  161. package/lib/styles/algorithms/generateColorPalette.js +0 -72
  162. package/lib/styles/algorithms/generateCustomStylish.d.ts +0 -17
  163. package/lib/styles/algorithms/generateCustomStylish.js +0 -122
  164. package/lib/styles/algorithms/generateCustomToken.d.ts +0 -3
  165. package/lib/styles/algorithms/generateCustomToken.js +0 -79
  166. package/lib/styles/algorithms/generateTheme.d.ts +0 -5
  167. package/lib/styles/algorithms/generateTheme.js +0 -59
  168. package/lib/styles/colors.d.ts +0 -38
  169. package/lib/styles/colors.js +0 -1828
  170. package/lib/styles/index.d.ts +0 -3
  171. package/lib/styles/index.js +0 -35
  172. package/lib/styles/theme/base.d.ts +0 -2
  173. package/lib/styles/theme/base.js +0 -41
  174. package/lib/styles/theme/dark.d.ts +0 -3
  175. package/lib/styles/theme/dark.js +0 -74
  176. package/lib/styles/theme/light.d.ts +0 -3
  177. package/lib/styles/theme/light.js +0 -74
  178. package/lib/types/customToken.d.ts +0 -1027
  179. package/lib/types/global.d.ts +0 -12
  180. package/lib/types/index.d.ts +0 -6
  181. package/lib/types/index.js +0 -17
  182. package/lib/utils/colorUtils.d.ts +0 -1
  183. package/lib/utils/colorUtils.js +0 -52
@@ -1,91 +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/components/ControlInput.tsx
20
- var ControlInput_exports = {};
21
- __export(ControlInput_exports, {
22
- ControlInput: () => ControlInput
23
- });
24
- module.exports = __toCommonJS(ControlInput_exports);
25
- var import__ = require("../index");
26
- var import_antd = require("antd");
27
- var import_lucide_react = require("lucide-react");
28
- var import_react = require("react");
29
- var ControlInput = (0, import_react.memo)(
30
- ({ value, onChange, onValueChanging, onChangeEnd, ...props }) => {
31
- const [input, setInput] = (0, import_react.useState)(value || "");
32
- const inputRef = (0, import_react.useRef)(null);
33
- const isChineseInput = (0, import_react.useRef)(false);
34
- const isFocusing = (0, import_react.useRef)(false);
35
- const updateValue = (0, import_react.useCallback)(() => {
36
- onChange == null ? void 0 : onChange(input);
37
- }, [input]);
38
- (0, import_react.useEffect)(() => {
39
- if (typeof value !== "undefined")
40
- setInput(value);
41
- }, [value]);
42
- return /* @__PURE__ */ React.createElement(
43
- import__.Input,
44
- {
45
- ref: inputRef,
46
- ...props,
47
- value: input,
48
- onCompositionStart: () => {
49
- isChineseInput.current = true;
50
- },
51
- onCompositionEnd: () => {
52
- isChineseInput.current = false;
53
- },
54
- onFocus: () => {
55
- isFocusing.current = true;
56
- },
57
- onBlur: () => {
58
- isFocusing.current = false;
59
- onChangeEnd == null ? void 0 : onChangeEnd(input);
60
- },
61
- onChange: (e) => {
62
- setInput(e.target.value);
63
- onValueChanging == null ? void 0 : onValueChanging(e.target.value);
64
- },
65
- onPressEnter: (e) => {
66
- if (!e.shiftKey && !isChineseInput.current) {
67
- e.preventDefault();
68
- updateValue();
69
- isFocusing.current = false;
70
- onChangeEnd == null ? void 0 : onChangeEnd(input);
71
- }
72
- },
73
- suffix: value === input ? /* @__PURE__ */ React.createElement("span", null) : /* @__PURE__ */ React.createElement(import_antd.ConfigProvider, { theme: { token: { fontSize: 14 } } }, /* @__PURE__ */ React.createElement(import_antd.Space, { size: 2 }, /* @__PURE__ */ React.createElement(
74
- import__.ActionIcon,
75
- {
76
- title: "Reset",
77
- icon: import_lucide_react.RotateCcw,
78
- size: "small",
79
- onClick: () => {
80
- setInput(value);
81
- }
82
- }
83
- ), /* @__PURE__ */ React.createElement(import__.ActionIcon, { title: "✅ Save", icon: import_lucide_react.Save, size: "small", onClick: updateValue })))
84
- }
85
- );
86
- }
87
- );
88
- // Annotate the CommonJS export names for ESM import in node:
89
- 0 && (module.exports = {
90
- ControlInput
91
- });
@@ -1,4 +0,0 @@
1
- export declare const useCopied: () => {
2
- copied: boolean;
3
- setCopied: () => void;
4
- };
@@ -1,44 +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/hooks/useCopied.ts
20
- var useCopied_exports = {};
21
- __export(useCopied_exports, {
22
- useCopied: () => useCopied
23
- });
24
- module.exports = __toCommonJS(useCopied_exports);
25
- var import_react = require("react");
26
- var useCopied = () => {
27
- const [copied, setCopy] = (0, import_react.useState)(false);
28
- (0, import_react.useEffect)(() => {
29
- if (!copied)
30
- return;
31
- const timer = setTimeout(() => {
32
- setCopy(false);
33
- }, 2e3);
34
- return () => {
35
- clearTimeout(timer);
36
- };
37
- }, [copied]);
38
- const setCopied = (0, import_react.useCallback)(() => setCopy(true), []);
39
- return (0, import_react.useMemo)(() => ({ copied, setCopied }), [copied]);
40
- };
41
- // Annotate the CommonJS export names for ESM import in node:
42
- 0 && (module.exports = {
43
- useCopied
44
- });
@@ -1,36 +0,0 @@
1
- import { Highlighter, Theme } from 'shiki-es';
2
- export interface ShikiSyntaxTheme {
3
- /**
4
- * @title 暗色模式主题
5
- */
6
- dark: Theme;
7
- /**
8
- * @title 亮色模式主题
9
- */
10
- light: Theme;
11
- }
12
- export declare const languageMap: readonly ["javascript", "js", "jsx", "json", "markdown", "md", "less", "css", "typescript", "ts", "tsx", "diff", "bash"];
13
- /**
14
- * @title 代码高亮的存储对象
15
- */
16
- interface Store {
17
- /**
18
- * @title 高亮器对象
19
- */
20
- highlighter?: Highlighter;
21
- /**
22
- * @title 初始化高亮器对象
23
- * @returns 初始化 Promise 对象
24
- */
25
- initHighlighter: () => Promise<void>;
26
- /**
27
- * @title 将代码转化为 HTML 字符串
28
- * @param text - 代码文本
29
- * @param language - 代码语言
30
- * @param isDarkMode - 是否为暗黑模式
31
- * @returns HTML 字符串
32
- */
33
- codeToHtml: (text: string, language: string, isDarkMode: boolean) => string;
34
- }
35
- export declare const useHighlight: import("zustand").UseBoundStore<import("zustand").StoreApi<Store>>;
36
- export {};
@@ -1,76 +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/hooks/useHighlight.ts
20
- var useHighlight_exports = {};
21
- __export(useHighlight_exports, {
22
- languageMap: () => languageMap,
23
- useHighlight: () => useHighlight
24
- });
25
- module.exports = __toCommonJS(useHighlight_exports);
26
- var import_shiki_es = require("shiki-es");
27
- var import_zustand = require("zustand");
28
- var THEME = {
29
- dark: "material-darker",
30
- light: "material-lighter"
31
- };
32
- var languageMap = [
33
- "javascript",
34
- "js",
35
- "jsx",
36
- "json",
37
- "markdown",
38
- "md",
39
- "less",
40
- "css",
41
- "typescript",
42
- "ts",
43
- "tsx",
44
- "diff",
45
- "bash"
46
- ];
47
- var useHighlight = (0, import_zustand.create)((set, get) => ({
48
- highlighter: void 0,
49
- initHighlighter: async () => {
50
- if (!get().highlighter) {
51
- const highlighter = await (0, import_shiki_es.getHighlighter)({
52
- langs: languageMap,
53
- themes: Object.values(THEME)
54
- });
55
- set({ highlighter });
56
- }
57
- },
58
- codeToHtml: (text, language, isDarkMode) => {
59
- const { highlighter } = get();
60
- if (!highlighter)
61
- return "";
62
- try {
63
- return highlighter == null ? void 0 : highlighter.codeToHtml(text, {
64
- lang: language,
65
- theme: isDarkMode ? THEME.dark : THEME.light
66
- });
67
- } catch (e) {
68
- return text;
69
- }
70
- }
71
- }));
72
- // Annotate the CommonJS export names for ESM import in node:
73
- 0 && (module.exports = {
74
- languageMap,
75
- useHighlight
76
- });
package/lib/index.d.ts DELETED
@@ -1,27 +0,0 @@
1
- export { default as ActionIcon, type ActionIconProps, type ActionIconSize } from './ActionIcon';
2
- export { default as Avatar, type AvatarProps } from './Avatar';
3
- export type { ChatMessage } from './Chat';
4
- export { default as ContextMenu, type ContextMenuProps } from './ContextMenu';
5
- export { default as Conversation, type ConversationProps } from './Conversation';
6
- export { default as CopyButton, type CopyButtonProps } from './CopyButton';
7
- export { default as DraggablePanel, type DraggablePanelProps } from './DraggablePanel';
8
- export { default as EditableMessage, type EditableMessageProps } from './EditableMessage';
9
- export { default as EditableMessageList, type EditableMessageListProps, } from './EditableMessageList';
10
- export { default as EditableText, type EditableTextProps } from './EditableText';
11
- export { default as Highlighter, SyntaxHighlighter, type HighlighterProps, type SyntaxHighlighterProps, } from './Highlighter';
12
- export { default as Icon, type IconProps, type IconSize } from './Icon';
13
- export { Input, TextArea, type InputProps, type TextAreaProps } from './Input';
14
- export { default as List } from './List';
15
- export { default as Logo, type LogoProps } from './Logo';
16
- export { default as Markdown, type MarkdownProps } from './Markdown';
17
- export { default as MessageInput, type MessageInputProps } from './MessageInput';
18
- export { default as MessageModal, type MessageModalProps } from './MessageModal';
19
- export { default as SearchBar, type SearchBarProps } from './SearchBar';
20
- export { default as SideNav, type SideNavProps } from './SideNav';
21
- export { default as Snippet, type SnippetProps } from './Snippet';
22
- export { default as StroyBook, useControls, useCreateStore, type StroyBookProps, } from './StroyBook';
23
- export { default as Swatches, type SwatchesProps } from './Swatches';
24
- export { default as TabsNav, type TabsNavProps } from './TabsNav';
25
- export { default as ThemeProvider } from './ThemeProvider';
26
- export { default as ThemeSwitch, type ThemeSwitchProps } from './ThemeSwitch';
27
- export { default as Tooltip, type TooltipProps } from './Tooltip';
package/lib/index.js DELETED
@@ -1,122 +0,0 @@
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/index.ts
30
- var src_exports = {};
31
- __export(src_exports, {
32
- ActionIcon: () => import_ActionIcon.default,
33
- Avatar: () => import_Avatar.default,
34
- ContextMenu: () => import_ContextMenu.default,
35
- Conversation: () => import_Conversation.default,
36
- CopyButton: () => import_CopyButton.default,
37
- DraggablePanel: () => import_DraggablePanel.default,
38
- EditableMessage: () => import_EditableMessage.default,
39
- EditableMessageList: () => import_EditableMessageList.default,
40
- EditableText: () => import_EditableText.default,
41
- Highlighter: () => import_Highlighter.default,
42
- Icon: () => import_Icon.default,
43
- Input: () => import_Input.Input,
44
- List: () => import_List.default,
45
- Logo: () => import_Logo.default,
46
- Markdown: () => import_Markdown.default,
47
- MessageInput: () => import_MessageInput.default,
48
- MessageModal: () => import_MessageModal.default,
49
- SearchBar: () => import_SearchBar.default,
50
- SideNav: () => import_SideNav.default,
51
- Snippet: () => import_Snippet.default,
52
- StroyBook: () => import_StroyBook.default,
53
- Swatches: () => import_Swatches.default,
54
- SyntaxHighlighter: () => import_Highlighter.SyntaxHighlighter,
55
- TabsNav: () => import_TabsNav.default,
56
- TextArea: () => import_Input.TextArea,
57
- ThemeProvider: () => import_ThemeProvider.default,
58
- ThemeSwitch: () => import_ThemeSwitch.default,
59
- Tooltip: () => import_Tooltip.default,
60
- useControls: () => import_StroyBook.useControls,
61
- useCreateStore: () => import_StroyBook.useCreateStore
62
- });
63
- module.exports = __toCommonJS(src_exports);
64
- var import_ActionIcon = __toESM(require("./ActionIcon"));
65
- var import_Avatar = __toESM(require("./Avatar"));
66
- var import_ContextMenu = __toESM(require("./ContextMenu"));
67
- var import_Conversation = __toESM(require("./Conversation"));
68
- var import_CopyButton = __toESM(require("./CopyButton"));
69
- var import_DraggablePanel = __toESM(require("./DraggablePanel"));
70
- var import_EditableMessage = __toESM(require("./EditableMessage"));
71
- var import_EditableMessageList = __toESM(require("./EditableMessageList"));
72
- var import_EditableText = __toESM(require("./EditableText"));
73
- var import_Highlighter = __toESM(require("./Highlighter"));
74
- var import_Icon = __toESM(require("./Icon"));
75
- var import_Input = require("./Input");
76
- var import_List = __toESM(require("./List"));
77
- var import_Logo = __toESM(require("./Logo"));
78
- var import_Markdown = __toESM(require("./Markdown"));
79
- var import_MessageInput = __toESM(require("./MessageInput"));
80
- var import_MessageModal = __toESM(require("./MessageModal"));
81
- var import_SearchBar = __toESM(require("./SearchBar"));
82
- var import_SideNav = __toESM(require("./SideNav"));
83
- var import_Snippet = __toESM(require("./Snippet"));
84
- var import_StroyBook = __toESM(require("./StroyBook"));
85
- var import_Swatches = __toESM(require("./Swatches"));
86
- var import_TabsNav = __toESM(require("./TabsNav"));
87
- var import_ThemeProvider = __toESM(require("./ThemeProvider"));
88
- var import_ThemeSwitch = __toESM(require("./ThemeSwitch"));
89
- var import_Tooltip = __toESM(require("./Tooltip"));
90
- // Annotate the CommonJS export names for ESM import in node:
91
- 0 && (module.exports = {
92
- ActionIcon,
93
- Avatar,
94
- ContextMenu,
95
- Conversation,
96
- CopyButton,
97
- DraggablePanel,
98
- EditableMessage,
99
- EditableMessageList,
100
- EditableText,
101
- Highlighter,
102
- Icon,
103
- Input,
104
- List,
105
- Logo,
106
- Markdown,
107
- MessageInput,
108
- MessageModal,
109
- SearchBar,
110
- SideNav,
111
- Snippet,
112
- StroyBook,
113
- Swatches,
114
- SyntaxHighlighter,
115
- TabsNav,
116
- TextArea,
117
- ThemeProvider,
118
- ThemeSwitch,
119
- Tooltip,
120
- useControls,
121
- useCreateStore
122
- });
@@ -1,11 +0,0 @@
1
- import { ColorScaleItem } from "../colors";
2
- import { AliasToken } from 'antd/es/theme/interface';
3
- export declare const generateColorPalette: ({ type, scale, appearance, }: {
4
- type: 'Primary' | 'Success' | 'Warning' | 'Error' | 'Info' | string;
5
- scale: ColorScaleItem;
6
- appearance: 'light' | 'dark';
7
- }) => Partial<AliasToken>;
8
- export declare const generateColorNeutralPalette: ({ scale, appearance, }: {
9
- scale: ColorScaleItem;
10
- appearance: 'light' | 'dark';
11
- }) => Partial<AliasToken>;
@@ -1,72 +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/styles/algorithms/generateColorPalette.ts
20
- var generateColorPalette_exports = {};
21
- __export(generateColorPalette_exports, {
22
- generateColorNeutralPalette: () => generateColorNeutralPalette,
23
- generateColorPalette: () => generateColorPalette
24
- });
25
- module.exports = __toCommonJS(generateColorPalette_exports);
26
- var import_lodash = require("lodash");
27
- var generateColorPalette = ({
28
- type,
29
- scale,
30
- appearance
31
- }) => {
32
- const name = (0, import_lodash.capitalize)(type);
33
- return {
34
- [`color${name}Bg`]: scale[appearance][1],
35
- [`color${name}BgHover`]: scale[appearance][2],
36
- [`color${name}Border`]: scale[appearance][4],
37
- [`color${name}BorderHover`]: scale[appearance][5],
38
- [`color${name}Hover`]: scale[appearance][10],
39
- [`color${name}`]: scale[appearance][9],
40
- [`color${name}Active`]: scale[appearance][7],
41
- [`color${name}TextHover`]: scale[appearance][10],
42
- [`color${name}Text`]: scale[appearance][9],
43
- [`color${name}Active`]: scale[appearance][7]
44
- };
45
- };
46
- var generateColorNeutralPalette = ({
47
- scale,
48
- appearance
49
- }) => {
50
- return {
51
- colorText: scale[appearance][12],
52
- colorTextSecondary: scale[appearance][10],
53
- colorTextTertiary: scale[appearance][8],
54
- colorTextQuaternary: scale[appearance][6],
55
- colorBorder: scale[`${appearance}A`][4],
56
- colorBorderSecondary: scale[`${appearance}A`][3],
57
- colorFill: scale[`${appearance}A`][3],
58
- colorFillSecondary: scale[`${appearance}A`][2],
59
- colorFillTertiary: scale[`${appearance}A`][1],
60
- colorFillQuaternary: scale[`${appearance}A`][0],
61
- colorBgContainer: appearance === "dark" ? scale[appearance][1] : scale[appearance][0],
62
- colorBgElevated: appearance === "dark" ? scale[appearance][2] : scale[appearance][0],
63
- colorBgLayout: appearance === "dark" ? scale[appearance][0] : scale[appearance][1],
64
- colorBgSpotlight: scale[appearance][5],
65
- colorBgMask: scale.lightA[8]
66
- };
67
- };
68
- // Annotate the CommonJS export names for ESM import in node:
69
- 0 && (module.exports = {
70
- generateColorNeutralPalette,
71
- generateColorPalette
72
- });
@@ -1,17 +0,0 @@
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 generateCustomStylish: GetCustomStylish<SiteStylish>;
@@ -1,122 +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/styles/algorithms/generateCustomStylish.ts
20
- var generateCustomStylish_exports = {};
21
- __export(generateCustomStylish_exports, {
22
- generateCustomStylish: () => generateCustomStylish
23
- });
24
- module.exports = __toCommonJS(generateCustomStylish_exports);
25
- var import_polished = require("polished");
26
- var generateCustomStylish = ({
27
- css,
28
- token,
29
- isDarkMode
30
- }) => {
31
- return {
32
- clickableText: css`
33
- cursor: pointer;
34
- color: ${token.colorTextSecondary};
35
-
36
- &:hover {
37
- color: ${token.colorText};
38
- }
39
- `,
40
- resetLinkColor: css`
41
- color: inherit;
42
-
43
- &:hover,
44
- &:active {
45
- color: inherit;
46
- }
47
- `,
48
- heroButtonGradient: css`
49
- background: linear-gradient(90deg, ${token.gradientColor1} 0%, ${token.gradientColor2} 100%);
50
- `,
51
- heroGradient: css`
52
- background-image: ${token.gradientHeroBgG};
53
- background-size: 300% 300%;
54
- `,
55
- heroGradientFlow: css`
56
- animation: flow 5s ease infinite;
57
-
58
- @keyframes flow {
59
- 0% {
60
- background-position: 0 0;
61
- }
62
-
63
- 50% {
64
- background-position: 100% 100%;
65
- }
66
-
67
- 100% {
68
- background-position: 0 0;
69
- }
70
- }
71
- `,
72
- heroTextShadow: css`
73
- will-change: transform;
74
- text-shadow: 0 8px 20px ${(0, import_polished.rgba)(token.gradientColor2, 0.2)},
75
- 0 8px 60px ${(0, import_polished.rgba)(token.gradientColor3, 0.2)},
76
- 0 8px 80px ${(0, import_polished.rgba)(token.cyan, isDarkMode ? 0.2 : 0.4)};
77
- `,
78
- heroBlurBall: css`
79
- will-change: transform;
80
-
81
- background: linear-gradient(
82
- 135deg,
83
- ${token.gradientColor3} 0%,
84
- ${token.gradientColor1} 30%,
85
- ${token.red} 70%,
86
- ${token.cyan} 100%
87
- );
88
- background-size: 200% 200%;
89
- filter: blur(69px);
90
-
91
- animation: glow 10s ease infinite;
92
-
93
- @keyframes glow {
94
- 0% {
95
- background-position: 0 -100%;
96
- }
97
-
98
- 50% {
99
- background-position: 200% 50%;
100
- }
101
-
102
- 100% {
103
- background-position: 0 -100%;
104
- }
105
- }
106
- `,
107
- iconGradientDefault: css`
108
- background-image: radial-gradient(
109
- 100% 100% at 50% 0,
110
- ${(0, import_polished.rgba)(token.colorSolid, 0.2)} 0,
111
- ${(0, import_polished.rgba)(token.colorSolid, 0.1)} 100%
112
- );
113
- `,
114
- blur: css`
115
- backdrop-filter: blur(7px);
116
- `
117
- };
118
- };
119
- // Annotate the CommonJS export names for ESM import in node:
120
- 0 && (module.exports = {
121
- generateCustomStylish
122
- });
@@ -1,3 +0,0 @@
1
- import { LobeCustomToken } from "../../types/customToken";
2
- import { GetCustomToken } from 'antd-style';
3
- export declare const generateCustomToken: GetCustomToken<LobeCustomToken>;