@yunlefun/vue 0.2.0 → 0.4.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 +2 -0
- package/components/YlfAccordion.vue +1 -1
- package/components/YlfAvatar.vue +2 -1
- package/components/YlfDialog.vue +23 -2
- package/components/YlfDropdownMenu.vue +20 -9
- package/components/YlfPopover.vue +5 -2
- package/components/YlfProgress.vue +29 -5
- package/components/YlfRadioGroup.vue +20 -2
- package/components/YlfSegmentedControl.vue +180 -0
- package/components/YlfSelect.vue +47 -13
- package/components/YlfSlider.vue +32 -2
- package/components/YlfTabs.vue +1 -1
- package/components/YlfTooltip.vue +8 -3
- package/components/accordion/demo.vue +1 -1
- package/components/accordion/index.md +2 -0
- package/components/avatar/index.md +3 -1
- package/components/checkbox/demo.vue +10 -9
- package/components/checkbox/index.md +2 -0
- package/components/dialog/index.md +9 -6
- package/components/dropdown-menu/index.md +9 -3
- package/components/popover/demo.vue +1 -1
- package/components/popover/index.md +8 -5
- package/components/progress/index.md +3 -1
- package/components/radio/demo.vue +1 -1
- package/components/radio/index.md +2 -0
- package/components/segmented-control/demo.vue +21 -0
- package/components/segmented-control/index.md +41 -0
- package/components/segmented-control.ts +8 -0
- package/components/select/index.md +10 -0
- package/components/slider/demo.vue +2 -2
- package/components/slider/index.md +15 -7
- package/components/switch/index.md +2 -0
- package/components/tabs/index.md +2 -0
- package/components/tooltip/index.md +11 -5
- package/dist/components/YlfAccordion.vue.d.ts +35 -0
- package/dist/components/YlfAiPromptLauncher.vue.d.ts +25 -0
- package/dist/components/YlfAvatar.vue.d.ts +14 -0
- package/dist/components/YlfBadge.vue.d.ts +29 -0
- package/dist/components/YlfBottomMenu.vue.d.ts +19 -0
- package/dist/components/YlfBottomMenuItem.vue.d.ts +22 -0
- package/dist/components/YlfButton.vue.d.ts +48 -0
- package/dist/components/YlfCard.vue.d.ts +28 -0
- package/dist/components/YlfCheckbox.vue.d.ts +18 -0
- package/dist/components/YlfDialog.vue.d.ts +37 -0
- package/dist/components/YlfDropdownMenu.vue.d.ts +34 -0
- package/dist/components/YlfLogo.vue.d.ts +13 -0
- package/dist/components/YlfPopover.vue.d.ts +31 -0
- package/dist/components/YlfProgress.vue.d.ts +17 -0
- package/dist/components/YlfRadioGroup.vue.d.ts +24 -0
- package/dist/components/YlfSegmentedControl.vue.d.ts +35 -0
- package/dist/components/YlfSelect.vue.d.ts +43 -0
- package/dist/components/YlfSeparator.vue.d.ts +16 -0
- package/dist/components/YlfSlider.vue.d.ts +29 -0
- package/dist/components/YlfSwitch.vue.d.ts +24 -0
- package/dist/components/YlfTabs.vue.d.ts +32 -0
- package/dist/components/YlfTooltip.vue.d.ts +26 -0
- package/dist/components/ai-prompt.d.ts +33 -0
- package/dist/components/ai-provider-logos.d.ts +3 -0
- package/dist/components/bottom-menu/index.d.ts +20 -0
- package/dist/components/segmented-control.d.ts +8 -0
- package/dist/components/theme.d.ts +4 -0
- package/dist/index.d.cts +10 -1
- package/dist/index.d.mts +10 -1
- package/dist/index.d.ts +10 -1
- package/package.json +6 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
disabled?: boolean;
|
|
3
|
+
/** 表单提交值 */
|
|
4
|
+
value?: string;
|
|
5
|
+
};
|
|
6
|
+
type __VLS_ModelProps = {
|
|
7
|
+
modelValue?: boolean | 'indeterminate';
|
|
8
|
+
};
|
|
9
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (value: boolean | "indeterminate") => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((value: boolean | "indeterminate") => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title?: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
/** 没有可见标题时供屏幕阅读器使用 */
|
|
5
|
+
accessibleTitle?: string;
|
|
6
|
+
/** Existing container in the same theme boundary. */
|
|
7
|
+
portalTo?: string | HTMLElement;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_ModelProps = {
|
|
10
|
+
'open'?: boolean;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
13
|
+
declare var __VLS_14: {}, __VLS_39: {}, __VLS_59: {}, __VLS_61: {};
|
|
14
|
+
type __VLS_Slots = {} & {
|
|
15
|
+
trigger?: (props: typeof __VLS_14) => any;
|
|
16
|
+
} & {
|
|
17
|
+
title?: (props: typeof __VLS_39) => any;
|
|
18
|
+
} & {
|
|
19
|
+
description?: (props: typeof __VLS_59) => any;
|
|
20
|
+
} & {
|
|
21
|
+
default?: (props: typeof __VLS_61) => any;
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
+
"update:open": (value: boolean) => any;
|
|
25
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
26
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
27
|
+
}>, {
|
|
28
|
+
accessibleTitle: string;
|
|
29
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
items: readonly MenuItem[];
|
|
3
|
+
portalTo?: string | HTMLElement;
|
|
4
|
+
};
|
|
5
|
+
interface MenuItem {
|
|
6
|
+
label?: string;
|
|
7
|
+
value?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/** 渲染成分隔线 */
|
|
10
|
+
separator?: boolean;
|
|
11
|
+
}
|
|
12
|
+
type __VLS_ModelProps = {
|
|
13
|
+
'open'?: boolean;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
16
|
+
declare var __VLS_14: {};
|
|
17
|
+
type __VLS_Slots = {} & {
|
|
18
|
+
trigger?: (props: typeof __VLS_14) => any;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
|
+
select: (value: string) => any;
|
|
22
|
+
"update:open": (value: boolean) => any;
|
|
23
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
24
|
+
onSelect?: ((value: string) => any) | undefined;
|
|
25
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
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,13 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
size?: 'sm' | 'md' | 'lg';
|
|
3
|
+
layout?: 'vertical' | 'horizontal';
|
|
4
|
+
/** 是否显示「云乐坊」文字 */
|
|
5
|
+
wordmark?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
8
|
+
size: "sm" | "md" | "lg";
|
|
9
|
+
layout: "vertical" | "horizontal";
|
|
10
|
+
wordmark: boolean;
|
|
11
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
3
|
+
align?: 'start' | 'center' | 'end';
|
|
4
|
+
portalTo?: string | HTMLElement;
|
|
5
|
+
};
|
|
6
|
+
type __VLS_ModelProps = {
|
|
7
|
+
'open'?: boolean;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
10
|
+
declare var __VLS_14: {}, __VLS_28: {};
|
|
11
|
+
type __VLS_Slots = {} & {
|
|
12
|
+
trigger?: (props: typeof __VLS_14) => any;
|
|
13
|
+
} & {
|
|
14
|
+
default?: (props: typeof __VLS_28) => any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
"update:open": (value: boolean) => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
19
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
side: "top" | "right" | "bottom" | "left";
|
|
22
|
+
align: "start" | "center" | "end";
|
|
23
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
25
|
+
declare const _default: typeof __VLS_export;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { YlfAccentTone } from './theme';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** null means that progress is unknown. */
|
|
4
|
+
value?: number | null;
|
|
5
|
+
max?: number;
|
|
6
|
+
/** 进度条填充:brand 主色或 accent 纯色;aurora 是 accent 的旧别名 */
|
|
7
|
+
variant?: 'brand' | 'accent' | 'aurora';
|
|
8
|
+
tone?: YlfAccentTone;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
+
value: number | null;
|
|
12
|
+
variant: "brand" | "accent" | "aurora";
|
|
13
|
+
tone: YlfAccentTone;
|
|
14
|
+
max: number;
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface RadioOption {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
options: readonly RadioOption[];
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
orientation?: 'vertical' | 'horizontal';
|
|
10
|
+
};
|
|
11
|
+
type __VLS_ModelProps = {
|
|
12
|
+
modelValue?: string;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
15
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
18
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
19
|
+
}>, {
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
orientation: "vertical" | "horizontal";
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { YlfSegmentedOption } from './segmented-control';
|
|
2
|
+
declare const __VLS_export: <T extends string = string>(__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<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<({
|
|
4
|
+
options: readonly YlfSegmentedOption<T>[];
|
|
5
|
+
/** Accessible name of the group, including for icon-only controls. */
|
|
6
|
+
label: string;
|
|
7
|
+
size?: "sm" | "md";
|
|
8
|
+
iconOnly?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
} & {
|
|
11
|
+
modelValue: T;
|
|
12
|
+
}) & {
|
|
13
|
+
"onUpdate:modelValue"?: ((value: T) => any) | undefined;
|
|
14
|
+
}> & (typeof globalThis extends {
|
|
15
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
16
|
+
} ? P : {});
|
|
17
|
+
expose: (exposed: {}) => void;
|
|
18
|
+
attrs: any;
|
|
19
|
+
slots: {
|
|
20
|
+
icon?: (props: {
|
|
21
|
+
option: YlfSegmentedOption<T>;
|
|
22
|
+
selected: boolean;
|
|
23
|
+
}) => unknown;
|
|
24
|
+
};
|
|
25
|
+
emit: (event: "update:modelValue", value: T) => void;
|
|
26
|
+
}>) => import("vue").VNode & {
|
|
27
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
28
|
+
};
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
32
|
+
[K in keyof T]: T[K];
|
|
33
|
+
} : {
|
|
34
|
+
[K in keyof T as K]: T[K];
|
|
35
|
+
}) & {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
declare const __VLS_export: <T extends string = string>(__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<{
|
|
2
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<({
|
|
3
|
+
/** color 可使用 CSS 色值或公共 token,例如 var(--ylf-accent-blue) */
|
|
4
|
+
options: readonly {
|
|
5
|
+
label: string;
|
|
6
|
+
value: T;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
color?: string;
|
|
9
|
+
}[];
|
|
10
|
+
/** Compact workbench or comfortable form density. */
|
|
11
|
+
size?: "sm" | "md";
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/** Native form field name and validation. */
|
|
15
|
+
name?: string;
|
|
16
|
+
required?: boolean;
|
|
17
|
+
/** Existing container in the same theme boundary. */
|
|
18
|
+
portalTo?: string | HTMLElement;
|
|
19
|
+
} & {
|
|
20
|
+
modelValue?: T;
|
|
21
|
+
}) & {
|
|
22
|
+
"onUpdate:modelValue"?: ((value: T | undefined) => any) | undefined;
|
|
23
|
+
}> & (typeof globalThis extends {
|
|
24
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
25
|
+
} ? P : {});
|
|
26
|
+
expose: (exposed: {}) => void;
|
|
27
|
+
attrs: any;
|
|
28
|
+
slots: {
|
|
29
|
+
icon?: (props: {}) => any;
|
|
30
|
+
} & {
|
|
31
|
+
indicator?: (props: {}) => any;
|
|
32
|
+
};
|
|
33
|
+
emit: (event: "update:modelValue", value: T | undefined) => void;
|
|
34
|
+
}>) => import("vue").VNode & {
|
|
35
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
36
|
+
};
|
|
37
|
+
declare const _default: typeof __VLS_export;
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
40
|
+
[K in keyof T]: T[K];
|
|
41
|
+
} : {
|
|
42
|
+
[K in keyof T as K]: T[K];
|
|
43
|
+
}) & {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { YlfAccentTone } from './theme';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
orientation?: 'horizontal' | 'vertical';
|
|
4
|
+
/** 仅装饰(不被屏幕阅读器作为分节朗读) */
|
|
5
|
+
decorative?: boolean;
|
|
6
|
+
variant?: 'neutral' | 'brand' | 'accent' | 'spectrum';
|
|
7
|
+
tone?: YlfAccentTone;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
10
|
+
orientation: "horizontal" | "vertical";
|
|
11
|
+
variant: "neutral" | "brand" | "accent" | "spectrum";
|
|
12
|
+
tone: YlfAccentTone;
|
|
13
|
+
decorative: boolean;
|
|
14
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
min?: number;
|
|
3
|
+
max?: number;
|
|
4
|
+
step?: number;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
/** Accessible name for a single value or the range as a whole. */
|
|
7
|
+
label?: string;
|
|
8
|
+
/** Per-thumb accessible names, such as minimum and maximum price. */
|
|
9
|
+
thumbLabels?: readonly string[];
|
|
10
|
+
};
|
|
11
|
+
type __VLS_ModelProps = {
|
|
12
|
+
modelValue?: number[];
|
|
13
|
+
};
|
|
14
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
15
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
"update:modelValue": (value: number[]) => any;
|
|
17
|
+
valueCommit: (value: number[]) => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
19
|
+
"onUpdate:modelValue"?: ((value: number[]) => any) | undefined;
|
|
20
|
+
onValueCommit?: ((value: number[]) => any) | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
label: string;
|
|
24
|
+
max: number;
|
|
25
|
+
min: number;
|
|
26
|
+
step: number;
|
|
27
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { YlfAccentTone } from './theme';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** on 态轨道:brand 主色(默认)或 accent 纯色;aurora 是 accent 的旧别名 */
|
|
4
|
+
variant?: 'brand' | 'accent' | 'aurora';
|
|
5
|
+
tone?: YlfAccentTone;
|
|
6
|
+
size?: 'sm' | 'md';
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_ModelProps = {
|
|
10
|
+
modelValue?: boolean;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
13
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
"update:modelValue": (value: boolean) => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
16
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
size: "sm" | "md";
|
|
20
|
+
variant: "brand" | "accent" | "aurora";
|
|
21
|
+
tone: YlfAccentTone;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
interface TabItem {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
items: readonly TabItem[];
|
|
8
|
+
orientation?: 'horizontal' | 'vertical';
|
|
9
|
+
};
|
|
10
|
+
type __VLS_ModelProps = {
|
|
11
|
+
modelValue?: string;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
14
|
+
declare var __VLS_32: string, __VLS_33: {};
|
|
15
|
+
type __VLS_Slots = {} & {
|
|
16
|
+
[K in NonNullable<typeof __VLS_32>]?: (props: typeof __VLS_33) => any;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
22
|
+
}>, {
|
|
23
|
+
orientation: "horizontal" | "vertical";
|
|
24
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
content?: string;
|
|
3
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
4
|
+
delay?: number;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
portalTo?: string | HTMLElement;
|
|
7
|
+
};
|
|
8
|
+
declare var __VLS_20: {}, __VLS_34: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
default?: (props: typeof __VLS_20) => any;
|
|
11
|
+
} & {
|
|
12
|
+
content?: (props: typeof __VLS_34) => any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
side: "top" | "right" | "bottom" | "left";
|
|
17
|
+
delay: number;
|
|
18
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** Services supported by the shared AI prompt launcher. */
|
|
2
|
+
export type AiProviderId = 'yuanbao' | 'doubao' | 'deepseek' | 'chatgpt' | 'claude' | 'cursor';
|
|
3
|
+
export interface AiProvider {
|
|
4
|
+
readonly id: AiProviderId;
|
|
5
|
+
readonly name: string;
|
|
6
|
+
readonly url: string;
|
|
7
|
+
readonly promptParameter?: 'q' | 'text';
|
|
8
|
+
}
|
|
9
|
+
/** Only public entry points belong here; never accept an arbitrary destination URL. */
|
|
10
|
+
export declare const aiProviders: readonly AiProvider[];
|
|
11
|
+
export interface AiPromptOptions {
|
|
12
|
+
/** Optional ChatGPT search hint. Ordinary creative/editorial prompts leave this off. */
|
|
13
|
+
chatgptSearch?: boolean;
|
|
14
|
+
/** Conservative encoded URL budget; Cursor also has a hard 10,000-character limit. */
|
|
15
|
+
maxUrlLength?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface AiPromptTarget {
|
|
18
|
+
provider: AiProvider;
|
|
19
|
+
url: string;
|
|
20
|
+
mode: 'link' | 'copy';
|
|
21
|
+
reason?: 'unsupported' | 'too-long' | 'empty';
|
|
22
|
+
}
|
|
23
|
+
/** Build a lossless handoff. Long prompts use the clipboard, never truncated query text. */
|
|
24
|
+
export declare function buildAiPromptTarget(id: AiProviderId, prompt: string, options?: AiPromptOptions): AiPromptTarget;
|
|
25
|
+
export type AiPromptLaunchStatus = 'opened' | 'copied' | 'copy-failed' | 'open-failed';
|
|
26
|
+
export interface AiPromptLaunchResult {
|
|
27
|
+
target: AiPromptTarget;
|
|
28
|
+
status: AiPromptLaunchStatus;
|
|
29
|
+
}
|
|
30
|
+
/** A desktop host can supply an IPC-backed launcher without exposing Electron to this package. */
|
|
31
|
+
export type AiPromptLaunch = (target: AiPromptTarget, prompt: string) => Promise<AiPromptLaunchStatus>;
|
|
32
|
+
/** Browser fallback. Call synchronously from a click to retain clipboard and popup activation. */
|
|
33
|
+
export declare function copyAndOpenAiPrompt(target: AiPromptTarget, prompt: string): Promise<AiPromptLaunchStatus>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface BottomMenuItem {
|
|
2
|
+
title: string;
|
|
3
|
+
/**
|
|
4
|
+
* @description icon class
|
|
5
|
+
*/
|
|
6
|
+
icon: string;
|
|
7
|
+
/**
|
|
8
|
+
* @description active icon class
|
|
9
|
+
*/
|
|
10
|
+
activeIcon?: string;
|
|
11
|
+
/**
|
|
12
|
+
* @description RouterLink to
|
|
13
|
+
*/
|
|
14
|
+
to?: string;
|
|
15
|
+
/**
|
|
16
|
+
* onClick
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
onClick?: (...args: any[]) => void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Shared accents, defaulting to sky blue. Status colors use their own semantic variants. */
|
|
2
|
+
export type YlfAccentTone = 'blue' | 'sun' | 'cyan' | 'coral' | 'pink' | 'green';
|
|
3
|
+
/** Visual emphasis for accent and status buttons/badges. */
|
|
4
|
+
export type YlfColorAppearance = 'solid' | 'soft' | 'outline';
|
package/dist/index.d.cts
CHANGED
|
@@ -19,6 +19,15 @@ interface BottomMenuItem {
|
|
|
19
19
|
onClick?: (...args: any[]) => void;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
/** One choice in a single-selection segmented control. */
|
|
23
|
+
interface YlfSegmentedOption<T extends string = string> {
|
|
24
|
+
value: T;
|
|
25
|
+
label: string;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
count?: number;
|
|
28
|
+
ariaLabel?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
22
31
|
/** Shared accents, defaulting to sky blue. Status colors use their own semantic variants. */
|
|
23
32
|
type YlfAccentTone = 'blue' | 'sun' | 'cyan' | 'coral' | 'pink' | 'green';
|
|
24
33
|
/** Visual emphasis for accent and status buttons/badges. */
|
|
@@ -28,4 +37,4 @@ declare const _dirname: string;
|
|
|
28
37
|
declare const componentsDir: string;
|
|
29
38
|
|
|
30
39
|
export { _dirname, componentsDir };
|
|
31
|
-
export type { BottomMenuItem, YlfAccentTone, YlfColorAppearance };
|
|
40
|
+
export type { BottomMenuItem, YlfAccentTone, YlfColorAppearance, YlfSegmentedOption };
|
package/dist/index.d.mts
CHANGED
|
@@ -19,6 +19,15 @@ interface BottomMenuItem {
|
|
|
19
19
|
onClick?: (...args: any[]) => void;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
/** One choice in a single-selection segmented control. */
|
|
23
|
+
interface YlfSegmentedOption<T extends string = string> {
|
|
24
|
+
value: T;
|
|
25
|
+
label: string;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
count?: number;
|
|
28
|
+
ariaLabel?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
22
31
|
/** Shared accents, defaulting to sky blue. Status colors use their own semantic variants. */
|
|
23
32
|
type YlfAccentTone = 'blue' | 'sun' | 'cyan' | 'coral' | 'pink' | 'green';
|
|
24
33
|
/** Visual emphasis for accent and status buttons/badges. */
|
|
@@ -28,4 +37,4 @@ declare const _dirname: string;
|
|
|
28
37
|
declare const componentsDir: string;
|
|
29
38
|
|
|
30
39
|
export { _dirname, componentsDir };
|
|
31
|
-
export type { BottomMenuItem, YlfAccentTone, YlfColorAppearance };
|
|
40
|
+
export type { BottomMenuItem, YlfAccentTone, YlfColorAppearance, YlfSegmentedOption };
|
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,15 @@ interface BottomMenuItem {
|
|
|
19
19
|
onClick?: (...args: any[]) => void;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
/** One choice in a single-selection segmented control. */
|
|
23
|
+
interface YlfSegmentedOption<T extends string = string> {
|
|
24
|
+
value: T;
|
|
25
|
+
label: string;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
count?: number;
|
|
28
|
+
ariaLabel?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
22
31
|
/** Shared accents, defaulting to sky blue. Status colors use their own semantic variants. */
|
|
23
32
|
type YlfAccentTone = 'blue' | 'sun' | 'cyan' | 'coral' | 'pink' | 'green';
|
|
24
33
|
/** Visual emphasis for accent and status buttons/badges. */
|
|
@@ -28,4 +37,4 @@ declare const _dirname: string;
|
|
|
28
37
|
declare const componentsDir: string;
|
|
29
38
|
|
|
30
39
|
export { _dirname, componentsDir };
|
|
31
|
-
export type { BottomMenuItem, YlfAccentTone, YlfColorAppearance };
|
|
40
|
+
export type { BottomMenuItem, YlfAccentTone, YlfColorAppearance, YlfSegmentedOption };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yunlefun/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"description": "Vue components and Nuxt integration for YunLeFun Design",
|
|
6
6
|
"author": "YunLeFun",
|
|
7
7
|
"license": "MIT",
|
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
"url": "https://github.com/YunLeFun/design/issues"
|
|
16
16
|
},
|
|
17
17
|
"exports": {
|
|
18
|
+
"./components/*.vue": {
|
|
19
|
+
"types": "./dist/components/*.vue.d.ts",
|
|
20
|
+
"default": "./components/*.vue"
|
|
21
|
+
},
|
|
18
22
|
"./components/*": "./components/*",
|
|
19
23
|
"./nuxt": "./nuxt.mjs",
|
|
20
24
|
".": {
|
|
@@ -41,7 +45,7 @@
|
|
|
41
45
|
"access": "public"
|
|
42
46
|
},
|
|
43
47
|
"scripts": {
|
|
44
|
-
"build": "unbuild",
|
|
48
|
+
"build": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && vue-tsc --project tsconfig.build.json && unbuild",
|
|
45
49
|
"prepublishOnly": "npm run build",
|
|
46
50
|
"release": "bumpp --no-commit --no-tag --no-push && npm publish",
|
|
47
51
|
"typecheck": "vue-tsc --noEmit"
|