@vtj/ui 0.0.1-alpha.1 → 0.0.1-alpha.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/cdn/index.js +4 -1
- package/lib/index.js +3208 -1
- package/package.json +5 -5
- package/types/components/config/Config.d.ts +22 -0
- package/types/components/config/index.d.ts +15 -0
- package/types/components/config/props.d.ts +5 -0
- package/types/components/index.d.ts +2 -0
- package/types/components/page/Page.d.ts +25 -0
- package/types/components/page/index.d.ts +21 -0
- package/types/constants.d.ts +1 -0
- package/types/hooks/index.d.ts +1 -0
- package/types/hooks/useConfig.d.ts +6 -0
- package/types/index.d.ts +9 -1
- package/types/list.d.ts +14 -0
- package/types/utils/emits.d.ts +6 -0
- package/types/utils/index.d.ts +4 -0
- package/types/utils/install.d.ts +9 -0
- package/types/utils/make-install.d.ts +5 -0
- package/types/utils/util.d.ts +2 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vtj/ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.1-alpha.
|
|
4
|
+
"version": "0.0.1-alpha.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"setup": "npm install --registry=https://registry.npmmirror.com",
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
"node": ">=16.0.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@vtj/deps": "
|
|
18
|
+
"@vtj/deps": "^0.3.8-alpha.0",
|
|
19
19
|
"@vtj/icons": "*",
|
|
20
|
-
"@vtj/utils": "
|
|
20
|
+
"@vtj/utils": "^0.3.8-alpha.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@vtj/cli": "^0.3.
|
|
23
|
+
"@vtj/cli": "^0.3.7-alpha.0"
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
"lib",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "38e4513ccbf281f408e9ce829cdfa7504fa8ac71"
|
|
45
45
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { DefineComponent, VNode, RendererNode, RendererElement, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, App, ExtractPropTypes, InjectionKey, Ref } from 'vue';
|
|
2
|
+
import { configProps } from './props';
|
|
3
|
+
export { configProps };
|
|
4
|
+
export type ConfigProps = ExtractPropTypes<typeof configProps>;
|
|
5
|
+
export type ConfigContext = Partial<ConfigProps>;
|
|
6
|
+
export declare const configContextKey: InjectionKey<Ref<ConfigContext>>;
|
|
7
|
+
export declare function provideConfig(config: ConfigContext | Ref<ConfigContext>, app?: App): Ref<Partial<ConfigProps> | {
|
|
8
|
+
tag?: string | undefined;
|
|
9
|
+
}>;
|
|
10
|
+
declare const Config: DefineComponent<{
|
|
11
|
+
tag: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
};
|
|
14
|
+
}, () => VNode<RendererNode, RendererElement, {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
17
|
+
tag: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
};
|
|
20
|
+
}>>, {}>;
|
|
21
|
+
export type ConfigInstance = InstanceType<typeof Config>;
|
|
22
|
+
export default Config;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DefineComponent, VNode, RendererNode, RendererElement, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from 'vue';
|
|
2
|
+
import type { WithInstall } from '../../utils';
|
|
3
|
+
export declare const XConfig: WithInstall<DefineComponent<{
|
|
4
|
+
tag: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
};
|
|
7
|
+
}, () => VNode<RendererNode, RendererElement, {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
10
|
+
tag: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
};
|
|
13
|
+
}>>, {}>> & Record<string, any>;
|
|
14
|
+
export default XConfig;
|
|
15
|
+
export * from './Config';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { DefineComponent, VNode, RendererNode, RendererElement, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from 'vue';
|
|
2
|
+
export declare const pageProps: {
|
|
3
|
+
tag: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export type PageProps = ExtractPropTypes<typeof pageProps>;
|
|
9
|
+
export declare const Page: DefineComponent<{
|
|
10
|
+
tag: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
}, () => VNode<RendererNode, RendererElement, {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
17
|
+
tag: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
}>>, {
|
|
22
|
+
tag: string;
|
|
23
|
+
}>;
|
|
24
|
+
export type PageInstance = InstanceType<typeof Page>;
|
|
25
|
+
export default Page;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { DefineComponent, VNode, RendererNode, RendererElement, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from 'vue';
|
|
2
|
+
import type { WithInstall } from '../../utils';
|
|
3
|
+
import Page from './Page';
|
|
4
|
+
export declare const XPage: WithInstall<DefineComponent<{
|
|
5
|
+
tag: {
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
}, () => VNode<RendererNode, RendererElement, {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
12
|
+
tag: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
}>>, {
|
|
17
|
+
tag: string;
|
|
18
|
+
}>> & Record<string, any>;
|
|
19
|
+
export default XPage;
|
|
20
|
+
export { Page };
|
|
21
|
+
export * from './Page';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const INSTALLED_KEY: unique symbol;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useConfig';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { ConfigContext } from '../components';
|
|
3
|
+
export declare function useConfig(key?: keyof ConfigContext): ComputedRef<string | Ref<{
|
|
4
|
+
tag?: string | undefined;
|
|
5
|
+
}> | undefined>;
|
|
6
|
+
export declare function setConfig(value: ConfigContext | Ref<ConfigContext>): void;
|
package/types/index.d.ts
CHANGED
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ConfigProps } from './components';
|
|
2
|
+
import type { App } from 'vue';
|
|
3
|
+
import Components from './list';
|
|
4
|
+
declare const installer: {
|
|
5
|
+
install: (app: App<any>, options?: Partial<ConfigProps> | undefined) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const install: (app: App<any>, options?: Partial<ConfigProps> | undefined) => void;
|
|
8
|
+
export default installer;
|
|
9
|
+
export { Components };
|
package/types/list.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DefineComponent, VNode, RendererNode, RendererElement, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from 'vue';
|
|
2
|
+
import type { WithInstall } from './utils';
|
|
3
|
+
declare const _default: (WithInstall<DefineComponent<{
|
|
4
|
+
tag: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
};
|
|
7
|
+
}, () => VNode<RendererNode, RendererElement, {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
10
|
+
tag: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
};
|
|
13
|
+
}>>, {}>> & Record<string, any>)[];
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type ObjectEmitsOptions = Record<string, ((...args: any[]) => any) | null>;
|
|
2
|
+
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
3
|
+
export type Emits<Options = ObjectEmitsOptions, Event extends keyof Options = keyof Options> = Options extends Array<infer V> ? (event: V, ...args: any[]) => void : {} extends Options ? (event: string, ...args: any[]) => void : UnionToIntersection<{
|
|
4
|
+
[key in Event]: Options[key] extends (...args: infer Args) => any ? (event: key, ...args: Args) => void : (event: key, ...args: any[]) => void;
|
|
5
|
+
}[Event]>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Directive, AppContext, Plugin } from 'vue';
|
|
2
|
+
export type WithInstall<T> = T & Plugin;
|
|
3
|
+
export type InstallWithContext<T> = WithInstall<T> & {
|
|
4
|
+
_context: AppContext | null;
|
|
5
|
+
};
|
|
6
|
+
export declare const withInstall: <T, E extends Record<string, any>>(main: T, extra?: E | undefined) => WithInstall<T> & E;
|
|
7
|
+
export declare const withInstallFunction: <T>(fn: T, name: string) => InstallWithContext<T>;
|
|
8
|
+
export declare const withInstallDirective: <T extends Directive<any, any>>(directive: T, name: string) => WithInstall<T>;
|
|
9
|
+
export declare const withNoopInstall: <T>(component: T) => WithInstall<T>;
|