@oiyo/core 0.4.0-beta.3 → 0.4.0-beta.4
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/dist/index.cjs +2 -2
- package/dist/index.d.ts +42 -0
- package/dist/index.mjs +2 -2
- package/package.json +6 -9
- package/dist/index.d.cts +0 -363
- package/dist/index.d.mts +0 -363
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { GlobalStyle, OiyoConfig, TabBarItem } from "@oiyo/config";
|
|
2
|
+
import { Plugin } from "vite";
|
|
3
|
+
|
|
4
|
+
//#region src/module/layout/placeholder.d.ts
|
|
5
|
+
declare const OiyoLayout: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}>[] | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/module/root/macro.d.ts
|
|
10
|
+
type RootContextFactory<T> = () => T;
|
|
11
|
+
declare const defineRootContext: <T>(factory: RootContextFactory<T>) => T;
|
|
12
|
+
declare const useRootContext: <T>() => T;
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/module/shared/type.d.ts
|
|
15
|
+
type Prettify<T> = { [K in keyof T]: T[K] } & {};
|
|
16
|
+
type RemoveIndexSignature<T> = { [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K] };
|
|
17
|
+
type StrictOmit<T, K extends keyof RemoveIndexSignature<T>> = Prettify<Omit<RemoveIndexSignature<T>, K>>;
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/module/route/types.d.ts
|
|
20
|
+
interface Tab extends StrictOmit<TabBarItem, 'pagePath'> {
|
|
21
|
+
index: number;
|
|
22
|
+
}
|
|
23
|
+
interface BasePageMeta {
|
|
24
|
+
type?: 'page' | 'home';
|
|
25
|
+
layout?: string | false;
|
|
26
|
+
style?: GlobalStyle;
|
|
27
|
+
tab?: Tab;
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/module/route/macro.d.ts
|
|
31
|
+
interface PageMeta extends BasePageMeta {
|
|
32
|
+
[key: string]: unknown;
|
|
33
|
+
}
|
|
34
|
+
declare const definePageMeta: (meta: PageMeta) => void;
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/module/route/placeholder.d.ts
|
|
37
|
+
declare const OiyoPage: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/plugin/index.d.ts
|
|
40
|
+
declare function OiyoCorePlugin(options?: OiyoConfig): Plugin[];
|
|
41
|
+
//#endregion
|
|
42
|
+
export { OiyoCorePlugin, OiyoLayout, OiyoPage, type PageMeta, definePageMeta, defineRootContext, useRootContext };
|