@wujies/components 5.6.4 → 5.6.6

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.
Files changed (40) hide show
  1. package/dist/components/KCustomTabs.vue.d.ts +27 -0
  2. package/dist/components/KIpSegmentInput.vue.d.ts +16 -0
  3. package/dist/components/KPagination.vue.d.ts +136 -0
  4. package/dist/components/KRightToolbar.vue.d.ts +48 -0
  5. package/dist/components/KSectionTitle.vue.d.ts +15 -0
  6. package/dist/components/KSegmented.vue.d.ts +61 -0
  7. package/dist/components/KSpin.vue.d.ts +27 -0
  8. package/dist/components/KTableSiderLayout.vue.d.ts +30 -0
  9. package/dist/index.d.ts +37 -18
  10. package/dist/index.js +1128 -1600
  11. package/dist/index.js.map +1 -1
  12. package/dist/names.d.ts +15 -5
  13. package/dist/names.js +21 -3
  14. package/dist/names.js.map +1 -1
  15. package/dist/propTypes.d.ts +24 -0
  16. package/dist/style.css +448 -288
  17. package/dist/types.d.ts +11 -0
  18. package/dist/utils/scroll-to.d.ts +6 -0
  19. package/package.json +6 -6
  20. package/dist/host/api/config.d.ts +0 -2
  21. package/dist/host/api/oss.d.ts +0 -2
  22. package/dist/host/api/types.d.ts +0 -11
  23. package/dist/host/api/user.d.ts +0 -1
  24. package/dist/host/components/ImageUpload.vue.d.ts +0 -129
  25. package/dist/host/components/ModuleBusinessSettings.vue.d.ts +0 -7
  26. package/dist/host/components/ModuleWebsiteSettings.vue.d.ts +0 -7
  27. package/dist/host/components/UserDetail.vue.d.ts +0 -10
  28. package/dist/host/contact.d.ts +0 -5
  29. package/dist/host/propTypes.d.ts +0 -29
  30. package/dist/host/request.d.ts +0 -4
  31. package/dist/{host/components → components}/ImagePreview.vue.d.ts +0 -0
  32. package/dist/{host/components → components}/KCard.vue.d.ts +0 -0
  33. package/dist/{host/components → components}/KDictTag.vue.d.ts +0 -0
  34. package/dist/{host/components → components}/KPlainButton.vue.d.ts +0 -0
  35. package/dist/{host/components → components}/KSearchBar.vue.d.ts +2 -2
  36. package/dist/{host/components → components}/KSelectedAlert.vue.d.ts +0 -0
  37. package/dist/{host/components → components}/KTable.vue.d.ts +1 -1
  38. /package/dist/{host/components → components}/KTableHeader.vue.d.ts +0 -0
  39. /package/dist/{host/components → components}/SettingForm.vue.d.ts +0 -0
  40. /package/dist/{host/components → components}/SettingTabs.vue.d.ts +0 -0
@@ -0,0 +1,27 @@
1
+ interface Tab {
2
+ name: string;
3
+ label: string;
4
+ icon: any;
5
+ }
6
+ interface Props {
7
+ modelValue: string;
8
+ tabs: Tab[];
9
+ }
10
+ declare var __VLS_21: {};
11
+ type __VLS_Slots = {} & {
12
+ default?: (props: typeof __VLS_21) => any;
13
+ };
14
+ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
+ "update:modelValue": (...args: any[]) => void;
16
+ "tab-click": (...args: any[]) => void;
17
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
18
+ "onUpdate:modelValue"?: (...args: any[]) => any;
19
+ "onTab-click"?: (...args: any[]) => any;
20
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
22
+ export default _default;
23
+ type __VLS_WithSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };
@@ -0,0 +1,16 @@
1
+ interface Props {
2
+ modelValue: string;
3
+ prefix?: string;
4
+ segmentCount?: number;
5
+ }
6
+ declare const _default: import("vue").DefineComponent<Props, {
7
+ focus: () => void;
8
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:modelValue": (...args: any[]) => void;
10
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
11
+ "onUpdate:modelValue"?: (...args: any[]) => any;
12
+ }>, {
13
+ prefix: string;
14
+ segmentCount: number;
15
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ export default _default;
@@ -0,0 +1,136 @@
1
+ declare const _default: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
2
+ total: {
3
+ type: NumberConstructor;
4
+ default?: number;
5
+ def: (value?: number) => {
6
+ type: NumberConstructor;
7
+ default: number;
8
+ };
9
+ };
10
+ page: {
11
+ type: NumberConstructor;
12
+ default: number;
13
+ };
14
+ limit: {
15
+ type: NumberConstructor;
16
+ default: number;
17
+ };
18
+ pageSizes: {
19
+ type: {
20
+ (arrayLength: number): number[];
21
+ (...items: number[]): number[];
22
+ new (arrayLength: number): number[];
23
+ new (...items: number[]): number[];
24
+ isArray(arg: any): arg is any[];
25
+ readonly prototype: any[];
26
+ from<T>(arrayLike: ArrayLike<T>): T[];
27
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
28
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
29
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
30
+ of<T>(...items: T[]): T[];
31
+ readonly [Symbol.species]: ArrayConstructor;
32
+ };
33
+ default: () => number[];
34
+ };
35
+ pagerCount: {
36
+ type: NumberConstructor;
37
+ default: number;
38
+ };
39
+ layout: {
40
+ type: StringConstructor;
41
+ default: string;
42
+ };
43
+ background: {
44
+ type: BooleanConstructor;
45
+ default: boolean;
46
+ };
47
+ autoScroll: {
48
+ type: BooleanConstructor;
49
+ default: boolean;
50
+ };
51
+ hidden: {
52
+ type: BooleanConstructor;
53
+ default: boolean;
54
+ };
55
+ float: {
56
+ type: StringConstructor;
57
+ default: string;
58
+ };
59
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
60
+ "update:page": (...args: any[]) => void;
61
+ "update:limit": (...args: any[]) => void;
62
+ pagination: (...args: any[]) => void;
63
+ }, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
64
+ total: {
65
+ type: NumberConstructor;
66
+ default?: number;
67
+ def: (value?: number) => {
68
+ type: NumberConstructor;
69
+ default: number;
70
+ };
71
+ };
72
+ page: {
73
+ type: NumberConstructor;
74
+ default: number;
75
+ };
76
+ limit: {
77
+ type: NumberConstructor;
78
+ default: number;
79
+ };
80
+ pageSizes: {
81
+ type: {
82
+ (arrayLength: number): number[];
83
+ (...items: number[]): number[];
84
+ new (arrayLength: number): number[];
85
+ new (...items: number[]): number[];
86
+ isArray(arg: any): arg is any[];
87
+ readonly prototype: any[];
88
+ from<T>(arrayLike: ArrayLike<T>): T[];
89
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
90
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
91
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
92
+ of<T>(...items: T[]): T[];
93
+ readonly [Symbol.species]: ArrayConstructor;
94
+ };
95
+ default: () => number[];
96
+ };
97
+ pagerCount: {
98
+ type: NumberConstructor;
99
+ default: number;
100
+ };
101
+ layout: {
102
+ type: StringConstructor;
103
+ default: string;
104
+ };
105
+ background: {
106
+ type: BooleanConstructor;
107
+ default: boolean;
108
+ };
109
+ autoScroll: {
110
+ type: BooleanConstructor;
111
+ default: boolean;
112
+ };
113
+ hidden: {
114
+ type: BooleanConstructor;
115
+ default: boolean;
116
+ };
117
+ float: {
118
+ type: StringConstructor;
119
+ default: string;
120
+ };
121
+ }>> & Readonly<{
122
+ "onUpdate:page"?: (...args: any[]) => any;
123
+ "onUpdate:limit"?: (...args: any[]) => any;
124
+ onPagination?: (...args: any[]) => any;
125
+ }>, {
126
+ hidden: boolean;
127
+ page: number;
128
+ limit: number;
129
+ pageSizes: number[];
130
+ pagerCount: number;
131
+ layout: string;
132
+ background: boolean;
133
+ autoScroll: boolean;
134
+ float: string;
135
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
136
+ export default _default;
@@ -0,0 +1,48 @@
1
+ import type { PropType } from 'vue';
2
+ declare const _default: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
3
+ showSearch: {
4
+ type: BooleanConstructor;
5
+ default: boolean;
6
+ };
7
+ columns: {
8
+ type: PropType<FieldOption[]>;
9
+ default: any;
10
+ };
11
+ search: {
12
+ type: BooleanConstructor;
13
+ default: boolean;
14
+ };
15
+ gutter: {
16
+ type: NumberConstructor;
17
+ default: number;
18
+ };
19
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
+ "update:showSearch": (...args: any[]) => void;
21
+ queryTable: (...args: any[]) => void;
22
+ }, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
23
+ showSearch: {
24
+ type: BooleanConstructor;
25
+ default: boolean;
26
+ };
27
+ columns: {
28
+ type: PropType<FieldOption[]>;
29
+ default: any;
30
+ };
31
+ search: {
32
+ type: BooleanConstructor;
33
+ default: boolean;
34
+ };
35
+ gutter: {
36
+ type: NumberConstructor;
37
+ default: number;
38
+ };
39
+ }>> & Readonly<{
40
+ "onUpdate:showSearch"?: (...args: any[]) => any;
41
+ onQueryTable?: (...args: any[]) => any;
42
+ }>, {
43
+ search: boolean;
44
+ showSearch: boolean;
45
+ columns: FieldOption[];
46
+ gutter: number;
47
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
48
+ export default _default;
@@ -0,0 +1,15 @@
1
+ type __VLS_Props = {
2
+ title?: string;
3
+ };
4
+ declare var __VLS_1: {};
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_1) => any;
7
+ };
8
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
9
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
10
+ export default _default;
11
+ type __VLS_WithSlots<T, S> = T & {
12
+ new (): {
13
+ $slots: S;
14
+ };
15
+ };
@@ -0,0 +1,61 @@
1
+ import type { PropType } from 'vue';
2
+ type SegmentedValue = string | number | boolean;
3
+ type SegmentedOption = SegmentedValue | {
4
+ label: string;
5
+ value: SegmentedValue;
6
+ disabled?: boolean;
7
+ };
8
+ declare const _default: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
9
+ modelValue: {
10
+ type: PropType<SegmentedValue>;
11
+ required: true;
12
+ };
13
+ options: {
14
+ type: PropType<SegmentedOption[]>;
15
+ required: true;
16
+ };
17
+ size: {
18
+ type: PropType<"large" | "default" | "small">;
19
+ default: string;
20
+ };
21
+ block: {
22
+ type: BooleanConstructor;
23
+ default: boolean;
24
+ };
25
+ disabled: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
28
+ };
29
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
30
+ "update:modelValue": (value: SegmentedValue) => any;
31
+ change: (value: SegmentedValue) => any;
32
+ }, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
33
+ modelValue: {
34
+ type: PropType<SegmentedValue>;
35
+ required: true;
36
+ };
37
+ options: {
38
+ type: PropType<SegmentedOption[]>;
39
+ required: true;
40
+ };
41
+ size: {
42
+ type: PropType<"large" | "default" | "small">;
43
+ default: string;
44
+ };
45
+ block: {
46
+ type: BooleanConstructor;
47
+ default: boolean;
48
+ };
49
+ disabled: {
50
+ type: BooleanConstructor;
51
+ default: boolean;
52
+ };
53
+ }>> & Readonly<{
54
+ "onUpdate:modelValue"?: (value: SegmentedValue) => any;
55
+ onChange?: (value: SegmentedValue) => any;
56
+ }>, {
57
+ size: "default" | "small" | "large";
58
+ disabled: boolean;
59
+ block: boolean;
60
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
61
+ export default _default;
@@ -0,0 +1,27 @@
1
+ type __VLS_Props = {
2
+ show?: boolean;
3
+ size?: number;
4
+ description?: string;
5
+ background?: string;
6
+ contentClass?: string;
7
+ };
8
+ declare var __VLS_1: {}, __VLS_7: {};
9
+ type __VLS_Slots = {} & {
10
+ default?: (props: typeof __VLS_1) => any;
11
+ } & {
12
+ spin?: (props: typeof __VLS_7) => any;
13
+ };
14
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
15
+ size: number;
16
+ background: string;
17
+ show: boolean;
18
+ description: string;
19
+ contentClass: string;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
21
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
22
+ export default _default;
23
+ type __VLS_WithSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };
@@ -0,0 +1,30 @@
1
+ type __VLS_Props = {
2
+ siderTitle?: string;
3
+ defaultExpanded?: boolean;
4
+ };
5
+ declare var __VLS_12: {}, __VLS_14: {}, __VLS_16: {}, __VLS_18: {}, __VLS_23: {}, __VLS_25: {}, __VLS_27: {}, __VLS_45: {};
6
+ type __VLS_Slots = {} & {
7
+ header?: (props: typeof __VLS_12) => any;
8
+ } & {
9
+ 'header-extra'?: (props: typeof __VLS_14) => any;
10
+ } & {
11
+ sider?: (props: typeof __VLS_16) => any;
12
+ } & {
13
+ default?: (props: typeof __VLS_18) => any;
14
+ } & {
15
+ header?: (props: typeof __VLS_23) => any;
16
+ } & {
17
+ 'header-extra'?: (props: typeof __VLS_25) => any;
18
+ } & {
19
+ sider?: (props: typeof __VLS_27) => any;
20
+ } & {
21
+ default?: (props: typeof __VLS_45) => any;
22
+ };
23
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
24
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
25
+ export default _default;
26
+ type __VLS_WithSlots<T, S> = T & {
27
+ new (): {
28
+ $slots: S;
29
+ };
30
+ };
package/dist/index.d.ts CHANGED
@@ -1,23 +1,42 @@
1
1
  /**
2
- * 真实组件库入口。
2
+ * 真实组件库入口 —— 平台共享组件。
3
3
  *
4
- * 源码由 `pnpm sync:host` 从宿主 plus-ui 同步(见 scripts/sync-host-components.mjs),
5
- * 构建后是可直接 import 的 Vue 组件。宿主运行时仍通过 Import Map 指向自己的那份实例,
4
+ * 本包是组件的事实源:源码直接在这里维护,构建后是可直接 import 的 Vue 组件。
5
+ * 宿主运行时通过 Import Map 把 `@wujies/components` 指到自己的那份实例,
6
6
  * 所以插件与宿主共享同一个 Vue / Element Plus,不会出现双实例。
7
+ *
8
+ * 两类导出:
9
+ * - **通用 UI kit**:包内带真实构件(不依赖宿主接口 / store);
10
+ * - **宿主业务组件**(ImageUpload / UserDetail / Module*Settings):它们内部要调宿主接口、
11
+ * 读宿主 store,包内**不放实现**,只声明同名占位 —— 插件构建时该说明符是 external,
12
+ * 运行期由宿主 `components` 槽给出真实例。占位一旦被真正渲染(说明外部化没生效、
13
+ * 把包打进了产物)会立刻抛错,而不是安静地渲染成空白。
14
+ *
15
+ * 名字清单见 ./names.ts。
7
16
  */
8
- export { default as ImagePreview } from './host/components/ImagePreview.vue';
9
- export { default as ImageUpload } from './host/components/ImageUpload.vue';
10
- export { default as KCard } from './host/components/KCard.vue';
11
- export { default as KDictTag } from './host/components/KDictTag.vue';
12
- export { default as KPlainButton } from './host/components/KPlainButton.vue';
13
- export { default as KSearchBar } from './host/components/KSearchBar.vue';
14
- export { default as KSelectedAlert } from './host/components/KSelectedAlert.vue';
15
- export { default as KTable } from './host/components/KTable.vue';
16
- export { default as KTableHeader } from './host/components/KTableHeader.vue';
17
- export { default as ModuleBusinessSettings } from './host/components/ModuleBusinessSettings.vue';
18
- export { default as ModuleWebsiteSettings } from './host/components/ModuleWebsiteSettings.vue';
19
- export { default as SettingTabs } from './host/components/SettingTabs.vue';
20
- export { default as UserDetail } from './host/components/UserDetail.vue';
21
- export { WUJIES_COMPONENT_NAMES } from './names';
17
+ import type { WujiesComponent } from './types';
18
+ export { default as ImagePreview } from './components/ImagePreview.vue';
19
+ export { default as KCard } from './components/KCard.vue';
20
+ export { default as KCustomTabs } from './components/KCustomTabs.vue';
21
+ export { default as KDictTag } from './components/KDictTag.vue';
22
+ export { default as KIpSegmentInput } from './components/KIpSegmentInput.vue';
23
+ export { default as KPagination } from './components/KPagination.vue';
24
+ export { default as KPlainButton } from './components/KPlainButton.vue';
25
+ export { default as KRightToolbar } from './components/KRightToolbar.vue';
26
+ export { default as KSearchBar } from './components/KSearchBar.vue';
27
+ export { default as KSectionTitle } from './components/KSectionTitle.vue';
28
+ export { default as KSegmented } from './components/KSegmented.vue';
29
+ export { default as KSelectedAlert } from './components/KSelectedAlert.vue';
30
+ export { default as KSpin } from './components/KSpin.vue';
31
+ export { default as KTable } from './components/KTable.vue';
32
+ export { default as KTableHeader } from './components/KTableHeader.vue';
33
+ export { default as KTableSiderLayout } from './components/KTableSiderLayout.vue';
34
+ export { default as SettingForm } from './components/SettingForm.vue';
35
+ export { default as SettingTabs } from './components/SettingTabs.vue';
36
+ export declare const ImageUpload: WujiesComponent;
37
+ export declare const ModuleBusinessSettings: WujiesComponent;
38
+ export declare const ModuleWebsiteSettings: WujiesComponent;
39
+ export declare const UserDetail: WujiesComponent;
40
+ export { WUJIES_COMPONENT_NAMES, WUJIES_HOST_ONLY_COMPONENT_NAMES } from './names';
22
41
  export type { WujiesComponentName } from './names';
23
- export type { KSearchBarItem, KSearchBarOption, KTableColumn, WujiesComponent } from './types';
42
+ export type { KSearchBarItem, KSearchBarOption, KTableColumn, KTableHeaderColumn, WujiesComponent } from './types';