@funhub/platform 0.1.152 → 0.1.153
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/components/biz/business/banner/variants/basic-banner/inspector-schema.d.mts +4 -5
- package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/material.d.mts +2 -3
- package/dist/components/biz/business/banner-carousel/material.d.mts +2 -3
- package/dist/components/biz/business/banner-carousel/schema.d.mts +2 -3
- package/dist/components/biz/business/banner-carousel/schema.mjs +1 -1
- package/dist/components/biz/business/channel-list/material.d.mts +2 -3
- package/dist/components/biz/business/channel-list/schema.d.mts +2 -3
- package/dist/components/biz/business/channel-list/schema.mjs +1 -1
- package/dist/components/biz/business/detail/shared/registry.d.mts +14 -17
- 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/video-detail-actions/schema.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-info/material.d.mts +2 -3
- package/dist/components/biz/business/detail/video-detail-info/schema.d.mts +2 -3
- package/dist/components/biz/business/detail/video-detail-info/schema.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-info/server.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/material.d.mts +2 -3
- package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/schema.d.mts +2 -3
- package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/schema.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-player/schema.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-player-bridge-only/client.d.mts +1 -1
- package/dist/components/biz/business/detail/video-detail-player-bridge-only/client.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-player-bridge-only/schema.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-recommend/client.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-recommend/material.d.mts +10 -11
- package/dist/components/biz/business/detail/video-detail-recommend/schema.d.mts +10 -11
- package/dist/components/biz/business/detail/video-detail-recommend/schema.mjs +1 -1
- package/dist/components/biz/business/floating-ball/material.d.mts +2 -3
- package/dist/components/biz/business/floating-ball/schema.d.mts +4 -5
- package/dist/components/biz/business/floating-ball/schema.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-icon/schema.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search/material.d.mts +2 -3
- package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.d.mts +2 -3
- package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/material.d.mts +2 -3
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/schema.d.mts +2 -3
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/schema.mjs +1 -1
- package/dist/components/biz/business/header-search/header-logo-search/material.d.mts +2 -3
- package/dist/components/biz/business/header-search/header-logo-search/schema.d.mts +2 -3
- package/dist/components/biz/business/header-search/header-logo-search/schema.mjs +1 -1
- package/dist/components/biz/business/header-search/header-search/schema.mjs +1 -1
- package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.d.mts +12 -13
- package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.mjs +1 -1
- package/dist/components/biz/business/home-recommend/home-recommend-grid/material.d.mts +12 -13
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.d.mts +10 -11
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.mjs +1 -1
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/material.d.mts +10 -11
- package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -1
- package/dist/components/biz/business/home-recommend/shared/home-recommend-server-data.mjs +1 -1
- package/dist/components/biz/business/home-recommend/shared/home-recommend-video-detail.mjs +1 -1
- package/dist/components/biz/business/image-text-recommend/material.d.mts +14 -15
- package/dist/components/biz/business/image-text-recommend/schema.d.mts +14 -15
- package/dist/components/biz/business/image-text-recommend/schema.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/client.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/schema.mjs +1 -1
- package/dist/components/biz/business/marquee/material.d.mts +7 -8
- package/dist/components/biz/business/marquee/schema.d.mts +24 -26
- package/dist/components/biz/business/marquee/schema.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/schema.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/user-profile-avatar.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/schema.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.d.mts +1 -1
- package/dist/components/biz/business/search-history/client.mjs +1 -1
- package/dist/components/biz/business/search-history/material.d.mts +2 -3
- package/dist/components/biz/business/search-history/schema.d.mts +2 -3
- package/dist/components/biz/business/search-history/schema.mjs +1 -1
- package/dist/components/biz/business/search-input/schema.mjs +1 -1
- package/dist/components/biz/business/shortcut-grid/material.d.mts +4 -5
- package/dist/components/biz/business/shortcut-grid/schema.d.mts +4 -5
- package/dist/components/biz/business/shortcut-grid/schema.mjs +1 -1
- package/dist/components/biz/business/tab-bar/schema.mjs +1 -1
- package/dist/components/biz/business/text-recommend/material.d.mts +3 -4
- package/dist/components/biz/business/text-recommend/schema.d.mts +3 -4
- package/dist/components/biz/business/text-recommend/schema.mjs +1 -1
- package/dist/components/biz/example/button/material.d.mts +8 -9
- package/dist/components/biz/example/button/schema.d.mts +19 -21
- package/dist/components/biz/example/button/schema.mjs +1 -1
- package/dist/components/common/series-episodes/index.mjs +1 -1
- package/dist/components/common/video-player/process-m3u8-cache.mjs +1 -1
- package/dist/components/pages/collection-add/page.mjs +1 -1
- package/dist/components/pages/collection-create/form.mjs +1 -1
- package/dist/components/pages/collection-detail/detail.mjs +1 -1
- package/dist/components/pages/login/verify.mjs +1 -1
- package/dist/components/pages/video-detail/video-detail-client.mjs +1 -1
- package/dist/components/pages/video-list/video-list-client.mjs +1 -1
- package/dist/components/ui/button-group.d.mts +1 -1
- package/dist/components/ui/button.d.mts +1 -1
- package/dist/components/ui/field.d.mts +1 -1
- package/dist/components/ui/image.d.mts +4 -4
- package/dist/hooks.d.mts +1 -3
- package/dist/hooks.mjs +1 -1
- package/dist/service/generated/client.d.mts +4 -12
- package/dist/service/generated/client.mjs +1 -1
- package/dist/service/generated/tanstack.d.mts +4 -14
- package/dist/service/generated/tanstack.mjs +1 -1
- package/dist/service/register-by-verify-email-code.d.mts +2 -2
- package/dist/service/register-by-verify-email-code.mjs +1 -1
- package/dist/service.d.mts +4 -4
- package/dist/service.mjs +1 -1
- package/dist/types.d.mts +57 -548
- package/dist/ui.d.mts +1 -2
- package/dist/ui.mjs +1 -1
- package/dist/utils/http.mjs +1 -1
- package/dist/utils/schema/index.d.mts +1 -1
- package/dist/utils/schema/inspector.d.mts +71 -43
- package/dist/utils/schema/schema.d.mts +53 -59
- package/dist/utils/schema/schema.mjs +1 -1
- package/dist/utils.d.mts +2 -3
- package/dist/utils.mjs +1 -1
- package/package.json +1 -1
- package/dist/components/ui/dots-loading.d.mts +0 -25
- package/dist/components/ui/dots-loading.mjs +0 -2
- package/dist/hooks/use-first-row-height.d.mts +0 -69
- package/dist/hooks/use-first-row-height.mjs +0 -2
- package/dist/hooks/use-min-duration-loading.d.mts +0 -18
- package/dist/hooks/use-min-duration-loading.mjs +0 -2
- package/dist/utils/device-id.d.mts +0 -14
- package/dist/utils/device-id.mjs +0 -2
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region components/ui/dots-loading.d.ts
|
|
6
|
-
/** DotsLoading 组件属性。 */
|
|
7
|
-
interface DotsLoadingProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
-
/**
|
|
9
|
-
* 点的大小(px)。
|
|
10
|
-
* @default 6
|
|
11
|
-
*/
|
|
12
|
-
dotSize?: number;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* DotsLoading
|
|
16
|
-
*
|
|
17
|
-
* 三个点的 loading 动画,用于列表底部轻量提示。
|
|
18
|
-
*/
|
|
19
|
-
declare function DotsLoading({
|
|
20
|
-
className,
|
|
21
|
-
dotSize,
|
|
22
|
-
...rest
|
|
23
|
-
}: DotsLoadingProps): react_jsx_runtime0.JSX.Element;
|
|
24
|
-
//#endregion
|
|
25
|
-
export { DotsLoading };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";import{cn as e}from"../../utils/cn.mjs";import{jsx as t,jsxs as n}from"react/jsx-runtime";function r({className:r,dotSize:i=6,...a}){let o={width:i,height:i};return n(`div`,{className:e(`inline-flex items-center gap-2 text-text2`,r),role:`status`,"aria-label":`Loading`,...a,children:[t(`span`,{className:`inline-block rounded-full bg-current animate-bounce`,style:{...o,animationDelay:`0ms`}}),t(`span`,{className:`inline-block rounded-full bg-current animate-bounce`,style:{...o,animationDelay:`150ms`}}),t(`span`,{className:`inline-block rounded-full bg-current animate-bounce`,style:{...o,animationDelay:`300ms`}})]})}export{r as DotsLoading};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { DependencyList, RefObject } from "react";
|
|
3
|
-
|
|
4
|
-
//#region hooks/use-first-row-height.d.ts
|
|
5
|
-
interface GridFirstRowHeightOptions {
|
|
6
|
-
enabled?: boolean;
|
|
7
|
-
containerRef: RefObject<HTMLElement | null>;
|
|
8
|
-
/** 第一行每个 item 的 wrapper ref(索引从 0 开始)。 */
|
|
9
|
-
firstRowItemRef: RefObject<Array<HTMLElement | null>>;
|
|
10
|
-
/** 列数(用于确定第一行 item 数量)。 */
|
|
11
|
-
columns: number;
|
|
12
|
-
/** 列表总数(用于避免 columns > itemsCount 时越界)。 */
|
|
13
|
-
itemsCount: number;
|
|
14
|
-
deps?: DependencyList;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* useGridFirstRowHeight
|
|
18
|
-
*
|
|
19
|
-
* 两列/多列宫格场景:计算“第 1 行”高度(取首行 item wrapper 的最大高度)。
|
|
20
|
-
*/
|
|
21
|
-
declare function useGridFirstRowHeight({
|
|
22
|
-
enabled,
|
|
23
|
-
containerRef,
|
|
24
|
-
firstRowItemRef,
|
|
25
|
-
columns,
|
|
26
|
-
itemsCount,
|
|
27
|
-
deps
|
|
28
|
-
}: GridFirstRowHeightOptions): number;
|
|
29
|
-
interface WaterfallFirstRowHeightOptions {
|
|
30
|
-
enabled?: boolean;
|
|
31
|
-
containerRef: RefObject<HTMLElement | null>;
|
|
32
|
-
/** 左右列首卡的 wrapper ref。 */
|
|
33
|
-
firstRowRef: RefObject<{
|
|
34
|
-
left: HTMLElement | null;
|
|
35
|
-
right: HTMLElement | null;
|
|
36
|
-
}>;
|
|
37
|
-
deps?: DependencyList;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* useWaterfallFirstRowHeight
|
|
41
|
-
*
|
|
42
|
-
* 瀑布流场景:计算“第 1 行”高度(取左右列首卡 wrapper 高度的最大值)。
|
|
43
|
-
*/
|
|
44
|
-
declare function useWaterfallFirstRowHeight({
|
|
45
|
-
enabled,
|
|
46
|
-
containerRef,
|
|
47
|
-
firstRowRef,
|
|
48
|
-
deps
|
|
49
|
-
}: WaterfallFirstRowHeightOptions): number;
|
|
50
|
-
interface SingleFirstRowHeightOptions {
|
|
51
|
-
enabled?: boolean;
|
|
52
|
-
containerRef: RefObject<HTMLElement | null>;
|
|
53
|
-
/** 单个首屏卡片 wrapper ref。 */
|
|
54
|
-
itemRef: RefObject<HTMLElement | null>;
|
|
55
|
-
deps?: DependencyList;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* useSingleFirstRowHeight
|
|
59
|
-
*
|
|
60
|
-
* 单卡场景:计算首卡高度(用于 overlay 定位)。
|
|
61
|
-
*/
|
|
62
|
-
declare function useSingleFirstRowHeight({
|
|
63
|
-
enabled,
|
|
64
|
-
containerRef,
|
|
65
|
-
itemRef,
|
|
66
|
-
deps
|
|
67
|
-
}: SingleFirstRowHeightOptions): number;
|
|
68
|
-
//#endregion
|
|
69
|
-
export { useGridFirstRowHeight, useSingleFirstRowHeight, useWaterfallFirstRowHeight };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{useEffect as e,useLayoutEffect as t,useRef as n,useState as r}from"react";function i({enabled:i=!0,containerRef:a,measure:o,deps:s=[]}){let[c,l]=r(0),u=n(null),d=()=>{if(!i){l(0);return}u.current!=null&&cancelAnimationFrame(u.current),u.current=requestAnimationFrame(()=>{u.current=null;let e=o();l(t=>t===e?t:e)})};return t(()=>{d()},[i,...s]),e(()=>{if(!i)return;let e=a.current;if(!e)return;let t=new ResizeObserver(()=>{d()});return t.observe(e),()=>{t.disconnect()}},[i]),e(()=>()=>{u.current!=null&&cancelAnimationFrame(u.current)},[]),c}function a({enabled:e=!0,containerRef:t,firstRowItemRef:n,columns:r,itemsCount:a,deps:o=[]}){return i({enabled:e,containerRef:t,measure:()=>{let e=Math.min(a,Math.max(0,r)),t=0;for(let r=0;r<e;r+=1){let e=n.current[r]?.getBoundingClientRect().height??0;e>t&&(t=e)}return t},deps:[r,a,...o]})}function o({enabled:e=!0,containerRef:t,firstRowRef:n,deps:r=[]}){return i({enabled:e,containerRef:t,measure:()=>{let e=n.current.left?.getBoundingClientRect().height??0,t=n.current.right?.getBoundingClientRect().height??0;return Math.max(e,t)},deps:r})}function s({enabled:e=!0,containerRef:t,itemRef:n,deps:r=[]}){return i({enabled:e,containerRef:t,measure:()=>n.current?.getBoundingClientRect().height??0,deps:r})}export{a as useGridFirstRowHeight,s as useSingleFirstRowHeight,o as useWaterfallFirstRowHeight};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region hooks/use-min-duration-loading.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* useMinDurationLoading
|
|
5
|
-
*
|
|
6
|
-
* 用于控制 loading 的展示时长:当请求很快完成时,保证 loading 至少展示 `minDuration` 毫秒,
|
|
7
|
-
* 避免 UI 闪烁。
|
|
8
|
-
*
|
|
9
|
-
* @param minDuration - 最小展示时长(ms),默认 500
|
|
10
|
-
*/
|
|
11
|
-
declare function useMinDurationLoading(minDuration?: number): {
|
|
12
|
-
isLoading: boolean;
|
|
13
|
-
show: () => void;
|
|
14
|
-
hide: () => void;
|
|
15
|
-
cancel: () => void;
|
|
16
|
-
};
|
|
17
|
-
//#endregion
|
|
18
|
-
export { useMinDurationLoading };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{useCallback as e,useEffect as t,useRef as n,useState as r}from"react";function i(i=500){let[a,o]=r(!1),s=n(!1),c=n(0),l=n(null),u=e(()=>{l.current&&=(clearTimeout(l.current),null),s.current=!1,o(!1)},[]),d=e(()=>{l.current&&=(clearTimeout(l.current),null),c.current=Date.now(),s.current=!0,o(!0)},[]),f=e(()=>{if(!s.current)return;let e=i-(Date.now()-(c.current||Date.now()));if(e<=0){s.current=!1,o(!1);return}l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=!1,o(!1)},e)},[i]);return t(()=>()=>{u()},[u]),{isLoading:a,show:d,hide:f,cancel:u}}export{i as useMinDurationLoading};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region utils/device-id.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* 获取或生成设备标识(仅客户端)。
|
|
5
|
-
*
|
|
6
|
-
* - 优先从 localStorage 读取(同一浏览器会话可稳定复用)。
|
|
7
|
-
* - 未命中时生成浏览器指纹(哈希)并写回。
|
|
8
|
-
* - 若指纹生成失败(极端环境/策略限制),降级为 `generateUUID()`。
|
|
9
|
-
*
|
|
10
|
-
* 注意:该值用于请求头 `x-device-id`,不应在服务端调用。
|
|
11
|
-
*/
|
|
12
|
-
declare function getOrCreateDeviceId(): string;
|
|
13
|
-
//#endregion
|
|
14
|
-
export { getOrCreateDeviceId };
|
package/dist/utils/device-id.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{generateUUID as e,isClient as t}from"./common.mjs";import n from"crypto-js";const r=`funhub-device-id`;function i(){if(!t())return``;try{let t=window.localStorage.getItem(r);if(t&&t.trim().length>=8)return t.trim();let n=a()||e();return window.localStorage.setItem(r,n),n}catch{return e()}}function a(){try{let e=o(),t=JSON.stringify(e);return n.SHA256(t).toString(n.enc.Hex)}catch(e){return console.warn(`[device-id] build fingerprint failed`,e),``}}function o(){return{navigator:s(),screen:c(),time:l(),canvas:u(),webgl:d()}}function s(){let e=typeof navigator<`u`?navigator:void 0;if(!e)return{};let t=Array.isArray(e.languages)?e.languages:[],n=e.platform,r=e.deviceMemory;return{userAgent:String(e.userAgent||``),language:String(e.language||``),languages:t.map(e=>String(e||``)),platform:typeof n==`string`?n:``,cookieEnabled:!!e.cookieEnabled,doNotTrack:String(e.doNotTrack??``),hardwareConcurrency:Number(e.hardwareConcurrency??0)||0,deviceMemory:Number(r??0)||0,maxTouchPoints:Number(e.maxTouchPoints??0)||0}}function c(){let e=typeof screen<`u`?screen:void 0;return{width:e?.width??0,height:e?.height??0,availWidth:e?.availWidth??0,availHeight:e?.availHeight??0,colorDepth:e?.colorDepth??0,pixelDepth:e?.pixelDepth??0,devicePixelRatio:typeof window<`u`?window.devicePixelRatio??1:1}}function l(){return{timezone:(()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||``}catch{return``}})(),timezoneOffset:new Date().getTimezoneOffset()}}function u(){try{if(typeof document>`u`)return``;let e=document.createElement(`canvas`);e.width=320,e.height=160;let t=e.getContext(`2d`);if(!t)return``;t.fillStyle=`#f3f4f6`,t.fillRect(0,0,e.width,e.height),t.textBaseline=`top`,t.font=`16px Arial`,t.fillStyle=`#111827`,t.fillText(`funhub:device-id`,12,12),t.fillStyle=`#ef4444`,t.fillText(`canvas-fp`,13,13),t.globalCompositeOperation=`multiply`,t.fillStyle=`rgba(59, 130, 246, 0.7)`,t.beginPath(),t.arc(240,70,28,0,Math.PI*2),t.closePath(),t.fill(),t.fillStyle=`rgba(34, 197, 94, 0.7)`,t.fillRect(210,88,60,32);let r=e.toDataURL();return n.MD5(r).toString(n.enc.Hex)}catch{return``}}function d(){try{if(typeof document>`u`)return``;let e=document.createElement(`canvas`),t=e.getContext(`webgl`)||e.getContext(`experimental-webgl`);if(!t)return``;let r=t.getExtension(`WEBGL_debug_renderer_info`),i=r?t.getParameter(r.UNMASKED_VENDOR_WEBGL):``,a=r?t.getParameter(r.UNMASKED_RENDERER_WEBGL):``,o={vendor:String(t.getParameter(t.VENDOR)||``),renderer:String(t.getParameter(t.RENDERER)||``),version:String(t.getParameter(t.VERSION)||``),shadingLanguageVersion:String(t.getParameter(t.SHADING_LANGUAGE_VERSION)||``),unmaskedVendor:String(i||``),unmaskedRenderer:String(a||``),maxTextureSize:Number(t.getParameter(t.MAX_TEXTURE_SIZE)??0)||0,maxCubeMapTextureSize:Number(t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE)??0)||0};return n.MD5(JSON.stringify(o)).toString(n.enc.Hex)}catch{return``}}export{i as getOrCreateDeviceId};
|