@emoo-ai/ui-vue 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +23 -2
- package/dist/components/EmooActionPill.vue.d.ts +13 -0
- package/dist/components/EmooActionSheet.vue.d.ts +36 -0
- package/dist/components/EmooAgentSelect.vue.d.ts +22 -0
- package/dist/components/EmooButton.vue.d.ts +32 -0
- package/dist/components/EmooCard.vue.d.ts +22 -0
- package/dist/components/EmooChips.vue.d.ts +27 -0
- package/dist/components/EmooChoice.vue.d.ts +51 -0
- package/dist/components/EmooColumnMenu.vue.d.ts +53 -0
- package/dist/components/EmooDrawer.vue.d.ts +41 -0
- package/dist/components/EmooEmpty.vue.d.ts +26 -0
- package/dist/components/EmooField.vue.d.ts +37 -0
- package/dist/components/EmooFieldGrid.vue.d.ts +19 -0
- package/dist/components/EmooGhostButton.vue.d.ts +17 -0
- package/dist/components/EmooGroupLabel.vue.d.ts +9 -0
- package/dist/components/EmooHistoryList.vue.d.ts +71 -0
- package/dist/components/EmooMemberRoleSelect.vue.d.ts +21 -0
- package/dist/components/EmooMemberSelect.vue.d.ts +22 -0
- package/dist/components/EmooMemberTag.vue.d.ts +22 -0
- package/dist/components/EmooMessage.vue.d.ts +33 -0
- package/dist/components/EmooNavMenu.vue.d.ts +35 -0
- package/dist/components/EmooNavSegmented.vue.d.ts +15 -0
- package/dist/components/EmooOptionRows.vue.d.ts +32 -0
- package/dist/components/EmooPagination.vue.d.ts +25 -0
- package/dist/components/EmooPopover.vue.d.ts +22 -0
- package/dist/components/EmooProgress.vue.d.ts +14 -0
- package/dist/components/EmooRoleSelect.vue.d.ts +24 -0
- package/dist/components/EmooSearchBox.vue.d.ts +35 -0
- package/dist/components/EmooSegmented.vue.d.ts +35 -0
- package/dist/components/EmooSidebarShell.vue.d.ts +30 -0
- package/dist/components/EmooSkeleton.vue.d.ts +22 -0
- package/dist/components/EmooSpinner.vue.d.ts +10 -0
- package/dist/components/EmooStatusTag.vue.d.ts +17 -0
- package/dist/components/EmooSwitcherPanel.vue.d.ts +23 -0
- package/dist/components/EmooTable.vue.d.ts +147 -0
- package/dist/components/EmooTagsInput.vue.d.ts +18 -0
- package/dist/components/EmooTooltip.vue.d.ts +25 -0
- package/dist/components/EmooUpload.vue.d.ts +40 -0
- package/dist/components/EmooValueDiff.vue.d.ts +7 -0
- package/dist/components/IconChatCirclePlus.vue.d.ts +3 -0
- package/dist/components/history-contract.d.ts +13 -0
- package/dist/components/select-contract.d.ts +29 -0
- package/dist/components/useRemoteOptions.d.ts +16 -0
- package/dist/components/useSelectedOptions.d.ts +8 -0
- package/dist/composables/useColumnPrefs.d.ts +84 -0
- package/dist/composables/useMessageScroll.d.ts +15 -0
- package/dist/composables/useSheetHeightDrag.d.ts +7 -0
- package/dist/constants.d.ts +4 -0
- package/dist/eslint.d.ts +18 -0
- package/dist/eslint.js +43 -0
- package/dist/global/SheetDragHandle.vue.d.ts +11 -0
- package/dist/icons.d.ts +414 -0
- package/dist/icons.js +153 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.js +3710 -0
- package/dist/locales/cn.d.ts +73 -0
- package/dist/locales/en.d.ts +73 -0
- package/dist/locales/index.d.ts +4 -0
- package/dist/locales.js +151 -0
- package/dist/styles.css +1 -0
- package/dist/theme.d.ts +6 -0
- package/dist/utils/avatar-tint.d.ts +1 -0
- package/dist/utils/drawer-size.d.ts +2 -0
- package/package.json +46 -4
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SelectValue } from './select-contract';
|
|
2
|
+
export declare function useSelectedOptions<T extends {
|
|
3
|
+
id: number | string;
|
|
4
|
+
}>(getValue: () => SelectValue, getOptions: () => T[], getSelected: () => T[]): {
|
|
5
|
+
mergedOptions: import("vue").ComputedRef<T[]>;
|
|
6
|
+
selectedOptions: import("vue").ComputedRef<T[]>;
|
|
7
|
+
remember: (value: SelectValue) => T[];
|
|
8
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
export interface ColPref {
|
|
2
|
+
key: string;
|
|
3
|
+
visible: boolean;
|
|
4
|
+
fixed: '' | 'left' | 'right';
|
|
5
|
+
width?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface ColumnPrefDef {
|
|
8
|
+
key: string;
|
|
9
|
+
width?: number;
|
|
10
|
+
minWidth?: number;
|
|
11
|
+
sortable?: boolean | 'custom';
|
|
12
|
+
}
|
|
13
|
+
export interface StoredSort {
|
|
14
|
+
key: string;
|
|
15
|
+
order: 'ascending' | 'descending';
|
|
16
|
+
}
|
|
17
|
+
export interface TablePrefs {
|
|
18
|
+
columns: ColPref[];
|
|
19
|
+
pageSize?: number;
|
|
20
|
+
sort?: StoredSort;
|
|
21
|
+
density?: 'default' | 'compact';
|
|
22
|
+
}
|
|
23
|
+
export declare const INLINE_TOOLS_MIN_WIDTH = 140;
|
|
24
|
+
export declare const MIN_COL_WIDTH = 64;
|
|
25
|
+
export declare function useColumnPrefs<Def extends ColumnPrefDef>(opts: {
|
|
26
|
+
columns: () => Def[];
|
|
27
|
+
storageKey?: string;
|
|
28
|
+
defaultPageSize?: number;
|
|
29
|
+
defaultSort?: {
|
|
30
|
+
key: string;
|
|
31
|
+
order: 'ascending' | 'descending';
|
|
32
|
+
};
|
|
33
|
+
minColWidth?: number;
|
|
34
|
+
persistOrder?: boolean;
|
|
35
|
+
onColumnsChange?: () => void;
|
|
36
|
+
}): {
|
|
37
|
+
colState: import("vue").Ref<{
|
|
38
|
+
key: string;
|
|
39
|
+
visible: boolean;
|
|
40
|
+
fixed: "" | "left" | "right";
|
|
41
|
+
width?: number | undefined;
|
|
42
|
+
}[], ColPref[] | {
|
|
43
|
+
key: string;
|
|
44
|
+
visible: boolean;
|
|
45
|
+
fixed: "" | "left" | "right";
|
|
46
|
+
width?: number | undefined;
|
|
47
|
+
}[]>;
|
|
48
|
+
pageSize: import("vue").Ref<number, number>;
|
|
49
|
+
density: import("vue").Ref<"default" | "compact", "default" | "compact">;
|
|
50
|
+
sortKey: import("vue").Ref<string, string>;
|
|
51
|
+
sortOrder: import("vue").Ref<"ascending" | "descending" | null, "ascending" | "descending" | null>;
|
|
52
|
+
effectiveStoredSort: () => StoredSort | null;
|
|
53
|
+
prefs: TablePrefs;
|
|
54
|
+
storageSort: StoredSort | null;
|
|
55
|
+
restoredSort: StoredSort | null;
|
|
56
|
+
savePrefs: () => void;
|
|
57
|
+
resetPrefsCore: (applySort: (key: string, order: "ascending" | "descending" | null) => void) => void;
|
|
58
|
+
visibleCols: import("vue").ComputedRef<{
|
|
59
|
+
key: string;
|
|
60
|
+
visible: boolean;
|
|
61
|
+
fixed: "" | "left" | "right";
|
|
62
|
+
width?: number | undefined;
|
|
63
|
+
}[]>;
|
|
64
|
+
hiddenCols: import("vue").ComputedRef<{
|
|
65
|
+
key: string;
|
|
66
|
+
visible: boolean;
|
|
67
|
+
fixed: "" | "left" | "right";
|
|
68
|
+
width?: number | undefined;
|
|
69
|
+
}[]>;
|
|
70
|
+
visibleCount: import("vue").ComputedRef<number>;
|
|
71
|
+
defOf: (key: string) => Def | undefined;
|
|
72
|
+
colWidth: (s: ColPref) => number | undefined;
|
|
73
|
+
colMinWidth: (s: ColPref) => number | undefined;
|
|
74
|
+
isWide: (s: ColPref) => boolean;
|
|
75
|
+
hideColumn: (col: ColPref) => void;
|
|
76
|
+
resetColumns: () => void;
|
|
77
|
+
normalizeColumns: () => void;
|
|
78
|
+
unpinSide: (side: "left" | "right") => void;
|
|
79
|
+
unpinCurrent: (col: ColPref) => void;
|
|
80
|
+
pinThrough: (col: ColPref, side: "left" | "right") => void;
|
|
81
|
+
pinEdge: (side: "left" | "right") => number;
|
|
82
|
+
togglePinSide: (col: ColPref, side: "left" | "right") => void;
|
|
83
|
+
togglePinSmart: (col: ColPref) => void;
|
|
84
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
export interface UseMessageScrollOptions {
|
|
3
|
+
onDockUpdate?: (docked: boolean) => void;
|
|
4
|
+
bottomTolerance?: number;
|
|
5
|
+
awayThreshold?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function useMessageScroll(getViewport: () => HTMLElement | undefined, options?: UseMessageScrollOptions): {
|
|
8
|
+
docked: Ref<boolean, boolean>;
|
|
9
|
+
showScrollToBottom: Ref<boolean, boolean>;
|
|
10
|
+
attach: () => void;
|
|
11
|
+
detach: () => void;
|
|
12
|
+
notifyContentChanged: () => void;
|
|
13
|
+
scrollToBottom: () => void;
|
|
14
|
+
handleScroll: () => void;
|
|
15
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function nearestSheetTier(ratio: number): number;
|
|
2
|
+
export declare function useSheetHeightDrag(scene: string, fallbackRatio: number): {
|
|
3
|
+
size: import("vue").ComputedRef<string>;
|
|
4
|
+
dragging: import("vue").Ref<boolean, boolean>;
|
|
5
|
+
animating: import("vue").Ref<boolean, boolean>;
|
|
6
|
+
onDragStart: (e: PointerEvent) => void;
|
|
7
|
+
};
|
package/dist/eslint.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const emooUiBanRules: () => {
|
|
2
|
+
selector: string;
|
|
3
|
+
message: string;
|
|
4
|
+
}[];
|
|
5
|
+
export declare const emooUiBanTagBySelector: () => Map<string, string>;
|
|
6
|
+
export declare function emooUiGate({ uiBanExcept, legacyKeeps }: {
|
|
7
|
+
uiBanExcept: (...tags: string[]) => unknown[];
|
|
8
|
+
legacyKeeps: Array<{
|
|
9
|
+
keep: string[];
|
|
10
|
+
files: string[];
|
|
11
|
+
}>;
|
|
12
|
+
}): {
|
|
13
|
+
blocks: {
|
|
14
|
+
files: string[];
|
|
15
|
+
rules: unknown[];
|
|
16
|
+
}[];
|
|
17
|
+
tagBySelector: Map<string, string>;
|
|
18
|
+
};
|
package/dist/eslint.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const l = {
|
|
2
|
+
"el-button": "用 EmooButton",
|
|
3
|
+
"el-table": "用 EmooTable",
|
|
4
|
+
"el-card": "用 EmooCard",
|
|
5
|
+
"el-drawer": "用 EmooDrawer(点选菜单形态用 EmooActionSheet)",
|
|
6
|
+
"el-empty": "用 EmooEmpty",
|
|
7
|
+
"el-tooltip": "用 EmooTooltip",
|
|
8
|
+
"el-popover": "用 EmooPopover",
|
|
9
|
+
"el-radio-button": "用 EmooSegmented",
|
|
10
|
+
"el-segmented": "用 EmooSegmented",
|
|
11
|
+
"el-skeleton": "用 EmooSkeleton",
|
|
12
|
+
"el-pagination": "用 EmooPagination(表格内用 EmooTable 内建分页)"
|
|
13
|
+
}, a = (e) => "El" + e.slice(3).replace(/(^|-)(\w)/g, (o, t, n) => n.toUpperCase()), c = () => {
|
|
14
|
+
const e = [];
|
|
15
|
+
for (const [o, t] of Object.entries(l))
|
|
16
|
+
for (const n of [o, a(o)])
|
|
17
|
+
e.push({
|
|
18
|
+
selector: `VElement[rawName='${n}']`,
|
|
19
|
+
message: `禁用裸 ${n}:${t}(标准件在 @emoo-ai/ui-vue,规范见宿主 /demo Guidelines)`
|
|
20
|
+
});
|
|
21
|
+
return e;
|
|
22
|
+
}, i = () => {
|
|
23
|
+
const e = /* @__PURE__ */ new Map();
|
|
24
|
+
for (const o of Object.keys(l))
|
|
25
|
+
for (const t of [o, a(o)])
|
|
26
|
+
e.set(`VElement[rawName='${t}']`, o);
|
|
27
|
+
return e;
|
|
28
|
+
};
|
|
29
|
+
function p({ uiBanExcept: e, legacyKeeps: o }) {
|
|
30
|
+
const t = c(), n = i(), s = [];
|
|
31
|
+
s.push({ files: ["src/**/*.{vue,ts}"], rules: t });
|
|
32
|
+
for (const { keep: r, files: m } of o)
|
|
33
|
+
s.push({
|
|
34
|
+
files: m,
|
|
35
|
+
rules: e(...r)
|
|
36
|
+
});
|
|
37
|
+
return { blocks: s, tagBySelector: n };
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
c as emooUiBanRules,
|
|
41
|
+
i as emooUiBanTagBySelector,
|
|
42
|
+
p as emooUiGate
|
|
43
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
dragging?: boolean;
|
|
3
|
+
dense?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
|
+
dragstart: (ev: PointerEvent) => any;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
+
onDragstart?: ((ev: PointerEvent) => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|