@taskon/widget-react 0.0.1-beta.2 → 0.0.1-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -17
- package/dist/CommunityTaskList.css +1593 -1741
- package/dist/EligibilityInfo.css +1275 -582
- package/dist/LeaderboardWidget.css +355 -152
- package/dist/PageBuilder.css +0 -2
- package/dist/Quest.css +1140 -903
- package/dist/TaskOnProvider.css +50 -31
- package/dist/UserCenterWidget.css +108 -237
- package/dist/UserCenterWidget2.css +2016 -711
- package/dist/chunks/{CommunityTaskList-BlH1Wdd5.js → CommunityTaskList-C9Gv8KOF.js} +962 -827
- package/dist/chunks/{EligibilityInfo-C7GZ2G5u.js → EligibilityInfo-D-Fuy9GE.js} +1137 -449
- package/dist/chunks/{LeaderboardWidget-CmYfDeHV.js → LeaderboardWidget-BV2D2q1N.js} +15 -10
- package/dist/chunks/{PageBuilder-Bw0zSkFh.js → PageBuilder-DQoU4Mwf.js} +5 -5
- package/dist/chunks/{Quest-DKFZ-pPU.js → Quest-B5NyVr3o.js} +516 -325
- package/dist/chunks/{TaskOnProvider-BD6Vp2x8.js → TaskOnProvider-93UxARFo.js} +2 -207
- package/dist/chunks/{ThemeProvider-wnSXrNQb.js → ThemeProvider-CPI_roeh.js} +249 -57
- package/dist/chunks/{UserCenterWidget-Cw6h_5hT.js → UserCenterWidget-BRtigY_S.js} +206 -1002
- package/dist/chunks/UserCenterWidget-cADBSVg7.js +8358 -0
- package/dist/chunks/{WidgetShell-D_5OjvNZ.js → dynamic-import-helper-DwXlQC0S.js} +607 -40
- package/dist/chunks/useToast-CaRkylKe.js +304 -0
- package/dist/chunks/{usercenter-ja-uu-XfVF9.js → usercenter-ja-B2465c1O.js} +4 -10
- package/dist/chunks/{usercenter-ko-DYgUOVzd.js → usercenter-ko-xAEYxqLg.js} +4 -10
- package/dist/community-task.d.ts +34 -3
- package/dist/community-task.js +1 -1
- package/dist/core.d.ts +40 -3
- package/dist/core.js +9 -10
- package/dist/dynamic-import-helper.css +596 -289
- package/dist/index.d.ts +207 -10
- package/dist/index.js +21 -19
- package/dist/leaderboard.d.ts +8 -1
- package/dist/leaderboard.js +2 -2
- package/dist/page-builder.js +1 -1
- package/dist/quest.d.ts +8 -2
- package/dist/quest.js +1 -1
- package/dist/user-center.d.ts +20 -136
- package/dist/user-center.js +19 -236
- package/package.json +10 -2
- package/dist/TipPopover.css +0 -210
- package/dist/WidgetShell.css +0 -182
- package/dist/chunks/TipPopover-BrW8jo71.js +0 -2926
- package/dist/chunks/UserCenterWidget-BE329iS7.js +0 -3546
- package/dist/chunks/dynamic-import-helper-DxEFwm31.js +0 -537
- package/dist/chunks/useToast-B-wyO5zL.js +0 -93
- package/dist/chunks/useWidgetLocale-JDelxtt8.js +0 -74
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { CampaignStatusInfo } from '@taskon/core';
|
|
|
2
2
|
import { CampaignWinnerReward } from '@taskon/core';
|
|
3
3
|
import { ChainInfo } from '@taskon/core';
|
|
4
4
|
import { ChainType } from '@taskon/core';
|
|
5
|
+
import { CloudThemeConfig } from '@taskon/core';
|
|
5
6
|
import { CommunityInfo } from '@taskon/core';
|
|
6
7
|
import { CommunityTaskInfo } from '@taskon/core';
|
|
7
8
|
import { ComponentPropsWithoutRef } from 'react';
|
|
@@ -179,6 +180,39 @@ export declare interface CardSelectorProps<T = string | number> {
|
|
|
179
180
|
*/
|
|
180
181
|
export declare function clearLocaleCache(): void;
|
|
181
182
|
|
|
183
|
+
/**
|
|
184
|
+
* Convert cloud theme config (B-end format) to React TaskOnThemeConfig.
|
|
185
|
+
*
|
|
186
|
+
* Mapping:
|
|
187
|
+
* CloudThemeConfig.colorMode → TaskOnThemeConfig.mode + modeStrategy
|
|
188
|
+
* CloudThemeConfig.light.*Color → light.seed.*
|
|
189
|
+
* CloudThemeConfig.dark.*Color → dark.seed.*
|
|
190
|
+
* CloudThemeConfig.shape → seed.borderRadius / seed.fontSize
|
|
191
|
+
* CloudThemeConfig.spacing → seed.spacingBaseStep / seed.spacingChangeUnit
|
|
192
|
+
*
|
|
193
|
+
* Design rule:
|
|
194
|
+
* - B-end configurable theme fields are treated as SeedToken inputs.
|
|
195
|
+
* - Map tokens are derived by the theme algorithm from seed values.
|
|
196
|
+
*
|
|
197
|
+
* @param cloud - Cloud theme configuration from B-end
|
|
198
|
+
* @returns React-compatible TaskOnThemeConfig
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* ```ts
|
|
202
|
+
* const cloudTheme: CloudThemeConfig = {
|
|
203
|
+
* colorMode: { type: "dual", dualVariant: "auto" },
|
|
204
|
+
* light: { primaryColor: "#6366f1", ... },
|
|
205
|
+
* dark: { primaryColor: "#818cf8", ... },
|
|
206
|
+
* spacing: { sizeBaseStep: 4, sizeChangeUnit: 2 },
|
|
207
|
+
* shape: { fontSize: 14, borderRadius: 8 },
|
|
208
|
+
* };
|
|
209
|
+
*
|
|
210
|
+
* const reactTheme = cloudThemeToReactTheme(cloudTheme);
|
|
211
|
+
* // { mode: "auto", seed: { borderRadius: 8, fontSize: 14 }, light: {...}, dark: {...} }
|
|
212
|
+
* ```
|
|
213
|
+
*/
|
|
214
|
+
export declare function cloudThemeToReactTheme(cloud: CloudThemeConfig): TaskOnThemeConfig;
|
|
215
|
+
|
|
182
216
|
/**
|
|
183
217
|
* Common messages type definition
|
|
184
218
|
*
|
|
@@ -248,6 +282,11 @@ export declare interface CommunityTaskListProps {
|
|
|
248
282
|
* Cloud config includes display options, sector filtering, etc.
|
|
249
283
|
*/
|
|
250
284
|
widgetId?: number;
|
|
285
|
+
/**
|
|
286
|
+
* Manual theme mode override (highest priority when provided).
|
|
287
|
+
* Recommended with dual + toggle cloud strategy.
|
|
288
|
+
*/
|
|
289
|
+
themeMode?: "light" | "dark" | "auto";
|
|
251
290
|
/** Whether in preview mode */
|
|
252
291
|
isPreview?: boolean;
|
|
253
292
|
/** 社区信息(用于前置任务链接跳转) */
|
|
@@ -266,8 +305,9 @@ export declare interface CommunityTaskListProps {
|
|
|
266
305
|
*/
|
|
267
306
|
initialTaskId?: number;
|
|
268
307
|
/**
|
|
269
|
-
* Callback when dialog opens (host can use to update URL params)
|
|
270
|
-
*
|
|
308
|
+
* Callback when dialog opens or switches task (host can use to update URL params).
|
|
309
|
+
* Fires whenever active task changes, including eligibility-driven task switches.
|
|
310
|
+
* @param taskId Currently active task ID
|
|
271
311
|
* @example
|
|
272
312
|
* ```tsx
|
|
273
313
|
* onTaskOpen={(taskId) => router.replace(`?task=${taskId}`)}
|
|
@@ -275,13 +315,28 @@ export declare interface CommunityTaskListProps {
|
|
|
275
315
|
*/
|
|
276
316
|
onTaskOpen?: (taskId: number) => void;
|
|
277
317
|
/**
|
|
278
|
-
* Callback when dialog closes (host can use to clear URL params)
|
|
318
|
+
* Callback when dialog closes (host can use to clear URL params).
|
|
319
|
+
* Fires only when dialog is actually closed; in-place task switches do not emit close first.
|
|
279
320
|
* @example
|
|
280
321
|
* ```tsx
|
|
281
322
|
* onTaskClose={() => router.replace(pathname)}
|
|
282
323
|
* ```
|
|
283
324
|
*/
|
|
284
325
|
onTaskClose?: () => void;
|
|
326
|
+
/**
|
|
327
|
+
* Initial TaskChain campaign ID from URL (passed by host after parsing URL)
|
|
328
|
+
* Used to auto-open TaskChain dialog on page refresh or shared links
|
|
329
|
+
*/
|
|
330
|
+
initialTaskChainId?: number;
|
|
331
|
+
/**
|
|
332
|
+
* Callback when TaskChain dialog opens (host can use to update URL params)
|
|
333
|
+
* @param taskChainId Currently opened TaskChain campaign ID
|
|
334
|
+
*/
|
|
335
|
+
onTaskChainOpen?: (taskChainId: number) => void;
|
|
336
|
+
/**
|
|
337
|
+
* Callback when TaskChain dialog closes (host can use to clear URL params)
|
|
338
|
+
*/
|
|
339
|
+
onTaskChainClose?: () => void;
|
|
285
340
|
/** Sector IDs to display; undefined means show all */
|
|
286
341
|
sectorIds?: number[];
|
|
287
342
|
/** Whether to show sector tab selector (default: true) */
|
|
@@ -292,6 +347,10 @@ export declare interface CommunityTaskListProps {
|
|
|
292
347
|
showSectorDescription?: boolean;
|
|
293
348
|
/** Whether to show sector reward (default: true) */
|
|
294
349
|
showSectorReward?: boolean;
|
|
350
|
+
/** How reward details are displayed in TaskChain claimed NFT cards */
|
|
351
|
+
rewardDisplayMode?: RewardDisplayMode;
|
|
352
|
+
/** Redirect URL for reward details when mode is redirect */
|
|
353
|
+
rewardRedirectUrl?: string;
|
|
295
354
|
}
|
|
296
355
|
|
|
297
356
|
/**
|
|
@@ -466,6 +525,11 @@ export declare interface CommunityTaskProps {
|
|
|
466
525
|
coolDown?: number;
|
|
467
526
|
/** 冷却结束回调(用于重置 coolDown 状态) */
|
|
468
527
|
onCoolDownComplete?: () => void;
|
|
528
|
+
/**
|
|
529
|
+
* 周期任务倒计时结束回调
|
|
530
|
+
* 用于在 next_time 到期后刷新单个任务卡片状态
|
|
531
|
+
*/
|
|
532
|
+
onDoneCountdownComplete?: (taskId: number) => void | Promise<void>;
|
|
469
533
|
/** 是否禁用交互 */
|
|
470
534
|
disabled?: boolean;
|
|
471
535
|
/**
|
|
@@ -497,6 +561,84 @@ export declare interface CommunityTaskProps {
|
|
|
497
561
|
nextTime?: number;
|
|
498
562
|
}
|
|
499
563
|
|
|
564
|
+
/**
|
|
565
|
+
* ConfirmNoticeDialog component
|
|
566
|
+
*
|
|
567
|
+
* @description
|
|
568
|
+
* - Replicates the original ConfirmNotice content structure
|
|
569
|
+
* - Supports default two-button mode and custom action slot
|
|
570
|
+
* - Reuses Dialog for accessibility / portal / keyboard interactions
|
|
571
|
+
* - Intentionally removes glow background layer
|
|
572
|
+
*/
|
|
573
|
+
export declare function ConfirmNoticeDialog({ open, onOpenChange, type, title, desc, col, cancelButton, confirmButton, onCancel, onConfirm, onClose, closeOnCancel, closeOnConfirm, cancelDisabled, confirmDisabled, showCloseButton, closeOnOverlayClick, closeOnEscapeKey, maxWidth, className, contentClassName, children, actions, footer, accessibilityTitle, accessibilityDescription, }: ConfirmNoticeDialogProps): default_2.ReactElement;
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* ConfirmNoticeDialog props
|
|
577
|
+
*/
|
|
578
|
+
export declare interface ConfirmNoticeDialogProps {
|
|
579
|
+
/** Whether the dialog is open (controlled) */
|
|
580
|
+
open: boolean;
|
|
581
|
+
/** Controlled open state callback */
|
|
582
|
+
onOpenChange: (open: boolean) => void;
|
|
583
|
+
/** Notice visual type */
|
|
584
|
+
type?: ConfirmNoticeType;
|
|
585
|
+
/** Title rendered below the icon */
|
|
586
|
+
title?: default_2.ReactNode;
|
|
587
|
+
/** Description rendered below the title */
|
|
588
|
+
desc?: default_2.ReactNode;
|
|
589
|
+
/** Allow action area wrapping on desktop */
|
|
590
|
+
col?: boolean;
|
|
591
|
+
/** Cancel button label. Hidden if omitted */
|
|
592
|
+
cancelButton?: default_2.ReactNode;
|
|
593
|
+
/** Confirm button label. Hidden if omitted */
|
|
594
|
+
confirmButton?: default_2.ReactNode;
|
|
595
|
+
/** Cancel button click callback */
|
|
596
|
+
onCancel?: () => void;
|
|
597
|
+
/** Confirm button click callback */
|
|
598
|
+
onConfirm?: () => void;
|
|
599
|
+
/** Called when dialog closes via overlay / ESC / close button / programmatic close */
|
|
600
|
+
onClose?: () => void;
|
|
601
|
+
/** Auto close after cancel click, defaults to true */
|
|
602
|
+
closeOnCancel?: boolean;
|
|
603
|
+
/** Auto close after confirm click, defaults to true */
|
|
604
|
+
closeOnConfirm?: boolean;
|
|
605
|
+
/** Disable cancel button */
|
|
606
|
+
cancelDisabled?: boolean;
|
|
607
|
+
/** Disable confirm button */
|
|
608
|
+
confirmDisabled?: boolean;
|
|
609
|
+
/** Show top-right close button, defaults to false (closer to original ConfirmNotice) */
|
|
610
|
+
showCloseButton?: boolean;
|
|
611
|
+
/** Allow closing by overlay click, defaults to true */
|
|
612
|
+
closeOnOverlayClick?: boolean;
|
|
613
|
+
/** Allow closing by ESC key, defaults to true */
|
|
614
|
+
closeOnEscapeKey?: boolean;
|
|
615
|
+
/** Dialog max width, defaults to 470 (same as original) */
|
|
616
|
+
maxWidth?: string | number;
|
|
617
|
+
/** Additional class on content root */
|
|
618
|
+
className?: string;
|
|
619
|
+
/** Additional class on Dialog.Content */
|
|
620
|
+
contentClassName?: string;
|
|
621
|
+
/** Custom body content between description and actions */
|
|
622
|
+
children?: default_2.ReactNode;
|
|
623
|
+
/** Custom action area. Overrides default cancel/confirm buttons */
|
|
624
|
+
actions?: default_2.ReactNode;
|
|
625
|
+
/** Extra content rendered after actions */
|
|
626
|
+
footer?: default_2.ReactNode;
|
|
627
|
+
/**
|
|
628
|
+
* Accessible dialog title
|
|
629
|
+
* - Falls back to string `title`
|
|
630
|
+
* - Uses default value when title is not a string
|
|
631
|
+
*/
|
|
632
|
+
accessibilityTitle?: string;
|
|
633
|
+
/** Accessible dialog description */
|
|
634
|
+
accessibilityDescription?: string;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* ConfirmNotice visual style type
|
|
639
|
+
*/
|
|
640
|
+
export declare type ConfirmNoticeType = "default" | "success" | "warn";
|
|
641
|
+
|
|
500
642
|
/**
|
|
501
643
|
* Create a locale loader function for a widget
|
|
502
644
|
*
|
|
@@ -626,6 +768,11 @@ export declare interface LeaderboardWidgetProps {
|
|
|
626
768
|
* Cloud config provides leaderboard tabs, display options, etc.
|
|
627
769
|
*/
|
|
628
770
|
widgetId?: number;
|
|
771
|
+
/**
|
|
772
|
+
* Manual theme mode override (highest priority when provided).
|
|
773
|
+
* Recommended with dual + toggle cloud strategy.
|
|
774
|
+
*/
|
|
775
|
+
themeMode?: "light" | "dark" | "auto";
|
|
629
776
|
/**
|
|
630
777
|
* 排行榜配置
|
|
631
778
|
* 包含所有 Tab 的配置和显示选项
|
|
@@ -689,13 +836,32 @@ export declare interface MapToken {
|
|
|
689
836
|
colorSuccess?: string;
|
|
690
837
|
colorWarning?: string;
|
|
691
838
|
colorError?: string;
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
839
|
+
/** Page/canvas base background */
|
|
840
|
+
colorBgCanvas?: string;
|
|
841
|
+
/** Main surface background (cards, panels) */
|
|
842
|
+
colorBgSurface?: string;
|
|
843
|
+
/** Subtle surface background (low-contrast cards) */
|
|
844
|
+
colorBgSurfaceSubtle?: string;
|
|
845
|
+
/** Strong surface background (section headers, tracks) */
|
|
846
|
+
colorBgSurfaceStrong?: string;
|
|
847
|
+
/** Floating layer background (tooltip, dropdown, popover) */
|
|
848
|
+
colorBgFloating?: string;
|
|
849
|
+
/** Overlay mask background */
|
|
850
|
+
colorBgMask?: string;
|
|
851
|
+
/** Inset background (inner slots/containers) */
|
|
852
|
+
colorBgInset?: string;
|
|
853
|
+
colorSuccessBg?: string;
|
|
854
|
+
colorWarningBg?: string;
|
|
855
|
+
colorErrorBg?: string;
|
|
856
|
+
colorSecondaryBg?: string;
|
|
695
857
|
colorText?: string;
|
|
696
858
|
colorTextSecondary?: string;
|
|
697
859
|
colorTextTertiary?: string;
|
|
698
860
|
colorTextDisabled?: string;
|
|
861
|
+
/** Link color */
|
|
862
|
+
colorLink?: string;
|
|
863
|
+
/** Text color on primary background elements (e.g. primary button text) */
|
|
864
|
+
colorTextOnPrimary?: string;
|
|
699
865
|
colorBorder?: string;
|
|
700
866
|
colorBorderSecondary?: string;
|
|
701
867
|
borderRadius?: number;
|
|
@@ -776,6 +942,14 @@ export declare interface QuestWidgetProps {
|
|
|
776
942
|
* 云端配置包含 campaignId、显示选项、自定义分享文案等
|
|
777
943
|
*/
|
|
778
944
|
widgetId?: number;
|
|
945
|
+
/**
|
|
946
|
+
* 手动主题模式(传入后拥有最高优先级)
|
|
947
|
+
* 建议在云端配置为 dual + toggle 时使用,避免与固定模式配置语义冲突。
|
|
948
|
+
* - light: 强制浅色主题
|
|
949
|
+
* - dark: 强制深色主题
|
|
950
|
+
* - auto: 跟随系统主题
|
|
951
|
+
*/
|
|
952
|
+
themeMode?: "light" | "dark" | "auto";
|
|
779
953
|
/**
|
|
780
954
|
* Campaign ID
|
|
781
955
|
* - 如果传入 widgetId,campaignId 可从云端配置获取
|
|
@@ -810,8 +984,6 @@ export declare interface QuestWidgetProps {
|
|
|
810
984
|
onError?: (error: Error) => void;
|
|
811
985
|
/** 连接钱包回调(未登录时触发) */
|
|
812
986
|
onConnectWallet?: () => void;
|
|
813
|
-
/** 领取 NFT 回调 (NFT/MintedNft/Cap) */
|
|
814
|
-
onClaimNft?: (reward: RewardValueInfo, layer: CampaignWinnerReward) => Promise<void>;
|
|
815
987
|
/** 领取 Discord 角色回调 */
|
|
816
988
|
onClaimDiscordRole?: (reward: RewardValueInfo, layer: CampaignWinnerReward) => Promise<void>;
|
|
817
989
|
/**
|
|
@@ -854,10 +1026,22 @@ export declare interface SeedToken {
|
|
|
854
1026
|
colorWarning?: string;
|
|
855
1027
|
/** Error color */
|
|
856
1028
|
colorError?: string;
|
|
1029
|
+
/** Link color */
|
|
1030
|
+
colorLink?: string;
|
|
1031
|
+
/** Base text color */
|
|
1032
|
+
colorText?: string;
|
|
1033
|
+
/** Text color on primary buttons */
|
|
1034
|
+
colorTextOnPrimary?: string;
|
|
1035
|
+
/** Base page background color (used to derive background layers) */
|
|
1036
|
+
colorBgBase?: string;
|
|
857
1037
|
/** Base border radius */
|
|
858
1038
|
borderRadius?: number;
|
|
859
1039
|
/** Base font size */
|
|
860
1040
|
fontSize?: number;
|
|
1041
|
+
/** Spacing base step from cloud config */
|
|
1042
|
+
spacingBaseStep?: number;
|
|
1043
|
+
/** Spacing change unit from cloud config */
|
|
1044
|
+
spacingChangeUnit?: number;
|
|
861
1045
|
}
|
|
862
1046
|
|
|
863
1047
|
/**
|
|
@@ -1045,6 +1229,12 @@ export declare interface TaskOnTheme {
|
|
|
1045
1229
|
export declare interface TaskOnThemeConfig {
|
|
1046
1230
|
/** Theme mode */
|
|
1047
1231
|
mode?: ThemeMode;
|
|
1232
|
+
/**
|
|
1233
|
+
* Theme mode strategy.
|
|
1234
|
+
* - auto: mode selection follows standard mode behavior
|
|
1235
|
+
* - toggle: SDK/host controls mode manually (typically used with dual+toggle from cloud config)
|
|
1236
|
+
*/
|
|
1237
|
+
modeStrategy?: "auto" | "toggle";
|
|
1048
1238
|
/** Compact mode */
|
|
1049
1239
|
compact?: boolean;
|
|
1050
1240
|
/** Seed tokens */
|
|
@@ -1076,7 +1266,7 @@ export declare interface TaskOnThemeConfig {
|
|
|
1076
1266
|
* />
|
|
1077
1267
|
* ```
|
|
1078
1268
|
*/
|
|
1079
|
-
export declare function TemplateTask({ task, userStatus, meetConditions, communityInfo, disabled, onClick, onClaim, onUpdate, onEligTaskClick, coolDown: sharedCoolDown, onCoolDownComplete: sharedOnCoolDownComplete, }: TemplateTaskProps): default_2.ReactElement;
|
|
1269
|
+
export declare function TemplateTask({ task, userStatus, meetConditions, communityInfo, disabled, onClick, onClaim, onUpdate, onEligTaskClick, coolDown: sharedCoolDown, onCoolDownComplete: sharedOnCoolDownComplete, onDoneCountdownComplete, }: TemplateTaskProps): default_2.ReactElement;
|
|
1080
1270
|
|
|
1081
1271
|
/**
|
|
1082
1272
|
* TemplateTask 组件属性
|
|
@@ -1107,13 +1297,15 @@ export declare interface TemplateTaskProps {
|
|
|
1107
1297
|
cool_down?: number;
|
|
1108
1298
|
}>;
|
|
1109
1299
|
/** 任务更新回调(完成/验证成功后) */
|
|
1110
|
-
onUpdate?: () => void
|
|
1300
|
+
onUpdate?: (taskId: number) => void | Promise<void>;
|
|
1111
1301
|
/** 点击资格条件中的前置任务回调(用于打开任务弹窗) */
|
|
1112
1302
|
onEligTaskClick?: (taskId: number) => void;
|
|
1113
1303
|
/** 共享的 coolDown 值(来自父组件) */
|
|
1114
1304
|
coolDown?: number;
|
|
1115
1305
|
/** coolDown 倒计时结束回调 */
|
|
1116
1306
|
onCoolDownComplete?: () => void;
|
|
1307
|
+
/** 周期任务倒计时结束回调(用于刷新单任务状态) */
|
|
1308
|
+
onDoneCountdownComplete?: (taskId: number) => void | Promise<void>;
|
|
1117
1309
|
}
|
|
1118
1310
|
|
|
1119
1311
|
/**
|
|
@@ -1340,6 +1532,11 @@ export declare interface UserCenterWidgetProps {
|
|
|
1340
1532
|
* Cloud config provides tab options, display settings, etc.
|
|
1341
1533
|
*/
|
|
1342
1534
|
widgetId?: number;
|
|
1535
|
+
/**
|
|
1536
|
+
* Manual theme mode override (highest priority when provided).
|
|
1537
|
+
* Recommended with dual + toggle cloud strategy.
|
|
1538
|
+
*/
|
|
1539
|
+
themeMode?: "light" | "dark" | "auto";
|
|
1343
1540
|
/** Widget 配置 */
|
|
1344
1541
|
config?: UserCenterConfig;
|
|
1345
1542
|
/** 默认选中的 Tab */
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { B, c } from "./chunks/dynamic-import-helper-DwXlQC0S.js";
|
|
2
|
+
import { T, c as c2, i, u, a, b } from "./chunks/ThemeProvider-CPI_roeh.js";
|
|
3
|
+
import { C, B as B2, a as a2, T as T2 } from "./chunks/CommunityTaskList-C9Gv8KOF.js";
|
|
3
4
|
import { RewardType } from "@taskon/core";
|
|
4
|
-
import { T as T3, c, b, i, a as a3, u as u2 } from "./chunks/TaskOnProvider-
|
|
5
|
-
import { a as a4, u as u3 } from "./chunks/useToast-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { P } from "./chunks/PageBuilder-Bw0zSkFh.js";
|
|
5
|
+
import { T as T3, c as c3, b as b2, i as i2, a as a3, u as u2 } from "./chunks/TaskOnProvider-93UxARFo.js";
|
|
6
|
+
import { a as a4, u as u3 } from "./chunks/useToast-CaRkylKe.js";
|
|
7
|
+
import { C as C2 } from "./chunks/EligibilityInfo-D-Fuy9GE.js";
|
|
8
|
+
import { L } from "./chunks/LeaderboardWidget-BV2D2q1N.js";
|
|
9
|
+
import { Q, Q as Q2, u as u4, b as b3, a as a5 } from "./chunks/Quest-B5NyVr3o.js";
|
|
10
|
+
import { U } from "./chunks/UserCenterWidget-BRtigY_S.js";
|
|
11
|
+
import { P } from "./chunks/PageBuilder-DQoU4Mwf.js";
|
|
12
12
|
export {
|
|
13
|
-
|
|
13
|
+
B as Button,
|
|
14
14
|
C as CardSelector,
|
|
15
|
-
|
|
15
|
+
B2 as CommunityTask,
|
|
16
16
|
a2 as CommunityTaskList,
|
|
17
|
+
C2 as ConfirmNoticeDialog,
|
|
17
18
|
L as LeaderboardWidget,
|
|
18
19
|
P as PageBuilder,
|
|
19
20
|
Q as Quest,
|
|
@@ -24,18 +25,19 @@ export {
|
|
|
24
25
|
T as ThemeProvider,
|
|
25
26
|
U as UserCenterWidget,
|
|
26
27
|
c2 as clearLocaleCache,
|
|
27
|
-
c as
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
i2 as
|
|
28
|
+
c as cloudThemeToReactTheme,
|
|
29
|
+
c3 as createLocaleLoader,
|
|
30
|
+
b2 as createT,
|
|
31
|
+
i2 as interpolate,
|
|
32
|
+
i as isSupportedLocale,
|
|
31
33
|
a3 as useCommonLocale,
|
|
32
34
|
a4 as useEvmWallet,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
u4 as useQuestDetail,
|
|
36
|
+
b3 as useQuestStatus,
|
|
35
37
|
a5 as useQuestUserStatus,
|
|
36
38
|
u as useTaskOnAuth,
|
|
37
39
|
a as useTaskOnTheme,
|
|
38
40
|
u2 as useTranslation,
|
|
39
41
|
u3 as useWallet,
|
|
40
|
-
|
|
42
|
+
b as useWidgetLocale
|
|
41
43
|
};
|
package/dist/leaderboard.d.ts
CHANGED
|
@@ -240,6 +240,11 @@ export declare interface LeaderboardWidgetProps {
|
|
|
240
240
|
* Cloud config provides leaderboard tabs, display options, etc.
|
|
241
241
|
*/
|
|
242
242
|
widgetId?: number;
|
|
243
|
+
/**
|
|
244
|
+
* Manual theme mode override (highest priority when provided).
|
|
245
|
+
* Recommended with dual + toggle cloud strategy.
|
|
246
|
+
*/
|
|
247
|
+
themeMode?: "light" | "dark" | "auto";
|
|
243
248
|
/**
|
|
244
249
|
* 排行榜配置
|
|
245
250
|
* 包含所有 Tab 的配置和显示选项
|
|
@@ -525,13 +530,15 @@ export declare interface UsePaginationResult {
|
|
|
525
530
|
* @param props - 组件属性
|
|
526
531
|
* @returns 用户单元格元素
|
|
527
532
|
*/
|
|
528
|
-
export declare function UserCell({ userId, userName, avatar, isCurrentUser, youLabel, onUserClick, className, }: UserCellProps): JSX.Element;
|
|
533
|
+
export declare function UserCell({ userId, userName, displayName, avatar, isCurrentUser, youLabel, onUserClick, className, }: UserCellProps): JSX.Element;
|
|
529
534
|
|
|
530
535
|
export declare interface UserCellProps {
|
|
531
536
|
/** 用户 ID */
|
|
532
537
|
userId: number;
|
|
533
538
|
/** 用户名 */
|
|
534
539
|
userName: string;
|
|
540
|
+
/** 展示用名称(可用于格式化地址) */
|
|
541
|
+
displayName?: string;
|
|
535
542
|
/** 头像 URL */
|
|
536
543
|
avatar: string;
|
|
537
544
|
/** 是否为当前登录用户 */
|
package/dist/leaderboard.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c, e, d, b, L, R, f, U, a, u } from "./chunks/LeaderboardWidget-
|
|
2
|
-
import { u as u2 } from "./chunks/dynamic-import-helper-
|
|
1
|
+
import { c, e, d, b, L, R, f, U, a, u } from "./chunks/LeaderboardWidget-BV2D2q1N.js";
|
|
2
|
+
import { u as u2 } from "./chunks/dynamic-import-helper-DwXlQC0S.js";
|
|
3
3
|
import { isAllTimeResponse, isCampaignResponse } from "@taskon/core";
|
|
4
4
|
export {
|
|
5
5
|
c as LeaderboardHeader,
|
package/dist/page-builder.js
CHANGED
package/dist/quest.d.ts
CHANGED
|
@@ -211,6 +211,14 @@ export declare interface QuestWidgetProps {
|
|
|
211
211
|
* 云端配置包含 campaignId、显示选项、自定义分享文案等
|
|
212
212
|
*/
|
|
213
213
|
widgetId?: number;
|
|
214
|
+
/**
|
|
215
|
+
* 手动主题模式(传入后拥有最高优先级)
|
|
216
|
+
* 建议在云端配置为 dual + toggle 时使用,避免与固定模式配置语义冲突。
|
|
217
|
+
* - light: 强制浅色主题
|
|
218
|
+
* - dark: 强制深色主题
|
|
219
|
+
* - auto: 跟随系统主题
|
|
220
|
+
*/
|
|
221
|
+
themeMode?: "light" | "dark" | "auto";
|
|
214
222
|
/**
|
|
215
223
|
* Campaign ID
|
|
216
224
|
* - 如果传入 widgetId,campaignId 可从云端配置获取
|
|
@@ -245,8 +253,6 @@ export declare interface QuestWidgetProps {
|
|
|
245
253
|
onError?: (error: Error) => void;
|
|
246
254
|
/** 连接钱包回调(未登录时触发) */
|
|
247
255
|
onConnectWallet?: () => void;
|
|
248
|
-
/** 领取 NFT 回调 (NFT/MintedNft/Cap) */
|
|
249
|
-
onClaimNft?: (reward: RewardValueInfo, layer: CampaignWinnerReward) => Promise<void>;
|
|
250
256
|
/** 领取 Discord 角色回调 */
|
|
251
257
|
onClaimDiscordRole?: (reward: RewardValueInfo, layer: CampaignWinnerReward) => Promise<void>;
|
|
252
258
|
/**
|
package/dist/quest.js
CHANGED