@funhub/platform 0.2.23 → 0.2.25
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/biz.d.mts +6 -4
- package/dist/biz.mjs +1 -1
- package/dist/cli/init/create-client.mjs +1 -1
- package/dist/cli/init/shared/constants.mjs +1 -1
- package/dist/cli/init/shared/create-project.mjs +1 -1
- package/dist/cli/init/shared/prompts.mjs +1 -1
- package/dist/cli/init/shared/template.mjs +1 -1
- package/dist/cli.mjs +2 -2
- package/dist/components/biz/basics/fullscreen-feed/runtime/client.mjs +1 -1
- package/dist/components/biz/basics/logo/variants/basic-logo/runtime/client.mjs +1 -1
- package/dist/components/biz/business/advertisement/ad-match.d.mts +0 -7
- package/dist/components/biz/business/advertisement/ad-match.mjs +1 -1
- package/dist/components/biz/business/advertisement/popup-ad/client.mjs +2 -2
- package/dist/components/biz/business/advertisement/popup-ad/material.d.mts +0 -3
- package/dist/components/biz/business/advertisement/popup-ad/schema.d.mts +0 -6
- package/dist/components/biz/business/advertisement/popup-ad/schema.mjs +1 -1
- package/dist/components/biz/business/channel-list/client.mjs +1 -1
- package/dist/components/biz/business/detail/shared/detail-operate.mjs +1 -1
- package/dist/components/biz/business/detail/shared/runtime-context-provider.mjs +1 -1
- package/dist/components/biz/business/detail/shared/use-video-detail-webview-bridge.mjs +1 -1
- package/dist/components/biz/business/detail/shared/video-hero.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-actions/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search/client.mjs +1 -1
- package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -1
- package/dist/components/biz/business/home-recommend/shared/home-recommend-preview.mjs +1 -1
- package/dist/components/biz/business/index.d.mts +5 -3
- package/dist/components/biz/business/large-feature-grid/card-item.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/client.mjs +1 -1
- package/dist/components/biz/business/marquee/client.mjs +1 -1
- package/dist/components/biz/business/profile/index.d.mts +5 -3
- package/dist/components/biz/business/profile/profile-header/client.d.mts +3 -2
- package/dist/components/biz/business/profile/profile-header/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/index.d.mts +4 -2
- package/dist/components/biz/business/profile/profile-header/material.d.mts +44 -1
- package/dist/components/biz/business/profile/profile-header/material.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/my-client.d.mts +12 -0
- package/dist/components/biz/business/profile/profile-header/my-client.mjs +2 -0
- package/dist/components/biz/business/profile/profile-header/my-profile-actions.mjs +2 -0
- package/dist/components/biz/business/profile/profile-header/my-profile-header.mjs +2 -0
- package/dist/components/biz/business/profile/profile-header/schema.d.mts +13 -5
- package/dist/components/biz/business/profile/profile-header/schema.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/shared.mjs +2 -0
- package/dist/components/biz/business/profile/profile-header/user-profile-cover-background.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/visitor-client.d.mts +12 -0
- package/dist/components/biz/business/profile/profile-header/visitor-client.mjs +2 -0
- package/dist/components/biz/business/profile/profile-header/visitor-profile-actions.mjs +2 -0
- package/dist/components/biz/business/profile/profile-header/visitor-profile-header.mjs +2 -0
- package/dist/components/biz/business/profile/profile-main/client.d.mts +1 -0
- package/dist/components/biz/business/profile/profile-main/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/index.d.mts +2 -2
- package/dist/components/biz/business/profile/profile-main/material.d.mts +3 -0
- package/dist/components/biz/business/profile/profile-main/schema.d.mts +7 -3
- package/dist/components/biz/business/profile/profile-main/schema.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/shell.d.mts +4 -0
- package/dist/components/biz/business/profile/profile-main/shell.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/history-tab/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/variants.d.mts +22 -3
- package/dist/components/biz/business/profile/profile-main/variants.mjs +1 -1
- package/dist/components/biz/business/search-history/client.mjs +1 -1
- package/dist/components/biz/business/search-input/client.mjs +1 -1
- package/dist/components/biz/business/shortcut-grid/client.mjs +1 -1
- package/dist/components/biz/business/tab-bar/client.mjs +1 -1
- package/dist/components/biz/business/text-recommend/client.mjs +1 -1
- package/dist/components/common/analytics-init/page-lifecycle-tracker.mjs +1 -1
- package/dist/components/common/list/waterfall-recommend/waterfall-recommend.mjs +1 -1
- package/dist/components/common/popup-video/index.mjs +1 -1
- package/dist/components/common/tab-bar/index.mjs +1 -1
- package/dist/components/common/top-nav-bar/client.mjs +1 -1
- package/dist/components/common/video-player/video-blind-ad-overlay.mjs +1 -1
- package/dist/components/common/video-player/video-preroll-ad-overlay.mjs +1 -1
- package/dist/components/pages/collection-add/page.mjs +1 -1
- package/dist/components/pages/edit/page.mjs +1 -1
- package/dist/components/pages/fullscreen-feed/page.mjs +1 -1
- package/dist/components/pages/post-detail/post-detail-client.mjs +1 -1
- package/dist/components/pages/search/page-client.mjs +1 -1
- package/dist/components/pages/search/search-result/search-video-info.mjs +1 -1
- package/dist/components/pages/search/top-header.mjs +1 -1
- package/dist/components/pages/search-result/page-client.mjs +1 -1
- package/dist/components/pages/search-result/top-header.mjs +1 -1
- package/dist/components/pages/settings/_components/settings.mjs +1 -1
- package/dist/components/pages/video-detail/video-detail-client.mjs +1 -1
- package/dist/components/ui/badge.d.mts +1 -1
- package/dist/components/ui/button.d.mts +2 -2
- package/dist/components/ui/image.d.mts +4 -4
- package/dist/hooks/use-content-operate.mjs +1 -1
- package/dist/materials.d.mts +2 -2
- package/dist/materials.mjs +1 -1
- package/dist/service/advertisement.d.mts +0 -4
- package/dist/service/advertisement.mjs +1 -1
- package/dist/utils/common.mjs +1 -1
- package/dist/utils/schema/inspector.d.mts +2 -2
- package/dist/utils/tracking.d.mts +11 -3
- package/dist/utils/tracking.mjs +1 -1
- package/dist/utils/use-compatible-router.mjs +1 -1
- package/dist/utils.d.mts +2 -2
- package/dist/utils.mjs +1 -1
- package/package.json +1 -1
- package/theme.css +0 -47
|
@@ -6,10 +6,10 @@ type InspectorFieldOption<T> = Omit<T, 'type'>;
|
|
|
6
6
|
declare const stringInspectorFieldSchema: z.ZodObject<{
|
|
7
7
|
type: z.ZodLiteral<"string">;
|
|
8
8
|
fieldType: z.ZodOptional<z.ZodEnum<{
|
|
9
|
+
select: "select";
|
|
9
10
|
input: "input";
|
|
10
11
|
textarea: "textarea";
|
|
11
12
|
color: "color";
|
|
12
|
-
select: "select";
|
|
13
13
|
}>>;
|
|
14
14
|
defaultValue: z.ZodOptional<z.ZodString>;
|
|
15
15
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -68,10 +68,10 @@ type ObjectInspectorFieldOption = InspectorFieldOption<z.infer<typeof objectInsp
|
|
|
68
68
|
declare const componentInspectorFieldMetaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
69
69
|
type: z.ZodLiteral<"string">;
|
|
70
70
|
fieldType: z.ZodOptional<z.ZodEnum<{
|
|
71
|
+
select: "select";
|
|
71
72
|
input: "input";
|
|
72
73
|
textarea: "textarea";
|
|
73
74
|
color: "color";
|
|
74
|
-
select: "select";
|
|
75
75
|
}>>;
|
|
76
76
|
defaultValue: z.ZodOptional<z.ZodString>;
|
|
77
77
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -209,8 +209,6 @@ interface PageLifecyclePayload {
|
|
|
209
209
|
page_key: string;
|
|
210
210
|
/** 页面名称,如 首页、我的。 */
|
|
211
211
|
page_name: string;
|
|
212
|
-
/** 页面路径(可选),如 /category/drama。 */
|
|
213
|
-
page_path?: string;
|
|
214
212
|
/** 页面停留时长(秒);show 事件固定为 0。 */
|
|
215
213
|
duration: number;
|
|
216
214
|
}
|
|
@@ -219,5 +217,15 @@ interface PageLifecyclePayload {
|
|
|
219
217
|
* @param payload 页面生命周期 payload。
|
|
220
218
|
*/
|
|
221
219
|
declare function trackPageLifecycle(payload: PageLifecyclePayload): void;
|
|
220
|
+
/**
|
|
221
|
+
* 页面生命周期追踪 Hook。
|
|
222
|
+
* - 挂载时上报 show(duration: 0)
|
|
223
|
+
* - 页面可见期间每隔 1 分钟上报一次 show(附带当前累计停留秒数)
|
|
224
|
+
* - visibilitychange 隐藏时上报 hide;重新可见时重置计时并上报 show
|
|
225
|
+
* - 卸载时(页面仍可见)补报 hide
|
|
226
|
+
* @param pageKey 页面标识键。
|
|
227
|
+
* @param pageName 页面名称。
|
|
228
|
+
*/
|
|
229
|
+
declare function usePageLifecycle(pageKey: string, pageName: string): void;
|
|
222
230
|
//#endregion
|
|
223
|
-
export { AdClickPayload, AdImpressionPayload, AdvertisingPayload, AppPageViewPayload, ClickPosition, KeywordClickPayload, NavigationPayload, PageLifecyclePayload, RecommendListClickPayload, VideoEventPayload, trackAdClick, trackAdImpression, trackAdvertising, trackAppPageView, trackKeywordClick, trackNavigation, trackPageClick, trackPageLifecycle, trackRecommendListClick, trackVideoEvent };
|
|
231
|
+
export { AdClickPayload, AdImpressionPayload, AdvertisingPayload, AppPageViewPayload, ClickPosition, KeywordClickPayload, NavigationPayload, PageLifecyclePayload, RecommendListClickPayload, VideoEventPayload, trackAdClick, trackAdImpression, trackAdvertising, trackAppPageView, trackKeywordClick, trackNavigation, trackPageClick, trackPageLifecycle, trackRecommendListClick, trackVideoEvent, usePageLifecycle };
|
package/dist/utils/tracking.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";function
|
|
2
|
+
"use client";import{useEffect as e}from"react";function t(e,t,n,r,i){if(typeof window>`u`)return;console.log(`trackPageClick${r}`);let a=n?.pageX??0,o=n?.pageY??0,s=window.innerWidth||1,c=window.innerHeight||1,l={page_key:e,page_name:t,element_name:r,click_page_x:Math.round(a),click_page_y:Math.round(o),click_x_percent:Math.round(a/s*100),click_y_percent:Math.round(o/c*100),screen_width:window.screen.width,screen_height:window.screen.height,recommend_trace_id:``,...i};window.WebSDK?.track?.({event:`page_click`,payload:l}),window.sensors?.track?.(`page_click`,l)}function n(e){if(console.log(`trackrecommend_list_click`,e.page_name),typeof window>`u`)return;let t={recommend_trace_id:``,recommend_id:``,recommend_trace_info:``,...e};window.WebSDK?.track?.({event:`recommend_list_click`,payload:t}),window.sensors?.track?.(`recommend_list_click`,t)}const r=new Set;function i(e){if(typeof window>`u`)return;let t=e.ad_id.split(`,`).map(e=>e.trim()).filter(Boolean),n=(e.creative_id??``).split(`,`).map(e=>e.trim()),i=t.reduce((t,n,i)=>(r.has(`${e.ad_slot_key}::${n}`)||t.push(i),t),[]);if(i.length===0)return;for(let n of i)r.add(`${e.ad_slot_key}::${t[n]}`);let a={...e,ad_id:i.map(e=>t[e]).join(`,`),creative_id:i.map(e=>n[e]??``).join(`,`)};console.log(`[trackAdImpression]`,a.ad_slot_key,a.ad_id),window.WebSDK?.track?.({event:`ad_impression`,payload:a}),window.sensors?.track?.(`ad_impression`,a)}function a(e){typeof window>`u`||(console.log(`[trackAdvertising]`,e.advertising_key,e.event_type),window.WebSDK?.track?.({event:`advertising`,payload:e}),window.sensors?.track?.(`advertising`,e))}function o(e){typeof window>`u`||(console.log(`navigaition`,e.navigation_name),window.WebSDK?.track?.({event:`navigation`,payload:e}),window.sensors?.track?.(`navigation`,e))}function s(e){typeof window>`u`||(console.log(`[trackVideoEvent]`,e.video_behavior_key,e.video_id),window.WebSDK?.track?.({event:`video_event`,payload:e}),window.sensors?.track?.(`video_event`,e))}function c(e){typeof window>`u`||(console.log(`keywordclick`,e.keyword),window.WebSDK?.track?.({event:`keyword_click`,payload:e}),window.sensors?.track?.(`keyword_click`,e))}function l(e){if(typeof window>`u`)return;let t={creative_id:``,...e};console.log(`[trackAdClick]`,t.ad_slot_key,t.ad_id),window.WebSDK?.track?.({event:`ad_click`,payload:t}),window.sensors?.track?.(`ad_click`,t)}function u(e){if(console.log(`trackPageView`,e.page_name),typeof window>`u`)return;let t={user_type:`normal`,referrer_page_key:``,referrer_page_name:``,page_load_time:0,recommend_trace_id:``,...e};window.WebSDK?.track?.({event:`app_page_view`,payload:t}),window.sensors?.track?.(`app_page_view`,t)}function d(e){typeof window>`u`||(console.log(`[trackPageLifecycle]`,e.page_name,e.duration,e.lifecycle_status),window.WebSDK?.track?.({event:`page_lifecycle`,payload:e}),window.sensors?.track?.(`page_lifecycle`,e))}function f(t,n){e(()=>{let e=Date.now();d({lifecycle_status:`show`,page_key:t,page_name:n,duration:0});let r=setInterval(()=>{document.visibilityState!==`hidden`&&d({lifecycle_status:`show`,page_key:t,page_name:n,duration:Math.floor((Date.now()-e)/1e3)})},600*1e3);return()=>{clearInterval(r)}},[])}export{l as trackAdClick,i as trackAdImpression,a as trackAdvertising,u as trackAppPageView,c as trackKeywordClick,o as trackNavigation,t as trackPageClick,d as trackPageLifecycle,n as trackRecommendListClick,s as trackVideoEvent,f as usePageLifecycle};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{
|
|
2
|
+
"use client";import{useCallback as e,useMemo as t}from"react";import{useRouter as n}from"next/navigation";function r(){let r=n(),i=typeof window<`u`&&window.isWebView===!0,a=e(e=>{if(!i||typeof window>`u`)return e;try{let t=new URL(e,window.location.origin),n=t.pathname.split(`/`).filter(Boolean),r=n.findIndex(e=>e===`video`);return r<0?e:(n[r]=`webview`,t.pathname=`/${n.join(`/`)}`,`${t.pathname}${t.search}${t.hash}`)}catch{return e}},[i]),o=e(e=>{if(typeof window>`u`)return{isSameOrigin:!0,path:e};try{let t=new URL(e,window.location.href);return t.origin===window.location.origin?{isSameOrigin:!0,path:a(`${t.pathname}${t.search}${t.hash}`)}:{isSameOrigin:!1,path:e}}catch{return{isSameOrigin:!0,path:a(e)}}},[a]),s=e((e,t)=>{let n=o(e);if(!n.isSameOrigin&&typeof window<`u`){window.location.href=n.path;return}r.push(n.path,t)},[o,r]),c=e((e,t)=>{let n=o(e);if(!n.isSameOrigin&&typeof window<`u`){window.location.replace(n.path);return}r.replace(n.path,t)},[o,r]);return t(()=>({...r,push:s,replace:c}),[s,c,r])}export{r as useRouter};
|
package/dist/utils.d.mts
CHANGED
|
@@ -21,8 +21,8 @@ import { createInputAndSelectFile, getCoverImage, getImageResolutionFromFile } f
|
|
|
21
21
|
import { PASSWORD_ALLOWED_SPECIAL_CHARS, PASSWORD_MAX_LENGTH, PASSWORD_MIN_LENGTH, PasswordValidationResult, PasswordValidationType, getFirstInvalidPasswordChar, getPasswordCharacterTypeCount, getPasswordValidationErrorText, validatePasswordPair } from "./utils/password-validator.mjs";
|
|
22
22
|
import { resolveRequestUserId } from "./utils/request-user-id.mjs";
|
|
23
23
|
import { PresignedUploadInfo, UploadToS3Options, UploadToS3Result, uploadToS3WithPresignedUrl } from "./utils/s3-uploader.mjs";
|
|
24
|
-
import { AdClickPayload, AdImpressionPayload, AdvertisingPayload, AppPageViewPayload, ClickPosition, KeywordClickPayload, NavigationPayload, PageLifecyclePayload, RecommendListClickPayload, VideoEventPayload, trackAdClick, trackAdImpression, trackAdvertising, trackAppPageView, trackKeywordClick, trackNavigation, trackPageClick, trackPageLifecycle, trackRecommendListClick, trackVideoEvent } from "./utils/tracking.mjs";
|
|
24
|
+
import { AdClickPayload, AdImpressionPayload, AdvertisingPayload, AppPageViewPayload, ClickPosition, KeywordClickPayload, NavigationPayload, PageLifecyclePayload, RecommendListClickPayload, VideoEventPayload, trackAdClick, trackAdImpression, trackAdvertising, trackAppPageView, trackKeywordClick, trackNavigation, trackPageClick, trackPageLifecycle, trackRecommendListClick, trackVideoEvent, usePageLifecycle } from "./utils/tracking.mjs";
|
|
25
25
|
import { base64ToUint8Array, uint8ArrayToBase64, uint8ArrayToNumberArray } from "./utils/uint8.mjs";
|
|
26
26
|
import { UploadFileResult, encryptBncBuffer, uploadFile } from "./utils/upload-file.mjs";
|
|
27
27
|
import { CompatibleRouter, useRouter } from "./utils/use-compatible-router.mjs";
|
|
28
|
-
export { AdClickPayload, AdImpressionPayload, AdvertisingPayload, AppPageViewPayload, ClickPosition, CompatibleRouter, ComponentPropsSchemaBuilderHelpers, DefineMaterialOption, eventBus as EventBus, HttpClient, HttpError, INSPECTOR_META_KEY, ImageCompressionQualityRule, InferSchemaProps, KeywordClickPayload, MaterialCategory, MaterialComponentMode, MaterialComponentProps, MaterialMap, NavigationPayload, OverwriteMaterialOption, PASSWORD_ALLOWED_SPECIAL_CHARS, PASSWORD_MAX_LENGTH, PASSWORD_MIN_LENGTH, PageLifecyclePayload, PasswordValidationResult, PasswordValidationType, PresignedUploadInfo, RecommendListClickPayload, RequestConfig, RequestMethod, ResponseData, SchemaHasDefaultValue, UploadFileResult, UploadToS3Options, UploadToS3Result, VideoEventPayload, array, base64ToUint8Array, boolean, checkFollowStatus, clearMyChannelsFromStorage, cn, components, compressImage, createInputAndSelectFile, datetime, debounceFun, decryptImageToArrayBuffer, decryptImageToUint8Array, decryptImageUrl, defaultImageCompressionMaxSizeMB, defaultImageCompressionQuality, defineComponentPropsSchema, defineMaterial, disablePageScroll, enablePageScroll, encryptBncBuffer, enumSchema as enum, enumSchema, followUser, formatCompactCount, formatVideoDuration, generateDynamicSign, generateMaterialMap, generateMaterialMapGroupByCategory, generateUUID, getAppId, getAtUserElement, getCookie, getCoverImage, getCurrentSecondTime, getCurrentUserId, getFirstInvalidPasswordChar, getImageCompressionQuality, getImageResolutionFromFile, getOrCreateBrowserFingerprint, getOrCreateDeviceId, getPasswordCharacterTypeCount, getPasswordValidationErrorText, getResUrl, getSchemaDefaultProps, getUserId, guessImageContentTypeFromUrl, hashPassword, httpClient, imageCompressionQualityRules, isClient, isEncryptedImageUrl, isMobileDevice, isValidEmail, loadComponent, loadHiddenChannelIdsFromStorage, loadMyChannelsFromStorage, normalizeClassName, numToString, number, object, overwriteMaterial, parseResolution, parseTextAtUserIds, pxToVw, randomString, removeCookie, replaceAtUserElement, replaceAtUserElementHtmlStr, resolveImageUrl, resolveRequestUserId, rewriteComponent, saveHiddenChannelIdsToStorage, secondToTime, setCookie, shouldProbeImageUrl, shouldUseApiResDirectly, string, stringToNumber, stripHtmlTags, timeRange, trackAdClick, trackAdImpression, trackAdvertising, trackAppPageView, trackKeywordClick, trackNavigation, trackPageClick, trackPageLifecycle, trackRecommendListClick, trackVideoEvent, uint8ArrayToBase64, uint8ArrayToNumberArray, unfollowUser, updateUrlParams, uploadFile, uploadToS3WithPresignedUrl, useRouter, validatePasswordPair, withInspectorMeta };
|
|
28
|
+
export { AdClickPayload, AdImpressionPayload, AdvertisingPayload, AppPageViewPayload, ClickPosition, CompatibleRouter, ComponentPropsSchemaBuilderHelpers, DefineMaterialOption, eventBus as EventBus, HttpClient, HttpError, INSPECTOR_META_KEY, ImageCompressionQualityRule, InferSchemaProps, KeywordClickPayload, MaterialCategory, MaterialComponentMode, MaterialComponentProps, MaterialMap, NavigationPayload, OverwriteMaterialOption, PASSWORD_ALLOWED_SPECIAL_CHARS, PASSWORD_MAX_LENGTH, PASSWORD_MIN_LENGTH, PageLifecyclePayload, PasswordValidationResult, PasswordValidationType, PresignedUploadInfo, RecommendListClickPayload, RequestConfig, RequestMethod, ResponseData, SchemaHasDefaultValue, UploadFileResult, UploadToS3Options, UploadToS3Result, VideoEventPayload, array, base64ToUint8Array, boolean, checkFollowStatus, clearMyChannelsFromStorage, cn, components, compressImage, createInputAndSelectFile, datetime, debounceFun, decryptImageToArrayBuffer, decryptImageToUint8Array, decryptImageUrl, defaultImageCompressionMaxSizeMB, defaultImageCompressionQuality, defineComponentPropsSchema, defineMaterial, disablePageScroll, enablePageScroll, encryptBncBuffer, enumSchema as enum, enumSchema, followUser, formatCompactCount, formatVideoDuration, generateDynamicSign, generateMaterialMap, generateMaterialMapGroupByCategory, generateUUID, getAppId, getAtUserElement, getCookie, getCoverImage, getCurrentSecondTime, getCurrentUserId, getFirstInvalidPasswordChar, getImageCompressionQuality, getImageResolutionFromFile, getOrCreateBrowserFingerprint, getOrCreateDeviceId, getPasswordCharacterTypeCount, getPasswordValidationErrorText, getResUrl, getSchemaDefaultProps, getUserId, guessImageContentTypeFromUrl, hashPassword, httpClient, imageCompressionQualityRules, isClient, isEncryptedImageUrl, isMobileDevice, isValidEmail, loadComponent, loadHiddenChannelIdsFromStorage, loadMyChannelsFromStorage, normalizeClassName, numToString, number, object, overwriteMaterial, parseResolution, parseTextAtUserIds, pxToVw, randomString, removeCookie, replaceAtUserElement, replaceAtUserElementHtmlStr, resolveImageUrl, resolveRequestUserId, rewriteComponent, saveHiddenChannelIdsToStorage, secondToTime, setCookie, shouldProbeImageUrl, shouldUseApiResDirectly, string, stringToNumber, stripHtmlTags, timeRange, trackAdClick, trackAdImpression, trackAdvertising, trackAppPageView, trackKeywordClick, trackNavigation, trackPageClick, trackPageLifecycle, trackRecommendListClick, trackVideoEvent, uint8ArrayToBase64, uint8ArrayToNumberArray, unfollowUser, updateUrlParams, uploadFile, uploadToS3WithPresignedUrl, usePageLifecycle, useRouter, validatePasswordPair, withInspectorMeta };
|
package/dist/utils.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{debounceFun as ee,formatCompactCount as te,formatVideoDuration as ne,generateDynamicSign as e,generateUUID as t,getAtUserElement as n,getCookie as r,getCurrentSecondTime as i,getUserId as a,hashPassword as o,isClient as s,isMobileDevice as c,numToString as l,parseResolution as u,parseTextAtUserIds as d,randomString as f,removeCookie as p,replaceAtUserElement as m,replaceAtUserElementHtmlStr as h,secondToTime as g,setCookie as _,stringToNumber as v,stripHtmlTags as y,updateUrlParams as b}from"./utils/common.mjs";import{getOrCreateBrowserFingerprint as x}from"./utils/browser-fingerprint.mjs";import{clearMyChannelsFromStorage as S,loadHiddenChannelIdsFromStorage as C,loadMyChannelsFromStorage as w,saveHiddenChannelIdsToStorage as T}from"./utils/channel-storage.mjs";import{cn as E}from"./utils/cn.mjs";import D from"./utils/get-res-url.mjs";import{decryptImageToArrayBuffer as O,decryptImageToUint8Array as k,decryptImageUrl as A,guessImageContentTypeFromUrl as j,isEncryptedImageUrl as M,resolveImageUrl as N,shouldProbeImageUrl as P,shouldUseApiResDirectly as F}from"./utils/decrypt-image-client.mjs";import{getOrCreateDeviceId as I}from"./utils/device-id.mjs";import{isValidEmail as L}from"./utils/email-validator.mjs";import R from"./utils/event-bus.mjs";import{resolveRequestUserId as z}from"./utils/request-user-id.mjs";import B,{HttpClient as V,HttpError as H}from"./utils/http.mjs";import{checkFollowStatus as U,followUser as W,getAppId as G,getCurrentUserId as K,unfollowUser as q}from"./utils/follow-service.mjs";import{disablePageScroll as J,enablePageScroll as Y,normalizeClassName as X,pxToVw as Z}from"./utils/helper.mjs";import{compressImage as re,defaultImageCompressionMaxSizeMB as Q,defaultImageCompressionQuality as ie,getImageCompressionQuality as ae,imageCompressionQualityRules as oe}from"./utils/image-compression.mjs";import{components as se,loadComponent as ce,rewriteComponent as le}from"./utils/loaders.mjs";import{createInputAndSelectFile as ue,getCoverImage as de,getImageResolutionFromFile as fe}from"./utils/media.mjs";import{PASSWORD_ALLOWED_SPECIAL_CHARS as pe,PASSWORD_MAX_LENGTH as me,PASSWORD_MIN_LENGTH as he,getFirstInvalidPasswordChar as ge,getPasswordCharacterTypeCount as _e,getPasswordValidationErrorText as ve,validatePasswordPair as ye}from"./utils/password-validator.mjs";import{uploadToS3WithPresignedUrl as be}from"./utils/s3-uploader.mjs";import{defineMaterial as xe,overwriteMaterial as Se}from"./utils/schema/material.mjs";import{INSPECTOR_META_KEY as Ce,array as we,boolean as Te,datetime as Ee,defineComponentPropsSchema as De,enumSchema as $,getSchemaDefaultProps as Oe,number as ke,object as Ae,string as je,timeRange as Me,withInspectorMeta as Ne}from"./utils/schema/schema.mjs";import{generateMaterialMap as Pe,generateMaterialMapGroupByCategory as Fe}from"./utils/schema/utils.mjs";import{trackAdClick as Ie,trackAdImpression as Le,trackAdvertising as Re,trackAppPageView as ze,trackKeywordClick as Be,trackNavigation as Ve,trackPageClick as He,trackPageLifecycle as Ue,trackRecommendListClick as We,trackVideoEvent as Ge}from"./utils/tracking.mjs";import{base64ToUint8Array as
|
|
2
|
+
import{debounceFun as ee,formatCompactCount as te,formatVideoDuration as ne,generateDynamicSign as e,generateUUID as t,getAtUserElement as n,getCookie as r,getCurrentSecondTime as i,getUserId as a,hashPassword as o,isClient as s,isMobileDevice as c,numToString as l,parseResolution as u,parseTextAtUserIds as d,randomString as f,removeCookie as p,replaceAtUserElement as m,replaceAtUserElementHtmlStr as h,secondToTime as g,setCookie as _,stringToNumber as v,stripHtmlTags as y,updateUrlParams as b}from"./utils/common.mjs";import{getOrCreateBrowserFingerprint as x}from"./utils/browser-fingerprint.mjs";import{clearMyChannelsFromStorage as S,loadHiddenChannelIdsFromStorage as C,loadMyChannelsFromStorage as w,saveHiddenChannelIdsToStorage as T}from"./utils/channel-storage.mjs";import{cn as E}from"./utils/cn.mjs";import D from"./utils/get-res-url.mjs";import{decryptImageToArrayBuffer as O,decryptImageToUint8Array as k,decryptImageUrl as A,guessImageContentTypeFromUrl as j,isEncryptedImageUrl as M,resolveImageUrl as N,shouldProbeImageUrl as P,shouldUseApiResDirectly as F}from"./utils/decrypt-image-client.mjs";import{getOrCreateDeviceId as I}from"./utils/device-id.mjs";import{isValidEmail as L}from"./utils/email-validator.mjs";import R from"./utils/event-bus.mjs";import{resolveRequestUserId as z}from"./utils/request-user-id.mjs";import B,{HttpClient as V,HttpError as H}from"./utils/http.mjs";import{checkFollowStatus as U,followUser as W,getAppId as G,getCurrentUserId as K,unfollowUser as q}from"./utils/follow-service.mjs";import{disablePageScroll as J,enablePageScroll as Y,normalizeClassName as X,pxToVw as Z}from"./utils/helper.mjs";import{compressImage as re,defaultImageCompressionMaxSizeMB as Q,defaultImageCompressionQuality as ie,getImageCompressionQuality as ae,imageCompressionQualityRules as oe}from"./utils/image-compression.mjs";import{components as se,loadComponent as ce,rewriteComponent as le}from"./utils/loaders.mjs";import{createInputAndSelectFile as ue,getCoverImage as de,getImageResolutionFromFile as fe}from"./utils/media.mjs";import{PASSWORD_ALLOWED_SPECIAL_CHARS as pe,PASSWORD_MAX_LENGTH as me,PASSWORD_MIN_LENGTH as he,getFirstInvalidPasswordChar as ge,getPasswordCharacterTypeCount as _e,getPasswordValidationErrorText as ve,validatePasswordPair as ye}from"./utils/password-validator.mjs";import{uploadToS3WithPresignedUrl as be}from"./utils/s3-uploader.mjs";import{defineMaterial as xe,overwriteMaterial as Se}from"./utils/schema/material.mjs";import{INSPECTOR_META_KEY as Ce,array as we,boolean as Te,datetime as Ee,defineComponentPropsSchema as De,enumSchema as $,getSchemaDefaultProps as Oe,number as ke,object as Ae,string as je,timeRange as Me,withInspectorMeta as Ne}from"./utils/schema/schema.mjs";import{generateMaterialMap as Pe,generateMaterialMapGroupByCategory as Fe}from"./utils/schema/utils.mjs";import{trackAdClick as Ie,trackAdImpression as Le,trackAdvertising as Re,trackAppPageView as ze,trackKeywordClick as Be,trackNavigation as Ve,trackPageClick as He,trackPageLifecycle as Ue,trackRecommendListClick as We,trackVideoEvent as Ge,usePageLifecycle as Ke}from"./utils/tracking.mjs";import{base64ToUint8Array as qe,uint8ArrayToBase64 as Je,uint8ArrayToNumberArray as Ye}from"./utils/uint8.mjs";import{encryptBncBuffer as Xe,uploadFile as Ze}from"./utils/upload-file.mjs";import{useRouter as Qe}from"./utils/use-compatible-router.mjs";export{R as EventBus,V as HttpClient,H as HttpError,Ce as INSPECTOR_META_KEY,pe as PASSWORD_ALLOWED_SPECIAL_CHARS,me as PASSWORD_MAX_LENGTH,he as PASSWORD_MIN_LENGTH,we as array,qe as base64ToUint8Array,Te as boolean,U as checkFollowStatus,S as clearMyChannelsFromStorage,E as cn,se as components,re as compressImage,ue as createInputAndSelectFile,Ee as datetime,ee as debounceFun,O as decryptImageToArrayBuffer,k as decryptImageToUint8Array,A as decryptImageUrl,Q as defaultImageCompressionMaxSizeMB,ie as defaultImageCompressionQuality,De as defineComponentPropsSchema,xe as defineMaterial,J as disablePageScroll,Y as enablePageScroll,Xe as encryptBncBuffer,$ as enum,$ as enumSchema,W as followUser,te as formatCompactCount,ne as formatVideoDuration,e as generateDynamicSign,Pe as generateMaterialMap,Fe as generateMaterialMapGroupByCategory,t as generateUUID,G as getAppId,n as getAtUserElement,r as getCookie,de as getCoverImage,i as getCurrentSecondTime,K as getCurrentUserId,ge as getFirstInvalidPasswordChar,ae as getImageCompressionQuality,fe as getImageResolutionFromFile,x as getOrCreateBrowserFingerprint,I as getOrCreateDeviceId,_e as getPasswordCharacterTypeCount,ve as getPasswordValidationErrorText,D as getResUrl,Oe as getSchemaDefaultProps,a as getUserId,j as guessImageContentTypeFromUrl,o as hashPassword,B as httpClient,oe as imageCompressionQualityRules,s as isClient,M as isEncryptedImageUrl,c as isMobileDevice,L as isValidEmail,ce as loadComponent,C as loadHiddenChannelIdsFromStorage,w as loadMyChannelsFromStorage,X as normalizeClassName,l as numToString,ke as number,Ae as object,Se as overwriteMaterial,u as parseResolution,d as parseTextAtUserIds,Z as pxToVw,f as randomString,p as removeCookie,m as replaceAtUserElement,h as replaceAtUserElementHtmlStr,N as resolveImageUrl,z as resolveRequestUserId,le as rewriteComponent,T as saveHiddenChannelIdsToStorage,g as secondToTime,_ as setCookie,P as shouldProbeImageUrl,F as shouldUseApiResDirectly,je as string,v as stringToNumber,y as stripHtmlTags,Me as timeRange,Ie as trackAdClick,Le as trackAdImpression,Re as trackAdvertising,ze as trackAppPageView,Be as trackKeywordClick,Ve as trackNavigation,He as trackPageClick,Ue as trackPageLifecycle,We as trackRecommendListClick,Ge as trackVideoEvent,Je as uint8ArrayToBase64,Ye as uint8ArrayToNumberArray,q as unfollowUser,b as updateUrlParams,Ze as uploadFile,be as uploadToS3WithPresignedUrl,Ke as usePageLifecycle,Qe as useRouter,ye as validatePasswordPair,Ne as withInspectorMeta};
|
package/package.json
CHANGED
package/theme.css
CHANGED
|
@@ -222,50 +222,3 @@
|
|
|
222
222
|
--sidebar-border: oklch(1 0 0 / 10%);
|
|
223
223
|
--sidebar-ring: var(--color-brand-primary);
|
|
224
224
|
}
|
|
225
|
-
|
|
226
|
-
.no-vw-x-16 {
|
|
227
|
-
padding-left: 16px;
|
|
228
|
-
/* px-to-viewport-ignore */
|
|
229
|
-
padding-right: 16px;
|
|
230
|
-
/* px-to-viewport-ignore */
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.no-vw-pl-16 {
|
|
234
|
-
padding-left: 16px;
|
|
235
|
-
/* px-to-viewport-ignore */
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.no-vw-pr-16 {
|
|
239
|
-
padding-right: 16px;
|
|
240
|
-
/* px-to-viewport-ignore */
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
.no-vw-pt-16 {
|
|
244
|
-
padding-top: 16px;
|
|
245
|
-
/* px-to-viewport-ignore */
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.no-vw-pb-16 {
|
|
249
|
-
padding-bottom: 16px;
|
|
250
|
-
/* px-to-viewport-ignore */
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
.no-vw-ml-16 {
|
|
254
|
-
margin-left: 16px;
|
|
255
|
-
/* px-to-viewport-ignore */
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
.no-vw-mr-16 {
|
|
259
|
-
margin-right: 16px;
|
|
260
|
-
/* px-to-viewport-ignore */
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
.no-vw-mt-16 {
|
|
264
|
-
margin-top: 16px;
|
|
265
|
-
/* px-to-viewport-ignore */
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.no-vw-mb-16 {
|
|
269
|
-
margin-bottom: 16px;
|
|
270
|
-
/* px-to-viewport-ignore */
|
|
271
|
-
}
|