@taskon/widget-react 0.0.1-beta.3 → 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.
Files changed (27) hide show
  1. package/README.md +1 -1
  2. package/dist/CommunityTaskList.css +1222 -1174
  3. package/dist/EligibilityInfo.css +443 -263
  4. package/dist/LeaderboardWidget.css +355 -152
  5. package/dist/Quest.css +690 -408
  6. package/dist/TaskOnProvider.css +35 -16
  7. package/dist/UserCenterWidget.css +116 -71
  8. package/dist/UserCenterWidget2.css +1285 -748
  9. package/dist/chunks/{CommunityTaskList-C9mPl_31.js → CommunityTaskList-C9Gv8KOF.js} +65 -17
  10. package/dist/chunks/{EligibilityInfo-DGBffKN8.js → EligibilityInfo-D-Fuy9GE.js} +4 -4
  11. package/dist/chunks/{LeaderboardWidget-DPOQVXkT.js → LeaderboardWidget-BV2D2q1N.js} +2 -2
  12. package/dist/chunks/{PageBuilder-WCZvxL2j.js → PageBuilder-DQoU4Mwf.js} +5 -5
  13. package/dist/chunks/{Quest-DjGH_8bx.js → Quest-B5NyVr3o.js} +56 -15
  14. package/dist/chunks/{TaskOnProvider-iannERG1.js → TaskOnProvider-93UxARFo.js} +1 -1
  15. package/dist/chunks/{ThemeProvider-DNJqI2lD.js → ThemeProvider-CPI_roeh.js} +3 -3
  16. package/dist/chunks/{UserCenterWidget-CAhgp46j.js → UserCenterWidget-BRtigY_S.js} +6 -5
  17. package/dist/chunks/{UserCenterWidget-B0O-f_xl.js → UserCenterWidget-cADBSVg7.js} +21 -7
  18. package/dist/chunks/{dynamic-import-helper-B2j_dZ4V.js → dynamic-import-helper-DwXlQC0S.js} +1 -1
  19. package/dist/community-task.js +1 -1
  20. package/dist/core.js +2 -2
  21. package/dist/dynamic-import-helper.css +424 -303
  22. package/dist/index.js +9 -9
  23. package/dist/leaderboard.js +2 -2
  24. package/dist/page-builder.js +1 -1
  25. package/dist/quest.js +1 -1
  26. package/dist/user-center.js +5 -5
  27. package/package.json +4 -1
@@ -1,11 +1,11 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import React__default, { useState, useRef, useCallback, useEffect, useContext, useMemo } from "react";
3
3
  import { isUnauthorizedError, TaskReviewResult, formatLongNumber, EligibilityType, Operator, MeetConditionStatus, RewardType, formatUtcTime, ErrorCode, SnsType, createCommunityTaskApi, ApiError, TaskCardType, ChainType, getSwapDexTitleExpress, UserEligibleStatus, CampaignStatus, MediaType, createQuestApi, CampaignType, formatTokenAmount, TaskTemplateId, EligibilityTemplateId, RecurrenceType, createCommonApi, normalizeTask, formatSwapTokensForDisplay, formatAddress } from "@taskon/core";
4
- import { p as TaskOnContext, d as useTaskOnContext, s as useTaskOnPortalContainer } from "./ThemeProvider-DNJqI2lD.js";
5
- import { D as Dialog, a as useResolvedWidgetConfig, W as WidgetShell } from "./dynamic-import-helper-B2j_dZ4V.js";
4
+ import { p as TaskOnContext, d as useTaskOnContext, s as useTaskOnPortalContainer } from "./ThemeProvider-CPI_roeh.js";
5
+ import { D as Dialog, a as useResolvedWidgetConfig, W as WidgetShell } from "./dynamic-import-helper-DwXlQC0S.js";
6
6
  import { d as useToast } from "./useToast-CaRkylKe.js";
7
- import { u as useBindWallet, T as TitleExpress, a as CardDescExpress, b as useNftClaimFlow, R as RewardModuleDialog, B as BlindBoxDialog, c as TaskItem, E as EligibilityInfo, d as Textarea } from "./EligibilityInfo-DGBffKN8.js";
8
- import { g as useBindSocialAccount, B as BindWalletDialog, l as useChainMap, s as TipPopover, I as Input } from "./UserCenterWidget-B0O-f_xl.js";
7
+ import { u as useBindWallet, T as TitleExpress, a as CardDescExpress, b as useNftClaimFlow, R as RewardModuleDialog, B as BlindBoxDialog, c as TaskItem, E as EligibilityInfo, d as Textarea } from "./EligibilityInfo-D-Fuy9GE.js";
8
+ import { g as useBindSocialAccount, B as BindWalletDialog, l as useChainMap, s as TipPopover, k as useIsMobile, I as Input } from "./UserCenterWidget-cADBSVg7.js";
9
9
  import { createPortal } from "react-dom";
10
10
  import '../CommunityTaskList.css';function CardSelector({
11
11
  options,
@@ -3510,17 +3510,6 @@ function getExpectedRewardDisplay(reward) {
3510
3510
  }
3511
3511
  return { icon: "", text: "", colorClass: "" };
3512
3512
  }
3513
- function useIsMobile() {
3514
- const [isMobile, setIsMobile] = useState(false);
3515
- useEffect(() => {
3516
- const mql = window.matchMedia("(max-width: 750px)");
3517
- setIsMobile(mql.matches);
3518
- const handler = (e) => setIsMobile(e.matches);
3519
- mql.addEventListener("change", handler);
3520
- return () => mql.removeEventListener("change", handler);
3521
- }, []);
3522
- return isMobile;
3523
- }
3524
3513
  function TaskChainRewardStep({
3525
3514
  campaignId,
3526
3515
  campaign,
@@ -4683,6 +4672,57 @@ function SectorItemComponent({
4683
4672
  ] });
4684
4673
  }
4685
4674
  const SectorItem = React__default.memo(SectorItemComponent);
4675
+ function renderTaskCards(count) {
4676
+ return Array.from({ length: count }, (_, index) => /* @__PURE__ */ jsx(
4677
+ "div",
4678
+ {
4679
+ className: "taskon-community-list-skeleton-block taskon-community-list-skeleton-task"
4680
+ },
4681
+ `task-${index}`
4682
+ ));
4683
+ }
4684
+ function CommunityTaskListSkeleton({
4685
+ showSectorTab = true,
4686
+ showSectorName = true,
4687
+ showSectorDescription = true,
4688
+ showSectorReward = true
4689
+ }) {
4690
+ return /* @__PURE__ */ jsxs(
4691
+ "div",
4692
+ {
4693
+ className: "taskon-community-list-skeleton",
4694
+ "aria-busy": "true",
4695
+ "aria-label": "Loading tasks",
4696
+ children: [
4697
+ showSectorTab && /* @__PURE__ */ jsxs("div", { className: "taskon-community-list-skeleton-selector", children: [
4698
+ /* @__PURE__ */ jsx("div", { className: "taskon-community-list-skeleton-chip taskon-community-list-skeleton-chip--wide" }),
4699
+ /* @__PURE__ */ jsx("div", { className: "taskon-community-list-skeleton-chip" }),
4700
+ /* @__PURE__ */ jsx("div", { className: "taskon-community-list-skeleton-chip" })
4701
+ ] }),
4702
+ /* @__PURE__ */ jsxs("div", { className: "taskon-community-list-skeleton-content", children: [
4703
+ /* @__PURE__ */ jsxs("div", { className: "taskon-community-list-skeleton-sector", children: [
4704
+ showSectorName && /* @__PURE__ */ jsx("div", { className: "taskon-community-list-skeleton-block taskon-community-list-skeleton-title" }),
4705
+ showSectorDescription && /* @__PURE__ */ jsxs("div", { className: "taskon-community-list-skeleton-lines", children: [
4706
+ /* @__PURE__ */ jsx("div", { className: "taskon-community-list-skeleton-block taskon-community-list-skeleton-line" }),
4707
+ /* @__PURE__ */ jsx("div", { className: "taskon-community-list-skeleton-block taskon-community-list-skeleton-line taskon-community-list-skeleton-line--short" })
4708
+ ] }),
4709
+ showSectorReward && /* @__PURE__ */ jsxs("div", { className: "taskon-community-list-skeleton-points", children: [
4710
+ /* @__PURE__ */ jsx("div", { className: "taskon-community-list-skeleton-block taskon-community-list-skeleton-pill" }),
4711
+ /* @__PURE__ */ jsx("div", { className: "taskon-community-list-skeleton-block taskon-community-list-skeleton-pill taskon-community-list-skeleton-pill--short" })
4712
+ ] }),
4713
+ /* @__PURE__ */ jsx("div", { className: "taskon-community-list-skeleton-tasks", children: renderTaskCards(4) })
4714
+ ] }),
4715
+ /* @__PURE__ */ jsxs("div", { className: "taskon-community-list-skeleton-sector", children: [
4716
+ showSectorName && /* @__PURE__ */ jsx("div", { className: "taskon-community-list-skeleton-block taskon-community-list-skeleton-title taskon-community-list-skeleton-title--second" }),
4717
+ showSectorDescription && /* @__PURE__ */ jsx("div", { className: "taskon-community-list-skeleton-lines", children: /* @__PURE__ */ jsx("div", { className: "taskon-community-list-skeleton-block taskon-community-list-skeleton-line" }) }),
4718
+ showSectorReward && /* @__PURE__ */ jsx("div", { className: "taskon-community-list-skeleton-points", children: /* @__PURE__ */ jsx("div", { className: "taskon-community-list-skeleton-block taskon-community-list-skeleton-pill taskon-community-list-skeleton-pill--short" }) }),
4719
+ /* @__PURE__ */ jsx("div", { className: "taskon-community-list-skeleton-tasks", children: renderTaskCards(3) })
4720
+ ] })
4721
+ ] })
4722
+ ]
4723
+ }
4724
+ );
4725
+ }
4686
4726
  const RECURRENCE_LABEL_MAP = {
4687
4727
  Once: "Once",
4688
4728
  Daily: "Daily",
@@ -6840,7 +6880,7 @@ function CommunityTaskListInner(props) {
6840
6880
  ] }) });
6841
6881
  }
6842
6882
  return /* @__PURE__ */ jsxs("div", { className: "taskon-community-list", children: [
6843
- showSectorTab && /* @__PURE__ */ jsx(
6883
+ showSectorTab && !isLoading && /* @__PURE__ */ jsx(
6844
6884
  CardSelector,
6845
6885
  {
6846
6886
  options: selectorOptions,
@@ -6850,7 +6890,15 @@ function CommunityTaskListInner(props) {
6850
6890
  className: "taskon-community-list-selector"
6851
6891
  }
6852
6892
  ),
6853
- /* @__PURE__ */ jsx("div", { className: "taskon-community-list-content", children: isLoading ? /* @__PURE__ */ jsx("div", { className: "taskon-community-list-loading", children: "Loading tasks..." }) : filteredTaskCards.length === 0 ? /* @__PURE__ */ jsx("div", { className: "taskon-community-list-empty", children: "No tasks available" }) : filteredTaskCards.map((sectorItem) => /* @__PURE__ */ jsx(
6893
+ /* @__PURE__ */ jsx("div", { className: "taskon-community-list-content", children: isLoading ? /* @__PURE__ */ jsx(
6894
+ CommunityTaskListSkeleton,
6895
+ {
6896
+ showSectorTab,
6897
+ showSectorName,
6898
+ showSectorDescription,
6899
+ showSectorReward
6900
+ }
6901
+ ) : filteredTaskCards.length === 0 ? /* @__PURE__ */ jsx("div", { className: "taskon-community-list-empty", children: "No tasks available" }) : filteredTaskCards.map((sectorItem) => /* @__PURE__ */ jsx(
6854
6902
  SectorItem,
6855
6903
  {
6856
6904
  sector: sectorItem,
@@ -2,9 +2,9 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import React__default, { forwardRef, useRef, useEffect, useCallback, useImperativeHandle, useMemo, useContext, useState } from "react";
3
3
  import { createUserApi, ChainType, getTxExplorerUrl, RewardType, parseTitleExpress, UserIdentityType, SnsType, createQuestApi, isUnauthorizedError, ErrorCode, ApiError, createCommonApi, powIcon, contractInteractiveIcon, getSwapDexTitleExpress, EligibilityTemplateId, UserEligibleStatus } from "@taskon/core";
4
4
  import { u as useWallet, d as useToast, e as createEthereumAdapterFromProvider } from "./useToast-CaRkylKe.js";
5
- import { k as useIsMobile, l as useChainMap, m as useNftClaim, C as ClaimNftDialog, n as PendingTxDialog, B as BindWalletDialog, R as Root2, o as Trigger, p as Portal, q as Content2, r as Arrow2, s as TipPopover, g as useBindSocialAccount, j as enMessages, a as useTokenAssets, u as useRewardDetails, c as usePointsHistory, L as LoadingState, i as TokenRewardContent, h as PointsList, E as EmptyState, N as NftRewardContent, W as WithdrawForm } from "./UserCenterWidget-B0O-f_xl.js";
6
- import { p as TaskOnContext, s as useTaskOnPortalContainer, u as useTaskOnAuth, b as useWidgetLocale } from "./ThemeProvider-DNJqI2lD.js";
7
- import { D as Dialog, _ as __variableDynamicImportRuntimeHelper } from "./dynamic-import-helper-B2j_dZ4V.js";
5
+ import { k as useIsMobile, l as useChainMap, m as useNftClaim, C as ClaimNftDialog, n as PendingTxDialog, B as BindWalletDialog, R as Root2, o as Trigger, p as Portal, q as Content2, r as Arrow2, s as TipPopover, g as useBindSocialAccount, j as enMessages, a as useTokenAssets, u as useRewardDetails, c as usePointsHistory, L as LoadingState, i as TokenRewardContent, h as PointsList, E as EmptyState, N as NftRewardContent, W as WithdrawForm } from "./UserCenterWidget-cADBSVg7.js";
6
+ import { p as TaskOnContext, s as useTaskOnPortalContainer, u as useTaskOnAuth, b as useWidgetLocale } from "./ThemeProvider-CPI_roeh.js";
7
+ import { D as Dialog, _ as __variableDynamicImportRuntimeHelper } from "./dynamic-import-helper-DwXlQC0S.js";
8
8
  import '../EligibilityInfo.css';const successIconUrl = new URL("data:image/svg+xml,%3csvg%20width='46'%20height='46'%20viewBox='0%200%2046%2046'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='23'%20cy='23'%20r='23'%20fill='%2331FF90'/%3e%3cpath%20d='M16.4281%2022.8899L20.6446%2027.1063L29.6798%2018.0711'%20stroke='black'%20stroke-width='5'%20stroke-linecap='square'%20stroke-linejoin='round'/%3e%3c/svg%3e", import.meta.url).href;
9
9
  const warnIconUrl = new URL("data:image/svg+xml,%3csvg%20width='46'%20height='46'%20viewBox='0%200%2046%2046'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M22.9783%200.0225143C10.2876%200.0225143%200%2010.3101%200%2023.0006C0%2035.6903%2010.2876%2045.9776%2022.9783%2045.9776C35.6682%2045.9776%2045.9556%2035.6903%2045.9556%2023.0006C45.9558%2010.3101%2035.6682%200.0225143%2022.9783%200.0225143ZM21.797%209.85031C21.797%209.01328%2022.4783%208.33197%2023.3154%208.33197C24.1524%208.33197%2024.8337%209.01328%2024.8337%209.85031V11.729C24.8337%2012.5662%2024.1524%2013.2475%2023.3154%2013.2475C22.4783%2013.2475%2021.797%2012.5662%2021.797%2011.7292V9.85031ZM12.0443%2023.1095H10.1657C9.32842%2023.1095%208.64717%2022.4282%208.64717%2021.5912C8.64717%2020.7541%209.32842%2020.0729%2010.1657%2020.0729H12.0443C12.8814%2020.0729%2013.5627%2020.7541%2013.5627%2021.5912C13.5627%2022.4282%2012.8819%2023.1095%2012.0443%2023.1095ZM12.6546%2014.9563C12.368%2014.6697%2012.2098%2014.2882%2012.2098%2013.8823C12.2098%2013.477%2012.3678%2013.0957%2012.6546%2012.8086C12.9411%2012.522%2013.3223%2012.3638%2013.7282%2012.3638C14.134%2012.3638%2014.515%2012.5216%2014.8021%2012.8086L16.1305%2014.137C16.4173%2014.4241%2016.5753%2014.8054%2016.5753%2015.2107C16.5753%2015.6165%2016.4171%2015.9976%2016.1305%2016.2847C15.843%2016.5715%2015.4617%2016.7295%2015.0565%2016.7295C14.6511%2016.7295%2014.2698%2016.5715%2013.9828%2016.2847L12.6546%2014.9563ZM24.2545%2039.3233H22.3764C21.5389%2039.3233%2020.8574%2038.642%2020.8574%2037.8045C20.8574%2036.9674%2021.5389%2036.2861%2022.3764%2036.2861H24.2545C25.0916%2036.2861%2025.7731%2036.9674%2025.7731%2037.8045C25.7732%2038.6421%2025.0916%2039.3233%2024.2545%2039.3233ZM26.1334%2035.8432H20.4976C19.6603%2035.8432%2018.9792%2035.1622%2018.9792%2034.3253C18.9792%2033.4875%2019.6603%2032.8063%2020.4976%2032.8063H26.133C26.9701%2032.8063%2027.6513%2033.4878%2027.6513%2034.3253C27.6518%2035.1624%2026.9705%2035.8432%2026.1334%2035.8432ZM23.3154%2032.033C18.335%2032.033%2014.2826%2027.9809%2014.2826%2023C14.2826%2018.0196%2018.3345%2013.9671%2023.3154%2013.9671C28.2958%2013.9671%2032.3478%2018.0191%2032.3478%2023C32.3478%2027.9809%2028.2958%2032.033%2023.3154%2032.033ZM31.574%2016.7295C31.1682%2016.7295%2030.7867%2016.5713%2030.5%2016.2843C29.9086%2015.6924%2029.9086%2014.7293%2030.5%2014.1374L31.8288%2012.8086C32.1155%2012.522%2032.4972%2012.364%2032.9026%2012.364C33.3082%2012.364%2033.6895%2012.522%2033.9762%2012.8084C34.568%2013.4009%2034.5676%2014.364%2033.9762%2014.9559L32.6478%2016.2843C32.3613%2016.5715%2031.98%2016.7295%2031.574%2016.7295ZM36.4652%2023.1095H34.5862C33.7491%2023.1095%2033.0678%2022.4282%2033.0678%2021.5912C33.0678%2020.7541%2033.7491%2020.0729%2034.5862%2020.0729H36.4652C37.3025%2020.0729%2037.9835%2020.7541%2037.9835%2021.5912C37.9836%2022.4282%2037.3025%2023.1095%2036.4652%2023.1095Z'%20fill='%23F89D35'/%3e%3c/svg%3e", import.meta.url).href;
10
10
  function getNoticeIcon(type) {
@@ -4841,7 +4841,7 @@ function RewardModuleDialog({
4841
4841
  const { messages, isLoading } = useWidgetLocale({
4842
4842
  widgetId: "UserCenterWidget",
4843
4843
  defaultMessages: enMessages,
4844
- loadMessages: (locale) => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../../../../UserCenter/locales/en.json": () => import("./UserCenterWidget-B0O-f_xl.js").then((n) => n.w), "../../../../UserCenter/locales/ja.json": () => import("./usercenter-ja-B2465c1O.js"), "../../../../UserCenter/locales/ko.json": () => import("./usercenter-ko-xAEYxqLg.js") }), `../../../../UserCenter/locales/${locale}.json`, 7)
4844
+ loadMessages: (locale) => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../../../../UserCenter/locales/en.json": () => import("./UserCenterWidget-cADBSVg7.js").then((n) => n.w), "../../../../UserCenter/locales/ja.json": () => import("./usercenter-ja-B2465c1O.js"), "../../../../UserCenter/locales/ko.json": () => import("./usercenter-ko-xAEYxqLg.js") }), `../../../../UserCenter/locales/${locale}.json`, 7)
4845
4845
  });
4846
4846
  const tokenAssets = useTokenAssets({
4847
4847
  autoLoad: open && isToken
@@ -1,8 +1,8 @@
1
- import { B as Button, T as Table, P as Pagination, D as Dialog, a as useResolvedWidgetConfig, W as WidgetShell, _ as __variableDynamicImportRuntimeHelper, u as usePagination } from "./dynamic-import-helper-B2j_dZ4V.js";
1
+ import { B as Button, T as Table, P as Pagination, D as Dialog, a as useResolvedWidgetConfig, W as WidgetShell, _ as __variableDynamicImportRuntimeHelper, u as usePagination } from "./dynamic-import-helper-DwXlQC0S.js";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useState, useCallback, useEffect, useMemo } from "react";
4
4
  import { createLeaderboardApi, LeaderboardContentType, formatRankRange, RewardsDistributeType, formatRewardText, calculatePrizePool, RewardType, LeaderboardTableColumn, truncateAddress, isAllTimeResponse, isCampaignResponse } from "@taskon/core";
5
- import { d as useTaskOnContext, b as useWidgetLocale } from "./ThemeProvider-DNJqI2lD.js";
5
+ import { d as useTaskOnContext, b as useWidgetLocale } from "./ThemeProvider-CPI_roeh.js";
6
6
  import '../LeaderboardWidget.css';function useLeaderboard(options) {
7
7
  const { client } = useTaskOnContext();
8
8
  const [data, setData] = useState(null);
@@ -1,11 +1,11 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useState, useEffect, useMemo, useRef } from "react";
3
3
  import { DEFAULT_PAGE_BUILDER_CONFIG, createPageBuilderApi, parsePageBuilderConfig, SectionLayoutType, WidgetTypeEnum, SECTION_LAYOUT_RATIOS } from "@taskon/core";
4
- import { Q as QuestWidget } from "./Quest-DjGH_8bx.js";
5
- import { a as CommunityTaskList } from "./CommunityTaskList-C9mPl_31.js";
6
- import { L as LeaderboardWidget } from "./LeaderboardWidget-DPOQVXkT.js";
7
- import { U as UserCenterWidget } from "./UserCenterWidget-CAhgp46j.js";
8
- import { d as useTaskOnContext } from "./ThemeProvider-DNJqI2lD.js";
4
+ import { Q as QuestWidget } from "./Quest-B5NyVr3o.js";
5
+ import { a as CommunityTaskList } from "./CommunityTaskList-C9Gv8KOF.js";
6
+ import { L as LeaderboardWidget } from "./LeaderboardWidget-BV2D2q1N.js";
7
+ import { U as UserCenterWidget } from "./UserCenterWidget-BRtigY_S.js";
8
+ import { d as useTaskOnContext } from "./ThemeProvider-CPI_roeh.js";
9
9
  import '../PageBuilder.css';function usePageBuilderConfig(pageId, localConfig) {
10
10
  const { client } = useTaskOnContext();
11
11
  const [config, setConfig] = useState(
@@ -1,11 +1,11 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import React__default, { useState, useMemo, useCallback, useEffect, useRef } from "react";
3
3
  import { RewardType, UserEligibleStatus, EligibilityTemplateId, SnsType, ChainType, QuestAutomaticallyWinnerDrawType, QuestWinnerDrawType, QuestWinnerRangeType, createQuestApi, QuestRewardsDistributeType, QuestRewardType, createLeaderboardApi, MediaType, RewardDistributedByType, ApiError, ErrorCode, CampaignType } from "@taskon/core";
4
- import { s as useTaskOnPortalContainer, d as useTaskOnContext } from "./ThemeProvider-DNJqI2lD.js";
5
- import { D as Dialog, B as Button, T as Table, P as Pagination, a as useResolvedWidgetConfig, W as WidgetShell } from "./dynamic-import-helper-B2j_dZ4V.js";
4
+ import { s as useTaskOnPortalContainer, d as useTaskOnContext } from "./ThemeProvider-CPI_roeh.js";
5
+ import { D as Dialog, B as Button, T as Table, P as Pagination, a as useResolvedWidgetConfig, W as WidgetShell } from "./dynamic-import-helper-DwXlQC0S.js";
6
6
  import { d as useToast } from "./useToast-CaRkylKe.js";
7
- import { R as Root2, o as Trigger, p as Portal, q as Content2, v as InfoIcon, r as Arrow2, s as TipPopover, g as useBindSocialAccount } from "./UserCenterWidget-B0O-f_xl.js";
8
- import { c as TaskItem, e as EligibilityList, g as getDefaultExportFromCjs, s as sanitizeHtml, R as RewardModuleDialog, C as ConfirmNoticeDialog, u as useBindWallet, b as useNftClaimFlow, E as EligibilityInfo, B as BlindBoxDialog } from "./EligibilityInfo-DGBffKN8.js";
7
+ import { R as Root2, o as Trigger, p as Portal, q as Content2, v as InfoIcon, r as Arrow2, s as TipPopover, g as useBindSocialAccount } from "./UserCenterWidget-cADBSVg7.js";
8
+ import { c as TaskItem, e as EligibilityList, g as getDefaultExportFromCjs, s as sanitizeHtml, R as RewardModuleDialog, C as ConfirmNoticeDialog, u as useBindWallet, b as useNftClaimFlow, E as EligibilityInfo, B as BlindBoxDialog } from "./EligibilityInfo-D-Fuy9GE.js";
9
9
  import '../Quest.css';function ButtonTabs({
10
10
  items,
11
11
  activeKey,
@@ -131,7 +131,7 @@ function GreenCheckIcon() {
131
131
  "path",
132
132
  {
133
133
  d: "M1 4L4.5 7.5L11 1",
134
- stroke: "#22c55e",
134
+ stroke: "currentColor",
135
135
  strokeWidth: "2",
136
136
  strokeLinecap: "round",
137
137
  strokeLinejoin: "round"
@@ -4220,12 +4220,16 @@ function QuestTitle({
4220
4220
  ] }),
4221
4221
  /* @__PURE__ */ jsx("div", { className: "taskon-quest-countdown-divider" }),
4222
4222
  /* @__PURE__ */ jsxs("div", { className: "taskon-quest-time-range", children: [
4223
- "(UTC",
4224
- offsetString,
4225
- ") ",
4226
- formatDateTime(startDate),
4227
- " ~ ",
4228
- formatDateTime(endDate)
4223
+ /* @__PURE__ */ jsxs("span", { className: "taskon-quest-time-range-timezone", children: [
4224
+ "(UTC",
4225
+ offsetString,
4226
+ ")"
4227
+ ] }),
4228
+ /* @__PURE__ */ jsxs("span", { className: "taskon-quest-time-range-values", children: [
4229
+ /* @__PURE__ */ jsx("span", { children: formatDateTime(startDate) }),
4230
+ /* @__PURE__ */ jsx("span", { className: "taskon-quest-time-range-separator", "aria-hidden": "true", children: "~" }),
4231
+ /* @__PURE__ */ jsx("span", { children: formatDateTime(endDate) })
4232
+ ] })
4229
4233
  ] }),
4230
4234
  showShare && /* @__PURE__ */ jsx(
4231
4235
  ShareDropdown,
@@ -7845,6 +7849,46 @@ function DiscordBindDialog({
7845
7849
  }
7846
7850
  );
7847
7851
  }
7852
+ function QuestLoadingSkeleton() {
7853
+ return /* @__PURE__ */ jsx("div", { className: "taskon-quest-loading", "aria-busy": "true", "aria-label": "Loading quest", children: /* @__PURE__ */ jsxs("div", { className: "taskon-quest-layout taskon-quest-skeleton-layout", children: [
7854
+ /* @__PURE__ */ jsxs("div", { className: "taskon-quest-content taskon-quest-skeleton-content", children: [
7855
+ /* @__PURE__ */ jsxs("div", { className: "taskon-quest-skeleton-group", children: [
7856
+ /* @__PURE__ */ jsx("div", { className: "taskon-quest-skeleton-block taskon-quest-skeleton-title" }),
7857
+ /* @__PURE__ */ jsx("div", { className: "taskon-quest-skeleton-block taskon-quest-skeleton-meta" }),
7858
+ /* @__PURE__ */ jsx("div", { className: "taskon-quest-skeleton-block taskon-quest-skeleton-banner" }),
7859
+ /* @__PURE__ */ jsx("div", { className: "taskon-quest-skeleton-block taskon-quest-skeleton-description" }),
7860
+ /* @__PURE__ */ jsx("div", { className: "taskon-quest-skeleton-block taskon-quest-skeleton-description taskon-quest-skeleton-description--short" })
7861
+ ] }),
7862
+ /* @__PURE__ */ jsx("div", { className: "taskon-quest-content-divider taskon-quest-skeleton-content-divider" }),
7863
+ /* @__PURE__ */ jsxs("div", { className: "taskon-quest-skeleton-group taskon-quest-skeleton-group--tasks", children: [
7864
+ /* @__PURE__ */ jsx("div", { className: "taskon-quest-skeleton-block taskon-quest-skeleton-section-title" }),
7865
+ /* @__PURE__ */ jsx("div", { className: "taskon-quest-skeleton-block taskon-quest-skeleton-progress" }),
7866
+ /* @__PURE__ */ jsx("div", { className: "taskon-quest-skeleton-block taskon-quest-skeleton-task" }),
7867
+ /* @__PURE__ */ jsx("div", { className: "taskon-quest-skeleton-block taskon-quest-skeleton-task" }),
7868
+ /* @__PURE__ */ jsx("div", { className: "taskon-quest-skeleton-block taskon-quest-skeleton-task" }),
7869
+ /* @__PURE__ */ jsx("div", { className: "taskon-quest-skeleton-block taskon-quest-skeleton-complete-button" })
7870
+ ] })
7871
+ ] }),
7872
+ /* @__PURE__ */ jsx("div", { className: "taskon-quest-divider taskon-quest-skeleton-divider" }),
7873
+ /* @__PURE__ */ jsxs("div", { className: "taskon-quest-sidebar taskon-quest-skeleton-sidebar", children: [
7874
+ /* @__PURE__ */ jsxs("div", { className: "taskon-quest-skeleton-panel", children: [
7875
+ /* @__PURE__ */ jsx("div", { className: "taskon-quest-skeleton-block taskon-quest-skeleton-panel-title" }),
7876
+ /* @__PURE__ */ jsx("div", { className: "taskon-quest-skeleton-block taskon-quest-skeleton-panel-line" }),
7877
+ /* @__PURE__ */ jsx("div", { className: "taskon-quest-skeleton-block taskon-quest-skeleton-panel-line taskon-quest-skeleton-panel-line--short" })
7878
+ ] }),
7879
+ /* @__PURE__ */ jsxs("div", { className: "taskon-quest-skeleton-panel", children: [
7880
+ /* @__PURE__ */ jsx("div", { className: "taskon-quest-skeleton-block taskon-quest-skeleton-panel-title" }),
7881
+ /* @__PURE__ */ jsx("div", { className: "taskon-quest-skeleton-block taskon-quest-skeleton-panel-line" }),
7882
+ /* @__PURE__ */ jsx("div", { className: "taskon-quest-skeleton-block taskon-quest-skeleton-panel-line" }),
7883
+ /* @__PURE__ */ jsx("div", { className: "taskon-quest-skeleton-block taskon-quest-skeleton-panel-line taskon-quest-skeleton-panel-line--short" })
7884
+ ] }),
7885
+ /* @__PURE__ */ jsxs("div", { className: "taskon-quest-skeleton-panel", children: [
7886
+ /* @__PURE__ */ jsx("div", { className: "taskon-quest-skeleton-block taskon-quest-skeleton-panel-title" }),
7887
+ /* @__PURE__ */ jsx("div", { className: "taskon-quest-skeleton-block taskon-quest-skeleton-panel-line" })
7888
+ ] })
7889
+ ] })
7890
+ ] }) });
7891
+ }
7848
7892
  function ChevronRightIcon() {
7849
7893
  return /* @__PURE__ */ jsx(
7850
7894
  "svg",
@@ -8678,10 +8722,7 @@ function QuestWidgetInner(props) {
8678
8722
  return userStatus.campaign_eligible !== UserEligibleStatus.Eligible;
8679
8723
  }, [statusDisplay == null ? void 0 : statusDisplay.isActive, userStatus]);
8680
8724
  if (isLoading && !campaign) {
8681
- return /* @__PURE__ */ jsx("div", { className: "taskon-quest", children: /* @__PURE__ */ jsxs("div", { className: "taskon-quest-loading", children: [
8682
- /* @__PURE__ */ jsx("div", { className: "taskon-quest-loading-spinner" }),
8683
- /* @__PURE__ */ jsx("span", { children: "Loading quest..." })
8684
- ] }) });
8725
+ return /* @__PURE__ */ jsx("div", { className: "taskon-quest", children: /* @__PURE__ */ jsx(QuestLoadingSkeleton, {}) });
8685
8726
  }
8686
8727
  if (error && !campaign) {
8687
8728
  return /* @__PURE__ */ jsx("div", { className: "taskon-quest", children: /* @__PURE__ */ jsxs("div", { className: "taskon-quest-error", children: [
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import React__default, { useState, useRef, useEffect, useMemo, useCallback } from "react";
3
- import { b as useWidgetLocale, e as createContextScope, f as useComposedRefs, g as createSlot, P as Primitive, B as Branch, h as useControllableState, j as Presence, k as composeEventHandlers, l as useCallbackRef, R as Root, m as Portal, n as dispatchDiscreteCustomEvent, o as useLayoutEffect2, p as TaskOnContext } from "./ThemeProvider-DNJqI2lD.js";
3
+ import { b as useWidgetLocale, e as createContextScope, f as useComposedRefs, g as createSlot, P as Primitive, B as Branch, h as useControllableState, j as Presence, k as composeEventHandlers, l as useCallbackRef, R as Root, m as Portal, n as dispatchDiscreteCustomEvent, o as useLayoutEffect2, p as TaskOnContext } from "./ThemeProvider-CPI_roeh.js";
4
4
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
5
5
  import { createTaskOnClient, createUserApi, createChainApi, createCommunityTaskApi } from "@taskon/core";
6
6
  import { c as createEthereumAdapter, W as WalletContext, b as useToastState, T as ToastContext } from "./useToast-CaRkylKe.js";
@@ -1177,9 +1177,9 @@ function getSystemThemeMode() {
1177
1177
  return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
1178
1178
  }
1179
1179
  const defaultTheme = {
1180
- mode: "light",
1180
+ mode: "dark",
1181
1181
  compact: false,
1182
- tokens: lightDefaultTokens
1182
+ tokens: darkDefaultTokens
1183
1183
  };
1184
1184
  function toKebabCase(str) {
1185
1185
  return str.replace(/([A-Z])/g, "-$1").toLowerCase();
@@ -1206,7 +1206,7 @@ function resolveTheme(config, systemMode) {
1206
1206
  } else if (config.mode) {
1207
1207
  resolvedMode = config.mode;
1208
1208
  } else {
1209
- resolvedMode = "light";
1209
+ resolvedMode = "dark";
1210
1210
  }
1211
1211
  const defaultTokens = resolvedMode === "light" ? lightDefaultTokens : darkDefaultTokens;
1212
1212
  const modeConfig = resolvedMode === "light" ? config.light : config.dark;
@@ -1,9 +1,9 @@
1
- import { T as Table, u as usePagination, D as Dialog, B as Button, a as useResolvedWidgetConfig, W as WidgetShell, _ as __variableDynamicImportRuntimeHelper } from "./dynamic-import-helper-B2j_dZ4V.js";
1
+ import { T as Table, u as usePagination, D as Dialog, B as Button, a as useResolvedWidgetConfig, W as WidgetShell, _ as __variableDynamicImportRuntimeHelper } from "./dynamic-import-helper-DwXlQC0S.js";
2
2
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
3
3
  import { useState, useRef, useCallback, useLayoutEffect, useMemo, useEffect } from "react";
4
4
  import { UserCenterRewardCardType, USER_CENTER_PAGE_SIZE, createUserCenterApi, SnsType, createUserApi, VerifyCodeType, getChainName, truncateAddress, filterEnabledAccounts, filterEnabledWallets, USER_CENTER_REWARD_CARD_TYPES, RewardType, toWei, LockedType, filterEnabledTabs, UserCenterTabType } from "@taskon/core";
5
- import { d as useTaskOnContext, b as useWidgetLocale } from "./ThemeProvider-DNJqI2lD.js";
6
- import { L as LoadingState, E as EmptyState, P as Pagination, e as formatDateTime, A as AssetImage, d as buildRewardCards, g as useBindSocialAccount, I as Input, a as useTokenAssets, u as useRewardDetails, c as usePointsHistory, W as WithdrawForm, h as PointsList, N as NftRewardContent, i as TokenRewardContent, j as enMessages } from "./UserCenterWidget-B0O-f_xl.js";
5
+ import { d as useTaskOnContext, b as useWidgetLocale } from "./ThemeProvider-CPI_roeh.js";
6
+ import { L as LoadingState, E as EmptyState, P as Pagination, e as formatDateTime, A as AssetImage, d as buildRewardCards, g as useBindSocialAccount, I as Input, a as useTokenAssets, u as useRewardDetails, c as usePointsHistory, W as WithdrawForm, h as PointsList, N as NftRewardContent, i as TokenRewardContent, j as enMessages } from "./UserCenterWidget-cADBSVg7.js";
7
7
  import { u as useWallet, d as useToast } from "./useToast-CaRkylKe.js";
8
8
  import '../UserCenterWidget.css';function Tabs({
9
9
  items,
@@ -1724,11 +1724,12 @@ function SocialIcon({
1724
1724
  fill: "none",
1725
1725
  xmlns: "http://www.w3.org/2000/svg",
1726
1726
  className,
1727
+ style: { color: "var(--taskon-color-text-secondary)" },
1727
1728
  children: /* @__PURE__ */ jsx(
1728
1729
  "path",
1729
1730
  {
1730
1731
  d: "M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1ZM8 13h8v-2H8v2Zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5Z",
1731
- fill: "#9CA3AF"
1732
+ fill: "currentColor"
1732
1733
  }
1733
1734
  )
1734
1735
  }
@@ -3134,7 +3135,7 @@ function UserCenterWidgetInner({
3134
3135
  const { messages, isLoading: isLocaleLoading } = useWidgetLocale({
3135
3136
  widgetId: "UserCenterWidget",
3136
3137
  defaultMessages: enMessages,
3137
- loadMessages: (locale) => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./locales/en.json": () => import("./UserCenterWidget-B0O-f_xl.js").then((n) => n.w), "./locales/ja.json": () => import("./usercenter-ja-B2465c1O.js"), "./locales/ko.json": () => import("./usercenter-ko-xAEYxqLg.js") }), `./locales/${locale}.json`, 3)
3138
+ loadMessages: (locale) => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./locales/en.json": () => import("./UserCenterWidget-cADBSVg7.js").then((n) => n.w), "./locales/ja.json": () => import("./usercenter-ja-B2465c1O.js"), "./locales/ko.json": () => import("./usercenter-ko-xAEYxqLg.js") }), `./locales/${locale}.json`, 3)
3138
3139
  });
3139
3140
  const enabledTabs = useMemo(() => filterEnabledTabs(config), [config]);
3140
3141
  const tabItems = useMemo(() => {
@@ -4,10 +4,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4
4
  import * as React from "react";
5
5
  import React__default, { forwardRef, useRef, useCallback, useImperativeHandle, useEffect, useContext, useState, useMemo, useLayoutEffect, createContext } from "react";
6
6
  import { createUserApi, createNftClaimApi, NftClaimError, NftClaimErrorType, getNftChainName, generatePendingKey, getPendingHash, NftClaimType, WithdrawNft, ClaimMintedNft, ClaimCapNft, setPendingHash, clearPendingHash, RewardType, isNftClaimed, isNftClaimable, getNftClaimType, ChainType, DEFAULT_ERROR_MESSAGES, openInNewTab, toWei, formatTokenAmount as formatTokenAmount$1, USER_CENTER_REWARD_CARD_TYPES, RouletteRewardType, USER_CENTER_PAGE_SIZE, createUserCenterApi, getTxExplorerUrl } from "@taskon/core";
7
- import { p as TaskOnContext, d as useTaskOnContext, P as Primitive, o as useLayoutEffect2, e as createContextScope, f as useComposedRefs, l as useCallbackRef, h as useControllableState, k as composeEventHandlers, j as Presence, m as Portal$1, g as createSlot, D as DismissableLayer, s as useTaskOnPortalContainer } from "./ThemeProvider-DNJqI2lD.js";
7
+ import { p as TaskOnContext, d as useTaskOnContext, P as Primitive, o as useLayoutEffect2, e as createContextScope, f as useComposedRefs, l as useCallbackRef, h as useControllableState, k as composeEventHandlers, j as Presence, m as Portal$1, g as createSlot, D as DismissableLayer, s as useTaskOnPortalContainer } from "./ThemeProvider-CPI_roeh.js";
8
8
  import { d as useToast, u as useWallet, e as createEthereumAdapterFromProvider } from "./useToast-CaRkylKe.js";
9
9
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
10
- import { D as Dialog, b as useId, h as hideOthers, R as ReactRemoveScroll, d as useFocusGuards, F as FocusScope, P as Pagination$1, B as Button, T as Table, u as usePagination } from "./dynamic-import-helper-B2j_dZ4V.js";
10
+ import { D as Dialog, b as useId, h as hideOthers, R as ReactRemoveScroll, d as useFocusGuards, F as FocusScope, P as Pagination$1, B as Button, T as Table, u as usePagination } from "./dynamic-import-helper-DwXlQC0S.js";
11
11
  import * as ReactDOM from "react-dom";
12
12
  import { createPortal } from "react-dom";
13
13
  const Input = forwardRef(
@@ -360,14 +360,20 @@ function useBindSocialAccount({
360
360
  isBound
361
361
  };
362
362
  }
363
- const MOBILE_BREAKPOINT = 750;
363
+ const VIEWPORT_BREAKPOINTS = {
364
+ mobileMax: 750
365
+ };
366
+ const MOBILE_MAX_WIDTH = VIEWPORT_BREAKPOINTS.mobileMax;
367
+ function isMobileViewport(width) {
368
+ return width <= MOBILE_MAX_WIDTH;
369
+ }
364
370
  function useIsMobile() {
365
371
  const [isMobile, setIsMobile] = useState(() => {
366
372
  if (typeof window === "undefined") return false;
367
- return window.innerWidth <= MOBILE_BREAKPOINT;
373
+ return isMobileViewport(window.innerWidth);
368
374
  });
369
375
  const handleResize = useCallback(() => {
370
- setIsMobile(window.innerWidth <= MOBILE_BREAKPOINT);
376
+ setIsMobile(isMobileViewport(window.innerWidth));
371
377
  }, []);
372
378
  useEffect(() => {
373
379
  if (typeof window === "undefined") return;
@@ -4067,7 +4073,15 @@ function TipPopover({
4067
4073
  className || ""
4068
4074
  ].filter(Boolean).join(" ");
4069
4075
  return /* @__PURE__ */ jsxs(Root2, { open, onOpenChange: setOpen, children: [
4070
- /* @__PURE__ */ jsx(Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
4076
+ /* @__PURE__ */ jsx(Trigger, { asChild: true, children: children ? /* @__PURE__ */ jsx(
4077
+ "span",
4078
+ {
4079
+ className: triggerClassName,
4080
+ onMouseEnter: handleMouseEnter,
4081
+ onMouseLeave: handleMouseLeave,
4082
+ children
4083
+ }
4084
+ ) : /* @__PURE__ */ jsx(
4071
4085
  "button",
4072
4086
  {
4073
4087
  type: "button",
@@ -4075,7 +4089,7 @@ function TipPopover({
4075
4089
  "aria-label": "More information",
4076
4090
  onMouseEnter: handleMouseEnter,
4077
4091
  onMouseLeave: handleMouseLeave,
4078
- children: children || /* @__PURE__ */ jsx(InfoIcon, { size: iconSize })
4092
+ children: /* @__PURE__ */ jsx(InfoIcon, { size: iconSize })
4079
4093
  }
4080
4094
  ) }),
4081
4095
  /* @__PURE__ */ jsx(Portal, { container: portalContainer ?? void 0, children: /* @__PURE__ */ jsxs(
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import { forwardRef, useState, useMemo, useCallback, useEffect } from "react";
4
- import { q as composeRefs, o as useLayoutEffect2, l as useCallbackRef$1, f as useComposedRefs, P as Primitive, h as useControllableState, e as createContextScope, j as Presence, m as Portal$1, k as composeEventHandlers, g as createSlot$1, D as DismissableLayer, r as createContext2, s as useTaskOnPortalContainer, d as useTaskOnContext, T as ThemeProvider } from "./ThemeProvider-DNJqI2lD.js";
4
+ import { q as composeRefs, o as useLayoutEffect2, l as useCallbackRef$1, f as useComposedRefs, P as Primitive, h as useControllableState, e as createContextScope, j as Presence, m as Portal$1, k as composeEventHandlers, g as createSlot$1, D as DismissableLayer, r as createContext2, s as useTaskOnPortalContainer, d as useTaskOnContext, T as ThemeProvider } from "./ThemeProvider-CPI_roeh.js";
5
5
  import { createWidgetApi, parseWidgetConfig } from "@taskon/core";
6
6
  import '../dynamic-import-helper.css';function cloudThemeToReactTheme(cloud) {
7
7
  const isDual = cloud.colorMode.type === "dual";
@@ -1,4 +1,4 @@
1
- import { B, B as B2, a, c, u, b } from "./chunks/CommunityTaskList-C9mPl_31.js";
1
+ import { B, B as B2, a, c, u, b } from "./chunks/CommunityTaskList-C9Gv8KOF.js";
2
2
  export {
3
3
  B as BaseTask,
4
4
  B2 as CommunityTask,
package/dist/core.js CHANGED
@@ -1,6 +1,6 @@
1
- import { T, c, i, u, a, b } from "./chunks/ThemeProvider-DNJqI2lD.js";
1
+ import { T, c, i, u, a, b } from "./chunks/ThemeProvider-CPI_roeh.js";
2
2
  import { RewardType } from "@taskon/core";
3
- import { T as T2, c as c2, b as b2, i as i2, a as a2, u as u2 } from "./chunks/TaskOnProvider-iannERG1.js";
3
+ import { T as T2, c as c2, b as b2, i as i2, a as a2, u as u2 } from "./chunks/TaskOnProvider-93UxARFo.js";
4
4
  import { a as a3, u as u3 } from "./chunks/useToast-CaRkylKe.js";
5
5
  export {
6
6
  RewardType,