@winm/vue-workbench-ui 0.0.0-stage → 0.1.2
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 +55 -2
- package/dist/Toggle-Dcjn5G6M.js +387 -0
- package/dist/code-editor.css +189 -0
- package/dist/code-editor.d.ts +5 -0
- package/dist/code-editor.js +1272 -0
- package/dist/components/Badge.vue.d.ts +34 -0
- package/dist/components/BrandMark.vue.d.ts +6 -0
- package/dist/components/CodeEditor.vue.d.ts +32 -0
- package/dist/components/ConfirmationDialog.vue.d.ts +27 -0
- package/dist/components/ContextMenu.vue.d.ts +66 -0
- package/dist/components/CopyButton.vue.d.ts +35 -0
- package/dist/components/DataTable.vue.d.ts +87 -0
- package/dist/components/DatePicker.vue.d.ts +33 -0
- package/dist/components/DropdownMenu.vue.d.ts +88 -0
- package/dist/components/EmptyState.vue.d.ts +38 -0
- package/dist/components/ErrorBanner.vue.d.ts +30 -0
- package/dist/components/ExpandableCodeEditor.vue.d.ts +72 -0
- package/dist/components/Expander.vue.d.ts +75 -0
- package/dist/components/FilePicker.vue.d.ts +111 -0
- package/dist/components/Icon.vue.d.ts +8 -0
- package/dist/components/Ipv4Input.vue.d.ts +95 -0
- package/dist/components/KeyValueTable.vue.d.ts +96 -0
- package/dist/components/ModalDialog.vue.d.ts +75 -0
- package/dist/components/NumberInput.vue.d.ts +69 -0
- package/dist/components/Pagination.vue.d.ts +49 -0
- package/dist/components/PasswordInput.vue.d.ts +48 -0
- package/dist/components/PlaceholderInput.vue.d.ts +36 -0
- package/dist/components/PluginIcon.vue.d.ts +20 -0
- package/dist/components/Popover.vue.d.ts +91 -0
- package/dist/components/ProgressBar.vue.d.ts +46 -0
- package/dist/components/SearchInput.vue.d.ts +72 -0
- package/dist/components/SegmentedControl.vue.d.ts +45 -0
- package/dist/components/SliderInput.vue.d.ts +59 -0
- package/dist/components/StatusBadge.vue.d.ts +18 -0
- package/dist/components/SwitchField.vue.d.ts +38 -0
- package/dist/components/Tabs.vue.d.ts +51 -0
- package/dist/components/TextInput.vue.d.ts +120 -0
- package/dist/components/Toast.vue.d.ts +47 -0
- package/dist/components/Toggle.vue.d.ts +16 -0
- package/dist/components/Tooltip.vue.d.ts +32 -0
- package/dist/components/WorkbenchTabs.vue.d.ts +52 -0
- package/dist/components/flow/PanelResizer.vue.d.ts +23 -0
- package/dist/components/http/HttpJsonTree.vue.d.ts +6 -0
- package/dist/components/http/HttpJsonTreeNode.vue.d.ts +22 -0
- package/dist/composables/useClipboard.d.ts +23 -0
- package/dist/date-picker-range.d.ts +54 -0
- package/dist/date-picker.d.ts +31 -0
- package/dist/directives/tooltip.d.ts +32 -0
- package/dist/editors/languages.d.ts +10 -0
- package/dist/editors/script-completions.d.ts +23 -0
- package/dist/editors/script-linter.d.ts +7 -0
- package/dist/editors/theme.d.ts +3 -0
- package/dist/file-picker.d.ts +68 -0
- package/dist/index.d.ts +69 -0
- package/dist/index.js +6116 -0
- package/dist/media-icon.d.ts +5 -0
- package/dist/modal-enhancer.d.ts +28 -0
- package/dist/overlay-host.d.ts +2 -0
- package/dist/plugin.d.ts +22 -0
- package/dist/select-popup.d.ts +14 -0
- package/dist/style.css +2 -0
- package/dist/template-placeholders.d.ts +64 -0
- package/dist/ui-context.d.ts +18 -0
- package/package.json +71 -3
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label?: string | number;
|
|
3
|
+
count?: number;
|
|
4
|
+
max?: number;
|
|
5
|
+
hideZero?: boolean;
|
|
6
|
+
tone?: "neutral" | "subtle" | "accent" | "success" | "warning" | "danger" | "muted";
|
|
7
|
+
size?: "default" | "compact";
|
|
8
|
+
clickable?: boolean;
|
|
9
|
+
tooltip?: string;
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
};
|
|
12
|
+
declare var __VLS_7: {};
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
default?: (props: typeof __VLS_7) => any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
17
|
+
max: number;
|
|
18
|
+
label: string | number;
|
|
19
|
+
tooltip: string;
|
|
20
|
+
size: "default" | "compact";
|
|
21
|
+
ariaLabel: string;
|
|
22
|
+
count: number;
|
|
23
|
+
hideZero: boolean;
|
|
24
|
+
tone: "success" | "warning" | "neutral" | "subtle" | "accent" | "danger" | "muted";
|
|
25
|
+
clickable: boolean;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
src: string;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type CodeLanguage, type SQLHints } from "../editors/languages";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
modelValue?: string;
|
|
4
|
+
language?: CodeLanguage;
|
|
5
|
+
dialect?: string;
|
|
6
|
+
hints?: SQLHints;
|
|
7
|
+
readonly?: boolean;
|
|
8
|
+
dark?: boolean;
|
|
9
|
+
label?: string;
|
|
10
|
+
wrap?: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare function insertText(text: string): void;
|
|
13
|
+
declare function replaceText(text: string): void;
|
|
14
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
15
|
+
insertText: typeof insertText;
|
|
16
|
+
replaceText: typeof replaceText;
|
|
17
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
+
"update:modelValue": (value: string) => any;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
20
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
dark: boolean;
|
|
23
|
+
modelValue: string;
|
|
24
|
+
language: CodeLanguage;
|
|
25
|
+
dialect: string;
|
|
26
|
+
hints: SQLHints;
|
|
27
|
+
readonly: boolean;
|
|
28
|
+
label: string;
|
|
29
|
+
wrap: boolean;
|
|
30
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
open?: boolean;
|
|
3
|
+
title?: string;
|
|
4
|
+
message?: string;
|
|
5
|
+
confirmLabel?: string;
|
|
6
|
+
cancelLabel?: string;
|
|
7
|
+
danger?: boolean;
|
|
8
|
+
/** 异步确认提交中:禁用取消与关闭并给确认按钮展示零位移加载态 */
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
cancel: () => any;
|
|
13
|
+
confirm: () => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
+
onCancel?: (() => any) | undefined;
|
|
16
|
+
onConfirm?: (() => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
title: string;
|
|
19
|
+
open: boolean;
|
|
20
|
+
message: string;
|
|
21
|
+
danger: boolean;
|
|
22
|
+
confirmLabel: string;
|
|
23
|
+
cancelLabel: string;
|
|
24
|
+
loading: boolean;
|
|
25
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { DropdownMenuGroup, DropdownMenuItem } from "./DropdownMenu.vue";
|
|
2
|
+
/**
|
|
3
|
+
* 通用右键上下文菜单(ContextMenu):
|
|
4
|
+
* - 支持声明式包裹目标区(自动监听 @contextmenu.prevent 弹出)与命令式 openAt(event | x, y) 两种用法。
|
|
5
|
+
* - 自动根据实际菜单尺寸执行视口边界防溢出定位(8px 安全边距)。
|
|
6
|
+
* - 内置 ArrowUp / ArrowDown / Home / End / Escape 键盘导航、外部点击及窗口缩放关闭。
|
|
7
|
+
*/
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
/** 受控打开状态(v-model:open) */
|
|
10
|
+
open?: boolean;
|
|
11
|
+
/** 结构化分组菜单项 */
|
|
12
|
+
groups?: DropdownMenuGroup[];
|
|
13
|
+
/** 菜单无障碍名称 */
|
|
14
|
+
ariaLabel?: string;
|
|
15
|
+
/** 最小宽度 */
|
|
16
|
+
minWidth?: string;
|
|
17
|
+
/** 受控 X 坐标 */
|
|
18
|
+
x?: number;
|
|
19
|
+
/** 受控 Y 坐标 */
|
|
20
|
+
y?: number;
|
|
21
|
+
/** 是否禁用右键触发 */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
};
|
|
24
|
+
declare function openAt(eventOrX: MouseEvent | number, maybeY?: number): void;
|
|
25
|
+
declare function close(): void;
|
|
26
|
+
declare var __VLS_1: {
|
|
27
|
+
open: boolean;
|
|
28
|
+
openAt: typeof openAt;
|
|
29
|
+
close: typeof close;
|
|
30
|
+
}, __VLS_15: {
|
|
31
|
+
close: typeof close;
|
|
32
|
+
};
|
|
33
|
+
type __VLS_Slots = {} & {
|
|
34
|
+
default?: (props: typeof __VLS_1) => any;
|
|
35
|
+
} & {
|
|
36
|
+
menu?: (props: typeof __VLS_15) => any;
|
|
37
|
+
};
|
|
38
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
39
|
+
open: import("vue").ComputedRef<boolean>;
|
|
40
|
+
openAt: typeof openAt;
|
|
41
|
+
close: typeof close;
|
|
42
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
43
|
+
select: (item: DropdownMenuItem) => any;
|
|
44
|
+
close: () => any;
|
|
45
|
+
"update:open": (open: boolean) => any;
|
|
46
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
47
|
+
onSelect?: ((item: DropdownMenuItem) => any) | undefined;
|
|
48
|
+
onClose?: (() => any) | undefined;
|
|
49
|
+
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
50
|
+
}>, {
|
|
51
|
+
minWidth: string;
|
|
52
|
+
open: boolean;
|
|
53
|
+
ariaLabel: string;
|
|
54
|
+
disabled: boolean;
|
|
55
|
+
groups: DropdownMenuGroup[];
|
|
56
|
+
x: number;
|
|
57
|
+
y: number;
|
|
58
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
59
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
60
|
+
declare const _default: typeof __VLS_export;
|
|
61
|
+
export default _default;
|
|
62
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
63
|
+
new (): {
|
|
64
|
+
$slots: S;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
text: string;
|
|
3
|
+
label?: string;
|
|
4
|
+
copiedLabel?: string;
|
|
5
|
+
iconOnly?: boolean;
|
|
6
|
+
variant?: "button" | "pill" | "icon" | "text";
|
|
7
|
+
size?: "default" | "small";
|
|
8
|
+
tooltip?: string;
|
|
9
|
+
ariaLabel?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
successMessage?: string;
|
|
12
|
+
errorMessage?: string;
|
|
13
|
+
resetDelay?: number;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
error: (error: Error) => any;
|
|
17
|
+
copied: (text: string) => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
+
onError?: ((error: Error) => any) | undefined;
|
|
20
|
+
onCopied?: ((text: string) => any) | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
label: string;
|
|
23
|
+
tooltip: string;
|
|
24
|
+
size: "default" | "small";
|
|
25
|
+
ariaLabel: string;
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
successMessage: string;
|
|
28
|
+
errorMessage: string;
|
|
29
|
+
copiedLabel: string;
|
|
30
|
+
iconOnly: boolean;
|
|
31
|
+
variant: "text" | "button" | "pill" | "icon";
|
|
32
|
+
resetDelay: number;
|
|
33
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
|
+
declare const _default: typeof __VLS_export;
|
|
35
|
+
export default _default;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export interface DataTableColumn<R = Record<string, any>> {
|
|
2
|
+
key: string;
|
|
3
|
+
label: string;
|
|
4
|
+
subLabel?: string;
|
|
5
|
+
inlineSubLabel?: boolean;
|
|
6
|
+
align?: "left" | "center" | "right";
|
|
7
|
+
headerAlign?: "left" | "center" | "right";
|
|
8
|
+
width?: string;
|
|
9
|
+
minWidth?: string;
|
|
10
|
+
maxWidth?: string;
|
|
11
|
+
mono?: boolean;
|
|
12
|
+
ellipsis?: boolean;
|
|
13
|
+
wrap?: boolean;
|
|
14
|
+
/** 是否作为行首语义标题(<th scope="row">) */
|
|
15
|
+
rowHeader?: boolean;
|
|
16
|
+
/** 横向滚动时首列吸附左侧 */
|
|
17
|
+
stickyStart?: boolean;
|
|
18
|
+
tooltip?: string;
|
|
19
|
+
formatter?: (value: unknown, row: R, index: number) => string;
|
|
20
|
+
}
|
|
21
|
+
declare const __VLS_export: <Row extends Record<string, any> = Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
22
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
23
|
+
columns: DataTableColumn<Row>[];
|
|
24
|
+
rows: Row[];
|
|
25
|
+
rowKey?: (keyof Row & string) | ((row: Row, index: number) => string | number);
|
|
26
|
+
caption?: string;
|
|
27
|
+
hideCaption?: boolean;
|
|
28
|
+
ariaLabel?: string;
|
|
29
|
+
maxHeight?: string;
|
|
30
|
+
density?: "default" | "compact";
|
|
31
|
+
stickyHeader?: boolean;
|
|
32
|
+
hoverable?: boolean;
|
|
33
|
+
striped?: boolean;
|
|
34
|
+
bordered?: boolean;
|
|
35
|
+
tableLayout?: "auto" | "fixed";
|
|
36
|
+
tableClass?: string;
|
|
37
|
+
wrapClass?: string;
|
|
38
|
+
selectedKey?: string | number | null;
|
|
39
|
+
rowClass?: (row: Row, index: number) => string | Record<string, boolean> | Array<string | Record<string, boolean>> | undefined;
|
|
40
|
+
rowClickable?: boolean;
|
|
41
|
+
emptyTitle?: string;
|
|
42
|
+
emptyDescription?: string;
|
|
43
|
+
emptyIcon?: string;
|
|
44
|
+
} & {
|
|
45
|
+
"onRow-click"?: ((row: Row, index: number, event: MouseEvent) => any) | undefined;
|
|
46
|
+
"onRow-dblclick"?: ((row: Row, index: number, event: MouseEvent) => any) | undefined;
|
|
47
|
+
}> & (typeof globalThis extends {
|
|
48
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
49
|
+
} ? P : {});
|
|
50
|
+
expose: (exposed: {}) => void;
|
|
51
|
+
attrs: any;
|
|
52
|
+
slots: {
|
|
53
|
+
[x: `header-${string}`]: ((props: {
|
|
54
|
+
column: DataTableColumn<Row>;
|
|
55
|
+
}) => any) | undefined;
|
|
56
|
+
} & {
|
|
57
|
+
[x: `cell-${string}`]: ((props: {
|
|
58
|
+
row: Row;
|
|
59
|
+
column: DataTableColumn<Row>;
|
|
60
|
+
value: any;
|
|
61
|
+
index: number;
|
|
62
|
+
}) => any) | undefined;
|
|
63
|
+
} & {
|
|
64
|
+
header?: (props: {
|
|
65
|
+
column: DataTableColumn<Row>;
|
|
66
|
+
}) => any;
|
|
67
|
+
} & {
|
|
68
|
+
cell?: (props: {
|
|
69
|
+
row: Row;
|
|
70
|
+
column: DataTableColumn<Row>;
|
|
71
|
+
value: any;
|
|
72
|
+
index: number;
|
|
73
|
+
}) => any;
|
|
74
|
+
} & {
|
|
75
|
+
empty?: (props: {}) => any;
|
|
76
|
+
};
|
|
77
|
+
emit: ((evt: "row-click", row: Row, index: number, event: MouseEvent) => void) & ((evt: "row-dblclick", row: Row, index: number, event: MouseEvent) => void);
|
|
78
|
+
}>) => import("vue").VNode & {
|
|
79
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
80
|
+
};
|
|
81
|
+
declare const _default: typeof __VLS_export;
|
|
82
|
+
export default _default;
|
|
83
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
84
|
+
[K in keyof T]: T[K];
|
|
85
|
+
} : {
|
|
86
|
+
[K in keyof T as K]: T[K];
|
|
87
|
+
}) & {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type DatePickerKind, type DatePickerRangeValue } from "../date-picker";
|
|
2
|
+
/**
|
|
3
|
+
* 统一日期/时间选择触发控件(支持单选与 Range 时间段选择)。
|
|
4
|
+
*
|
|
5
|
+
* 采用纯点击选择交互(整框可点击、屏蔽直接键盘打字输入),
|
|
6
|
+
* 在禁用原生 readonly 对 required 表单校验干扰的前提下保留原生校验能力。
|
|
7
|
+
*/
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
modelValue?: string | DatePickerRangeValue;
|
|
10
|
+
type?: DatePickerKind;
|
|
11
|
+
/** 是否开启时间段(Range)选择模式 */
|
|
12
|
+
range?: boolean;
|
|
13
|
+
/** Range 模式下展示文本的起止分隔符 */
|
|
14
|
+
rangeSeparator?: string;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
min?: string;
|
|
17
|
+
max?: string;
|
|
18
|
+
required?: boolean;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
readonly?: boolean;
|
|
21
|
+
};
|
|
22
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
23
|
+
"update:modelValue": (value: any) => any;
|
|
24
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
26
|
+
}>, {
|
|
27
|
+
modelValue: string | DatePickerRangeValue;
|
|
28
|
+
type: DatePickerKind;
|
|
29
|
+
range: boolean;
|
|
30
|
+
rangeSeparator: string;
|
|
31
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export interface DropdownMenuItem {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
icon?: string;
|
|
5
|
+
shortcut?: string;
|
|
6
|
+
danger?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
tooltip?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface DropdownMenuGroup {
|
|
11
|
+
label?: string;
|
|
12
|
+
danger?: boolean;
|
|
13
|
+
items: DropdownMenuItem[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 通用下拉与右键操作菜单(DropdownMenu):
|
|
17
|
+
* - 通过 Teleport 挂载至当前 dialog 或主题顶层容器,彻底避免被外层 overflow: hidden/auto 裁剪遮挡。
|
|
18
|
+
* - 自动基于触发器位置计算视口固定坐标,支持空间不足自动上下翻转与左右边界夹紧。
|
|
19
|
+
* - 内置 ArrowUp / ArrowDown / Home / End 循环键盘聚焦、Escape 与外部点击关闭。
|
|
20
|
+
*/
|
|
21
|
+
type __VLS_Props = {
|
|
22
|
+
/** 受控打开状态(v-model:open;未传时使用非受控内部状态) */
|
|
23
|
+
open?: boolean;
|
|
24
|
+
/** 结构化分组菜单项 */
|
|
25
|
+
groups?: DropdownMenuGroup[];
|
|
26
|
+
/** 锚点模式下的首选弹出方向 */
|
|
27
|
+
placement?: "bottom-start" | "bottom-end" | "top-start" | "top-end";
|
|
28
|
+
/** 菜单无障碍名称 */
|
|
29
|
+
ariaLabel?: string;
|
|
30
|
+
/** 最小宽度 */
|
|
31
|
+
minWidth?: string;
|
|
32
|
+
/** 是否以固定视口坐标模式渲染(右键菜单) */
|
|
33
|
+
contextMenu?: boolean;
|
|
34
|
+
/** 右键菜单 X 坐标 */
|
|
35
|
+
x?: number;
|
|
36
|
+
/** 右键菜单 Y 坐标 */
|
|
37
|
+
y?: number;
|
|
38
|
+
/** 是否禁用触发 */
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
};
|
|
41
|
+
declare function updatePosition(): void;
|
|
42
|
+
declare function toggle(): void;
|
|
43
|
+
declare function close(): void;
|
|
44
|
+
declare var __VLS_1: {
|
|
45
|
+
open: boolean;
|
|
46
|
+
toggle: typeof toggle;
|
|
47
|
+
close: typeof close;
|
|
48
|
+
menuId: string;
|
|
49
|
+
}, __VLS_15: {
|
|
50
|
+
close: typeof close;
|
|
51
|
+
};
|
|
52
|
+
type __VLS_Slots = {} & {
|
|
53
|
+
trigger?: (props: typeof __VLS_1) => any;
|
|
54
|
+
} & {
|
|
55
|
+
default?: (props: typeof __VLS_15) => any;
|
|
56
|
+
};
|
|
57
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
58
|
+
open: import("vue").ComputedRef<boolean>;
|
|
59
|
+
toggle: typeof toggle;
|
|
60
|
+
close: typeof close;
|
|
61
|
+
updatePosition: typeof updatePosition;
|
|
62
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
63
|
+
select: (item: DropdownMenuItem) => any;
|
|
64
|
+
close: () => any;
|
|
65
|
+
"update:open": (open: boolean) => any;
|
|
66
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
67
|
+
onSelect?: ((item: DropdownMenuItem) => any) | undefined;
|
|
68
|
+
onClose?: (() => any) | undefined;
|
|
69
|
+
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
70
|
+
}>, {
|
|
71
|
+
minWidth: string;
|
|
72
|
+
placement: "bottom-start" | "bottom-end" | "top-start" | "top-end";
|
|
73
|
+
open: boolean;
|
|
74
|
+
ariaLabel: string;
|
|
75
|
+
disabled: boolean;
|
|
76
|
+
groups: DropdownMenuGroup[];
|
|
77
|
+
contextMenu: boolean;
|
|
78
|
+
x: number;
|
|
79
|
+
y: number;
|
|
80
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
81
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
82
|
+
declare const _default: typeof __VLS_export;
|
|
83
|
+
export default _default;
|
|
84
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
85
|
+
new (): {
|
|
86
|
+
$slots: S;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title?: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
icon?: string;
|
|
5
|
+
iconSize?: number;
|
|
6
|
+
iconContainer?: boolean;
|
|
7
|
+
spin?: boolean;
|
|
8
|
+
compact?: boolean;
|
|
9
|
+
surface?: "plain" | "card" | "panel";
|
|
10
|
+
role?: "status" | "alert";
|
|
11
|
+
};
|
|
12
|
+
declare var __VLS_7: {}, __VLS_19: {}, __VLS_21: {};
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
icon?: (props: typeof __VLS_7) => any;
|
|
15
|
+
} & {
|
|
16
|
+
default?: (props: typeof __VLS_19) => any;
|
|
17
|
+
} & {
|
|
18
|
+
actions?: (props: typeof __VLS_21) => any;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
21
|
+
title: string;
|
|
22
|
+
role: "alert" | "status";
|
|
23
|
+
compact: boolean;
|
|
24
|
+
iconSize: number;
|
|
25
|
+
icon: string;
|
|
26
|
+
description: string;
|
|
27
|
+
iconContainer: boolean;
|
|
28
|
+
spin: boolean;
|
|
29
|
+
surface: "panel" | "plain" | "card";
|
|
30
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
35
|
+
new (): {
|
|
36
|
+
$slots: S;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
message?: string;
|
|
3
|
+
tone?: "danger" | "warning" | "info";
|
|
4
|
+
icon?: string;
|
|
5
|
+
showIcon?: boolean;
|
|
6
|
+
compact?: boolean;
|
|
7
|
+
role?: "alert" | "status";
|
|
8
|
+
};
|
|
9
|
+
declare var __VLS_6: {}, __VLS_8: {};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
default?: (props: typeof __VLS_6) => any;
|
|
12
|
+
} & {
|
|
13
|
+
actions?: (props: typeof __VLS_8) => any;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
16
|
+
role: "alert" | "status";
|
|
17
|
+
compact: boolean;
|
|
18
|
+
message: string;
|
|
19
|
+
tone: "info" | "warning" | "danger";
|
|
20
|
+
icon: string;
|
|
21
|
+
showIcon: boolean;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { CodeHints, CodeLanguage } from "../editors/languages";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
modelValue?: string;
|
|
4
|
+
title: string;
|
|
5
|
+
language?: CodeLanguage;
|
|
6
|
+
dialect?: string;
|
|
7
|
+
hints?: CodeHints;
|
|
8
|
+
dark?: boolean;
|
|
9
|
+
readonly?: boolean;
|
|
10
|
+
hideTitle?: boolean;
|
|
11
|
+
headingClass?: string;
|
|
12
|
+
editorClass?: string;
|
|
13
|
+
editorId?: string;
|
|
14
|
+
inlineLabel?: string;
|
|
15
|
+
dialogLabel?: string;
|
|
16
|
+
dialogCodeLabel?: string;
|
|
17
|
+
expandLabel?: string;
|
|
18
|
+
closeLabel?: string;
|
|
19
|
+
dialogHint?: string;
|
|
20
|
+
};
|
|
21
|
+
declare function openExpanded(): void;
|
|
22
|
+
declare function closeExpanded(): void;
|
|
23
|
+
declare function insertText(text: string): void;
|
|
24
|
+
declare function replaceText(text: string): void;
|
|
25
|
+
declare var __VLS_1: {}, __VLS_20: {}, __VLS_35: {}, __VLS_38: {}, __VLS_48: {};
|
|
26
|
+
type __VLS_Slots = {} & {
|
|
27
|
+
'heading-actions'?: (props: typeof __VLS_1) => any;
|
|
28
|
+
} & {
|
|
29
|
+
below?: (props: typeof __VLS_20) => any;
|
|
30
|
+
} & {
|
|
31
|
+
'dialog-side'?: (props: typeof __VLS_35) => any;
|
|
32
|
+
} & {
|
|
33
|
+
'dialog-below'?: (props: typeof __VLS_38) => any;
|
|
34
|
+
} & {
|
|
35
|
+
'dialog-actions'?: (props: typeof __VLS_48) => any;
|
|
36
|
+
};
|
|
37
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
38
|
+
wordWrap: import("vue").Ref<boolean, boolean>;
|
|
39
|
+
openExpanded: typeof openExpanded;
|
|
40
|
+
closeExpanded: typeof closeExpanded;
|
|
41
|
+
insertText: typeof insertText;
|
|
42
|
+
replaceText: typeof replaceText;
|
|
43
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
44
|
+
"update:modelValue": (value: string) => any;
|
|
45
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
46
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
47
|
+
}>, {
|
|
48
|
+
dark: boolean;
|
|
49
|
+
modelValue: string;
|
|
50
|
+
language: CodeLanguage;
|
|
51
|
+
dialect: string;
|
|
52
|
+
hints: import("../code-editor.ts").SQLHints;
|
|
53
|
+
readonly: boolean;
|
|
54
|
+
closeLabel: string;
|
|
55
|
+
hideTitle: boolean;
|
|
56
|
+
headingClass: string;
|
|
57
|
+
editorClass: string;
|
|
58
|
+
editorId: string;
|
|
59
|
+
inlineLabel: string;
|
|
60
|
+
dialogLabel: string;
|
|
61
|
+
dialogCodeLabel: string;
|
|
62
|
+
expandLabel: string;
|
|
63
|
+
dialogHint: string;
|
|
64
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
65
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
66
|
+
declare const _default: typeof __VLS_export;
|
|
67
|
+
export default _default;
|
|
68
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
69
|
+
new (): {
|
|
70
|
+
$slots: S;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 通用展开/收起(渐进式披露)容器组件。
|
|
3
|
+
* 支持受控(v-model)与非受控(defaultOpen)两种模式,
|
|
4
|
+
* 内置无障碍 ARIA 关联、平滑高度过渡与头部独立操作插槽。
|
|
5
|
+
*/
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
/** 受控展开状态(支持 v-model;未传时使用内部非受控状态) */
|
|
8
|
+
modelValue?: boolean;
|
|
9
|
+
/** 非受控模式下的默认展开状态 */
|
|
10
|
+
defaultOpen?: boolean;
|
|
11
|
+
/** 折叠栏标题文案 */
|
|
12
|
+
title?: string;
|
|
13
|
+
/** 标题下方的辅助说明文案 */
|
|
14
|
+
subtitle?: string;
|
|
15
|
+
/** 可选前置线性图标名称 */
|
|
16
|
+
icon?: string;
|
|
17
|
+
/** 可选标题旁弱化状态标签 */
|
|
18
|
+
badge?: string;
|
|
19
|
+
/** 视觉容器变体:card(描边卡片)/ subtle(浅底弱描边)/ ghost(无外框极简) */
|
|
20
|
+
variant?: "card" | "subtle" | "ghost";
|
|
21
|
+
/** 紧凑内边距模式 */
|
|
22
|
+
compact?: boolean;
|
|
23
|
+
/** 禁用展开与收起交互 */
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
/** 是否延迟挂载内容直到首次展开 */
|
|
26
|
+
lazy?: boolean;
|
|
27
|
+
};
|
|
28
|
+
declare function toggle(): void;
|
|
29
|
+
declare function expand(): void;
|
|
30
|
+
declare function collapse(): void;
|
|
31
|
+
declare var __VLS_11: {
|
|
32
|
+
open: boolean;
|
|
33
|
+
}, __VLS_18: {
|
|
34
|
+
open: boolean;
|
|
35
|
+
}, __VLS_20: {
|
|
36
|
+
open: boolean;
|
|
37
|
+
};
|
|
38
|
+
type __VLS_Slots = {} & {
|
|
39
|
+
header?: (props: typeof __VLS_11) => any;
|
|
40
|
+
} & {
|
|
41
|
+
actions?: (props: typeof __VLS_18) => any;
|
|
42
|
+
} & {
|
|
43
|
+
default?: (props: typeof __VLS_20) => any;
|
|
44
|
+
};
|
|
45
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
46
|
+
open: import("vue").ComputedRef<boolean>;
|
|
47
|
+
toggle: typeof toggle;
|
|
48
|
+
expand: typeof expand;
|
|
49
|
+
collapse: typeof collapse;
|
|
50
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
51
|
+
"update:modelValue": (open: boolean) => any;
|
|
52
|
+
toggle: (open: boolean) => any;
|
|
53
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
54
|
+
"onUpdate:modelValue"?: ((open: boolean) => any) | undefined;
|
|
55
|
+
onToggle?: ((open: boolean) => any) | undefined;
|
|
56
|
+
}>, {
|
|
57
|
+
modelValue: boolean;
|
|
58
|
+
title: string;
|
|
59
|
+
disabled: boolean;
|
|
60
|
+
compact: boolean;
|
|
61
|
+
icon: string;
|
|
62
|
+
variant: "subtle" | "card" | "ghost";
|
|
63
|
+
defaultOpen: boolean;
|
|
64
|
+
subtitle: string;
|
|
65
|
+
badge: string;
|
|
66
|
+
lazy: boolean;
|
|
67
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
68
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
69
|
+
declare const _default: typeof __VLS_export;
|
|
70
|
+
export default _default;
|
|
71
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
72
|
+
new (): {
|
|
73
|
+
$slots: S;
|
|
74
|
+
};
|
|
75
|
+
};
|