@taskon/widget-react 0.0.1-beta.3 → 0.0.1-beta.5
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 +1 -1
- package/dist/CommunityTaskList.css +1340 -1292
- package/dist/EligibilityInfo.css +512 -332
- package/dist/LeaderboardWidget.css +355 -152
- package/dist/Quest.css +911 -629
- package/dist/TaskOnProvider.css +35 -16
- package/dist/UserCenterWidget.css +116 -71
- package/dist/UserCenterWidget2.css +1285 -748
- package/dist/chunks/{CommunityTaskList-C9mPl_31.js → CommunityTaskList-CrMvOB8w.js} +784 -452
- package/dist/chunks/{EligibilityInfo-DGBffKN8.js → EligibilityInfo-Beww12QX.js} +1569 -597
- package/dist/chunks/{LeaderboardWidget-DPOQVXkT.js → LeaderboardWidget-DwuSpVl0.js} +2 -2
- package/dist/chunks/{PageBuilder-WCZvxL2j.js → PageBuilder-DsX6Tv0N.js} +5 -5
- package/dist/chunks/{Quest-DjGH_8bx.js → Quest-CuD2LElS.js} +713 -484
- package/dist/chunks/{TaskOnProvider-iannERG1.js → TaskOnProvider-xUeP2Nro.js} +78 -65
- package/dist/chunks/{ThemeProvider-DNJqI2lD.js → ThemeProvider-Bt4UZ33y.js} +33 -9
- package/dist/chunks/{UserCenterWidget-CAhgp46j.js → UserCenterWidget-CB0hnj-L.js} +69 -31
- package/dist/chunks/{UserCenterWidget-B0O-f_xl.js → UserCenterWidget-CvU6K4AC.js} +21 -7
- package/dist/chunks/communitytask-es-1zawvXEX.js +311 -0
- package/dist/chunks/communitytask-ja-CmW6nP-L.js +311 -0
- package/dist/chunks/communitytask-ko-BD0hzQSi.js +311 -0
- package/dist/chunks/communitytask-ru-DhySaZL8.js +311 -0
- package/dist/chunks/createLocaleLoader-BameiEhU.js +65 -0
- package/dist/chunks/{dynamic-import-helper-B2j_dZ4V.js → dynamic-import-helper-WmIF58Sb.js} +1 -1
- package/dist/chunks/quest-es-D-b5xcme.js +948 -0
- package/dist/chunks/quest-ja-Dxd2vqBF.js +948 -0
- package/dist/chunks/quest-ko-CSmRWgK_.js +948 -0
- package/dist/chunks/quest-ru-CkEKv1_F.js +948 -0
- package/dist/chunks/taskwidget-es-Do9b3Mqw.js +245 -0
- package/dist/chunks/taskwidget-ja-CqSu-yWA.js +245 -0
- package/dist/chunks/taskwidget-ko-EHgXFV4B.js +245 -0
- package/dist/chunks/taskwidget-ru-CMbLQDK4.js +245 -0
- package/dist/community-task.js +1 -1
- package/dist/core.d.ts +17 -5
- package/dist/core.js +8 -7
- package/dist/dynamic-import-helper.css +424 -303
- package/dist/index.d.ts +56 -5
- package/dist/index.js +18 -16
- package/dist/leaderboard.js +2 -2
- package/dist/page-builder.js +1 -1
- package/dist/quest.d.ts +682 -0
- package/dist/quest.js +3 -1
- package/dist/user-center.d.ts +3 -1
- package/dist/user-center.js +5 -5
- package/package.json +7 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { CommunityInfo } from '@taskon/core';
|
|
|
7
7
|
import { CommunityTaskInfo } from '@taskon/core';
|
|
8
8
|
import { ComponentPropsWithoutRef } from 'react';
|
|
9
9
|
import { default as default_2 } from 'react';
|
|
10
|
+
import { ElementType } from 'react';
|
|
10
11
|
import { ForwardRefExoticComponent } from 'react';
|
|
11
12
|
import { GtcUserTaskStatus } from '@taskon/core';
|
|
12
13
|
import { LeaderboardContentConfig } from '@taskon/core';
|
|
@@ -654,6 +655,8 @@ export declare type ConfirmNoticeType = "default" | "success" | "warn";
|
|
|
654
655
|
* const loadMessages = createLocaleLoader(enMessages, {
|
|
655
656
|
* ko: () => import('./locales/ko'),
|
|
656
657
|
* ja: () => import('./locales/ja'),
|
|
658
|
+
* ru: () => import('./locales/ru'),
|
|
659
|
+
* es: () => import('./locales/es'),
|
|
657
660
|
* });
|
|
658
661
|
* ```
|
|
659
662
|
*/
|
|
@@ -683,6 +686,44 @@ export declare function createLocaleLoader<T>(defaultMessages: T, imports: Local
|
|
|
683
686
|
*/
|
|
684
687
|
export declare function createT<T extends Record<string, string>>(messages: T): <K extends keyof T>(key: K, params?: InterpolationParams) => string;
|
|
685
688
|
|
|
689
|
+
/**
|
|
690
|
+
* Rich text translation component.
|
|
691
|
+
*
|
|
692
|
+
* It first translates text with temporary markers, then replaces markers
|
|
693
|
+
* with provided React nodes.
|
|
694
|
+
*/
|
|
695
|
+
export declare function I18nT<T extends Record<string, string>, K extends keyof T>({ t, i18nKey, values, components, textClassName, as: Wrapper, className, }: I18nTProps<T, K>): default_2.ReactElement;
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* Slot component map for rich placeholders.
|
|
699
|
+
*
|
|
700
|
+
* Key is the interpolation name in message template, e.g. {community}
|
|
701
|
+
*/
|
|
702
|
+
export declare type I18nTComponents = Record<string, ReactNode>;
|
|
703
|
+
|
|
704
|
+
/**
|
|
705
|
+
* I18nT component props
|
|
706
|
+
*
|
|
707
|
+
* @template T - Locale messages object type
|
|
708
|
+
* @template K - Message key type
|
|
709
|
+
*/
|
|
710
|
+
export declare interface I18nTProps<T extends Record<string, string>, K extends keyof T> {
|
|
711
|
+
/** Translation function returned by useTranslation/useXxxLocale */
|
|
712
|
+
t: TFunction<T>;
|
|
713
|
+
/** Translation key */
|
|
714
|
+
i18nKey: K;
|
|
715
|
+
/** Plain interpolation values */
|
|
716
|
+
values?: InterpolationParams;
|
|
717
|
+
/** Rich component slots */
|
|
718
|
+
components?: I18nTComponents;
|
|
719
|
+
/** Optional className for plain text fragments between rich slots */
|
|
720
|
+
textClassName?: string;
|
|
721
|
+
/** Optional wrapper element type (default: Fragment) */
|
|
722
|
+
as?: ElementType;
|
|
723
|
+
/** Optional wrapper className (only applied when `as` is provided) */
|
|
724
|
+
className?: string;
|
|
725
|
+
}
|
|
726
|
+
|
|
686
727
|
/**
|
|
687
728
|
* Interpolate a string with parameters
|
|
688
729
|
*
|
|
@@ -795,7 +836,11 @@ export declare type Locale = "en" | "ko" | "ja" | "ru" | "es";
|
|
|
795
836
|
|
|
796
837
|
/**
|
|
797
838
|
* Locale import map type
|
|
798
|
-
* Maps supported locales to their dynamic import functions
|
|
839
|
+
* Maps supported non-English locales to their dynamic import functions.
|
|
840
|
+
*
|
|
841
|
+
* Notes:
|
|
842
|
+
* - Keys are optional so widgets can incrementally adopt locales.
|
|
843
|
+
* - Missing locale imports safely fall back to inlined English messages.
|
|
799
844
|
*/
|
|
800
845
|
export declare type LocaleImportMap<T> = {
|
|
801
846
|
[K in Exclude<SupportedLocale, "en">]?: () => Promise<{
|
|
@@ -870,6 +915,9 @@ export declare interface MapToken {
|
|
|
870
915
|
fontSize?: number;
|
|
871
916
|
fontSizeSm?: number;
|
|
872
917
|
fontSizeLg?: number;
|
|
918
|
+
fontSizeXl?: number;
|
|
919
|
+
fontSizeXxl?: number;
|
|
920
|
+
fontSizeXxxl?: number;
|
|
873
921
|
spacing?: number;
|
|
874
922
|
spacingXs?: number;
|
|
875
923
|
spacingSm?: number;
|
|
@@ -1045,10 +1093,13 @@ export declare interface SeedToken {
|
|
|
1045
1093
|
}
|
|
1046
1094
|
|
|
1047
1095
|
/**
|
|
1048
|
-
* Locales
|
|
1049
|
-
*
|
|
1096
|
+
* Locales recognized by the widget i18n runtime.
|
|
1097
|
+
*
|
|
1098
|
+
* Notes:
|
|
1099
|
+
* - A widget can choose to provide only part of these locale files.
|
|
1100
|
+
* - Missing locale modules still fall back to inlined English messages.
|
|
1050
1101
|
*/
|
|
1051
|
-
export declare type SupportedLocale = "en" | "ko" | "ja";
|
|
1102
|
+
export declare type SupportedLocale = "en" | "ko" | "ja" | "ru" | "es";
|
|
1052
1103
|
|
|
1053
1104
|
/**
|
|
1054
1105
|
* TaskOn Context value
|
|
@@ -1852,6 +1903,6 @@ export declare interface WalletState {
|
|
|
1852
1903
|
/**
|
|
1853
1904
|
* Supported widget names for preloading
|
|
1854
1905
|
*/
|
|
1855
|
-
export declare type WidgetName = "CommunityTask";
|
|
1906
|
+
export declare type WidgetName = "CommunityTask" | "Quest" | "TaskWidget" | "LeaderboardWidget" | "UserCenterWidget";
|
|
1856
1907
|
|
|
1857
1908
|
export { }
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import { B, c } from "./chunks/dynamic-import-helper-
|
|
2
|
-
import { T, c as c2, i, u, a, b } from "./chunks/ThemeProvider-
|
|
3
|
-
import { C, B as B2, a as a2, T as T2 } from "./chunks/CommunityTaskList-
|
|
1
|
+
import { B, c } from "./chunks/dynamic-import-helper-WmIF58Sb.js";
|
|
2
|
+
import { T, c as c2, i, u, a, b } from "./chunks/ThemeProvider-Bt4UZ33y.js";
|
|
3
|
+
import { C, B as B2, a as a2, T as T2 } from "./chunks/CommunityTaskList-CrMvOB8w.js";
|
|
4
4
|
import { RewardType } from "@taskon/core";
|
|
5
|
-
import { T as T3,
|
|
6
|
-
import { a as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
5
|
+
import { T as T3, u as u2 } from "./chunks/TaskOnProvider-xUeP2Nro.js";
|
|
6
|
+
import { a as a3, u as u3 } from "./chunks/useToast-CaRkylKe.js";
|
|
7
|
+
import { c as c3, a as a4, i as i2, u as u4 } from "./chunks/createLocaleLoader-BameiEhU.js";
|
|
8
|
+
import { C as C2, I } from "./chunks/EligibilityInfo-Beww12QX.js";
|
|
9
|
+
import { L } from "./chunks/LeaderboardWidget-DwuSpVl0.js";
|
|
10
|
+
import { Q, Q as Q2, u as u5, b as b2, a as a5 } from "./chunks/Quest-CuD2LElS.js";
|
|
11
|
+
import { U } from "./chunks/UserCenterWidget-CB0hnj-L.js";
|
|
12
|
+
import { P } from "./chunks/PageBuilder-DsX6Tv0N.js";
|
|
12
13
|
export {
|
|
13
14
|
B as Button,
|
|
14
15
|
C as CardSelector,
|
|
15
16
|
B2 as CommunityTask,
|
|
16
17
|
a2 as CommunityTaskList,
|
|
17
18
|
C2 as ConfirmNoticeDialog,
|
|
19
|
+
I as I18nT,
|
|
18
20
|
L as LeaderboardWidget,
|
|
19
21
|
P as PageBuilder,
|
|
20
22
|
Q as Quest,
|
|
@@ -27,17 +29,17 @@ export {
|
|
|
27
29
|
c2 as clearLocaleCache,
|
|
28
30
|
c as cloudThemeToReactTheme,
|
|
29
31
|
c3 as createLocaleLoader,
|
|
30
|
-
|
|
32
|
+
a4 as createT,
|
|
31
33
|
i2 as interpolate,
|
|
32
34
|
i as isSupportedLocale,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
u2 as useCommonLocale,
|
|
36
|
+
a3 as useEvmWallet,
|
|
37
|
+
u5 as useQuestDetail,
|
|
38
|
+
b2 as useQuestStatus,
|
|
37
39
|
a5 as useQuestUserStatus,
|
|
38
40
|
u as useTaskOnAuth,
|
|
39
41
|
a as useTaskOnTheme,
|
|
40
|
-
|
|
42
|
+
u4 as useTranslation,
|
|
41
43
|
u3 as useWallet,
|
|
42
44
|
b as useWidgetLocale
|
|
43
45
|
};
|
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-DwuSpVl0.js";
|
|
2
|
+
import { u as u2 } from "./chunks/dynamic-import-helper-WmIF58Sb.js";
|
|
3
3
|
import { isAllTimeResponse, isCampaignResponse } from "@taskon/core";
|
|
4
4
|
export {
|
|
5
5
|
c as LeaderboardHeader,
|
package/dist/page-builder.js
CHANGED