weifuwu 0.83.0 → 0.85.0
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 +56 -51
- package/dist/components/ChatInput/ChatInput.d.ts +2 -2
- package/dist/components/Confirm/Confirm.d.ts +2 -2
- package/dist/components/Notification/Notification.d.ts +0 -2
- package/dist/components/Toast/Toast.d.ts +0 -2
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +12 -12
- package/dist/components/style.css +17 -0
- package/dist/index.js +2408 -341
- package/dist/ui-dom/Confirm.d.ts +1 -1
- package/dist/ui-dom/Notification.d.ts +1 -1
- package/dist/ui-dom/Toast.d.ts +1 -1
- package/dist/ui-dom/hooks/index.d.ts +0 -1
- package/dist/ui-dom/hooks/popup.d.ts +2 -0
- package/dist/ui-dom/hooks/stable.d.ts +2 -6
- package/dist/ui-dom/index.d.ts +24 -19
- package/dist/ui-dom/index.js +40 -22
- package/dist/ui-dom/jsx-runtime.js +1 -1
- package/dist/ui-dom/middleware/ws.d.ts +8 -0
- package/dist/ui-dom/popup-tracker.d.ts +1 -1
- package/dist/ui-dom/testing.d.ts +3 -9
- package/dist/ui-dom/testing.js +7 -1
- package/dist/ui-dom/types.d.ts +7 -37
- package/dist/ui-dom/vdom3/README.d.ts +6 -3
- package/dist/ui-dom/vdom3/app.d.ts +20 -0
- package/dist/ui-dom/vdom3/audit.d.ts +13 -0
- package/dist/ui-dom/vdom3/build.d.ts +7 -3
- package/dist/ui-dom/vdom3/commands.d.ts +13 -3
- package/dist/ui-dom/vdom3/comp-index.d.ts +18 -0
- package/dist/ui-dom/vdom3/delegate.d.ts +48 -0
- package/dist/ui-dom/vdom3/events.d.ts +8 -2
- package/dist/ui-dom/vdom3/index.d.ts +5 -3
- package/dist/ui-dom/vdom3/jsx.d.ts +26 -4
- package/dist/ui-dom/vdom3/record.d.ts +3 -0
- package/dist/ui-dom/vdom3/render.d.ts +19 -6
- package/dist/ui-dom/vdom3/replay.d.ts +11 -8
- package/dist/ui-dom/vdom3/root.d.ts +3 -7
- package/dist/ui-dom/vdom3/types.d.ts +128 -70
- package/dist/ui-dom/vdom3/ui.d.ts +3 -30
- package/dist/ui-dom/vdom3.js +12 -10
- package/dist/ui-dom/vnode.d.ts +9 -89
- package/docs/compat-three-library.md +1 -1
- package/docs/components-map.md +1 -1
- package/docs/frontend-middleware.md +59 -53
- package/docs/frontend-ui-dom.md +115 -132
- package/docs/frontend.md +28 -24
- package/docs/realtime.md +21 -21
- package/package.json +1 -1
- package/dist/test/client/setup.d.ts +0 -12
- package/dist/ui-dom/context.d.ts +0 -32
- package/dist/ui-dom/hooks/test/hooks.test.d.ts +0 -1
- package/dist/ui-dom/middleware/serve.d.ts +0 -27
- package/dist/ui-dom/router.d.ts +0 -73
- package/dist/ui-dom/vdom2/audit.d.ts +0 -28
- package/dist/ui-dom/vdom2/build.d.ts +0 -53
- package/dist/ui-dom/vdom2/ctx.d.ts +0 -32
- package/dist/ui-dom/vdom2/dom-trace.d.ts +0 -4
- package/dist/ui-dom/vdom2/events.d.ts +0 -65
- package/dist/ui-dom/vdom2/hydrate.d.ts +0 -21
- package/dist/ui-dom/vdom2/index.d.ts +0 -13
- package/dist/ui-dom/vdom2/kind.d.ts +0 -44
- package/dist/ui-dom/vdom2/lifecycle.d.ts +0 -54
- package/dist/ui-dom/vdom2/mount.d.ts +0 -77
- package/dist/ui-dom/vdom2/patch.d.ts +0 -116
- package/dist/ui-dom/vdom2/registry.d.ts +0 -27
- package/dist/ui-dom/vdom2/render.d.ts +0 -21
- package/dist/ui-dom/vdom2/route.d.ts +0 -29
- package/dist/ui-dom/vdom2/ssr.d.ts +0 -32
- package/dist/ui-dom/vdom2/trace.d.ts +0 -62
- package/dist/ui-dom/vdom2/transform.d.ts +0 -76
- package/dist/ui-dom/vdom2/transitions.d.ts +0 -24
- package/dist/ui-dom/vdom2/x2html.d.ts +0 -26
- package/dist/ui-dom/vdom3/compat.d.ts +0 -20
package/dist/ui-dom/Confirm.d.ts
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* v1 退役(design 归档):实现已收敛到 components/Confirm(vdom 引擎,
|
|
5
5
|
* mountCommand + render-only)。本文件保留为公开 API 兼容入口。
|
|
6
6
|
*/
|
|
7
|
-
export { Confirm
|
|
7
|
+
export { Confirm } from '../components/Confirm/Confirm.ts';
|
|
8
8
|
export type { ConfirmProps, ConfirmOptions, ConfirmInjected } from '../components/Confirm/Confirm.ts';
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* v1 退役(design 归档):实现已收敛到 components/Notification(vdom 引擎,
|
|
5
5
|
* mountCommand + render-only)。本文件保留为公开 API 兼容入口。
|
|
6
6
|
*/
|
|
7
|
-
export { Notification
|
|
7
|
+
export { Notification } from '../components/Notification/Notification.ts';
|
|
8
8
|
export type { NotificationType, NotificationPosition, NotificationItem, NotificationProps, NotificationOptions, NotificationInjected, } from '../components/Notification/Notification.ts';
|
package/dist/ui-dom/Toast.d.ts
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* v1 退役(design 归档):实现已收敛到 components/Toast(vdom 引擎,
|
|
5
5
|
* mountCommand + render-only)。本文件保留为公开 API 兼容入口。
|
|
6
6
|
*/
|
|
7
|
-
export { Toast
|
|
7
|
+
export { Toast } from '../components/Toast/Toast.ts';
|
|
8
8
|
export type { ToastType, ToastPosition, ToastItem, ToastProps, ToastOptions, ToastInjected, } from '../components/Toast/Toast.ts';
|
|
@@ -8,7 +8,6 @@ export type { HookEnv, MediaRegistryItem, PopupTracker, ScrollTracker } from './
|
|
|
8
8
|
export { useStableRef } from './stable.ts';
|
|
9
9
|
export { useHoverCapable } from './stable.ts';
|
|
10
10
|
export { useReducedMotion } from './stable.ts';
|
|
11
|
-
export { useAnimationEnd } from './stable.ts';
|
|
12
11
|
export { useLongPress } from './stable.ts';
|
|
13
12
|
export { usePresence } from './stable.ts';
|
|
14
13
|
export { useTween } from './stable.ts';
|
|
@@ -12,10 +12,6 @@ export declare function useStableRef(_env: HookEnv, init: (el: HTMLElement | nul
|
|
|
12
12
|
export declare function useHoverCapable(env: HookEnv): boolean;
|
|
13
13
|
/** 响应式系统偏好(prefers-reduced-motion)。mount 期一次判定 */
|
|
14
14
|
export declare function useReducedMotion(_env: HookEnv): boolean;
|
|
15
|
-
/** 元素动画完成回调(animationend):stableRef——ref 挂载绑定、卸载清理、引用恒定 */
|
|
16
|
-
export declare function useAnimationEnd(env: HookEnv, cb: () => void, opts?: {
|
|
17
|
-
once?: boolean;
|
|
18
|
-
}): (node: HTMLElement | null) => void;
|
|
19
15
|
/** 长按手势:pointerdown 按住 duration 触发,提前松开/位移取消,桌面右键兼容 */
|
|
20
16
|
export declare function useLongPress(env: HookEnv, options: UseLongPressOptions): UseLongPressHandle;
|
|
21
17
|
/**
|
|
@@ -25,9 +21,9 @@ export declare function useLongPress(env: HookEnv, options: UseLongPressOptions)
|
|
|
25
21
|
export declare function usePresence(env: HookEnv, options?: {
|
|
26
22
|
name?: string;
|
|
27
23
|
}): {
|
|
28
|
-
readonly phase: "
|
|
24
|
+
readonly phase: "closed" | "open" | "exit";
|
|
29
25
|
ref: (el: HTMLElement | null) => void;
|
|
30
|
-
sync: (open: boolean) => "
|
|
26
|
+
sync: (open: boolean) => "closed" | "open" | "exit";
|
|
31
27
|
};
|
|
32
28
|
/** 数值补间:rAF + ease + reduced-motion 直落终值。目标变化自动补间。 */
|
|
33
29
|
export declare function useTween(env: HookEnv, target: number, opts?: {
|
package/dist/ui-dom/index.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
* 迁移路线图:design/vdom3-migration-plan.md——vdom2 保留(git 历史/回滚保险),
|
|
4
|
-
* 不再演进(bug 修复在 vdom3)。新引擎入口:weifuwu/ui-dom/vdom3。
|
|
5
|
-
*
|
|
2
|
+
|
|
6
3
|
* weifuwu/ui-dom — 前端路由 + 渲染运行时(v2 vdom 引擎,render-only)
|
|
7
4
|
*
|
|
8
5
|
* 渲染运行时 = vdom(第 2 代引擎,design 归档):
|
|
@@ -11,12 +8,11 @@
|
|
|
11
8
|
* - 命令式挂载:mountCommand/unmountCommand(弹窗中间件在 components 各组件内部)
|
|
12
9
|
*
|
|
13
10
|
* 定稿架构(design/ui-architecture.md):req = window.location,res = VNode,
|
|
14
|
-
*
|
|
11
|
+
* createRouter/createRoot = 事件流渲染落地;组件 = 两阶段异步组件。
|
|
15
12
|
*/
|
|
16
|
-
export { UIRouter } from './router.ts';
|
|
17
|
-
export type { UIRouterOptions, RouteMatch } from './router.ts';
|
|
18
13
|
export { h, jsx, jsxs, jsxDEV, Fragment, Portal, createPortal } from './vnode.ts';
|
|
19
|
-
export
|
|
14
|
+
export { App } from './vdom3/types.ts';
|
|
15
|
+
export type { VNode, VNodeChild, Component } from './vnode.ts';
|
|
20
16
|
export { createClientBrowser } from './browser.ts';
|
|
21
17
|
export { animateOut } from './motion.ts';
|
|
22
18
|
export { api } from './middleware/api.ts';
|
|
@@ -27,16 +23,25 @@ export { ws } from './middleware/ws.ts';
|
|
|
27
23
|
export { i18n } from './i18n.ts';
|
|
28
24
|
export type { I18nState, I18nInjected, I18nOptions } from './i18n.ts';
|
|
29
25
|
export type { WsClient, WsInjected } from './middleware/ws.ts';
|
|
30
|
-
export type {
|
|
31
|
-
export { uiServe } from './middleware/serve.ts';
|
|
32
|
-
export type { UIServeOptions, UIServeHandle } from './middleware/serve.ts';
|
|
33
|
-
export { patchValue } from './vdom2/patch.ts';
|
|
34
|
-
export { hydrateVNode } from './vdom2/hydrate.ts';
|
|
35
|
-
export { ssrPage, ssrToString, serializeData, createSsrContext } from './vdom2/ssr.ts';
|
|
36
|
-
export { buildVNode } from './vdom2/build.ts';
|
|
37
|
-
export { renderValue } from './vdom2/render.ts';
|
|
38
|
-
export { createRenderer, type Renderer } from './vdom2/mount.ts';
|
|
39
|
-
export { mountCommand, unmountCommand } from './vdom2/mount.ts';
|
|
26
|
+
export type { WfuiContext, } from './types.ts';
|
|
40
27
|
export { createStore } from './store.ts';
|
|
41
|
-
export { createVdomContext, mountRoot } from './context.ts';
|
|
42
28
|
export type { ExternalStore } from './store.ts';
|
|
29
|
+
export { createRoot } from './vdom3/root.ts';
|
|
30
|
+
export type { RootHandle } from './vdom3/root.ts';
|
|
31
|
+
export { createRouter } from './vdom3/router.ts';
|
|
32
|
+
export type { RouteDef } from './vdom3/router.ts';
|
|
33
|
+
export { mount, patch } from './vdom3/render.ts';
|
|
34
|
+
export { buildVNode, isVNode } from './vdom3/build.ts';
|
|
35
|
+
export { createEventStream, stream, ev, evKey } from './vdom3/events.ts';
|
|
36
|
+
export { addGlobalListener, bindElementListener, bindDelegated, unbindEvent, unbindAll, ensureDelegationRoot, removeDelegationRoot } from './vdom3/delegate.ts';
|
|
37
|
+
export { registerApp, getAppFactory, resetAppRegistry } from './vdom3/app.ts';
|
|
38
|
+
export { replay, applyEvent, undo, eventsOf, hasEvent, expectEventSequence } from './vdom3/replay.ts';
|
|
39
|
+
export { NodeRegistry, ensurePortalContainer } from './vdom3/registry.ts';
|
|
40
|
+
export { renderToEvents, renderToEventStream, serializeEvents, deserializeEvents, eventsToHtml } from './vdom3/ssr.ts';
|
|
41
|
+
export { recordToTest, summarizeEvents } from './vdom3/record.ts';
|
|
42
|
+
export { createV3Ui } from './vdom3/ui.ts';
|
|
43
|
+
export { createSync, autoSync } from './vdom3/sync.ts';
|
|
44
|
+
export { v3Confirm, v3Toast } from './vdom3/commands.ts';
|
|
45
|
+
export type { V3CommandInjected } from './vdom3/commands.ts';
|
|
46
|
+
export { scheduler, Scheduler } from './vdom3/scheduler.ts';
|
|
47
|
+
export type { V3Event, Entity, Action, PatchStrategy, EventStream } from './vdom3/types.ts';
|