aot-ui 0.2.29 → 0.2.35
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/dist-lib/aot-ui.css +1 -1
- package/dist-lib/aot-ui.js +12009 -8480
- package/dist-lib/index.d.ts +8 -0
- package/dist-lib/modules/bubble-chart/constants.d.ts +3 -3
- package/dist-lib/modules/check-in-confetti/constants.d.ts +1 -1
- package/dist-lib/modules/color/types.d.ts +1 -1
- package/dist-lib/modules/comment-react/constants.d.ts +3 -3
- package/dist-lib/modules/community-tiles/components/CommunityIcons.d.ts +3 -0
- package/dist-lib/modules/community-tiles/components/CommunityTiles.d.ts +2 -0
- package/dist-lib/modules/community-tiles/constants.d.ts +3 -0
- package/dist-lib/modules/community-tiles/index.d.ts +3 -0
- package/dist-lib/modules/community-tiles/types.d.ts +16 -0
- package/dist-lib/modules/config-provider/components/ConfigProvider.d.ts +1 -1
- package/dist-lib/modules/config-provider/index.d.ts +3 -1
- package/dist-lib/modules/config-provider/themeColor.d.ts +14 -1
- package/dist-lib/modules/config-provider/themes/applyTheme.d.ts +24 -0
- package/dist-lib/modules/config-provider/themes/default.d.ts +3 -0
- package/dist-lib/modules/config-provider/themes/index.d.ts +6 -0
- package/dist-lib/modules/config-provider/themes/koharu.d.ts +2 -0
- package/dist-lib/modules/config-provider/themes/themeTransition.d.ts +5 -0
- package/dist-lib/modules/config-provider/themes/types.d.ts +12 -0
- package/dist-lib/modules/config-provider/types.d.ts +22 -2
- package/dist-lib/modules/donut-chart/constants.d.ts +2 -2
- package/dist-lib/modules/edu-tiles/components/EduIcons.d.ts +15 -0
- package/dist-lib/modules/edu-tiles/components/EduTiles.d.ts +2 -0
- package/dist-lib/modules/edu-tiles/constants.d.ts +2 -0
- package/dist-lib/modules/edu-tiles/index.d.ts +3 -0
- package/dist-lib/modules/edu-tiles/types.d.ts +19 -0
- package/dist-lib/modules/feature-tiles/components/FeatureTile.d.ts +8 -0
- package/dist-lib/modules/feature-tiles/components/FeatureTiles.d.ts +2 -0
- package/dist-lib/modules/feature-tiles/components/TileIcons.d.ts +11 -0
- package/dist-lib/modules/feature-tiles/constants.d.ts +3 -0
- package/dist-lib/modules/feature-tiles/index.d.ts +3 -0
- package/dist-lib/modules/feature-tiles/types.d.ts +31 -0
- package/dist-lib/modules/feed-new-tip/constants.d.ts +8 -8
- package/dist-lib/modules/fluid-progress/constants.d.ts +1 -1
- package/dist-lib/modules/game-tiles/components/GameIcons.d.ts +17 -0
- package/dist-lib/modules/game-tiles/components/GameTiles.d.ts +2 -0
- package/dist-lib/modules/game-tiles/constants.d.ts +3 -0
- package/dist-lib/modules/game-tiles/index.d.ts +3 -0
- package/dist-lib/modules/game-tiles/types.d.ts +32 -0
- package/dist-lib/modules/image-detail/constants.d.ts +2 -2
- package/dist-lib/modules/life-tiles/components/LifeIcons.d.ts +11 -0
- package/dist-lib/modules/life-tiles/components/LifeTiles.d.ts +2 -0
- package/dist-lib/modules/life-tiles/constants.d.ts +3 -0
- package/dist-lib/modules/life-tiles/index.d.ts +3 -0
- package/dist-lib/modules/life-tiles/types.d.ts +22 -0
- package/dist-lib/modules/like-burst/constants.d.ts +1 -1
- package/dist-lib/modules/liquid-progress/constants.d.ts +1 -1
- package/dist-lib/modules/mention-suggest/constants.d.ts +6 -6
- package/dist-lib/modules/message-banner/constants.d.ts +4 -4
- package/dist-lib/modules/modal/motion.d.ts +6 -3
- package/dist-lib/modules/offline-banner/constants.d.ts +2 -2
- package/dist-lib/modules/ops-tiles/components/OpsIcons.d.ts +11 -0
- package/dist-lib/modules/ops-tiles/components/OpsTiles.d.ts +2 -0
- package/dist-lib/modules/ops-tiles/constants.d.ts +3 -0
- package/dist-lib/modules/ops-tiles/index.d.ts +3 -0
- package/dist-lib/modules/ops-tiles/types.d.ts +23 -0
- package/dist-lib/modules/photo-upload/constants.d.ts +2 -2
- package/dist-lib/modules/product-story/constants.d.ts +3 -3
- package/dist-lib/modules/proportion-bar/constants.d.ts +2 -2
- package/dist-lib/modules/radio/types.d.ts +1 -1
- package/dist-lib/modules/rate/types.d.ts +3 -3
- package/dist-lib/modules/semi-gauge/constants.d.ts +3 -3
- package/dist-lib/modules/theme-switcher/AppearanceContext.d.ts +15 -0
- package/dist-lib/modules/theme-switcher/appearanceStorage.d.ts +6 -0
- package/dist-lib/modules/theme-switcher/components/ThemeSwitcher.d.ts +7 -0
- package/dist-lib/modules/theme-switcher/index.d.ts +4 -0
- package/dist-lib/modules/theme-switcher/types.d.ts +27 -0
- package/dist-lib/modules/thread-expand/components/MentionComposer.d.ts +2 -1
- package/dist-lib/modules/thread-expand/constants.d.ts +12 -10
- package/dist-lib/modules/thread-expand/types.d.ts +2 -0
- package/dist-lib/modules/trend-tiles/components/TrendIcons.d.ts +4 -0
- package/dist-lib/modules/trend-tiles/components/TrendTiles.d.ts +2 -0
- package/dist-lib/modules/trend-tiles/constants.d.ts +7 -0
- package/dist-lib/modules/trend-tiles/index.d.ts +3 -0
- package/dist-lib/modules/trend-tiles/types.d.ts +21 -0
- package/dist-lib/modules/window-shell/AppShell.d.ts +6 -3
- package/dist-lib/modules/window-shell/components/TitleBar.d.ts +8 -4
- package/dist-lib/modules/window-shell/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type LifeTileTone = {
|
|
3
|
+
from: string;
|
|
4
|
+
to: string;
|
|
5
|
+
ink: string;
|
|
6
|
+
soft: string;
|
|
7
|
+
};
|
|
8
|
+
export type LifeTileItem = {
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
description: string;
|
|
12
|
+
kind?: "food" | "cart" | "flight" | "medical";
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
tone?: LifeTileTone;
|
|
15
|
+
avatars?: string[];
|
|
16
|
+
onClick?: () => void;
|
|
17
|
+
};
|
|
18
|
+
export type LifeTilesProps = {
|
|
19
|
+
className?: string;
|
|
20
|
+
items?: LifeTileItem[];
|
|
21
|
+
onItemClick?: (item: LifeTileItem) => void;
|
|
22
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/** 8 burst dots around the heart (degrees). */
|
|
2
2
|
export declare const PARTICLE_ANGLES: readonly [0, 45, 90, 135, 180, 225, 270, 315];
|
|
3
3
|
/** Colorful particle palette (blue slot tracks theme primary). */
|
|
4
|
-
export declare const PARTICLE_COLORS: readonly ["#ef4444", "#f59e0b", "#84cc16", "#22c55e", "#06b6d4", "var(--aot-config-primary)", "#a855f7", "#ec4899"];
|
|
4
|
+
export declare const PARTICLE_COLORS: readonly ["var(--aot-color-danger, #ef4444)", "var(--aot-color-warning, #f59e0b)", "#84cc16", "var(--aot-color-success, #22c55e)", "#06b6d4", "var(--aot-config-primary)", "var(--aot-config-primary, #a855f7)", "var(--aot-config-primary, #ec4899)"];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const LP_DEFAULT_SIZE = 148;
|
|
2
|
-
export declare const LP_DEFAULT_COLOR = "#0ea5e9";
|
|
2
|
+
export declare const LP_DEFAULT_COLOR = "var(--aot-config-primary, #0ea5e9)";
|
|
@@ -11,36 +11,36 @@ export declare const MS_FRIENDS: readonly [{
|
|
|
11
11
|
readonly id: "ms-2";
|
|
12
12
|
readonly name: "老周";
|
|
13
13
|
readonly handle: "zhou";
|
|
14
|
-
readonly color: "#34d399";
|
|
14
|
+
readonly color: "var(--aot-color-success, #34d399)";
|
|
15
15
|
readonly note: "客户端 · 刚活跃";
|
|
16
16
|
}, {
|
|
17
17
|
readonly id: "ms-3";
|
|
18
18
|
readonly name: "小林";
|
|
19
19
|
readonly handle: "lin";
|
|
20
|
-
readonly color: "#fbbf24";
|
|
20
|
+
readonly color: "var(--aot-color-warning, #fbbf24)";
|
|
21
21
|
readonly note: "动效 · 本周值班";
|
|
22
22
|
}, {
|
|
23
23
|
readonly id: "ms-4";
|
|
24
24
|
readonly name: "小满";
|
|
25
25
|
readonly handle: "man";
|
|
26
|
-
readonly color: "#f472b6";
|
|
26
|
+
readonly color: "var(--aot-color-danger, #f472b6)";
|
|
27
27
|
readonly note: "运营 · 关注你了";
|
|
28
28
|
}, {
|
|
29
29
|
readonly id: "ms-5";
|
|
30
30
|
readonly name: "Kiki";
|
|
31
31
|
readonly handle: "kiki";
|
|
32
|
-
readonly color: "#a78bfa";
|
|
32
|
+
readonly color: "var(--aot-config-primary, #a78bfa)";
|
|
33
33
|
readonly note: "插画 · 常出没评论区";
|
|
34
34
|
}, {
|
|
35
35
|
readonly id: "ms-6";
|
|
36
36
|
readonly name: "阿北";
|
|
37
37
|
readonly handle: "bei";
|
|
38
|
-
readonly color: "#fb7185";
|
|
38
|
+
readonly color: "var(--aot-color-danger-hover, #fb7185)";
|
|
39
39
|
readonly note: "后端 · 可 @ 联调";
|
|
40
40
|
}, {
|
|
41
41
|
readonly id: "ms-7";
|
|
42
42
|
readonly name: "米粒";
|
|
43
43
|
readonly handle: "mili";
|
|
44
|
-
readonly color: "#2dd4bf";
|
|
44
|
+
readonly color: "var(--aot-color-success, #2dd4bf)";
|
|
45
45
|
readonly note: "测试 · 爱抓边界";
|
|
46
46
|
}];
|
|
@@ -13,21 +13,21 @@ export declare const MB_DEMO_MESSAGES: readonly [{
|
|
|
13
13
|
}, {
|
|
14
14
|
readonly id: "m2";
|
|
15
15
|
readonly name: "阿宁";
|
|
16
|
-
readonly color: "#34d399";
|
|
16
|
+
readonly color: "var(--aot-color-success, #34d399)";
|
|
17
17
|
readonly text: "设计稿第二版发你邮箱了";
|
|
18
18
|
}, {
|
|
19
19
|
readonly id: "m3";
|
|
20
20
|
readonly name: "老周";
|
|
21
|
-
readonly color: "#fbbf24";
|
|
21
|
+
readonly color: "var(--aot-color-warning, #fbbf24)";
|
|
22
22
|
readonly text: "报表核对完了,麻烦看一眼";
|
|
23
23
|
}, {
|
|
24
24
|
readonly id: "m4";
|
|
25
25
|
readonly name: "小满";
|
|
26
|
-
readonly color: "#f472b6";
|
|
26
|
+
readonly color: "var(--aot-color-danger, #f472b6)";
|
|
27
27
|
readonly text: "晚上一起评审一下交互稿?";
|
|
28
28
|
}, {
|
|
29
29
|
readonly id: "m5";
|
|
30
30
|
readonly name: "Kiki";
|
|
31
|
-
readonly color: "#a78bfa";
|
|
31
|
+
readonly color: "var(--aot-color-info, #a78bfa)";
|
|
32
32
|
readonly text: "客户确认了方案,可以开工";
|
|
33
33
|
}];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
/** Leave keyframes: visible → sunk + faded (退场). Enter plays these reversed (上浮).
|
|
1
|
+
/** Leave keyframes: visible → sunk + faded (退场). Enter plays these reversed (上浮).
|
|
2
|
+
* Transform 含 --aot-modal-dx/dy,避免 fill:forwards 锁死位移导致无法拖拽。 */
|
|
2
3
|
export declare const LEAVE_KEYFRAMES: {
|
|
3
4
|
readonly mask: readonly [{
|
|
4
5
|
readonly opacity: 1;
|
|
@@ -7,15 +8,17 @@ export declare const LEAVE_KEYFRAMES: {
|
|
|
7
8
|
}];
|
|
8
9
|
readonly panel: readonly [{
|
|
9
10
|
readonly opacity: 1;
|
|
10
|
-
readonly transform: "translate3d(
|
|
11
|
+
readonly transform: "translate3d(var(--aot-modal-dx, 0px), var(--aot-modal-dy, 0px), 0) scale(1)";
|
|
11
12
|
}, {
|
|
12
13
|
readonly opacity: 0;
|
|
13
|
-
readonly transform: "translate3d(
|
|
14
|
+
readonly transform: "translate3d(var(--aot-modal-dx, 0px), calc(var(--aot-modal-dy, 0px) + 14px), 0) scale(0.96)";
|
|
14
15
|
}];
|
|
15
16
|
};
|
|
16
17
|
export declare function cancelAnims(...els: (Element | null)[]): void;
|
|
17
18
|
/** Paint the leave-end pose (enter start). */
|
|
18
19
|
export declare function snapHidden(mask: HTMLElement, panel: HTMLElement): void;
|
|
20
|
+
/** Commit enter end pose (drop WAAPI fill). Transform keeps --aot-modal-dx/dy so drag works. */
|
|
21
|
+
export declare function commitEntered(mask: HTMLElement, panel: HTMLElement): void;
|
|
19
22
|
export declare function clearInline(mask: HTMLElement, panel: HTMLElement): void;
|
|
20
23
|
/** Enter = leave reversed (上浮淡入). */
|
|
21
24
|
export declare function playEnter(mask: HTMLElement, panel: HTMLElement): Animation[];
|
|
@@ -18,7 +18,7 @@ export declare const OB_FEED: readonly [{
|
|
|
18
18
|
readonly title: "周报摘要";
|
|
19
19
|
readonly body: "本周关闭 12 个缺陷,还剩 3 个 P1。";
|
|
20
20
|
readonly kind: "cached";
|
|
21
|
-
readonly tone: "#dcfce7";
|
|
21
|
+
readonly tone: "var(--aot-color-success-soft-border, #dcfce7)";
|
|
22
22
|
}, {
|
|
23
23
|
readonly id: "ob-4";
|
|
24
24
|
readonly title: "视觉素材";
|
|
@@ -30,5 +30,5 @@ export declare const OB_FEED: readonly [{
|
|
|
30
30
|
readonly title: "发布备忘";
|
|
31
31
|
readonly body: "灰度已推 5%,观察错误率与崩溃。";
|
|
32
32
|
readonly kind: "cached";
|
|
33
|
-
readonly tone: "#fef3c7";
|
|
33
|
+
readonly tone: "var(--aot-color-warning-soft-border, #fef3c7)";
|
|
34
34
|
}];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OpsTileItem } from '../types';
|
|
2
|
+
type Tone = {
|
|
3
|
+
ink: string;
|
|
4
|
+
soft: string;
|
|
5
|
+
};
|
|
6
|
+
/** 半透明果冻:糖果渐变 + 强高光 */
|
|
7
|
+
export declare function CheckinJelly({ ink, soft }: Tone): import('react').JSX.Element;
|
|
8
|
+
export declare function CameraJelly({ ink, soft }: Tone): import('react').JSX.Element;
|
|
9
|
+
export declare function GamepadJelly({ ink, soft }: Tone): import('react').JSX.Element;
|
|
10
|
+
export declare function resolveOpsIcon(kind: OpsTileItem["kind"], tone: Tone): import('react').JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type OpsTileItem = {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
kind?: "checkin" | "share" | "gamepad";
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
avatars?: string[];
|
|
9
|
+
meta?: string;
|
|
10
|
+
tone?: {
|
|
11
|
+
from: string;
|
|
12
|
+
to: string;
|
|
13
|
+
ink: string;
|
|
14
|
+
soft: string;
|
|
15
|
+
};
|
|
16
|
+
onClick?: () => void;
|
|
17
|
+
};
|
|
18
|
+
export type OpsTilesProps = {
|
|
19
|
+
className?: string;
|
|
20
|
+
hero?: OpsTileItem;
|
|
21
|
+
sideItems?: OpsTileItem[];
|
|
22
|
+
onItemClick?: (item: OpsTileItem) => void;
|
|
23
|
+
};
|
|
@@ -7,11 +7,11 @@ export declare const PU_MIN_MAX = 1;
|
|
|
7
7
|
export declare const PU_HARD_MAX = 20;
|
|
8
8
|
export declare const PU_PHOTOS: readonly [{
|
|
9
9
|
readonly id: "pu-1";
|
|
10
|
-
readonly hue: "linear-gradient(145deg, #fda4af, #fb7185)";
|
|
10
|
+
readonly hue: "linear-gradient(145deg, var(--aot-color-danger-soft-border, #fda4af), var(--aot-color-danger, #fb7185))";
|
|
11
11
|
}, {
|
|
12
12
|
readonly id: "pu-2";
|
|
13
13
|
readonly hue: "linear-gradient(145deg, var(--aot-config-primary-border), var(--aot-config-primary))";
|
|
14
14
|
}, {
|
|
15
15
|
readonly id: "pu-3";
|
|
16
|
-
readonly hue: "linear-gradient(145deg, #86efac, #22c55e)";
|
|
16
|
+
readonly hue: "linear-gradient(145deg, var(--aot-color-success-soft-border, #86efac), var(--aot-color-success, #22c55e))";
|
|
17
17
|
}];
|
|
@@ -7,15 +7,15 @@ export declare const PS_SECTIONS: readonly [{
|
|
|
7
7
|
readonly id: "ps-2";
|
|
8
8
|
readonly title: "指尖有回声";
|
|
9
9
|
readonly body: "每个按压缩一点、弹回来,反馈跟着手感走。";
|
|
10
|
-
readonly hue: "linear-gradient(145deg,
|
|
10
|
+
readonly hue: "linear-gradient(145deg, var(--aot-config-primary-border), var(--aot-config-primary-hover))";
|
|
11
11
|
}, {
|
|
12
12
|
readonly id: "ps-3";
|
|
13
13
|
readonly title: "内容自己排队";
|
|
14
14
|
readonly body: "新动态不打断阅读,提示轻轻落在肩上。";
|
|
15
|
-
readonly hue: "linear-gradient(145deg, #34d399, #047857)";
|
|
15
|
+
readonly hue: "linear-gradient(145deg, var(--aot-color-success, #34d399), var(--aot-color-success-hover, #047857))";
|
|
16
16
|
}, {
|
|
17
17
|
readonly id: "ps-4";
|
|
18
18
|
readonly title: "桌面也讲究";
|
|
19
19
|
readonly body: "为 1440×900 的工作台留出呼吸感与对齐。";
|
|
20
|
-
readonly hue: "linear-gradient(145deg, #fb7185, #be123c)";
|
|
20
|
+
readonly hue: "linear-gradient(145deg, var(--aot-color-danger, #fb7185), var(--aot-color-danger-hover, #be123c))";
|
|
21
21
|
}];
|
|
@@ -7,7 +7,7 @@ export declare const PR_SEGMENTS: readonly [{
|
|
|
7
7
|
readonly id: "design";
|
|
8
8
|
readonly label: "设计";
|
|
9
9
|
readonly value: 22;
|
|
10
|
-
readonly color: "#8b5cf6";
|
|
10
|
+
readonly color: "var(--aot-config-primary, #8b5cf6)";
|
|
11
11
|
}, {
|
|
12
12
|
readonly id: "eng";
|
|
13
13
|
readonly label: "研发";
|
|
@@ -17,5 +17,5 @@ export declare const PR_SEGMENTS: readonly [{
|
|
|
17
17
|
readonly id: "ops";
|
|
18
18
|
readonly label: "运营";
|
|
19
19
|
readonly value: 16;
|
|
20
|
-
readonly color: "#f59e0b";
|
|
20
|
+
readonly color: "var(--aot-color-warning, #f59e0b)";
|
|
21
21
|
}];
|
|
@@ -57,17 +57,17 @@ export type RateProps = {
|
|
|
57
57
|
highThreshold?: number;
|
|
58
58
|
/**
|
|
59
59
|
* 选中 icon 颜色;数组 3 段或对象分段
|
|
60
|
-
* @default ["
|
|
60
|
+
* @default ["var(--aot-color-warning, #f7ba2a)", ...]
|
|
61
61
|
*/
|
|
62
62
|
colors?: RateColors;
|
|
63
63
|
/**
|
|
64
64
|
* 未选中 icon 颜色
|
|
65
|
-
* @default #c6d1de
|
|
65
|
+
* @default var(--aot-color-border-1, #c6d1de)
|
|
66
66
|
*/
|
|
67
67
|
voidColor?: string;
|
|
68
68
|
/**
|
|
69
69
|
* 只读时未选中 icon 颜色
|
|
70
|
-
* @default #eff2f7
|
|
70
|
+
* @default var(--aot-color-border-4, #eff2f7)
|
|
71
71
|
*/
|
|
72
72
|
disabledVoidColor?: string;
|
|
73
73
|
/**
|
|
@@ -8,16 +8,16 @@ export declare const SG_BOUNCE = 1.08;
|
|
|
8
8
|
export declare const SG_ZONES: readonly [{
|
|
9
9
|
readonly from: 0;
|
|
10
10
|
readonly to: 40;
|
|
11
|
-
readonly color: "#ef4444";
|
|
11
|
+
readonly color: "var(--aot-color-danger, #ef4444)";
|
|
12
12
|
readonly label: "偏低";
|
|
13
13
|
}, {
|
|
14
14
|
readonly from: 40;
|
|
15
15
|
readonly to: 70;
|
|
16
|
-
readonly color: "#f59e0b";
|
|
16
|
+
readonly color: "var(--aot-color-warning, #f59e0b)";
|
|
17
17
|
readonly label: "适中";
|
|
18
18
|
}, {
|
|
19
19
|
readonly from: 70;
|
|
20
20
|
readonly to: 100;
|
|
21
|
-
readonly color: "#22c55e";
|
|
21
|
+
readonly color: "var(--aot-color-success, #22c55e)";
|
|
22
22
|
readonly label: "良好";
|
|
23
23
|
}];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ThemeSwitcherValue } from './types';
|
|
3
|
+
type AppearanceContextValue = {
|
|
4
|
+
appearance: ThemeSwitcherValue;
|
|
5
|
+
setAppearance: (next: ThemeSwitcherValue) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function AppearanceProvider({ children }: {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}): import('react').JSX.Element;
|
|
10
|
+
/**
|
|
11
|
+
* Shared appearance (theme + scheme) for titlebar + playgrounds.
|
|
12
|
+
* Falls back to defaults when no AppearanceProvider is mounted.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useAppearance(): AppearanceContextValue;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ThemeSwitcherValue } from './types';
|
|
2
|
+
export declare const DEFAULT_APPEARANCE: ThemeSwitcherValue;
|
|
3
|
+
/** Read persisted gallery / host appearance; falls back to defaults. */
|
|
4
|
+
export declare function loadAppearance(): ThemeSwitcherValue;
|
|
5
|
+
/** Persist appearance for the next session. */
|
|
6
|
+
export declare function saveAppearance(value: ThemeSwitcherValue): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ThemeSwitcherProps } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Drop-in theme + color-scheme control.
|
|
4
|
+
* Pair with ConfigProvider: pass `theme` / `colorScheme` from onChange,
|
|
5
|
+
* or lift state at the app root.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ThemeSwitcher({ theme: themeProp, defaultTheme, colorScheme: schemeProp, defaultColorScheme, themes, showColorScheme, size, className, onChange, label, }: ThemeSwitcherProps): import('react').JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { AppearanceProvider, useAppearance } from './AppearanceContext';
|
|
2
|
+
export { DEFAULT_APPEARANCE, loadAppearance, saveAppearance, } from './appearanceStorage';
|
|
3
|
+
export { ThemeSwitcher } from './components/ThemeSwitcher';
|
|
4
|
+
export type { ThemeSwitcherProps, ThemeSwitcherValue } from './types';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AotColorScheme, AotThemeName } from '../config-provider/themes/types';
|
|
3
|
+
export type ThemeSwitcherValue = {
|
|
4
|
+
theme: AotThemeName;
|
|
5
|
+
colorScheme: AotColorScheme;
|
|
6
|
+
};
|
|
7
|
+
export type ThemeSwitcherProps = {
|
|
8
|
+
/** Controlled theme id */
|
|
9
|
+
theme?: AotThemeName;
|
|
10
|
+
/** Uncontrolled default */
|
|
11
|
+
defaultTheme?: AotThemeName;
|
|
12
|
+
/** Controlled color scheme */
|
|
13
|
+
colorScheme?: AotColorScheme;
|
|
14
|
+
/** Uncontrolled default */
|
|
15
|
+
defaultColorScheme?: AotColorScheme;
|
|
16
|
+
/** Theme options to show; defaults to all built-in presets */
|
|
17
|
+
themes?: AotThemeName[];
|
|
18
|
+
/** Show light / dark / system segmented control */
|
|
19
|
+
showColorScheme?: boolean;
|
|
20
|
+
/** Compact size for Segmented */
|
|
21
|
+
size?: "sm" | "md" | "lg";
|
|
22
|
+
className?: string;
|
|
23
|
+
/** Fires when either theme or scheme changes */
|
|
24
|
+
onChange?: (next: ThemeSwitcherValue) => void;
|
|
25
|
+
/** Optional label before controls */
|
|
26
|
+
label?: ReactNode;
|
|
27
|
+
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { MentionFriend } from '../../mention-suggest';
|
|
2
2
|
type MentionComposerProps = {
|
|
3
|
+
className?: string;
|
|
3
4
|
placeholder?: string;
|
|
4
5
|
friends?: MentionFriend[];
|
|
5
6
|
onCancel: () => void;
|
|
6
7
|
onSubmit: (plain: string) => void;
|
|
7
8
|
};
|
|
8
|
-
export declare function MentionComposer({ placeholder, friends: friendsProp, onCancel, onSubmit, }: MentionComposerProps): import('react').JSX.Element;
|
|
9
|
+
export declare function MentionComposer({ className, placeholder, friends: friendsProp, onCancel, onSubmit, }: MentionComposerProps): import('react').JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export declare const TE_STAGGER_MS = 70;
|
|
2
2
|
export declare const TE_ITEM_MS = 320;
|
|
3
3
|
export declare const TE_ARROW_MS = 220;
|
|
4
|
-
export declare const TE_LEAVE_MS =
|
|
4
|
+
export declare const TE_LEAVE_MS = 420;
|
|
5
|
+
export declare const TE_ENTER_MS = 360;
|
|
6
|
+
export declare const TE_COMPOSER_MS = 300;
|
|
5
7
|
export declare const TE_SELF: {
|
|
6
8
|
readonly name: "我";
|
|
7
9
|
readonly color: "var(--aot-config-primary)";
|
|
@@ -21,7 +23,7 @@ export declare const TE_THREADS: readonly [{
|
|
|
21
23
|
readonly replies: readonly [{
|
|
22
24
|
readonly id: "te-1-r1";
|
|
23
25
|
readonly name: "老周";
|
|
24
|
-
readonly color: "#34d399";
|
|
26
|
+
readonly color: "var(--aot-color-success, #34d399)";
|
|
25
27
|
readonly text: "同意,间隔 70ms 刚好能看清一条条垂下来。";
|
|
26
28
|
readonly time: "2 分钟前";
|
|
27
29
|
readonly likes: 4;
|
|
@@ -33,7 +35,7 @@ export declare const TE_THREADS: readonly [{
|
|
|
33
35
|
}, {
|
|
34
36
|
readonly id: "te-1-r2";
|
|
35
37
|
readonly name: "小林";
|
|
36
|
-
readonly color: "#fbbf24";
|
|
38
|
+
readonly color: "var(--aot-color-warning, #fbbf24)";
|
|
37
39
|
readonly text: "收起要从下往上收,别一起消失。";
|
|
38
40
|
readonly time: "2 分钟前";
|
|
39
41
|
readonly likes: 2;
|
|
@@ -42,7 +44,7 @@ export declare const TE_THREADS: readonly [{
|
|
|
42
44
|
}, {
|
|
43
45
|
readonly id: "te-1-r3";
|
|
44
46
|
readonly name: "小满";
|
|
45
|
-
readonly color: "#f472b6";
|
|
47
|
+
readonly color: "var(--aot-color-danger, #f472b6)";
|
|
46
48
|
readonly text: "下面评论让位也要平滑,不然会跳。";
|
|
47
49
|
readonly time: "1 分钟前";
|
|
48
50
|
readonly likes: 6;
|
|
@@ -51,7 +53,7 @@ export declare const TE_THREADS: readonly [{
|
|
|
51
53
|
}, {
|
|
52
54
|
readonly id: "te-1-r4";
|
|
53
55
|
readonly name: "Kiki";
|
|
54
|
-
readonly color: "#a78bfa";
|
|
56
|
+
readonly color: "var(--aot-color-info, #a78bfa)";
|
|
55
57
|
readonly text: "箭头转 180° 这点小反馈别漏。";
|
|
56
58
|
readonly time: "1 分钟前";
|
|
57
59
|
readonly likes: 1;
|
|
@@ -60,7 +62,7 @@ export declare const TE_THREADS: readonly [{
|
|
|
60
62
|
}, {
|
|
61
63
|
readonly id: "te-1-r5";
|
|
62
64
|
readonly name: "阿北";
|
|
63
|
-
readonly color: "#fb7185";
|
|
65
|
+
readonly color: "var(--aot-color-danger-hover, #fb7185)";
|
|
64
66
|
readonly text: "竖线颜色淡一点,别抢正文。";
|
|
65
67
|
readonly time: "刚刚";
|
|
66
68
|
readonly likes: 3;
|
|
@@ -70,7 +72,7 @@ export declare const TE_THREADS: readonly [{
|
|
|
70
72
|
}, {
|
|
71
73
|
readonly id: "te-2";
|
|
72
74
|
readonly name: "米粒";
|
|
73
|
-
readonly color: "#2dd4bf";
|
|
75
|
+
readonly color: "var(--aot-color-success, #2dd4bf)";
|
|
74
76
|
readonly text: "这条没有回复,点「回复」可以直接盖楼。";
|
|
75
77
|
readonly time: "12 分钟前";
|
|
76
78
|
readonly likes: 5;
|
|
@@ -89,7 +91,7 @@ export declare const TE_THREADS: readonly [{
|
|
|
89
91
|
readonly replies: readonly [{
|
|
90
92
|
readonly id: "te-self-r1";
|
|
91
93
|
readonly name: "老周";
|
|
92
|
-
readonly color: "#34d399";
|
|
94
|
+
readonly color: "var(--aot-color-success, #34d399)";
|
|
93
95
|
readonly text: "别人的回复你可以举报,删不掉。";
|
|
94
96
|
readonly time: "7 分钟前";
|
|
95
97
|
readonly likes: 0;
|
|
@@ -117,7 +119,7 @@ export declare const TE_THREADS: readonly [{
|
|
|
117
119
|
readonly replies: readonly [{
|
|
118
120
|
readonly id: "te-3-r1";
|
|
119
121
|
readonly name: "老周";
|
|
120
|
-
readonly color: "#34d399";
|
|
122
|
+
readonly color: "var(--aot-color-success, #34d399)";
|
|
121
123
|
readonly text: "短串也能看出垂落感。";
|
|
122
124
|
readonly time: "18 分钟前";
|
|
123
125
|
readonly likes: 2;
|
|
@@ -126,7 +128,7 @@ export declare const TE_THREADS: readonly [{
|
|
|
126
128
|
}, {
|
|
127
129
|
readonly id: "te-3-r2";
|
|
128
130
|
readonly name: "小林";
|
|
129
|
-
readonly color: "#fbbf24";
|
|
131
|
+
readonly color: "var(--aot-color-warning, #fbbf24)";
|
|
130
132
|
readonly text: "两条就够试收起倒序了。";
|
|
131
133
|
readonly time: "16 分钟前";
|
|
132
134
|
readonly likes: 0;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type TrendTileSideItem = {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
};
|
|
9
|
+
export type TrendTilesProps = {
|
|
10
|
+
className?: string;
|
|
11
|
+
/** 左侧主卡标题 */
|
|
12
|
+
heroTitle?: string;
|
|
13
|
+
/** 左侧主卡副文案 */
|
|
14
|
+
heroDescription?: string;
|
|
15
|
+
/** 主卡按钮文案 */
|
|
16
|
+
actionLabel?: string;
|
|
17
|
+
heroIcon?: ReactNode;
|
|
18
|
+
sideItems?: TrendTileSideItem[];
|
|
19
|
+
onHeroClick?: () => void;
|
|
20
|
+
onSideClick?: (item: TrendTileSideItem) => void;
|
|
21
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MouseEventHandler, ReactNode } from 'react';
|
|
2
|
-
type AppShellProps = {
|
|
2
|
+
export type AppShellProps = {
|
|
3
3
|
title?: string;
|
|
4
4
|
/**
|
|
5
5
|
* Brand logo for the titlebar (local asset URL / data URL).
|
|
@@ -8,7 +8,10 @@ type AppShellProps = {
|
|
|
8
8
|
logoSrc?: string;
|
|
9
9
|
/** Fired when the titlebar logo is clicked (e.g. secret gestures). */
|
|
10
10
|
onLogoClick?: MouseEventHandler<HTMLButtonElement>;
|
|
11
|
+
/**
|
|
12
|
+
* Titlebar trailing actions (before min/max/close), e.g. CommandPalette + ThemeSwitcher.
|
|
13
|
+
*/
|
|
14
|
+
actions?: ReactNode;
|
|
11
15
|
children: ReactNode;
|
|
12
16
|
};
|
|
13
|
-
export declare function AppShell({ title, logoSrc, onLogoClick, children, }: AppShellProps): import('react').JSX.Element;
|
|
14
|
-
export {};
|
|
17
|
+
export declare function AppShell({ title, logoSrc, onLogoClick, actions, children, }: AppShellProps): import('react').JSX.Element;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { MouseEventHandler } from 'react';
|
|
2
|
-
type TitleBarProps = {
|
|
1
|
+
import { MouseEventHandler, ReactNode } from 'react';
|
|
2
|
+
export type TitleBarProps = {
|
|
3
3
|
title?: string;
|
|
4
4
|
isMaximized: boolean;
|
|
5
5
|
/** Host brand logo URL (local asset / data URL). Falls back to built-in mark. */
|
|
6
6
|
logoSrc?: string;
|
|
7
7
|
onLogoClick?: MouseEventHandler<HTMLButtonElement>;
|
|
8
|
+
/**
|
|
9
|
+
* Extra chrome before window controls (command palette, theme switcher, …).
|
|
10
|
+
* Marked no-drag so clicks work on frameless windows.
|
|
11
|
+
*/
|
|
12
|
+
actions?: ReactNode;
|
|
8
13
|
};
|
|
9
|
-
export declare function TitleBar({ title, isMaximized, logoSrc, onLogoClick, }: TitleBarProps): import('react').JSX.Element;
|
|
10
|
-
export {};
|
|
14
|
+
export declare function TitleBar({ title, isMaximized, logoSrc, onLogoClick, actions, }: TitleBarProps): import('react').JSX.Element;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { AppShell } from './AppShell';
|
|
2
|
+
export type { AppShellProps } from './AppShell';
|
|
2
3
|
export { TitleBar } from './components/TitleBar';
|
|
4
|
+
export type { TitleBarProps } from './components/TitleBar';
|
|
3
5
|
export { ResizeHandles } from './components/ResizeHandles';
|
|
4
6
|
export { useWindowMaximized } from './hooks/useWindowMaximized';
|