@funhub/platform 0.1.38 → 0.1.41
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 +6 -0
- package/dist/common.d.mts +1 -2
- package/dist/common.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.d.mts +4 -0
- package/dist/components/biz/business/banner/variants/basic-banner/material.d.mts +4 -0
- package/dist/components/biz/business/banner/variants/basic-banner/runtime/client.d.mts +6 -1
- package/dist/components/biz/business/banner/variants/basic-banner/runtime/client.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/server.mjs +1 -1
- package/dist/components/biz/business/banner-carousel/client.mjs +1 -1
- package/dist/components/biz/business/banner-carousel/material.d.mts +4 -0
- package/dist/components/biz/business/banner-carousel/schema.d.mts +4 -0
- package/dist/components/biz/business/banner-carousel/server.mjs +1 -1
- package/dist/components/biz/business/channel-list/client.mjs +1 -1
- package/dist/components/biz/business/channel-list/material.d.mts +4 -0
- package/dist/components/biz/business/channel-list/schema.d.mts +4 -0
- package/dist/components/biz/business/detail/detail-operate.mjs +1 -1
- package/dist/components/biz/business/detail/materials/registry.d.mts +30 -3
- package/dist/components/biz/business/detail/materials/video-detail-actions/client.d.mts +2 -1
- package/dist/components/biz/business/detail/materials/video-detail-actions/client.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-actions/material.d.mts +6 -1
- package/dist/components/biz/business/detail/materials/video-detail-actions/schema.d.mts +6 -1
- package/dist/components/biz/business/detail/materials/video-detail-actions/server.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info/client.d.mts +2 -1
- package/dist/components/biz/business/detail/materials/video-detail-info/client.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info/material.d.mts +4 -0
- package/dist/components/biz/business/detail/materials/video-detail-info/schema.d.mts +4 -0
- package/dist/components/biz/business/detail/materials/video-detail-info/server.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title/client.d.mts +2 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title/client.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title/material.d.mts +6 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title/schema.d.mts +6 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title/server.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/client.d.mts +2 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/client.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/material.d.mts +4 -0
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/schema.d.mts +4 -0
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/server.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-player/client.d.mts +2 -1
- package/dist/components/biz/business/detail/materials/video-detail-player/client.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-player/material.d.mts +6 -1
- package/dist/components/biz/business/detail/materials/video-detail-player/schema.d.mts +6 -1
- package/dist/components/biz/business/detail/materials/video-detail-player/server.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-recommend/client.d.mts +2 -1
- package/dist/components/biz/business/detail/materials/video-detail-recommend/client.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-recommend/material.d.mts +4 -0
- package/dist/components/biz/business/detail/materials/video-detail-recommend/schema.d.mts +4 -0
- package/dist/components/biz/business/detail/materials/video-detail-recommend/server.mjs +1 -1
- package/dist/components/biz/business/detail/video-hero.mjs +1 -1
- package/dist/components/biz/business/floating-ball/client.mjs +1 -1
- package/dist/components/biz/business/floating-ball/material.d.mts +4 -0
- package/dist/components/biz/business/floating-ball/schema.d.mts +4 -0
- package/dist/components/biz/business/floating-ball/server.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-icon/client.d.mts +3 -1
- package/dist/components/biz/business/header-search/header-avatar-icon/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-icon/material.d.mts +6 -1
- package/dist/components/biz/business/header-search/header-avatar-icon/schema.d.mts +6 -1
- package/dist/components/biz/business/header-search/header-avatar-icon/server.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search/material.d.mts +4 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.d.mts +4 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search/server.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/material.d.mts +4 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/schema.d.mts +4 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/server.mjs +1 -1
- package/dist/components/biz/business/header-search/header-logo-search/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-logo-search/material.d.mts +4 -0
- package/dist/components/biz/business/header-search/header-logo-search/schema.d.mts +4 -0
- package/dist/components/biz/business/header-search/header-logo-search/server.mjs +1 -1
- package/dist/components/biz/business/header-search/header-search/client.d.mts +3 -1
- package/dist/components/biz/business/header-search/header-search/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-search/material.d.mts +6 -1
- package/dist/components/biz/business/header-search/header-search/schema.d.mts +6 -1
- package/dist/components/biz/business/header-search/header-search/server.mjs +1 -1
- package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/inspector-schema.d.mts +4 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/material.d.mts +4 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/runtime/client.d.mts +8 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/runtime/client.mjs +1 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/server.mjs +1 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/inspector-schema.d.mts +4 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/material.d.mts +4 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/runtime/client.d.mts +8 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/runtime/client.mjs +1 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/server.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/card-item.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/client.d.mts +15 -0
- package/dist/components/biz/business/large-feature-grid/client.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/material.d.mts +34 -4
- package/dist/components/biz/business/large-feature-grid/schema.d.mts +42 -0
- package/dist/components/biz/business/large-feature-grid/server.d.mts +15 -0
- package/dist/components/biz/business/large-feature-grid/server.mjs +1 -1
- package/dist/components/biz/business/marquee/client.mjs +1 -1
- package/dist/components/biz/business/marquee/material.d.mts +4 -0
- package/dist/components/biz/business/marquee/schema.d.mts +4 -0
- package/dist/components/biz/business/marquee/server.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/client.d.mts +2 -1
- package/dist/components/biz/business/profile/profile-header/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/material.d.mts +18 -2
- package/dist/components/biz/business/profile/profile-header/material.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/schema.d.mts +7 -2
- package/dist/components/biz/business/profile/profile-header/server.d.mts +4 -1
- package/dist/components/biz/business/profile/profile-header/server.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/user-profile-cover-background.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/client.d.mts +2 -1
- package/dist/components/biz/business/profile/profile-main/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/material.d.mts +6 -1
- package/dist/components/biz/business/profile/profile-main/schema.d.mts +7 -2
- package/dist/components/biz/business/profile/profile-main/server.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/client.d.mts +5 -0
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/server.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/history-tab/client.d.mts +5 -0
- package/dist/components/biz/business/profile/profile-main/tabs/history-tab/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/history-tab/server.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.d.mts +5 -0
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/server.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/publish-tab/client.d.mts +5 -0
- package/dist/components/biz/business/profile/profile-main/tabs/publish-tab/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/publish-tab/server.mjs +1 -1
- package/dist/components/biz/business/search-history/client.mjs +1 -1
- package/dist/components/biz/business/search-history/material.d.mts +4 -0
- package/dist/components/biz/business/search-history/schema.d.mts +4 -0
- package/dist/components/biz/business/search-history/server.mjs +1 -1
- package/dist/components/biz/business/search-input/client.mjs +1 -1
- package/dist/components/biz/business/search-input/material.d.mts +4 -0
- package/dist/components/biz/business/search-input/schema.d.mts +4 -0
- package/dist/components/biz/business/search-input/server.mjs +1 -1
- package/dist/components/biz/business/shortcut-grid/client.mjs +1 -1
- package/dist/components/biz/business/shortcut-grid/material.d.mts +4 -0
- package/dist/components/biz/business/shortcut-grid/schema.d.mts +4 -0
- package/dist/components/biz/business/shortcut-grid/server.mjs +1 -1
- package/dist/components/biz/business/tab-bar/client.mjs +1 -1
- package/dist/components/biz/business/tab-bar/material.d.mts +9 -1
- package/dist/components/biz/business/tab-bar/schema.d.mts +9 -1
- package/dist/components/biz/business/tab-bar/server.mjs +1 -1
- package/dist/components/biz/business/text-recommend/client.mjs +1 -1
- package/dist/components/biz/business/text-recommend/material.d.mts +4 -0
- package/dist/components/biz/business/text-recommend/schema.d.mts +4 -0
- package/dist/components/biz/business/text-recommend/server.mjs +1 -1
- package/dist/components/biz/business/video-horizontal-list/client.mjs +1 -1
- package/dist/components/biz/business/video-horizontal-list/material.d.mts +4 -0
- package/dist/components/biz/business/video-horizontal-list/schema.d.mts +4 -0
- package/dist/components/biz/business/video-horizontal-list/server.mjs +1 -1
- package/dist/components/biz/example/button/client.mjs +1 -1
- package/dist/components/biz/example/button/material.d.mts +4 -0
- package/dist/components/biz/example/button/schema.d.mts +4 -0
- package/dist/components/biz/example/button/server.d.mts +4 -1
- package/dist/components/biz/example/button/server.mjs +1 -1
- package/dist/components/ui/badge.d.mts +1 -1
- package/dist/components/ui/button.d.mts +2 -2
- package/dist/hooks.d.mts +1 -4
- package/dist/hooks.mjs +1 -1
- package/dist/utils/schema/index.d.mts +1 -1
- package/dist/utils/schema/material.d.mts +3 -2
- package/dist/utils/schema/schema.d.mts +18 -3
- package/dist/utils/schema/schema.mjs +1 -1
- package/dist/utils.d.mts +2 -2
- package/package.json +1 -1
- package/dist/components/common/app-context/index.d.mts +0 -19
- package/dist/components/common/app-context/index.mjs +0 -2
- package/dist/components/common/app-context/provider.mjs +0 -2
- package/dist/hooks/app-context.d.mts +0 -20
- package/dist/hooks/app-context.mjs +0 -2
- package/dist/hooks/get-app-context.d.mts +0 -19
- package/dist/hooks/get-app-context.mjs +0 -2
- package/dist/hooks/use-app-context/index.d.mts +0 -14
- package/dist/hooks/use-app-context/index.mjs +0 -2
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { AppContextValue } from "../../../hooks/app-context.mjs";
|
|
3
|
-
import { PropsWithChildren } from "react";
|
|
4
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
//#region components/common/app-context/index.d.ts
|
|
7
|
-
type AppContextProps = PropsWithChildren<{
|
|
8
|
-
value: AppContextValue;
|
|
9
|
-
context?: never;
|
|
10
|
-
} | {
|
|
11
|
-
value?: never;
|
|
12
|
-
context: AppContextValue;
|
|
13
|
-
}>;
|
|
14
|
-
/**
|
|
15
|
-
* 应用上下文入口,仅建议在页面根部使用。
|
|
16
|
-
*/
|
|
17
|
-
declare function AppContext(props: AppContextProps): react_jsx_runtime0.JSX.Element;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { AppContext, AppContextProps };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{defaultAppContextValue as e}from"../../../hooks/app-context.mjs";import{provideAppContext as t}from"../../../hooks/get-app-context.mjs";import{AppContextClientProvider as n}from"./provider.mjs";import{jsx as r}from"react/jsx-runtime";function i(i){let{children:a}=i,o=(`value`in i?i.value:i.context)??e;return t(o),r(n,{value:o,children:a})}export{i as AppContext};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";import{appContextCookieKey as e,lockAppContext as t,normalizeAppContextValue as n}from"../../../hooks/app-context.mjs";import{AppModeContext as r}from"../../../hooks/use-app-context/index.mjs";import{createContext as i,use as a,useEffect as o}from"react";import{Fragment as s,jsx as c}from"react/jsx-runtime";const l=i(!1);function u(t){typeof document>`u`||(document.cookie=`${e}=${encodeURIComponent(t)}; path=/; max-age=31536000; samesite=lax`)}function d(e){let{children:i,value:d}=e,f=n(d);t(f);let p=a(l);return o(()=>{u(f)},[f]),p?c(s,{children:i}):c(l,{value:!0,children:c(r,{value:f,children:i})})}export{d as AppContextClientProvider};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region hooks/app-context.d.ts
|
|
3
|
-
declare const appContextValues: readonly ["editor", "renderer"];
|
|
4
|
-
type AppContextValue = (typeof appContextValues)[number];
|
|
5
|
-
declare const defaultAppContextValue: AppContextValue;
|
|
6
|
-
declare const appContextCookieKey = "funhub-app-context";
|
|
7
|
-
/**
|
|
8
|
-
* 标准化应用上下文值。
|
|
9
|
-
*/
|
|
10
|
-
declare function normalizeAppContextValue(value: AppContextValue | null | undefined): AppContextValue;
|
|
11
|
-
/**
|
|
12
|
-
* 锁定应用上下文,首次设置后不允许变更。
|
|
13
|
-
*/
|
|
14
|
-
declare function lockAppContext(value: AppContextValue): void;
|
|
15
|
-
/**
|
|
16
|
-
* 获取已锁定的应用上下文。
|
|
17
|
-
*/
|
|
18
|
-
declare function getLockedAppContext(): "editor" | "renderer" | undefined;
|
|
19
|
-
//#endregion
|
|
20
|
-
export { AppContextValue, appContextCookieKey, appContextValues, defaultAppContextValue, getLockedAppContext, lockAppContext, normalizeAppContextValue };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
const e=[`editor`,`renderer`],t=`renderer`,n=`funhub-app-context`;let r;function i(e){return e===`editor`?`editor`:`renderer`}function a(e){let t=i(e);if(!r){r=t;return}if(r!==t)throw Error(`[funhub] AppContext 已锁定为 "${r}",不能切换到 "${t}"`)}function o(){return r}export{n as appContextCookieKey,e as appContextValues,t as defaultAppContextValue,o as getLockedAppContext,a as lockAppContext,i as normalizeAppContextValue};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { AppContextValue } from "./app-context.mjs";
|
|
3
|
-
|
|
4
|
-
//#region hooks/get-app-context.d.ts
|
|
5
|
-
type AppContextResolvedSource = 'provider' | 'locked' | 'cookie' | 'default';
|
|
6
|
-
interface AppContextResolvedResult {
|
|
7
|
-
value: AppContextValue;
|
|
8
|
-
source: AppContextResolvedSource;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* 从当前请求作用域读取应用上下文。
|
|
12
|
-
*/
|
|
13
|
-
declare function getAppContext(): "editor" | "renderer";
|
|
14
|
-
/**
|
|
15
|
-
* 读取应用上下文并返回来源,优先级:provider -> locked -> cookie -> default。
|
|
16
|
-
*/
|
|
17
|
-
declare function getAppContextResolved(): Promise<AppContextResolvedResult>;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { getAppContext, getAppContextResolved };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{appContextCookieKey as e,defaultAppContextValue as t,getLockedAppContext as n,lockAppContext as r,normalizeAppContextValue as i}from"./app-context.mjs";import{cache as a}from"react";const o=a(()=>({value:t,hasProvider:!1}));function s(e){let t=o(),n=i(e);if(r(n),t.hasProvider){if(t.value!==n)throw Error(`[funhub] 当前请求中 AppContext 已设置为 "${t.value}",不能切换到 "${n}"`);return}t.value=n,t.hasProvider=!0}function c(){let e=o();return e.hasProvider?e.value:n()||t}async function l(){try{let{cookies:t}=await import(`next/headers`),n=(await t()).get(e)?.value;return n?i(n):void 0}catch{return}}async function u(){let e=o();if(e.hasProvider)return{value:e.value,source:`provider`};let i=n();if(i)return{value:i,source:`locked`};let a=await l();return a?(r(a),{value:a,source:`cookie`}):{value:t,source:`default`}}export{c as getAppContext,u as getAppContextResolved,s as provideAppContext};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import "react";
|
|
3
|
-
|
|
4
|
-
//#region hooks/use-app-context/index.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* 在客户端读取应用上下文。
|
|
7
|
-
*
|
|
8
|
-
* 注意:
|
|
9
|
-
* - 仅限 Client Component 使用;
|
|
10
|
-
* - Server Component 请改用 `getAppContext()`。
|
|
11
|
-
*/
|
|
12
|
-
declare function useAppContext(): "editor" | "renderer";
|
|
13
|
-
//#endregion
|
|
14
|
-
export { useAppContext };
|