@lobehub/ui 1.161.0 → 1.162.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/es/Avatar/index.js +3 -2
- package/es/Highlighter/FullFeatured.d.ts +6 -3
- package/es/Highlighter/FullFeatured.js +6 -21
- package/es/Highlighter/SyntaxHighlighter/index.d.ts +1 -0
- package/es/Highlighter/SyntaxHighlighter/index.js +3 -5
- package/es/Highlighter/index.js +6 -2
- package/es/Highlighter/theme.js +7 -8
- package/es/Highlighter/type.d.ts +1 -0
- package/es/Markdown/CodeBlock.js +2 -2
- package/es/Mermaid/index.js +4 -3
- package/es/awesome/Giscus/index.js +4 -10
- package/es/awesome/Giscus/style.d.ts +1 -2
- package/es/awesome/Giscus/style.js +18 -14
- package/es/{ColorScales → color/ColorScales}/ScaleRow.js +1 -1
- package/es/{ColorScales → color/ColorScales}/index.d.ts +1 -1
- package/es/color/colors/blue.d.ts +3 -0
- package/es/color/colors/blue.js +7 -0
- package/es/color/colors/cyan.d.ts +3 -0
- package/es/color/colors/cyan.js +7 -0
- package/es/color/colors/geekblue.d.ts +3 -0
- package/es/color/colors/geekblue.js +7 -0
- package/es/color/colors/gold.d.ts +3 -0
- package/es/color/colors/gold.js +7 -0
- package/es/color/colors/gray.d.ts +3 -0
- package/es/color/colors/gray.js +7 -0
- package/es/color/colors/green.d.ts +3 -0
- package/es/color/colors/green.js +7 -0
- package/es/color/colors/index.d.ts +33 -0
- package/es/color/colors/index.js +45 -0
- package/es/color/colors/lime.d.ts +3 -0
- package/es/color/colors/lime.js +7 -0
- package/es/color/colors/magenta.d.ts +3 -0
- package/es/color/colors/magenta.js +7 -0
- package/es/color/colors/orange.d.ts +3 -0
- package/es/color/colors/orange.js +7 -0
- package/es/color/colors/primary.d.ts +3 -0
- package/es/color/colors/primary.js +7 -0
- package/es/color/colors/purple.d.ts +3 -0
- package/es/color/colors/purple.js +7 -0
- package/es/color/colors/red.d.ts +3 -0
- package/es/color/colors/red.js +7 -0
- package/es/color/colors/volcano.d.ts +3 -0
- package/es/color/colors/volcano.js +7 -0
- package/es/color/colors/yellow.d.ts +3 -0
- package/es/color/colors/yellow.js +7 -0
- package/es/color/index.d.ts +4 -0
- package/es/color/index.js +4 -0
- package/es/color/neutrals/index.d.ts +15 -0
- package/es/color/neutrals/index.js +18 -0
- package/es/color/neutrals/mauve.d.ts +3 -0
- package/es/color/neutrals/mauve.js +7 -0
- package/es/color/neutrals/olive.d.ts +3 -0
- package/es/color/neutrals/olive.js +7 -0
- package/es/color/neutrals/sage.d.ts +3 -0
- package/es/color/neutrals/sage.js +7 -0
- package/es/color/neutrals/sand.d.ts +3 -0
- package/es/color/neutrals/sand.js +7 -0
- package/es/color/neutrals/slate.d.ts +3 -0
- package/es/color/neutrals/slate.js +7 -0
- package/es/color/types.d.ts +22 -0
- package/es/color/types.js +1 -0
- package/es/components.d.ts +1 -1
- package/es/components.js +2 -2
- package/es/hooks/useChatListActionsBar.js +28 -25
- package/es/hooks/useHighlight.d.ts +1 -1
- package/es/hooks/useHighlight.js +27 -11
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/styles/customTheme.js +19 -19
- package/es/styles/index.d.ts +1 -4
- package/es/styles/index.js +2 -5
- package/es/styles/theme/algorithms/darkAlgorithm.js +3 -2
- package/es/styles/theme/algorithms/lightAlgorithm.js +3 -2
- package/es/styles/theme/antdTheme.d.ts +1 -1
- package/es/styles/theme/customToken.js +1 -1
- package/es/styles/{colors → theme}/generateColorPalette.d.ts +1 -1
- package/es/styles/theme/token/dark.js +8 -8
- package/es/styles/theme/token/light.js +8 -8
- package/package.json +1 -1
- package/es/styles/colors/colors.d.ts +0 -39
- package/es/styles/colors/colors.js +0 -86
- package/es/styles/colors/neutralColors.d.ts +0 -9
- package/es/styles/colors/neutralColors.js +0 -32
- /package/es/{ColorScales → color/ColorScales}/ScaleRow.d.ts +0 -0
- /package/es/{ColorScales → color/ColorScales}/index.js +0 -0
- /package/es/{ColorScales → color/ColorScales}/style.d.ts +0 -0
- /package/es/{ColorScales → color/ColorScales}/style.js +0 -0
- /package/es/styles/{colors → theme}/generateColorPalette.js +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
var primary = {
|
|
2
|
+
dark: ['#000000', '#111111', '#333333', '#555555', '#666666', '#888888', '#aaaaaa', '#cccccc', '#dddddd', '#eeeeee', '#ffffff', '#ffffff', '#ffffff'],
|
|
3
|
+
darkA: ['rgba(255, 255, 255, 0.02)', 'rgba(255, 255, 255, 0.08)', 'rgba(255, 255, 255, 0.16)', 'rgba(255, 255, 255, 0.22)', 'rgba(255, 255, 255, 0.36)', 'rgba(255, 255, 255, 0.48)', 'rgba(255, 255, 255, 0.6)', 'rgba(255, 255, 255, 0.72)', 'rgba(255, 255, 255, 0.84)', 'rgba(255, 255, 255, 0.88)', 'rgba(255, 255, 255, 0.92)', 'rgba(255, 255, 255, 0.96)', 'rgba(255, 255, 255, 0.98)'],
|
|
4
|
+
light: ['#ffffff', '#f5f5f5', '#eeeeee', '#cccccc', '#aaaaaa', '#888888', '#666666', '#444444', '#333333', '#222222', '#111111', '#0b0b0b', '#000000'],
|
|
5
|
+
lightA: ['rgba(0, 0, 0, 0.02)', 'rgba(0, 0, 0, 0.08)', 'rgba(0, 0, 0, 0.16)', 'rgba(0, 0, 0, 0.22)', 'rgba(0, 0, 0, 0.36)', 'rgba(0, 0, 0, 0.48)', 'rgba(0, 0, 0, 0.6)', 'rgba(0, 0, 0, 0.72)', 'rgba(0, 0, 0, 0.84)', 'rgba(0, 0, 0, 0.88)', 'rgba(0, 0, 0, 0.92)', 'rgba(0, 0, 0, 0.96)', 'rgba(0, 0, 0, 0.98)']
|
|
6
|
+
};
|
|
7
|
+
export default primary;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
var purple = {
|
|
2
|
+
dark: ['#0d000b', '#2e002a', '#42003e', '#560053', '#670e66', '#781e78', '#892b8a', '#9a399e', '#ab46b2', '#bd54c6', '#d590da', '#edc7ee', '#ffffff'],
|
|
3
|
+
darkA: ['rgba(217, 0, 183, 0.06)', 'rgba(242, 0, 221, 0.19)', 'rgba(254, 0, 238, 0.26)', 'rgba(253, 0, 244, 0.34)', 'rgba(251, 34, 249, 0.41)', 'rgba(255, 64, 255, 0.47)', 'rgba(249, 78, 251, 0.55)', 'rgba(248, 92, 255, 0.62)', 'rgba(244, 100, 254, 0.7)', 'rgba(242, 108, 254, 0.78)', 'rgba(248, 167, 253, 0.86)', 'rgba(252, 212, 253, 0.94)', '#ffffff'],
|
|
4
|
+
light: ['#ffffff', '#fff6fb', '#ffe7fd', '#fdd6fe', '#f6c4f8', '#eeb1f1', '#e49ce8', '#d886de', '#cb6ed2', '#bd54c6', '#892b8a', '#560053', '#0d000b'],
|
|
5
|
+
lightA: ['rgba(255, 255, 255, 0.01)', 'rgba(255, 30, 155, 0.04)', 'rgba(255, 15, 235, 0.1)', 'rgba(243, 14, 249, 0.17)', 'rgba(218, 9, 226, 0.24)', 'rgba(200, 3, 210, 0.31)', 'rgba(186, 1, 196, 0.39)', 'rgba(174, 3, 186, 0.48)', 'rgba(164, 1, 176, 0.57)', 'rgba(156, 0, 170, 0.67)', 'rgba(113, 0, 114, 0.83)', '#560053', '#0d000b']
|
|
6
|
+
};
|
|
7
|
+
export default purple;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
var red = {
|
|
2
|
+
dark: ['#0f0003', '#380015', '#560023', '#780032', '#9d0042', '#c10251', '#d6225d', '#e43165', '#ee3a6a', '#f4416c', '#ffb0b7', '#ffe8e8', '#ffffff'],
|
|
3
|
+
darkA: ['rgba(250, 0, 50, 0.06)', 'rgba(255, 0, 95, 0.22)', 'rgba(253, 0, 103, 0.34)', 'rgba(255, 0, 106, 0.47)', 'rgba(253, 0, 106, 0.62)', 'rgba(254, 3, 107, 0.76)', 'rgba(255, 40, 111, 0.84)', 'rgba(253, 54, 112, 0.9)', 'rgba(253, 62, 113, 0.94)', 'rgba(254, 68, 112, 0.96)', '#ffb0b7', '#ffe8e8', '#ffffff'],
|
|
4
|
+
light: ['#ffffff', '#fffbff', '#fff3f3', '#ffe8e8', '#ffdadb', '#ffc7ca', '#ffb0b7', '#ff94a1', '#ff6f87', '#f4416c', '#d6225d', '#780032', '#0f0003'],
|
|
5
|
+
lightA: ['rgba(255, 255, 255, 0.01)', 'rgba(255, 55, 255, 0.02)', 'rgba(255, 15, 15, 0.05)', 'rgba(255, 25, 25, 0.1)', 'rgba(255, 8, 15, 0.15)', 'rgba(255, 0, 14, 0.22)', 'rgba(255, 0, 23, 0.31)', 'rgba(255, 0, 31, 0.42)', 'rgba(255, 2, 44, 0.57)', 'rgba(240, 2, 59, 0.75)', 'rgba(208, 1, 69, 0.87)', '#780032', '#0f0003']
|
|
6
|
+
};
|
|
7
|
+
export default red;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
var volcano = {
|
|
2
|
+
dark: ['#0c0100', '#2f0a00', '#451200', '#5d1900', '#762000', '#8e2a07', '#a53716', '#bc4424', '#d45132', '#ec5e41', '#ff9480', '#ffcbc3', '#ffffff'],
|
|
3
|
+
darkA: ['rgba(240, 20, 0, 0.05)', 'rgba(247, 53, 0, 0.19)', 'rgba(246, 64, 0, 0.28)', 'rgba(251, 68, 0, 0.37)', 'rgba(251, 68, 0, 0.47)', 'rgba(254, 75, 12, 0.56)', 'rgba(254, 85, 34, 0.65)', 'rgba(254, 92, 49, 0.74)', 'rgba(255, 98, 60, 0.83)', 'rgba(254, 101, 70, 0.93)', '#ff9480', '#ffcbc3', '#ffffff'],
|
|
4
|
+
light: ['#ffffff', '#fff7f6', '#ffece9', '#ffded9', '#ffcec5', '#ffbbaf', '#ffa695', '#ff8e78', '#fb745a', '#ec5e41', '#a53716', '#5d1900', '#0c0100'],
|
|
5
|
+
lightA: ['rgba(255, 255, 255, 0.01)', 'rgba(255, 55, 30, 0.04)', 'rgba(255, 44, 11, 0.09)', 'rgba(255, 35, 2, 0.15)', 'rgba(255, 42, 3, 0.23)', 'rgba(255, 43, 5, 0.32)', 'rgba(255, 43, 3, 0.42)', 'rgba(255, 42, 0, 0.53)', 'rgba(249, 41, 1, 0.65)', 'rgba(230, 40, 2, 0.75)', 'rgba(157, 38, 2, 0.92)', '#5d1900', '#0c0100']
|
|
6
|
+
};
|
|
7
|
+
export default volcano;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
var yellow = {
|
|
2
|
+
dark: ['#050400', '#251d00', '#3e3300', '#584a00', '#736300', '#8e7d00', '#ab9800', '#c7b426', '#e3d142', '#ffef5c', '#fff594', '#fffad3', '#ffffff'],
|
|
3
|
+
darkA: ['rgba(250, 200, 0, 0.02)', 'rgba(247, 193, 0, 0.15)', 'rgba(248, 204, 0, 0.25)', 'rgba(251, 211, 0, 0.35)', 'rgba(250, 215, 0, 0.46)', 'rgba(254, 223, 0, 0.56)', 'rgba(255, 227, 0, 0.67)', 'rgba(255, 231, 49, 0.78)', 'rgba(255, 235, 74, 0.89)', '#ffef5c', '#fff594', '#fffad3', '#ffffff'],
|
|
4
|
+
light: ['#ffffff', '#fffeff', '#fffcff', '#fffbf1', '#fffada', '#fff9c2', '#fff7aa', '#fff592', '#fff279', '#ffef5c', '#ab9800', '#584a00', '#050400'],
|
|
5
|
+
lightA: ['rgba(255, 255, 255, 0.01)', 'rgba(255, 155, 255, 0.01)', 'rgba(255, 105, 255, 0.02)', 'rgba(255, 188, 22, 0.06)', 'rgba(255, 222, 8, 0.15)', 'rgba(255, 230, 1, 0.24)', 'rgba(255, 231, 5, 0.34)', 'rgba(255, 232, 2, 0.43)', 'rgba(255, 230, 2, 0.53)', 'rgba(255, 230, 0, 0.64)', '#ab9800', '#584a00', '#050400']
|
|
6
|
+
};
|
|
7
|
+
export default yellow;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ColorScaleItem } from "../types";
|
|
2
|
+
export interface NeutralColorScales {
|
|
3
|
+
mauve: ColorScaleItem;
|
|
4
|
+
olive: ColorScaleItem;
|
|
5
|
+
sage: ColorScaleItem;
|
|
6
|
+
sand: ColorScaleItem;
|
|
7
|
+
slate: ColorScaleItem;
|
|
8
|
+
}
|
|
9
|
+
export declare const neutralColorScales: NeutralColorScales;
|
|
10
|
+
export { neutralColorScales as neutrals };
|
|
11
|
+
export { default as mauve } from './mauve';
|
|
12
|
+
export { default as olive } from './olive';
|
|
13
|
+
export { default as sage } from './sage';
|
|
14
|
+
export { default as sand } from './sand';
|
|
15
|
+
export { default as slate } from './slate';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import mauve from "./mauve";
|
|
2
|
+
import olive from "./olive";
|
|
3
|
+
import sage from "./sage";
|
|
4
|
+
import sand from "./sand";
|
|
5
|
+
import slate from "./slate";
|
|
6
|
+
export var neutralColorScales = {
|
|
7
|
+
mauve: mauve,
|
|
8
|
+
olive: olive,
|
|
9
|
+
sage: sage,
|
|
10
|
+
sand: sand,
|
|
11
|
+
slate: slate
|
|
12
|
+
};
|
|
13
|
+
export { neutralColorScales as neutrals };
|
|
14
|
+
export { default as mauve } from "./mauve";
|
|
15
|
+
export { default as olive } from "./olive";
|
|
16
|
+
export { default as sage } from "./sage";
|
|
17
|
+
export { default as sand } from "./sand";
|
|
18
|
+
export { default as slate } from "./slate";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
var mauve = {
|
|
2
|
+
dark: ['#1c1b1e', '#252528', '#2f2f32', '#3a393d', '#454448', '#504f53', '#5b5a5f', '#67666a', '#737177', '#7f7d83', '#bbb9bd', '#fcf8fb', '#ffffff'],
|
|
3
|
+
darkA: ['rgba(233, 225, 250, 0.12)', 'rgba(231, 231, 250, 0.16)', 'rgba(235, 235, 250, 0.2)', 'rgba(242, 237, 254, 0.24)', 'rgba(238, 234, 248, 0.29)', 'rgba(242, 239, 252, 0.33)', 'rgba(239, 237, 250, 0.38)', 'rgba(245, 243, 252, 0.42)', 'rgba(245, 240, 253, 0.47)', 'rgba(244, 240, 252, 0.52)', 'rgba(253, 250, 255, 0.74)', 'rgba(255, 251, 254, 0.99)', '#ffffff'],
|
|
4
|
+
light: ['#fcf8fb', '#edeaed', '#dfdcdf', '#d1ced2', '#c2c0c4', '#b4b2b7', '#a7a4a9', '#99979c', '#8c8a90', '#7f7d83', '#4a494d', '#1c1b1e', '#111'],
|
|
5
|
+
lightA: ['rgba(155, 22, 122, 0.03)', 'rgba(55, 22, 55, 0.09)', 'rgba(26, 5, 26, 0.14)', 'rgba(25, 10, 30, 0.2)', 'rgba(11, 3, 19, 0.25)', 'rgba(13, 7, 23, 0.31)', 'rgba(11, 2, 16, 0.36)', 'rgba(6, 1, 14, 0.41)', 'rgba(5, 1, 14, 0.46)', 'rgba(4, 0, 12, 0.51)', 'rgba(4, 2, 8, 0.72)', 'rgba(3, 2, 5, 0.9)', '#111']
|
|
6
|
+
};
|
|
7
|
+
export default mauve;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
var olive = {
|
|
2
|
+
dark: ['#1a1c1b', '#232624', '#2d302e', '#383a38', '#424542', '#4d504d', '#585c58', '#646763', '#70736e', '#7c7f79', '#b9bab5', '#faf9f4', '#ffffff'],
|
|
3
|
+
darkA: ['rgba(236, 255, 245, 0.11)', 'rgba(233, 253, 240, 0.15)', 'rgba(237, 253, 242, 0.19)', 'rgba(243, 252, 243, 0.23)', 'rgba(236, 246, 236, 0.28)', 'rgba(241, 250, 241, 0.32)', 'rgba(238, 249, 238, 0.37)', 'rgba(244, 251, 241, 0.41)', 'rgba(243, 250, 239, 0.46)', 'rgba(248, 254, 242, 0.5)', 'rgba(253, 255, 248, 0.73)', 'rgba(255, 254, 249, 0.98)', '#ffffff'],
|
|
4
|
+
light: ['#faf9f4', '#ecebe6', '#ddddd7', '#cfcfc9', '#c0c1bb', '#b2b4ae', '#a4a6a0', '#969993', '#898c86', '#7c7f79', '#484b48', '#1a1c1b', '#111'],
|
|
5
|
+
lightA: ['rgba(155, 135, 35, 0.05)', 'rgba(65, 55, 5, 0.1)', 'rgba(43, 43, 5, 0.16)', 'rgba(37, 37, 10, 0.22)', 'rgba(22, 25, 3, 0.27)', 'rgba(14, 21, 2, 0.32)', 'rgba(16, 21, 5, 0.38)', 'rgba(11, 18, 4, 0.43)', 'rgba(9, 15, 3, 0.48)', 'rgba(8, 13, 2, 0.53)', 'rgba(1, 5, 1, 0.72)', 'rgba(1, 3, 2, 0.9)', '#111']
|
|
6
|
+
};
|
|
7
|
+
export default olive;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
var sage = {
|
|
2
|
+
dark: ['#1a1c1b', '#232624', '#2d302e', '#383a38', '#424542', '#4d504d', '#585c58', '#646763', '#70736e', '#7c7f79', '#b9bab5', '#faf9f4', '#ffffff'],
|
|
3
|
+
darkA: ['rgba(236, 255, 245, 0.11)', 'rgba(233, 253, 240, 0.15)', 'rgba(237, 253, 242, 0.19)', 'rgba(243, 252, 243, 0.23)', 'rgba(236, 246, 236, 0.28)', 'rgba(241, 250, 241, 0.32)', 'rgba(238, 249, 238, 0.37)', 'rgba(244, 251, 241, 0.41)', 'rgba(243, 250, 239, 0.46)', 'rgba(248, 254, 242, 0.5)', 'rgba(253, 255, 248, 0.73)', 'rgba(255, 254, 249, 0.98)', '#ffffff'],
|
|
4
|
+
light: ['#faf9f4', '#ecebe6', '#ddddd7', '#cfcfc9', '#c0c1bb', '#b2b4ae', '#a4a6a0', '#969993', '#898c86', '#7c7f79', '#484b48', '#1a1c1b', '#111'],
|
|
5
|
+
lightA: ['rgba(155, 135, 35, 0.05)', 'rgba(65, 55, 5, 0.1)', 'rgba(43, 43, 5, 0.16)', 'rgba(37, 37, 10, 0.22)', 'rgba(22, 25, 3, 0.27)', 'rgba(14, 21, 2, 0.32)', 'rgba(16, 21, 5, 0.38)', 'rgba(11, 18, 4, 0.43)', 'rgba(9, 15, 3, 0.48)', 'rgba(8, 13, 2, 0.53)', 'rgba(1, 5, 1, 0.72)', 'rgba(1, 3, 2, 0.9)', '#111']
|
|
6
|
+
};
|
|
7
|
+
export default sage;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
var sand = {
|
|
2
|
+
dark: ['#1c1c18', '#262521', '#30302b', '#3a3a35', '#45453f', '#505049', '#5c5b54', '#67675f', '#73726a', '#7f7e76', '#bcbab2', '#fcf9f3', '#ffffff'],
|
|
3
|
+
darkA: ['rgba(255, 255, 218, 0.11)', 'rgba(253, 247, 220, 0.15)', 'rgba(253, 253, 226, 0.19)', 'rgba(252, 252, 230, 0.23)', 'rgba(246, 246, 225, 0.28)', 'rgba(250, 250, 228, 0.32)', 'rgba(249, 246, 227, 0.37)', 'rgba(251, 251, 232, 0.41)', 'rgba(250, 248, 230, 0.46)', 'rgba(254, 252, 236, 0.5)', 'rgba(254, 251, 241, 0.74)', 'rgba(255, 252, 245, 0.99)', '#ffffff'],
|
|
4
|
+
light: ['#fcf9f3', '#edebe4', '#dfddd5', '#d1cfc7', '#c3c1b9', '#b5b3ab', '#a7a69d', '#999890', '#8c8b83', '#7f7e76', '#4b4a44', '#1c1c18', '#111'],
|
|
5
|
+
lightA: ['rgba(195, 135, 15, 0.05)', 'rgba(91, 73, 10, 0.11)', 'rgba(67, 55, 8, 0.17)', 'rgba(46, 37, 0, 0.22)', 'rgba(41, 34, 5, 0.28)', 'rgba(31, 25, 0, 0.33)', 'rgba(29, 27, 4, 0.39)', 'rgba(23, 21, 3, 0.44)', 'rgba(20, 18, 2, 0.49)', 'rgba(18, 16, 1, 0.54)', 'rgba(12, 10, 2, 0.74)', 'rgba(6, 6, 1, 0.91)', '#111']
|
|
6
|
+
};
|
|
7
|
+
export default sand;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
var slate = {
|
|
2
|
+
dark: ['#1b1c1d', '#242527', '#2e2f32', '#383a3c', '#434547', '#4e5052', '#595b5e', '#64676a', '#707276', '#7b7e82', '#b8babc', '#f9f9fa', '#ffffff'],
|
|
3
|
+
darkA: ['rgba(225, 233, 242, 0.12)', 'rgba(225, 231, 244, 0.16)', 'rgba(230, 235, 250, 0.2)', 'rgba(233, 242, 250, 0.24)', 'rgba(239, 246, 254, 0.28)', 'rgba(236, 242, 248, 0.33)', 'rgba(241, 246, 254, 0.37)', 'rgba(238, 245, 252, 0.42)', 'rgba(238, 243, 251, 0.47)', 'rgba(241, 247, 255, 0.51)', 'rgba(249, 251, 254, 0.74)', 'rgba(254, 254, 255, 0.98)', '#ffffff'],
|
|
4
|
+
light: ['#f9f9fa', '#ebebec', '#dcddde', '#cecfd0', '#bfc1c3', '#b1b3b5', '#a4a6a8', '#96989b', '#898b8e', '#7b7e82', '#484a4d', '#1b1c1d', '#111'],
|
|
5
|
+
lightA: ['rgba(55, 55, 88, 0.03)', 'rgba(5, 5, 17, 0.08)', 'rgba(5, 12, 19, 0.14)', 'rgba(10, 15, 20, 0.2)', 'rgba(9, 17, 24, 0.26)', 'rgba(3, 10, 16, 0.31)', 'rgba(2, 8, 13, 0.36)', 'rgba(5, 10, 17, 0.42)', 'rgba(4, 8, 15, 0.47)', 'rgba(1, 7, 15, 0.52)', 'rgba(1, 4, 8, 0.72)', 'rgba(2, 3, 4, 0.9)', '#111']
|
|
6
|
+
};
|
|
7
|
+
export default slate;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type colorStep = [
|
|
2
|
+
string,
|
|
3
|
+
string,
|
|
4
|
+
string,
|
|
5
|
+
string,
|
|
6
|
+
string,
|
|
7
|
+
string,
|
|
8
|
+
string,
|
|
9
|
+
string,
|
|
10
|
+
string,
|
|
11
|
+
string,
|
|
12
|
+
string,
|
|
13
|
+
string,
|
|
14
|
+
string
|
|
15
|
+
];
|
|
16
|
+
export interface ColorScaleItem {
|
|
17
|
+
dark: colorStep;
|
|
18
|
+
darkA: colorStep;
|
|
19
|
+
light: colorStep;
|
|
20
|
+
lightA: colorStep;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/components.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ export { default as Avatar, type AvatarProps } from './Avatar';
|
|
|
5
5
|
export { default as Burger, type BurgerProps } from './Burger';
|
|
6
6
|
export { default as CodeEditor, type CodeEditorProps } from './CodeEditor';
|
|
7
7
|
export { default as Collapse, type CollapseProps } from './Collapse';
|
|
8
|
-
export { default as ColorScales, type ColorScalesProps } from './ColorScales';
|
|
9
8
|
export { type Config, default as ConfigProvider, useCdnFn } from './ConfigProvider';
|
|
10
9
|
export { default as ContextMenu, type ContextMenuProps } from './ContextMenu';
|
|
11
10
|
export { default as CopyButton, type CopyButtonProps } from './CopyButton';
|
|
@@ -63,3 +62,4 @@ export type * from './types';
|
|
|
63
62
|
export { copyToClipboard } from './utils/copyToClipboard';
|
|
64
63
|
export { type CDN, genCdnUrl } from './utils/genCdnUrl';
|
|
65
64
|
export { default as Video, type VideoProps } from './Video';
|
|
65
|
+
export { ErrorBoundary, type ErrorBoundaryProps } from 'react-error-boundary';
|
package/es/components.js
CHANGED
|
@@ -5,7 +5,6 @@ export { default as Avatar } from "./Avatar";
|
|
|
5
5
|
export { default as Burger } from "./Burger";
|
|
6
6
|
export { default as CodeEditor } from "./CodeEditor";
|
|
7
7
|
export { default as Collapse } from "./Collapse";
|
|
8
|
-
export { default as ColorScales } from "./ColorScales";
|
|
9
8
|
export { default as ConfigProvider, useCdnFn } from "./ConfigProvider";
|
|
10
9
|
export { default as ContextMenu } from "./ContextMenu";
|
|
11
10
|
export { default as CopyButton } from "./CopyButton";
|
|
@@ -61,4 +60,5 @@ export { default as Toc } from "./Toc";
|
|
|
61
60
|
export { default as Tooltip } from "./Tooltip";
|
|
62
61
|
export { copyToClipboard } from "./utils/copyToClipboard";
|
|
63
62
|
export { genCdnUrl } from "./utils/genCdnUrl";
|
|
64
|
-
export { default as Video } from "./Video";
|
|
63
|
+
export { default as Video } from "./Video";
|
|
64
|
+
export { ErrorBoundary } from 'react-error-boundary';
|
|
@@ -1,28 +1,31 @@
|
|
|
1
1
|
import { Copy, Edit, RotateCw, Trash } from 'lucide-react';
|
|
2
|
+
import { useMemo } from 'react';
|
|
2
3
|
export var useChatListActionsBar = function useChatListActionsBar(text) {
|
|
3
|
-
return {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
4
|
+
return useMemo(function () {
|
|
5
|
+
return {
|
|
6
|
+
copy: {
|
|
7
|
+
icon: Copy,
|
|
8
|
+
key: 'copy',
|
|
9
|
+
label: (text === null || text === void 0 ? void 0 : text.copy) || 'Copy'
|
|
10
|
+
},
|
|
11
|
+
del: {
|
|
12
|
+
icon: Trash,
|
|
13
|
+
key: 'del',
|
|
14
|
+
label: (text === null || text === void 0 ? void 0 : text.delete) || 'Delete'
|
|
15
|
+
},
|
|
16
|
+
divider: {
|
|
17
|
+
type: 'divider'
|
|
18
|
+
},
|
|
19
|
+
edit: {
|
|
20
|
+
icon: Edit,
|
|
21
|
+
key: 'edit',
|
|
22
|
+
label: (text === null || text === void 0 ? void 0 : text.edit) || 'Edit'
|
|
23
|
+
},
|
|
24
|
+
regenerate: {
|
|
25
|
+
icon: RotateCw,
|
|
26
|
+
key: 'regenerate',
|
|
27
|
+
label: (text === null || text === void 0 ? void 0 : text.regenerate) || 'Regenerate'
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}, [text]);
|
|
28
31
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const FALLBACK_LANG = "txt";
|
|
2
|
-
export declare const useHighlight: (text: string, lang: string,
|
|
2
|
+
export declare const useHighlight: (text: string, lang: string, enableTransformer?: boolean) => import("swr/dist/_internal").SWRResponse<string, any, any>;
|
|
3
3
|
export { default as languageMap } from './languageMap';
|
package/es/hooks/useHighlight.js
CHANGED
|
@@ -1,35 +1,51 @@
|
|
|
1
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
3
|
import { transformerNotationDiff, transformerNotationErrorLevel, transformerNotationFocus, transformerNotationHighlight, transformerNotationWordHighlight } from '@shikijs/transformers';
|
|
4
|
+
import { useThemeMode } from 'antd-style';
|
|
5
|
+
import { useMemo } from 'react';
|
|
4
6
|
import { codeToHtml } from 'shiki';
|
|
5
7
|
import useSWR from 'swr';
|
|
6
8
|
import { Md5 } from 'ts-md5';
|
|
7
9
|
import { themeConfig } from "../Highlighter/theme";
|
|
8
10
|
import languageMap from "./languageMap";
|
|
9
11
|
export var FALLBACK_LANG = 'txt';
|
|
10
|
-
export var useHighlight = function useHighlight(text, lang,
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
export var useHighlight = function useHighlight(text, lang, enableTransformer) {
|
|
13
|
+
var _useThemeMode = useThemeMode(),
|
|
14
|
+
isDarkMode = _useThemeMode.isDarkMode;
|
|
15
|
+
var language = lang.toLowerCase();
|
|
16
|
+
var matchedLanguage = useMemo(function () {
|
|
17
|
+
return languageMap.includes(language) ? language : FALLBACK_LANG;
|
|
18
|
+
}, [language]);
|
|
19
|
+
var theme = useMemo(function () {
|
|
20
|
+
return themeConfig(isDarkMode);
|
|
21
|
+
}, [isDarkMode]);
|
|
22
|
+
var transformers = useMemo(function () {
|
|
23
|
+
if (!enableTransformer) return;
|
|
24
|
+
return [transformerNotationDiff(), transformerNotationHighlight(), transformerNotationWordHighlight(), transformerNotationFocus(), transformerNotationErrorLevel()];
|
|
25
|
+
}, [enableTransformer]);
|
|
26
|
+
var key = useMemo(function () {
|
|
27
|
+
return Md5.hashStr(text);
|
|
28
|
+
}, [text]);
|
|
29
|
+
return useSWR([matchedLanguage, isDarkMode ? 'd' : 'l', key].join('-'), /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
13
30
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
14
31
|
while (1) switch (_context.prev = _context.next) {
|
|
15
32
|
case 0:
|
|
16
33
|
_context.prev = 0;
|
|
17
|
-
language = lang.toLowerCase();
|
|
18
34
|
return _context.abrupt("return", codeToHtml(text, {
|
|
19
|
-
lang:
|
|
20
|
-
theme:
|
|
21
|
-
transformers:
|
|
35
|
+
lang: matchedLanguage,
|
|
36
|
+
theme: theme,
|
|
37
|
+
transformers: transformers
|
|
22
38
|
}));
|
|
23
|
-
case
|
|
24
|
-
_context.prev =
|
|
39
|
+
case 4:
|
|
40
|
+
_context.prev = 4;
|
|
25
41
|
_context.t0 = _context["catch"](0);
|
|
26
42
|
console.error('shiki Highlight error:', _context.t0);
|
|
27
43
|
return _context.abrupt("return", text);
|
|
28
|
-
case
|
|
44
|
+
case 8:
|
|
29
45
|
case "end":
|
|
30
46
|
return _context.stop();
|
|
31
47
|
}
|
|
32
|
-
}, _callee, null, [[0,
|
|
48
|
+
}, _callee, null, [[0, 4]]);
|
|
33
49
|
})));
|
|
34
50
|
};
|
|
35
51
|
export { default as languageMap } from "./languageMap";
|
package/es/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { default as Logo, type LobeHubProps as LogoProps } from './brand/LobeHub
|
|
|
3
3
|
export { default as LogoThree, type LogoThreeProps } from './brand/LogoThree';
|
|
4
4
|
export { default as LogoSpline, type LogoSplineProps } from './brand/LogoThree/LogoSpline';
|
|
5
5
|
export * from './chat';
|
|
6
|
+
export * from './color';
|
|
6
7
|
export * from './components';
|
|
7
8
|
export * from './mobile';
|
|
8
9
|
export * from './storybook';
|
package/es/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export { default as Logo } from "./brand/LobeHub";
|
|
|
3
3
|
export { default as LogoThree } from "./brand/LogoThree";
|
|
4
4
|
export { default as LogoSpline } from "./brand/LogoThree/LogoSpline";
|
|
5
5
|
export * from "./chat";
|
|
6
|
+
export * from "./color";
|
|
6
7
|
export * from "./components";
|
|
7
8
|
export * from "./mobile";
|
|
8
9
|
export * from "./storybook";
|
package/es/styles/customTheme.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { blue, cyan, geekblue, gold, green, lime, magenta, orange, purple, red, volcano, yellow } from "../color/colors";
|
|
2
|
+
import { mauve, olive, sage, sand, slate } from "../color/neutrals";
|
|
3
3
|
export var primaryColors = {
|
|
4
|
-
blue:
|
|
5
|
-
cyan:
|
|
6
|
-
geekblue:
|
|
7
|
-
gold:
|
|
8
|
-
green:
|
|
9
|
-
lime:
|
|
10
|
-
magenta:
|
|
11
|
-
orange:
|
|
12
|
-
purple:
|
|
13
|
-
red:
|
|
14
|
-
volcano:
|
|
15
|
-
yellow:
|
|
4
|
+
blue: blue.dark[9],
|
|
5
|
+
cyan: cyan.dark[9],
|
|
6
|
+
geekblue: geekblue.dark[9],
|
|
7
|
+
gold: gold.dark[9],
|
|
8
|
+
green: green.dark[9],
|
|
9
|
+
lime: lime.dark[9],
|
|
10
|
+
magenta: magenta.dark[9],
|
|
11
|
+
orange: orange.dark[9],
|
|
12
|
+
purple: purple.dark[9],
|
|
13
|
+
red: red.dark[9],
|
|
14
|
+
volcano: volcano.dark[9],
|
|
15
|
+
yellow: yellow.dark[9]
|
|
16
16
|
};
|
|
17
17
|
export var primaryColorsSwatches = [primaryColors.red, primaryColors.orange, primaryColors.gold, primaryColors.yellow, primaryColors.lime, primaryColors.green, primaryColors.cyan, primaryColors.blue, primaryColors.geekblue, primaryColors.purple, primaryColors.magenta, primaryColors.volcano];
|
|
18
18
|
export var neutralColors = {
|
|
19
|
-
mauve:
|
|
20
|
-
olive:
|
|
21
|
-
sage:
|
|
22
|
-
sand:
|
|
23
|
-
slate:
|
|
19
|
+
mauve: mauve.dark[9],
|
|
20
|
+
olive: olive.dark[9],
|
|
21
|
+
sage: sage.dark[9],
|
|
22
|
+
sand: sand.dark[9],
|
|
23
|
+
slate: slate.dark[9]
|
|
24
24
|
};
|
|
25
25
|
export var neutralColorsSwatches = [neutralColors.mauve, neutralColors.slate, neutralColors.sage, neutralColors.olive, neutralColors.sand];
|
|
26
26
|
export var findCustomThemeName = function findCustomThemeName(type, value) {
|
package/es/styles/index.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
export { colorScales as colors } from './colors/colors';
|
|
2
|
-
export { colorScales } from './colors/colors';
|
|
3
|
-
export { generateColorNeutralPalette, generateColorPalette } from './colors/generateColorPalette';
|
|
4
|
-
export { neutralColorScales } from './colors/neutralColors';
|
|
5
1
|
export * from './customTheme';
|
|
6
2
|
export { generateCustomStylish as lobeCustomStylish } from './theme/customStylish';
|
|
7
3
|
export { generateCustomToken as lobeCustomToken } from './theme/customToken';
|
|
4
|
+
export { generateColorNeutralPalette, generateColorPalette } from './theme/generateColorPalette';
|
package/es/styles/index.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
export { colorScales as colors } from "./colors/colors";
|
|
2
|
-
export { colorScales } from "./colors/colors";
|
|
3
|
-
export { generateColorNeutralPalette, generateColorPalette } from "./colors/generateColorPalette";
|
|
4
|
-
export { neutralColorScales } from "./colors/neutralColors";
|
|
5
1
|
export * from "./customTheme";
|
|
6
2
|
export { generateCustomStylish as lobeCustomStylish } from "./theme/customStylish";
|
|
7
|
-
export { generateCustomToken as lobeCustomToken } from "./theme/customToken";
|
|
3
|
+
export { generateCustomToken as lobeCustomToken } from "./theme/customToken";
|
|
4
|
+
export { generateColorNeutralPalette, generateColorPalette } from "./theme/generateColorPalette";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { colorScales } from "../../../color/colors";
|
|
3
|
+
import { neutralColorScales } from "../../../color/neutrals";
|
|
4
|
+
import { generateColorNeutralPalette, generateColorPalette } from "../generateColorPalette";
|
|
4
5
|
import darkBaseToken from "../token/dark";
|
|
5
6
|
export var darkAlgorithm = function darkAlgorithm(seedToken, mapToken) {
|
|
6
7
|
var primaryColor = seedToken.primaryColor;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { colorScales } from "../../../color/colors";
|
|
3
|
+
import { neutralColorScales } from "../../../color/neutrals";
|
|
4
|
+
import { generateColorNeutralPalette, generateColorPalette } from "../generateColorPalette";
|
|
4
5
|
import lightBaseToken from "../token/light";
|
|
5
6
|
export var lightAlgorithm = function lightAlgorithm(seedToken, mapToken) {
|
|
6
7
|
var primaryColor = seedToken.primaryColor;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ThemeConfig } from 'antd';
|
|
2
2
|
import { ThemeAppearance } from 'antd-style';
|
|
3
|
-
import { NeutralColors, PrimaryColors } from
|
|
3
|
+
import { NeutralColors, PrimaryColors } from '../customTheme';
|
|
4
4
|
export interface LobeAntdThemeParams {
|
|
5
5
|
appearance: ThemeAppearance;
|
|
6
6
|
neutralColor?: NeutralColors;
|
|
@@ -3,7 +3,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
3
3
|
import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
|
|
4
4
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
5
5
|
import { camelCase } from 'lodash-es';
|
|
6
|
-
import { colorScales } from "
|
|
6
|
+
import { colorScales } from "../../color/colors";
|
|
7
7
|
var generateColorPalette = function generateColorPalette(_ref) {
|
|
8
8
|
var _ref2;
|
|
9
9
|
var name = _ref.name,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AliasToken } from 'antd/es/theme/interface';
|
|
2
|
-
import { ColorScaleItem } from "
|
|
2
|
+
import type { ColorScaleItem } from "../../color/types";
|
|
3
3
|
export declare const generateColorPalette: ({ type, scale, appearance, }: {
|
|
4
4
|
appearance: 'light' | 'dark';
|
|
5
5
|
scale: ColorScaleItem;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import {
|
|
3
|
-
import { generateColorNeutralPalette, generateColorPalette } from "
|
|
2
|
+
import { blue, gold, gray, lime, primary, red } from "../../../color/colors";
|
|
3
|
+
import { generateColorNeutralPalette, generateColorPalette } from "../generateColorPalette";
|
|
4
4
|
var primaryToken = generateColorPalette({
|
|
5
5
|
appearance: 'dark',
|
|
6
|
-
scale:
|
|
6
|
+
scale: primary,
|
|
7
7
|
type: 'Primary'
|
|
8
8
|
});
|
|
9
9
|
var neutralToken = generateColorNeutralPalette({
|
|
10
10
|
appearance: 'dark',
|
|
11
|
-
scale:
|
|
11
|
+
scale: gray
|
|
12
12
|
});
|
|
13
13
|
var successToken = generateColorPalette({
|
|
14
14
|
appearance: 'dark',
|
|
15
|
-
scale:
|
|
15
|
+
scale: lime,
|
|
16
16
|
type: 'Success'
|
|
17
17
|
});
|
|
18
18
|
var warningToken = generateColorPalette({
|
|
19
19
|
appearance: 'dark',
|
|
20
|
-
scale:
|
|
20
|
+
scale: gold,
|
|
21
21
|
type: 'Warning'
|
|
22
22
|
});
|
|
23
23
|
var errorToken = generateColorPalette({
|
|
24
24
|
appearance: 'dark',
|
|
25
|
-
scale:
|
|
25
|
+
scale: red,
|
|
26
26
|
type: 'Error'
|
|
27
27
|
});
|
|
28
28
|
var infoToken = generateColorPalette({
|
|
29
29
|
appearance: 'dark',
|
|
30
|
-
scale:
|
|
30
|
+
scale: blue,
|
|
31
31
|
type: 'Info'
|
|
32
32
|
});
|
|
33
33
|
var darkBaseToken = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, primaryToken), neutralToken), successToken), warningToken), errorToken), infoToken), {}, {
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import {
|
|
3
|
-
import { generateColorNeutralPalette, generateColorPalette } from "
|
|
2
|
+
import { geekblue, gray, green, orange, primary, volcano } from "../../../color/colors";
|
|
3
|
+
import { generateColorNeutralPalette, generateColorPalette } from "../generateColorPalette";
|
|
4
4
|
var primaryToken = generateColorPalette({
|
|
5
5
|
appearance: 'light',
|
|
6
|
-
scale:
|
|
6
|
+
scale: primary,
|
|
7
7
|
type: 'Primary'
|
|
8
8
|
});
|
|
9
9
|
var neutralToken = generateColorNeutralPalette({
|
|
10
10
|
appearance: 'light',
|
|
11
|
-
scale:
|
|
11
|
+
scale: gray
|
|
12
12
|
});
|
|
13
13
|
var successToken = generateColorPalette({
|
|
14
14
|
appearance: 'light',
|
|
15
|
-
scale:
|
|
15
|
+
scale: green,
|
|
16
16
|
type: 'Success'
|
|
17
17
|
});
|
|
18
18
|
var warningToken = generateColorPalette({
|
|
19
19
|
appearance: 'light',
|
|
20
|
-
scale:
|
|
20
|
+
scale: orange,
|
|
21
21
|
type: 'Warning'
|
|
22
22
|
});
|
|
23
23
|
var errorToken = generateColorPalette({
|
|
24
24
|
appearance: 'light',
|
|
25
|
-
scale:
|
|
25
|
+
scale: volcano,
|
|
26
26
|
type: 'Error'
|
|
27
27
|
});
|
|
28
28
|
var infoToken = generateColorPalette({
|
|
29
29
|
appearance: 'light',
|
|
30
|
-
scale:
|
|
30
|
+
scale: geekblue,
|
|
31
31
|
type: 'Info'
|
|
32
32
|
});
|
|
33
33
|
var lightBaseToken = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, primaryToken), neutralToken), successToken), warningToken), errorToken), infoToken), {}, {
|