weifuwu 0.38.2 → 0.40.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 +96 -66
- package/dist/client/app.d.ts +2 -6
- package/dist/client/error-boundary.d.ts +2 -2
- package/dist/client/index.d.ts +3 -1
- package/dist/client/index.js +350 -147
- package/dist/client/locale/en_US.d.ts +15 -0
- package/dist/client/locale/zh_CN.d.ts +15 -0
- package/dist/client/popup.d.ts +19 -0
- package/dist/client/render.d.ts +3 -3
- package/dist/client/router.d.ts +1 -1
- package/dist/client/types.d.ts +11 -5
- package/dist/client/vnode.d.ts +11 -2
- package/dist/components/Chart/Chart.d.ts +15 -0
- package/dist/components/Chart/chart-utils.d.ts +53 -0
- package/dist/components/DatePicker/DatePicker.d.ts +18 -0
- package/dist/components/DatePicker/calendar-utils.d.ts +30 -0
- package/dist/components/Dropdown/Dropdown.d.ts +3 -0
- package/dist/components/Editor/Editor.d.ts +13 -0
- package/dist/components/Editor/tools/format.d.ts +10 -0
- package/dist/components/Editor/tools/table.d.ts +7 -0
- package/dist/components/Editor/tools/toolbar.d.ts +9 -0
- package/dist/components/Editor/tools/types.d.ts +15 -0
- package/dist/components/FileUpload/FileUpload.d.ts +3 -0
- package/dist/components/Img/Img.d.ts +0 -2
- package/dist/components/InView/InView.d.ts +2 -17
- package/dist/components/Popover/Popover.d.ts +2 -12
- package/dist/components/Skeleton/Skeleton.d.ts +0 -8
- package/dist/components/Tooltip/Tooltip.d.ts +5 -1
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +1603 -343
- package/dist/components/style.css +734 -153
- package/dist/layout/weifuwu-layout.css +14 -0
- package/package.json +2 -2
|
@@ -30,5 +30,20 @@ export declare const enUS: {
|
|
|
30
30
|
Drawer: {
|
|
31
31
|
ariaLabel: string;
|
|
32
32
|
};
|
|
33
|
+
DatePicker: {
|
|
34
|
+
w0: string;
|
|
35
|
+
w1: string;
|
|
36
|
+
w2: string;
|
|
37
|
+
w3: string;
|
|
38
|
+
w4: string;
|
|
39
|
+
w5: string;
|
|
40
|
+
w6: string;
|
|
41
|
+
hour: string;
|
|
42
|
+
minute: string;
|
|
43
|
+
time: string;
|
|
44
|
+
confirm: string;
|
|
45
|
+
cancel: string;
|
|
46
|
+
placeholder: string;
|
|
47
|
+
};
|
|
33
48
|
};
|
|
34
49
|
};
|
|
@@ -30,5 +30,20 @@ export declare const zhCN: {
|
|
|
30
30
|
Drawer: {
|
|
31
31
|
ariaLabel: string;
|
|
32
32
|
};
|
|
33
|
+
DatePicker: {
|
|
34
|
+
w0: string;
|
|
35
|
+
w1: string;
|
|
36
|
+
w2: string;
|
|
37
|
+
w3: string;
|
|
38
|
+
w4: string;
|
|
39
|
+
w5: string;
|
|
40
|
+
w6: string;
|
|
41
|
+
hour: string;
|
|
42
|
+
minute: string;
|
|
43
|
+
time: string;
|
|
44
|
+
confirm: string;
|
|
45
|
+
cancel: string;
|
|
46
|
+
placeholder: string;
|
|
47
|
+
};
|
|
33
48
|
};
|
|
34
49
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* weifuwu/client — 弹出层定位工具
|
|
3
|
+
*
|
|
4
|
+
* 基于 position: fixed 的坐标计算,替代 CSS absolute 定位。
|
|
5
|
+
* 配合 createPortal 使用,让弹出层不受父级 overflow/transform 影响。
|
|
6
|
+
*/
|
|
7
|
+
export interface FixedPos {
|
|
8
|
+
top: number;
|
|
9
|
+
left: number;
|
|
10
|
+
}
|
|
11
|
+
export type Placement = 'top' | 'bottom' | 'left' | 'right';
|
|
12
|
+
/**
|
|
13
|
+
* 根据触发元素和方向计算弹出层的 fixed 坐标
|
|
14
|
+
* @param el 触发元素
|
|
15
|
+
* @param placement 弹出方向
|
|
16
|
+
* @param gap 间距(px),默认 6
|
|
17
|
+
* @param center 是否居中于触发元素,默认 true
|
|
18
|
+
*/
|
|
19
|
+
export declare function computeFixedPos(el: HTMLElement, placement?: Placement, gap?: number, center?: boolean): FixedPos;
|
package/dist/client/render.d.ts
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*
|
|
7
7
|
* 支持:
|
|
8
8
|
* - key 属性(keyed diff)
|
|
9
|
-
* -
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* - ctx.ui.onmount/onmounted/onunmount/onupdate 生命周期
|
|
10
|
+
*
|
|
11
|
+
* 状态管理:组件使用闭包变量 + ctx.ui.render() 手动触发重渲染。
|
|
12
12
|
*/
|
|
13
13
|
import type { VNode } from './vnode.ts';
|
|
14
14
|
import type { WfuiContext } from './types.ts';
|
package/dist/client/router.d.ts
CHANGED
|
@@ -11,4 +11,4 @@ export interface RouterOptions {
|
|
|
11
11
|
}
|
|
12
12
|
export declare const layoutDepth: WeakMap<any, number>;
|
|
13
13
|
export declare function router(opts: RouterOptions): AppMiddleware;
|
|
14
|
-
export declare function RouteView(_props: {}, ctx: WfuiContext): any;
|
|
14
|
+
export declare function RouteView(_props: {}, ctx: WfuiContext): () => any;
|
package/dist/client/types.d.ts
CHANGED
|
@@ -8,12 +8,18 @@ export interface WfuiContext {
|
|
|
8
8
|
ui: {
|
|
9
9
|
/** 触发组件重渲染 */
|
|
10
10
|
render: () => void;
|
|
11
|
-
/**
|
|
11
|
+
/** 标记脏状态,下一个微任务批量渲染 */
|
|
12
12
|
dirty: () => void;
|
|
13
|
-
/**
|
|
14
|
-
$: Record<string, any>;
|
|
15
|
-
/**
|
|
16
|
-
|
|
13
|
+
/** 创建响应式状态容器:$.x = val 自动触发 dirty()(微任务批量渲染) */
|
|
14
|
+
$: () => Record<string, any>;
|
|
15
|
+
/** 组件首次渲染后触发(DOM 未创建) */
|
|
16
|
+
onmount: (fn: () => void) => void;
|
|
17
|
+
/** 组件 DOM 创建后触发,接收根元素,返回值作为 cleanup */
|
|
18
|
+
onmounted: (fn: (el: Element) => (() => void) | void) => void;
|
|
19
|
+
/** 组件移除前清理 */
|
|
20
|
+
onunmount: (fn: () => void) => void;
|
|
21
|
+
/** props 变化时触发,接收旧 props */
|
|
22
|
+
onupdate: (fn: (prevProps: any) => void) => void;
|
|
17
23
|
};
|
|
18
24
|
/** 路由(由 router 中间件注入) */
|
|
19
25
|
route?: {
|
package/dist/client/vnode.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* --jsxImportSource=weifuwu/client
|
|
8
8
|
*/
|
|
9
9
|
import type { WfuiContext } from './types.ts';
|
|
10
|
-
export type VNodeType = string | Component | typeof Fragment;
|
|
10
|
+
export type VNodeType = string | Component | typeof Fragment | typeof Portal;
|
|
11
11
|
export interface VNode {
|
|
12
12
|
type: VNodeType;
|
|
13
13
|
props: Record<string, any>;
|
|
@@ -18,9 +18,15 @@ export interface VNode {
|
|
|
18
18
|
_child?: any;
|
|
19
19
|
/** ref 回调返回的清理函数,卸载时由框架调用 */
|
|
20
20
|
_cleanup?: (() => void) | undefined;
|
|
21
|
+
/** Portal 子容器 DOM */
|
|
22
|
+
_portalEl?: HTMLDivElement | undefined;
|
|
23
|
+
/** 两阶段组件的 render 函数(mount 返回的函数) */
|
|
24
|
+
_render?: (props: any) => VNode | null;
|
|
21
25
|
}
|
|
22
|
-
export type Component<P = {}> = (
|
|
26
|
+
export type Component<P = {}> = (initProps: P, ctx: WfuiContext) => ((props: P) => VNode | null) | null;
|
|
23
27
|
export declare const Fragment: unique symbol;
|
|
28
|
+
/** Portal — 将子 VNode 渲染到 document.body 下的独立容器 */
|
|
29
|
+
export declare const Portal: unique symbol;
|
|
24
30
|
/** JSX 类型声明 — 使 TypeScript 理解自定义 JSX 运行时 */
|
|
25
31
|
declare global {
|
|
26
32
|
namespace JSX {
|
|
@@ -39,3 +45,6 @@ export declare function h(type: VNodeType, props: Record<string, any> | null, ..
|
|
|
39
45
|
export declare function isNative(vnode: VNode): boolean;
|
|
40
46
|
export declare function isComponent(vnode: VNode): boolean;
|
|
41
47
|
export declare function isFragment(vnode: VNode): boolean;
|
|
48
|
+
export declare function isPortal(vnode: VNode): boolean;
|
|
49
|
+
/** Portal VNode — 子节点渲染到 document.body#__wf_portal 中 */
|
|
50
|
+
export declare function createPortal(children: any, portalKey?: string): VNode;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* weifuwu/components — Chart
|
|
3
|
+
*/
|
|
4
|
+
import type { Component } from '../../client/vnode.ts';
|
|
5
|
+
import type { DataPoint, ChartType, ChartOptions } from './chart-utils.ts';
|
|
6
|
+
export type { DataPoint, ChartType, ChartOptions };
|
|
7
|
+
export interface ChartProps {
|
|
8
|
+
type?: ChartType;
|
|
9
|
+
data: DataPoint[];
|
|
10
|
+
options?: ChartOptions;
|
|
11
|
+
title?: string;
|
|
12
|
+
area?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const Chart: Component<ChartProps>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* weifuwu/components — Chart 纯函数坐标计算
|
|
3
|
+
*
|
|
4
|
+
* 无 DOM 依赖,可测试。
|
|
5
|
+
*/
|
|
6
|
+
export type ChartType = 'line' | 'bar' | 'pie';
|
|
7
|
+
export interface DataPoint {
|
|
8
|
+
label: string;
|
|
9
|
+
value: number;
|
|
10
|
+
color?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ChartOptions {
|
|
13
|
+
width?: number;
|
|
14
|
+
height?: number;
|
|
15
|
+
padding?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface ScaleLinear {
|
|
18
|
+
(v: number): number;
|
|
19
|
+
invert?(v: number): number;
|
|
20
|
+
domain: [number, number];
|
|
21
|
+
range: [number, number];
|
|
22
|
+
}
|
|
23
|
+
export declare function scaleLinear(domain: [number, number], range: [number, number]): ScaleLinear;
|
|
24
|
+
export declare function linePath(data: DataPoint[], xScale: ScaleLinear, yScale: ScaleLinear): string;
|
|
25
|
+
export declare function areaPath(data: DataPoint[], xScale: ScaleLinear, yScale: ScaleLinear, yBase: number): string;
|
|
26
|
+
export interface BarRect {
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
color: string;
|
|
32
|
+
label: string;
|
|
33
|
+
value: number;
|
|
34
|
+
}
|
|
35
|
+
export declare function barRects(data: DataPoint[], xScale: ScaleLinear, yScale: ScaleLinear, barWidth?: number): BarRect[];
|
|
36
|
+
export interface Arc {
|
|
37
|
+
d: string;
|
|
38
|
+
color: string;
|
|
39
|
+
label: string;
|
|
40
|
+
value: number;
|
|
41
|
+
centroid: {
|
|
42
|
+
x: number;
|
|
43
|
+
y: number;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export declare function pieArcs(data: DataPoint[], cx: number, cy: number, radius: number): Arc[];
|
|
47
|
+
export declare function getDefaultColor(index: number): string;
|
|
48
|
+
export interface Tick {
|
|
49
|
+
value: number;
|
|
50
|
+
y: number;
|
|
51
|
+
label: string;
|
|
52
|
+
}
|
|
53
|
+
export declare function getYTicks(yScale: ScaleLinear, tickCount?: number): Tick[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* weifuwu/components — DatePicker
|
|
3
|
+
*
|
|
4
|
+
* 四合一日期选择器,支持 mode: date | datetime | time | range
|
|
5
|
+
* 使用 createPortal + position:fixed 定位弹出层。
|
|
6
|
+
*
|
|
7
|
+
* 状态管理:闭包变量 + ctx.ui.render()
|
|
8
|
+
*/
|
|
9
|
+
import type { Component } from '../../client/vnode.ts';
|
|
10
|
+
export type DatePickerMode = 'date' | 'datetime' | 'time' | 'range';
|
|
11
|
+
export interface DatePickerProps {
|
|
12
|
+
mode?: DatePickerMode;
|
|
13
|
+
value?: string;
|
|
14
|
+
onChange?: (value: string) => void;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const DatePicker: Component<DatePickerProps>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* weifuwu/components — DatePicker 日期计算工具
|
|
3
|
+
*
|
|
4
|
+
* 纯函数,无 DOM 依赖,可测试。
|
|
5
|
+
*/
|
|
6
|
+
export interface CalendarDay {
|
|
7
|
+
year: number;
|
|
8
|
+
month: number;
|
|
9
|
+
day: number;
|
|
10
|
+
isOtherMonth: boolean;
|
|
11
|
+
isToday: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function getWeekdays(): string[];
|
|
14
|
+
export declare function isToday(year: number, month: number, day: number): boolean;
|
|
15
|
+
export declare function getDaysInMonth(year: number, month: number): number;
|
|
16
|
+
export declare function getFirstDayOfMonth(year: number, month: number): number;
|
|
17
|
+
/** 生成一个月历网格(6 行 × 7 列 = 42 格) */
|
|
18
|
+
export declare function getCalendarGrid(year: number, month: number): CalendarDay[][];
|
|
19
|
+
/** 格式化日期 */
|
|
20
|
+
export declare function formatDate(year: number, month: number, day: number): string;
|
|
21
|
+
export declare function formatTime(hour: number, minute: number): string;
|
|
22
|
+
export declare function formatDateTime(year: number, month: number, day: number, hour: number, minute: number): string;
|
|
23
|
+
/** 小时选项(00-23) */
|
|
24
|
+
export declare function hourOptions(): number[];
|
|
25
|
+
/** 分钟选项(00-59,步长 5) */
|
|
26
|
+
export declare function minuteOptions(): number[];
|
|
27
|
+
/** 日期比较:a 是否在 b 之前 */
|
|
28
|
+
export declare function isBefore(a: Date, b: Date): boolean;
|
|
29
|
+
/** 日期比较:a 是否在 b 之后 */
|
|
30
|
+
export declare function isAfter(a: Date, b: Date): boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* weifuwu/components — Editor
|
|
3
|
+
*
|
|
4
|
+
* 富文本编辑器组件,基于 contentEditable + document.execCommand。
|
|
5
|
+
* 零外部依赖,纯函数 (props, ctx) => VNode。
|
|
6
|
+
*
|
|
7
|
+
* 使用两阶段模型 + VDOM innerHTML 支持。
|
|
8
|
+
* 状态管理:闭包变量 + ctx.ui.render()
|
|
9
|
+
*/
|
|
10
|
+
import type { Component } from '../../client/vnode.ts';
|
|
11
|
+
import type { EditorProps } from './tools/types.ts';
|
|
12
|
+
export type { EditorProps, ToolbarItem } from './tools/types.ts';
|
|
13
|
+
export declare const Editor: Component<EditorProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* weifuwu/components/Editor/tools — 格式化命令
|
|
3
|
+
*/
|
|
4
|
+
import type { FormatState, ToolbarItem } from './types.ts';
|
|
5
|
+
/** 查询当前选区格式状态 */
|
|
6
|
+
export declare function queryFormats(): FormatState;
|
|
7
|
+
/** 执行 document.execCommand */
|
|
8
|
+
export declare function exec(cmd: string, value?: string): void;
|
|
9
|
+
/** 根据工具项执行格式化 */
|
|
10
|
+
export declare function execFormat(item: ToolbarItem): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* weifuwu/components/Editor/tools — 表格工具
|
|
3
|
+
*/
|
|
4
|
+
/** 在光标处插入表格 HTML */
|
|
5
|
+
export declare function insertTable(rows: number, cols: number): void;
|
|
6
|
+
/** 渲染 6×6 表格选择网格 */
|
|
7
|
+
export declare function renderTableGrid(hoverRow: number, hoverCol: number, onSelect: (rows: number, cols: number) => void, onHover: (row: number, col: number) => void, onLeave: () => void): any;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* weifuwu/components/Editor/tools — 工具栏渲染
|
|
3
|
+
*/
|
|
4
|
+
import type { VNode } from '../../../client/vnode.ts';
|
|
5
|
+
import type { FormatState, ToolbarItem } from './types.ts';
|
|
6
|
+
export declare const DEFAULT_TOOLBAR: ToolbarItem[];
|
|
7
|
+
export declare const TOOLBAR_LABELS: Record<ToolbarItem, string>;
|
|
8
|
+
export declare const TOOLBAR_TITLES: Record<ToolbarItem, string>;
|
|
9
|
+
export declare function renderToolbar(items: ToolbarItem[], active: FormatState, isSource: boolean, onItem: (item: ToolbarItem) => void, customRender?: Record<string, (item: ToolbarItem) => VNode>): VNode;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* weifuwu/components/Editor/tools — 类型定义
|
|
3
|
+
*/
|
|
4
|
+
export type ToolbarItem = 'bold' | 'italic' | 'underline' | 'h1' | 'h2' | 'h3' | 'ul' | 'ol' | 'blockquote' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'hr' | 'image' | 'table' | 'link' | 'clear' | 'source';
|
|
5
|
+
export interface EditorProps {
|
|
6
|
+
value?: string;
|
|
7
|
+
onChange?: (html: string) => void;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
minHeight?: string;
|
|
11
|
+
toolbar?: ToolbarItem[];
|
|
12
|
+
/** 图片上传回调 — 接收 File 返回图片 URL。不传时弹出 URL 输入框 */
|
|
13
|
+
onUpload?: (file: File) => Promise<string>;
|
|
14
|
+
}
|
|
15
|
+
export type FormatState = Record<string, boolean>;
|
|
@@ -1,31 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* weifuwu/components — InView
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* 用法:
|
|
8
|
-
* <InView>
|
|
9
|
-
* <ExpensiveComponent />
|
|
10
|
-
* </InView>
|
|
11
|
-
*
|
|
12
|
-
* <InView once={false} rootMargin="200px">
|
|
13
|
-
* <img src="large.jpg" />
|
|
14
|
-
* </InView>
|
|
4
|
+
* 组件挂载后用 ctx.ui.onmounted 获取根元素,设置 IntersectionObserver。
|
|
5
|
+
* 进入视窗后替换占位符为真实内容。
|
|
15
6
|
*/
|
|
16
7
|
import type { Component } from '../../client/vnode.ts';
|
|
17
8
|
export interface InViewProps {
|
|
18
|
-
/** 是否只触发一次(默认 true,进入后一直显示) */
|
|
19
9
|
once?: boolean;
|
|
20
|
-
/** IntersectionObserver threshold(默认 0) */
|
|
21
10
|
threshold?: number;
|
|
22
|
-
/** IntersectionObserver rootMargin(默认 '0px') */
|
|
23
11
|
rootMargin?: string;
|
|
24
|
-
/** 进入视窗前渲染的占位内容(默认轻量占位块) */
|
|
25
12
|
placeholder?: any;
|
|
26
|
-
/** 进入视窗回调 */
|
|
27
13
|
onEnter?: () => void;
|
|
28
|
-
/** 懒加载内容 */
|
|
29
14
|
children?: any;
|
|
30
15
|
}
|
|
31
16
|
export declare const InView: Component<InViewProps>;
|
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* weifuwu/components — Popover
|
|
3
|
-
*
|
|
4
|
-
* 通用弹出层组件。触发点击后在目标元素附近弹出浮动面板。
|
|
5
|
-
* 点击面板外部关闭。
|
|
6
|
-
*
|
|
7
|
-
* 触发方式:
|
|
8
|
-
* 'click' — 点击触发元素切换显示
|
|
9
|
-
* 'hover' — 悬停触发元素显示,移出关闭
|
|
10
|
-
*
|
|
11
|
-
* 受控模式:
|
|
12
|
-
* 传入 open + onOpenChange 可外部控制显示状态
|
|
13
|
-
* (Dropdown 使用此模式)
|
|
14
3
|
*/
|
|
15
4
|
import type { Component } from '../../client/vnode.ts';
|
|
16
|
-
|
|
5
|
+
import type { Placement } from '../../client/popup.ts';
|
|
6
|
+
export type PopoverPosition = Placement;
|
|
17
7
|
export interface PopoverProps {
|
|
18
8
|
content?: any;
|
|
19
9
|
trigger?: 'click' | 'hover';
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* weifuwu/components — Skeleton
|
|
3
|
-
*
|
|
4
|
-
* 骨架屏占位组件。纯 CSS,无交互,无状态。
|
|
5
|
-
*
|
|
6
|
-
* 用法:
|
|
7
|
-
* <Skeleton /> ← 单行文本
|
|
8
|
-
* <Skeleton lines={3} /> ← 多行段落
|
|
9
|
-
* <Skeleton variant="circle" /> ← 圆形头像
|
|
10
|
-
* <Skeleton variant="rect" w={200} h={120} /> ← 矩形区域
|
|
11
3
|
*/
|
|
12
4
|
import type { Component } from '../../client/vnode.ts';
|
|
13
5
|
export type SkeletonVariant = 'text' | 'circle' | 'rect';
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* weifuwu/components — Tooltip
|
|
3
|
+
*/
|
|
1
4
|
import type { Component } from '../../client/vnode.ts';
|
|
2
|
-
|
|
5
|
+
import type { Placement } from '../../client/popup.ts';
|
|
6
|
+
export type TooltipPosition = Placement;
|
|
3
7
|
export interface TooltipProps {
|
|
4
8
|
content: string;
|
|
5
9
|
position?: TooltipPosition;
|
|
@@ -81,3 +81,9 @@ export { Img } from './Img/Img.ts';
|
|
|
81
81
|
export type { ImgProps } from './Img/Img.ts';
|
|
82
82
|
export { InView } from './InView/InView.ts';
|
|
83
83
|
export type { InViewProps } from './InView/InView.ts';
|
|
84
|
+
export { DatePicker } from './DatePicker/DatePicker.ts';
|
|
85
|
+
export type { DatePickerProps, DatePickerMode } from './DatePicker/DatePicker.ts';
|
|
86
|
+
export { Chart } from './Chart/Chart.ts';
|
|
87
|
+
export type { ChartProps, ChartType, DataPoint, ChartOptions } from './Chart/Chart.ts';
|
|
88
|
+
export { Editor } from './Editor/Editor.ts';
|
|
89
|
+
export type { EditorProps, ToolbarItem } from './Editor/Editor.ts';
|