@aeria-ui/theme
Advanced tools
Comparing version 0.0.60 to 0.0.61
@@ -1,4 +0,6 @@ | ||
import type { RouteRecordRaw } from 'vue-router'; | ||
import { useNavbar, type MenuNode } from '@aeria-ui/core'; | ||
export declare const breakpoints: import("vue").Ref<{ | ||
import type { Ref } from 'vue'; | ||
import type { MenuNode, MenuSchema } from '@aeria-ui/core'; | ||
import type { GlobalStateManager } from '@aeria-ui/state-management'; | ||
import { useNavbar } from '@aeria-ui/core'; | ||
export declare const breakpoints: Ref<{ | ||
width: number; | ||
@@ -30,163 +32,33 @@ height: number; | ||
export declare const navbarRefs: { | ||
routes: { | ||
meta: { | ||
[x: string]: unknown; | ||
[x: number]: unknown; | ||
[x: symbol]: unknown; | ||
routes: ({ | ||
meta?: { | ||
title: string; | ||
icon?: import("@aeriajs/types").Icon | undefined; | ||
roles?: string[] | undefined; | ||
}; | ||
end?: boolean | undefined; | ||
sensitive?: boolean | undefined; | ||
strict?: boolean | undefined; | ||
component?: import("vue").FunctionalComponent<any, {}, any, {}> | { | ||
new (...args: any[]): any; | ||
__isFragment?: never; | ||
__isTeleport?: never; | ||
__isSuspense?: never; | ||
} | import("vue").DefineComponent | (() => Promise<import("vue-router").RouteComponent>) | { | ||
[x: string]: any; | ||
setup?: ((this: void, props: import("@vue/shared").LooseRequired<any>, ctx: { | ||
attrs: { | ||
[x: string]: unknown; | ||
}; | ||
slots: Readonly<{ | ||
[name: string]: import("vue").Slot<any> | undefined; | ||
}>; | ||
emit: ((event: unknown, ...args: any[]) => void) | ((event: string, ...args: any[]) => void); | ||
expose: <Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed) => void; | ||
}) => any) | undefined; | ||
name?: string | undefined; | ||
template?: (string | object) | undefined; | ||
render?: Function | undefined; | ||
components?: Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>> | undefined; | ||
directives?: Record<string, import("vue").Directive<any, any, string, string>> | undefined; | ||
inheritAttrs?: boolean | undefined; | ||
emits?: any; | ||
slots?: {} | undefined; | ||
expose?: string[] | undefined; | ||
serverPrefetch?: (() => void | Promise<any>) | undefined; | ||
compilerOptions?: { | ||
isCustomElement?: ((tag: string) => boolean) | undefined; | ||
whitespace?: ("preserve" | "condense") | undefined; | ||
comments?: boolean | undefined; | ||
delimiters?: [string, string] | undefined; | ||
} | undefined; | ||
roles?: (string[] | ((role: string[]) => boolean | Promise<boolean>)) | undefined; | ||
children?: (string | any | { | ||
meta?: { | ||
title: string; | ||
icon?: import("@aeriajs/types").Icon | undefined; | ||
roles?: string[] | undefined; | ||
} | undefined; | ||
call?: ((this: unknown, ...args: unknown[]) => never) | undefined; | ||
__isFragment?: never | undefined; | ||
__isTeleport?: never | undefined; | ||
__isSuspense?: never | undefined; | ||
__defaults?: {} | undefined; | ||
compatConfig?: { | ||
GLOBAL_MOUNT?: boolean | "suppress-warning" | undefined; | ||
GLOBAL_MOUNT_CONTAINER?: boolean | "suppress-warning" | undefined; | ||
GLOBAL_EXTEND?: boolean | "suppress-warning" | undefined; | ||
GLOBAL_PROTOTYPE?: boolean | "suppress-warning" | undefined; | ||
GLOBAL_SET?: boolean | "suppress-warning" | undefined; | ||
GLOBAL_DELETE?: boolean | "suppress-warning" | undefined; | ||
GLOBAL_OBSERVABLE?: boolean | "suppress-warning" | undefined; | ||
GLOBAL_PRIVATE_UTIL?: boolean | "suppress-warning" | undefined; | ||
CONFIG_SILENT?: boolean | "suppress-warning" | undefined; | ||
CONFIG_DEVTOOLS?: boolean | "suppress-warning" | undefined; | ||
CONFIG_KEY_CODES?: boolean | "suppress-warning" | undefined; | ||
CONFIG_PRODUCTION_TIP?: boolean | "suppress-warning" | undefined; | ||
CONFIG_IGNORED_ELEMENTS?: boolean | "suppress-warning" | undefined; | ||
CONFIG_WHITESPACE?: boolean | "suppress-warning" | undefined; | ||
CONFIG_OPTION_MERGE_STRATS?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_SET?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_DELETE?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_DESTROY?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_EVENT_EMITTER?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_EVENT_HOOKS?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_CHILDREN?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_LISTENERS?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_SCOPED_SLOTS?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_ATTRS_CLASS_STYLE?: boolean | "suppress-warning" | undefined; | ||
OPTIONS_DATA_FN?: boolean | "suppress-warning" | undefined; | ||
OPTIONS_DATA_MERGE?: boolean | "suppress-warning" | undefined; | ||
OPTIONS_BEFORE_DESTROY?: boolean | "suppress-warning" | undefined; | ||
OPTIONS_DESTROYED?: boolean | "suppress-warning" | undefined; | ||
WATCH_ARRAY?: boolean | "suppress-warning" | undefined; | ||
PROPS_DEFAULT_THIS?: boolean | "suppress-warning" | undefined; | ||
V_ON_KEYCODE_MODIFIER?: boolean | "suppress-warning" | undefined; | ||
CUSTOM_DIR?: boolean | "suppress-warning" | undefined; | ||
ATTR_FALSE_VALUE?: boolean | "suppress-warning" | undefined; | ||
ATTR_ENUMERATED_COERCION?: boolean | "suppress-warning" | undefined; | ||
TRANSITION_CLASSES?: boolean | "suppress-warning" | undefined; | ||
TRANSITION_GROUP_ROOT?: boolean | "suppress-warning" | undefined; | ||
COMPONENT_ASYNC?: boolean | "suppress-warning" | undefined; | ||
COMPONENT_FUNCTIONAL?: boolean | "suppress-warning" | undefined; | ||
COMPONENT_V_MODEL?: boolean | "suppress-warning" | undefined; | ||
RENDER_FUNCTION?: boolean | "suppress-warning" | undefined; | ||
FILTERS?: boolean | "suppress-warning" | undefined; | ||
PRIVATE_APIS?: boolean | "suppress-warning" | undefined; | ||
MODE?: (2 | 3 | ((comp: import("vue").Component | null) => 2 | 3)) | undefined; | ||
} | undefined; | ||
data?: ((this: any, vm: any) => any) | undefined; | ||
computed?: import("vue").ComputedOptions | undefined; | ||
methods?: import("vue").MethodOptions | undefined; | ||
watch?: { | ||
[x: string]: (string | import("vue").WatchCallback | ({ | ||
handler: import("vue").WatchCallback | string; | ||
} & import("vue").WatchOptions<boolean>)) | (string | import("vue").WatchCallback | ({ | ||
handler: import("vue").WatchCallback | string; | ||
} & import("vue").WatchOptions<boolean>))[]; | ||
} | undefined; | ||
provide?: import("vue").ComponentProvideOptions | undefined; | ||
inject?: {} | string[] | undefined; | ||
filters?: Record<string, Function> | undefined; | ||
mixins?: any[] | undefined; | ||
extends?: any; | ||
beforeCreate?: (() => void) | undefined; | ||
created?: (() => void) | undefined; | ||
beforeMount?: (() => void) | undefined; | ||
mounted?: (() => void) | undefined; | ||
beforeUpdate?: (() => void) | undefined; | ||
updated?: (() => void) | undefined; | ||
activated?: (() => void) | undefined; | ||
deactivated?: (() => void) | undefined; | ||
beforeDestroy?: (() => void) | undefined; | ||
beforeUnmount?: (() => void) | undefined; | ||
destroyed?: (() => void) | undefined; | ||
unmounted?: (() => void) | undefined; | ||
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | undefined; | ||
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | undefined; | ||
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | undefined; | ||
delimiters?: [string, string] | undefined; | ||
__differentiator?: string | number | symbol | undefined; | ||
__isBuiltIn?: boolean | undefined; | ||
__file?: string | undefined; | ||
__name?: string | undefined; | ||
beforeRouteEnter?: (import("vue-router").TypesConfig extends Record<"beforeRouteEnter", infer T> ? T : import("vue-router").NavigationGuardWithThis<undefined>) | undefined; | ||
beforeRouteUpdate?: (import("vue-router").TypesConfig extends Record<"beforeRouteUpdate", infer T> ? T : import("vue-router").NavigationGuard) | undefined; | ||
beforeRouteLeave?: (import("vue-router").TypesConfig extends Record<"beforeRouteLeave", infer T> ? T : import("vue-router").NavigationGuard) | undefined; | ||
} | null | undefined; | ||
components?: Record<string, import("vue-router").RouteComponent | (() => Promise<import("vue-router").RouteComponent>)> | null | undefined; | ||
redirect?: string | ((to: import("vue-router").RouteLocation) => import("vue-router").RouteLocationRaw) | { | ||
name?: import("vue-router").RouteRecordNameGeneric; | ||
params?: import("vue-router").RouteParamsRawGeneric | undefined; | ||
path?: undefined; | ||
query?: import("vue-router").LocationQueryRaw | undefined; | ||
hash?: string | undefined; | ||
replace?: boolean | undefined; | ||
force?: boolean | undefined; | ||
state?: import("vue-router").HistoryState | undefined; | ||
} | { | ||
path: string; | ||
query?: import("vue-router").LocationQueryRaw | undefined; | ||
hash?: string | undefined; | ||
replace?: boolean | undefined; | ||
force?: boolean | undefined; | ||
state?: import("vue-router").HistoryState | undefined; | ||
roles?: (string[] | ((role: string[]) => boolean | Promise<boolean>)) | undefined; | ||
children: (string | any | any)[]; | ||
badge?: (() => string | number extends infer ReturnType ? ReturnType | Promise<ReturnType> : never) | undefined; | ||
collapsed: boolean | "user"; | ||
})[] | undefined; | ||
badge?: (() => string | number extends infer ReturnType ? ReturnType | Promise<ReturnType> : never) | undefined; | ||
path?: string | undefined; | ||
} | { | ||
meta?: { | ||
title: string; | ||
icon?: import("@aeriajs/types").Icon | undefined; | ||
roles?: string[] | undefined; | ||
} | undefined; | ||
props?: import("vue-router")._RouteRecordProps<string | symbol> | Record<string, import("vue-router")._RouteRecordProps<string | symbol>> | undefined; | ||
path: string; | ||
alias?: (string | string[]) | undefined; | ||
name?: import("vue-router").RouteRecordNameGeneric; | ||
beforeEnter?: (import("vue-router").NavigationGuardWithThis<undefined> | import("vue-router").NavigationGuardWithThis<undefined>[]) | undefined; | ||
children?: any[] | undefined; | ||
badgeFunction?: string | undefined; | ||
badgePayload?: unknown; | ||
}[]; | ||
roles?: (string[] | ((role: string[]) => boolean | Promise<boolean>)) | undefined; | ||
children: (string | any | any)[]; | ||
badge?: (() => string | number extends infer ReturnType ? ReturnType | Promise<ReturnType> : never) | undefined; | ||
collapsed: boolean | "user"; | ||
})[]; | ||
router: { | ||
@@ -197,328 +69,113 @@ push: (to: import("vue-router").RouteLocationRaw) => Promise<import("vue-router").NavigationFailure | void | undefined>; | ||
}; | ||
export declare const routes: import("vue").Ref<{ | ||
meta: { | ||
[x: string]: unknown; | ||
[x: number]: unknown; | ||
[x: symbol]: unknown; | ||
export declare const routes: Ref<({ | ||
meta?: { | ||
title: string; | ||
icon?: import("@aeriajs/types").Icon | undefined; | ||
roles?: string[] | undefined; | ||
}; | ||
end?: boolean | undefined; | ||
sensitive?: boolean | undefined; | ||
strict?: boolean | undefined; | ||
component?: import("vue").FunctionalComponent<any, {}, any, {}> | { | ||
new (...args: any[]): any; | ||
__isFragment?: never; | ||
__isTeleport?: never; | ||
__isSuspense?: never; | ||
} | import("vue").DefineComponent | (() => Promise<import("vue-router").RouteComponent>) | { | ||
[x: string]: any; | ||
setup?: ((this: void, props: import("@vue/shared").LooseRequired<any>, ctx: { | ||
attrs: { | ||
[x: string]: unknown; | ||
}; | ||
slots: Readonly<{ | ||
[name: string]: import("vue").Slot<any> | undefined; | ||
}>; | ||
emit: ((event: unknown, ...args: any[]) => void) | ((event: string, ...args: any[]) => void); | ||
expose: <Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed) => void; | ||
}) => any) | undefined; | ||
name?: string | undefined; | ||
template?: (string | object) | undefined; | ||
render?: Function | undefined; | ||
components?: Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>> | undefined; | ||
directives?: Record<string, import("vue").Directive<any, any, string, string>> | undefined; | ||
inheritAttrs?: boolean | undefined; | ||
emits?: any; | ||
slots?: {} | undefined; | ||
expose?: string[] | undefined; | ||
serverPrefetch?: (() => void | Promise<any>) | undefined; | ||
compilerOptions?: { | ||
isCustomElement?: ((tag: string) => boolean) | undefined; | ||
whitespace?: ("preserve" | "condense") | undefined; | ||
comments?: boolean | undefined; | ||
delimiters?: [string, string] | undefined; | ||
} | undefined; | ||
roles?: (string[] | ((role: string[]) => boolean | Promise<boolean>)) | undefined; | ||
children?: (string | any | { | ||
meta?: { | ||
title: string; | ||
icon?: import("@aeriajs/types").Icon | undefined; | ||
roles?: string[] | undefined; | ||
} | undefined; | ||
call?: ((this: unknown, ...args: unknown[]) => never) | undefined; | ||
__isFragment?: never | undefined; | ||
__isTeleport?: never | undefined; | ||
__isSuspense?: never | undefined; | ||
__defaults?: {} | undefined; | ||
compatConfig?: { | ||
GLOBAL_MOUNT?: boolean | "suppress-warning" | undefined; | ||
GLOBAL_MOUNT_CONTAINER?: boolean | "suppress-warning" | undefined; | ||
GLOBAL_EXTEND?: boolean | "suppress-warning" | undefined; | ||
GLOBAL_PROTOTYPE?: boolean | "suppress-warning" | undefined; | ||
GLOBAL_SET?: boolean | "suppress-warning" | undefined; | ||
GLOBAL_DELETE?: boolean | "suppress-warning" | undefined; | ||
GLOBAL_OBSERVABLE?: boolean | "suppress-warning" | undefined; | ||
GLOBAL_PRIVATE_UTIL?: boolean | "suppress-warning" | undefined; | ||
CONFIG_SILENT?: boolean | "suppress-warning" | undefined; | ||
CONFIG_DEVTOOLS?: boolean | "suppress-warning" | undefined; | ||
CONFIG_KEY_CODES?: boolean | "suppress-warning" | undefined; | ||
CONFIG_PRODUCTION_TIP?: boolean | "suppress-warning" | undefined; | ||
CONFIG_IGNORED_ELEMENTS?: boolean | "suppress-warning" | undefined; | ||
CONFIG_WHITESPACE?: boolean | "suppress-warning" | undefined; | ||
CONFIG_OPTION_MERGE_STRATS?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_SET?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_DELETE?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_DESTROY?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_EVENT_EMITTER?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_EVENT_HOOKS?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_CHILDREN?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_LISTENERS?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_SCOPED_SLOTS?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_ATTRS_CLASS_STYLE?: boolean | "suppress-warning" | undefined; | ||
OPTIONS_DATA_FN?: boolean | "suppress-warning" | undefined; | ||
OPTIONS_DATA_MERGE?: boolean | "suppress-warning" | undefined; | ||
OPTIONS_BEFORE_DESTROY?: boolean | "suppress-warning" | undefined; | ||
OPTIONS_DESTROYED?: boolean | "suppress-warning" | undefined; | ||
WATCH_ARRAY?: boolean | "suppress-warning" | undefined; | ||
PROPS_DEFAULT_THIS?: boolean | "suppress-warning" | undefined; | ||
V_ON_KEYCODE_MODIFIER?: boolean | "suppress-warning" | undefined; | ||
CUSTOM_DIR?: boolean | "suppress-warning" | undefined; | ||
ATTR_FALSE_VALUE?: boolean | "suppress-warning" | undefined; | ||
ATTR_ENUMERATED_COERCION?: boolean | "suppress-warning" | undefined; | ||
TRANSITION_CLASSES?: boolean | "suppress-warning" | undefined; | ||
TRANSITION_GROUP_ROOT?: boolean | "suppress-warning" | undefined; | ||
COMPONENT_ASYNC?: boolean | "suppress-warning" | undefined; | ||
COMPONENT_FUNCTIONAL?: boolean | "suppress-warning" | undefined; | ||
COMPONENT_V_MODEL?: boolean | "suppress-warning" | undefined; | ||
RENDER_FUNCTION?: boolean | "suppress-warning" | undefined; | ||
FILTERS?: boolean | "suppress-warning" | undefined; | ||
PRIVATE_APIS?: boolean | "suppress-warning" | undefined; | ||
MODE?: (2 | 3 | ((comp: import("vue").Component | null) => 2 | 3)) | undefined; | ||
roles?: (string[] | ((role: string[]) => boolean | Promise<boolean>)) | undefined; | ||
children: (string | any | any)[]; | ||
badge?: (() => string | number extends infer ReturnType ? ReturnType | Promise<ReturnType> : never) | undefined; | ||
collapsed: boolean | "user"; | ||
})[] | undefined; | ||
badge?: (() => string | number extends infer ReturnType ? ReturnType | Promise<ReturnType> : never) | undefined; | ||
path?: string | undefined; | ||
} | { | ||
meta?: { | ||
title: string; | ||
icon?: import("@aeriajs/types").Icon | undefined; | ||
roles?: string[] | undefined; | ||
} | undefined; | ||
roles?: (string[] | ((role: string[]) => boolean | Promise<boolean>)) | undefined; | ||
children: (string | { | ||
meta?: { | ||
title: string; | ||
icon?: import("@aeriajs/types").Icon | undefined; | ||
roles?: string[] | undefined; | ||
} | undefined; | ||
data?: ((this: any, vm: any) => any) | undefined; | ||
computed?: import("vue").ComputedOptions | undefined; | ||
methods?: import("vue").MethodOptions | undefined; | ||
watch?: { | ||
[x: string]: (string | import("vue").WatchCallback | ({ | ||
handler: import("vue").WatchCallback | string; | ||
} & import("vue").WatchOptions<boolean>)) | (string | import("vue").WatchCallback | ({ | ||
handler: import("vue").WatchCallback | string; | ||
} & import("vue").WatchOptions<boolean>))[]; | ||
roles?: (string[] | ((role: string[]) => boolean | Promise<boolean>)) | undefined; | ||
children?: (string | any | { | ||
meta?: { | ||
title: string; | ||
icon?: import("@aeriajs/types").Icon | undefined; | ||
roles?: string[] | undefined; | ||
} | undefined; | ||
roles?: (string[] | ((role: string[]) => boolean | Promise<boolean>)) | undefined; | ||
children: (string | any | any)[]; | ||
badge?: (() => string | number extends infer ReturnType ? ReturnType | Promise<ReturnType> : never) | undefined; | ||
collapsed: boolean | "user"; | ||
})[] | undefined; | ||
badge?: (() => string | number extends infer ReturnType ? ReturnType | Promise<ReturnType> : never) | undefined; | ||
path?: string | undefined; | ||
} | any)[]; | ||
badge?: (() => string | number extends infer ReturnType ? ReturnType | Promise<ReturnType> : never) | undefined; | ||
collapsed: boolean | "user"; | ||
})[], ({ | ||
meta?: { | ||
title: string; | ||
icon?: import("@aeriajs/types").Icon | undefined; | ||
roles?: string[] | undefined; | ||
} | undefined; | ||
roles?: (string[] | ((role: string[]) => boolean | Promise<boolean>)) | undefined; | ||
children?: (string | any | { | ||
meta?: { | ||
title: string; | ||
icon?: import("@aeriajs/types").Icon | undefined; | ||
roles?: string[] | undefined; | ||
} | undefined; | ||
provide?: import("vue").ComponentProvideOptions | undefined; | ||
inject?: {} | string[] | undefined; | ||
filters?: Record<string, Function> | undefined; | ||
mixins?: any[] | undefined; | ||
extends?: any; | ||
beforeCreate?: (() => void) | undefined; | ||
created?: (() => void) | undefined; | ||
beforeMount?: (() => void) | undefined; | ||
mounted?: (() => void) | undefined; | ||
beforeUpdate?: (() => void) | undefined; | ||
updated?: (() => void) | undefined; | ||
activated?: (() => void) | undefined; | ||
deactivated?: (() => void) | undefined; | ||
beforeDestroy?: (() => void) | undefined; | ||
beforeUnmount?: (() => void) | undefined; | ||
destroyed?: (() => void) | undefined; | ||
unmounted?: (() => void) | undefined; | ||
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | undefined; | ||
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | undefined; | ||
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | undefined; | ||
delimiters?: [string, string] | undefined; | ||
__differentiator?: string | number | symbol | undefined; | ||
__isBuiltIn?: boolean | undefined; | ||
__file?: string | undefined; | ||
__name?: string | undefined; | ||
beforeRouteEnter?: (import("vue-router").TypesConfig extends Record<"beforeRouteEnter", infer T> ? T : import("vue-router").NavigationGuardWithThis<undefined>) | undefined; | ||
beforeRouteUpdate?: (import("vue-router").TypesConfig extends Record<"beforeRouteUpdate", infer T> ? T : import("vue-router").NavigationGuard) | undefined; | ||
beforeRouteLeave?: (import("vue-router").TypesConfig extends Record<"beforeRouteLeave", infer T> ? T : import("vue-router").NavigationGuard) | undefined; | ||
} | null | undefined; | ||
components?: Record<string, import("vue-router").RouteComponent | (() => Promise<import("vue-router").RouteComponent>)> | null | undefined; | ||
redirect?: string | ((to: import("vue-router").RouteLocation) => import("vue-router").RouteLocationRaw) | { | ||
name?: import("vue-router").RouteRecordNameGeneric; | ||
params?: import("vue-router").RouteParamsRawGeneric | undefined; | ||
path?: undefined; | ||
query?: import("vue-router").LocationQueryRaw | undefined; | ||
hash?: string | undefined; | ||
replace?: boolean | undefined; | ||
force?: boolean | undefined; | ||
state?: import("vue-router").HistoryState | undefined; | ||
} | { | ||
path: string; | ||
query?: import("vue-router").LocationQueryRaw | undefined; | ||
hash?: string | undefined; | ||
replace?: boolean | undefined; | ||
force?: boolean | undefined; | ||
state?: import("vue-router").HistoryState | undefined; | ||
} | undefined; | ||
props?: import("vue-router")._RouteRecordProps<string | symbol> | Record<string, import("vue-router")._RouteRecordProps<string | symbol>> | undefined; | ||
path: string; | ||
alias?: (string | string[]) | undefined; | ||
name?: import("vue-router").RouteRecordNameGeneric; | ||
beforeEnter?: (import("vue-router").NavigationGuardWithThis<undefined> | import("vue-router").NavigationGuardWithThis<undefined>[]) | undefined; | ||
children?: any[] | undefined; | ||
badgeFunction?: string | undefined; | ||
badgePayload?: unknown; | ||
}[], { | ||
meta: { | ||
[x: string]: unknown; | ||
[x: number]: unknown; | ||
[x: symbol]: unknown; | ||
roles?: (string[] | ((role: string[]) => boolean | Promise<boolean>)) | undefined; | ||
children: (string | any | any)[]; | ||
badge?: (() => string | number extends infer ReturnType ? ReturnType | Promise<ReturnType> : never) | undefined; | ||
collapsed: boolean | "user"; | ||
})[] | undefined; | ||
badge?: (() => string | number extends infer ReturnType ? ReturnType | Promise<ReturnType> : never) | undefined; | ||
path?: string | undefined; | ||
} | { | ||
meta?: { | ||
title: string; | ||
icon?: import("@aeriajs/types").Icon | undefined; | ||
roles?: string[] | undefined; | ||
}; | ||
end?: boolean | undefined; | ||
sensitive?: boolean | undefined; | ||
strict?: boolean | undefined; | ||
component?: import("vue").FunctionalComponent<any, {}, any, {}> | { | ||
new (...args: any[]): any; | ||
__isFragment?: never; | ||
__isTeleport?: never; | ||
__isSuspense?: never; | ||
} | import("vue").DefineComponent | (() => Promise<import("vue-router").RouteComponent>) | { | ||
[x: string]: any; | ||
setup?: ((this: void, props: import("@vue/shared").LooseRequired<any>, ctx: { | ||
attrs: { | ||
[x: string]: unknown; | ||
}; | ||
slots: Readonly<{ | ||
[name: string]: import("vue").Slot<any> | undefined; | ||
}>; | ||
emit: ((event: unknown, ...args: any[]) => void) | ((event: string, ...args: any[]) => void); | ||
expose: <Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed) => void; | ||
}) => any) | undefined; | ||
name?: string | undefined; | ||
template?: (string | object) | undefined; | ||
render?: Function | undefined; | ||
components?: Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>> | undefined; | ||
directives?: Record<string, import("vue").Directive<any, any, string, string>> | undefined; | ||
inheritAttrs?: boolean | undefined; | ||
emits?: any; | ||
slots?: {} | undefined; | ||
expose?: string[] | undefined; | ||
serverPrefetch?: (() => void | Promise<any>) | undefined; | ||
compilerOptions?: { | ||
isCustomElement?: ((tag: string) => boolean) | undefined; | ||
whitespace?: ("preserve" | "condense") | undefined; | ||
comments?: boolean | undefined; | ||
delimiters?: [string, string] | undefined; | ||
} | undefined; | ||
roles?: (string[] | ((role: string[]) => boolean | Promise<boolean>)) | undefined; | ||
children: (string | { | ||
meta?: { | ||
title: string; | ||
icon?: import("@aeriajs/types").Icon | undefined; | ||
roles?: string[] | undefined; | ||
} | undefined; | ||
call?: ((this: unknown, ...args: unknown[]) => never) | undefined; | ||
__isFragment?: never | undefined; | ||
__isTeleport?: never | undefined; | ||
__isSuspense?: never | undefined; | ||
__defaults?: {} | undefined; | ||
compatConfig?: { | ||
GLOBAL_MOUNT?: boolean | "suppress-warning" | undefined; | ||
GLOBAL_MOUNT_CONTAINER?: boolean | "suppress-warning" | undefined; | ||
GLOBAL_EXTEND?: boolean | "suppress-warning" | undefined; | ||
GLOBAL_PROTOTYPE?: boolean | "suppress-warning" | undefined; | ||
GLOBAL_SET?: boolean | "suppress-warning" | undefined; | ||
GLOBAL_DELETE?: boolean | "suppress-warning" | undefined; | ||
GLOBAL_OBSERVABLE?: boolean | "suppress-warning" | undefined; | ||
GLOBAL_PRIVATE_UTIL?: boolean | "suppress-warning" | undefined; | ||
CONFIG_SILENT?: boolean | "suppress-warning" | undefined; | ||
CONFIG_DEVTOOLS?: boolean | "suppress-warning" | undefined; | ||
CONFIG_KEY_CODES?: boolean | "suppress-warning" | undefined; | ||
CONFIG_PRODUCTION_TIP?: boolean | "suppress-warning" | undefined; | ||
CONFIG_IGNORED_ELEMENTS?: boolean | "suppress-warning" | undefined; | ||
CONFIG_WHITESPACE?: boolean | "suppress-warning" | undefined; | ||
CONFIG_OPTION_MERGE_STRATS?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_SET?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_DELETE?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_DESTROY?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_EVENT_EMITTER?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_EVENT_HOOKS?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_CHILDREN?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_LISTENERS?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_SCOPED_SLOTS?: boolean | "suppress-warning" | undefined; | ||
INSTANCE_ATTRS_CLASS_STYLE?: boolean | "suppress-warning" | undefined; | ||
OPTIONS_DATA_FN?: boolean | "suppress-warning" | undefined; | ||
OPTIONS_DATA_MERGE?: boolean | "suppress-warning" | undefined; | ||
OPTIONS_BEFORE_DESTROY?: boolean | "suppress-warning" | undefined; | ||
OPTIONS_DESTROYED?: boolean | "suppress-warning" | undefined; | ||
WATCH_ARRAY?: boolean | "suppress-warning" | undefined; | ||
PROPS_DEFAULT_THIS?: boolean | "suppress-warning" | undefined; | ||
V_ON_KEYCODE_MODIFIER?: boolean | "suppress-warning" | undefined; | ||
CUSTOM_DIR?: boolean | "suppress-warning" | undefined; | ||
ATTR_FALSE_VALUE?: boolean | "suppress-warning" | undefined; | ||
ATTR_ENUMERATED_COERCION?: boolean | "suppress-warning" | undefined; | ||
TRANSITION_CLASSES?: boolean | "suppress-warning" | undefined; | ||
TRANSITION_GROUP_ROOT?: boolean | "suppress-warning" | undefined; | ||
COMPONENT_ASYNC?: boolean | "suppress-warning" | undefined; | ||
COMPONENT_FUNCTIONAL?: boolean | "suppress-warning" | undefined; | ||
COMPONENT_V_MODEL?: boolean | "suppress-warning" | undefined; | ||
RENDER_FUNCTION?: boolean | "suppress-warning" | undefined; | ||
FILTERS?: boolean | "suppress-warning" | undefined; | ||
PRIVATE_APIS?: boolean | "suppress-warning" | undefined; | ||
MODE?: (2 | 3 | ((comp: import("vue").Component | null) => 2 | 3)) | undefined; | ||
} | undefined; | ||
data?: ((this: any, vm: any) => any) | undefined; | ||
computed?: import("vue").ComputedOptions | undefined; | ||
methods?: import("vue").MethodOptions | undefined; | ||
watch?: { | ||
[x: string]: (string | import("vue").WatchCallback | ({ | ||
handler: import("vue").WatchCallback | string; | ||
} & import("vue").WatchOptions<boolean>)) | (string | import("vue").WatchCallback | ({ | ||
handler: import("vue").WatchCallback | string; | ||
} & import("vue").WatchOptions<boolean>))[]; | ||
} | undefined; | ||
provide?: import("vue").ComponentProvideOptions | undefined; | ||
inject?: {} | string[] | undefined; | ||
filters?: Record<string, Function> | undefined; | ||
mixins?: any[] | undefined; | ||
extends?: any; | ||
beforeCreate?: (() => void) | undefined; | ||
created?: (() => void) | undefined; | ||
beforeMount?: (() => void) | undefined; | ||
mounted?: (() => void) | undefined; | ||
beforeUpdate?: (() => void) | undefined; | ||
updated?: (() => void) | undefined; | ||
activated?: (() => void) | undefined; | ||
deactivated?: (() => void) | undefined; | ||
beforeDestroy?: (() => void) | undefined; | ||
beforeUnmount?: (() => void) | undefined; | ||
destroyed?: (() => void) | undefined; | ||
unmounted?: (() => void) | undefined; | ||
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | undefined; | ||
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | undefined; | ||
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | undefined; | ||
delimiters?: [string, string] | undefined; | ||
__differentiator?: string | number | symbol | undefined; | ||
__isBuiltIn?: boolean | undefined; | ||
__file?: string | undefined; | ||
__name?: string | undefined; | ||
beforeRouteEnter?: (import("vue-router").TypesConfig extends Record<"beforeRouteEnter", infer T> ? T : import("vue-router").NavigationGuardWithThis<undefined>) | undefined; | ||
beforeRouteUpdate?: (import("vue-router").TypesConfig extends Record<"beforeRouteUpdate", infer T> ? T : import("vue-router").NavigationGuard) | undefined; | ||
beforeRouteLeave?: (import("vue-router").TypesConfig extends Record<"beforeRouteLeave", infer T> ? T : import("vue-router").NavigationGuard) | undefined; | ||
} | null | undefined; | ||
components?: Record<string, import("vue-router").RouteComponent | (() => Promise<import("vue-router").RouteComponent>)> | null | undefined; | ||
redirect?: string | ((to: import("vue-router").RouteLocation) => import("vue-router").RouteLocationRaw) | { | ||
name?: import("vue-router").RouteRecordNameGeneric; | ||
params?: import("vue-router").RouteParamsRawGeneric | undefined; | ||
path?: undefined; | ||
query?: import("vue-router").LocationQueryRaw | undefined; | ||
hash?: string | undefined; | ||
replace?: boolean | undefined; | ||
force?: boolean | undefined; | ||
state?: import("vue-router").HistoryState | undefined; | ||
} | { | ||
path: string; | ||
query?: import("vue-router").LocationQueryRaw | undefined; | ||
hash?: string | undefined; | ||
replace?: boolean | undefined; | ||
force?: boolean | undefined; | ||
state?: import("vue-router").HistoryState | undefined; | ||
} | undefined; | ||
props?: import("vue-router")._RouteRecordProps<string | symbol> | Record<string, import("vue-router")._RouteRecordProps<string | symbol>> | undefined; | ||
path: string; | ||
alias?: (string | string[]) | undefined; | ||
name?: import("vue-router").RouteRecordNameGeneric; | ||
beforeEnter?: (import("vue-router").NavigationGuardWithThis<undefined> | import("vue-router").NavigationGuardWithThis<undefined>[]) | undefined; | ||
children?: any[] | undefined; | ||
badgeFunction?: string | undefined; | ||
badgePayload?: unknown; | ||
}[]>, isCurrent: import("vue").Ref<(subroute: RouteRecordRaw) => boolean, (subroute: RouteRecordRaw) => boolean>; | ||
export declare const memoizeBadge: (promise: () => Promise<unknown> | unknown, key: string) => unknown; | ||
export declare const pushRoute: (to: string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric) => Promise<void | import("vue-router").NavigationFailure | undefined>; | ||
roles?: (string[] | ((role: string[]) => boolean | Promise<boolean>)) | undefined; | ||
children?: (string | any | { | ||
meta?: { | ||
title: string; | ||
icon?: import("@aeriajs/types").Icon | undefined; | ||
roles?: string[] | undefined; | ||
} | undefined; | ||
roles?: (string[] | ((role: string[]) => boolean | Promise<boolean>)) | undefined; | ||
children: (string | any | any)[]; | ||
badge?: (() => string | number extends infer ReturnType ? ReturnType | Promise<ReturnType> : never) | undefined; | ||
collapsed: boolean | "user"; | ||
})[] | undefined; | ||
badge?: (() => string | number extends infer ReturnType ? ReturnType | Promise<ReturnType> : never) | undefined; | ||
path?: string | undefined; | ||
} | any)[]; | ||
badge?: (() => string | number extends infer ReturnType ? ReturnType | Promise<ReturnType> : never) | undefined; | ||
collapsed: boolean | "user"; | ||
})[]>, isCurrent: Ref<(subroute: MenuNode) => boolean, (subroute: MenuNode) => boolean>; | ||
export declare const memoizeBadge: (promise: () => Promise<unknown> | unknown, key: string) => Promise<unknown>; | ||
export declare const navbarEntryOpen: (node: MenuNode) => boolean | undefined; | ||
export declare const isCollapsibleRouteOpen: (node: MenuNode) => boolean; | ||
export declare const routeClick: (node: MenuNode) => Promise<void | import("vue-router").NavigationFailure | undefined> | undefined; | ||
export declare const initTheme: () => void; | ||
export declare const pushRoute: (manager: GlobalStateManager, to: string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric) => Promise<void | import("vue-router").NavigationFailure | undefined>; | ||
export declare const routeClick: (node: MenuNode, manager: GlobalStateManager) => void; | ||
export declare const initTheme: () => { | ||
manager: { | ||
__globalState: import("@aeria-ui/state-management").GlobalState; | ||
}; | ||
menuSchema: MenuSchema | Ref<MenuSchema, MenuSchema>; | ||
}; |
import { useBreakpoints, useNavbar, MENU_SCHEMA_SYMBOL } from '@aeria-ui/core'; | ||
import { useStore, getGlobalStateManager } from '@aeria-ui/state-management'; | ||
import { reactive, inject, toRefs, onMounted } from 'vue'; | ||
let manager = undefined; | ||
import { reactive, inject, toRefs, unref, watch } from 'vue'; | ||
export const breakpoints = useBreakpoints(); | ||
@@ -13,3 +12,3 @@ export const badgeMemo = {}; | ||
export const { routes, isCurrent, } = toRefs(navbarRefs); | ||
export const memoizeBadge = (promise, key) => { | ||
export const memoizeBadge = async (promise, key) => { | ||
if (key in badgeMemo) { | ||
@@ -21,10 +20,2 @@ return badgeMemo[key]; | ||
}; | ||
export const pushRoute = (...args) => { | ||
if (!breakpoints.value.md) { | ||
const metaStore = useStore('meta', manager); | ||
metaStore.menu.visible = false; | ||
} | ||
window.scrollTo(0, 0); | ||
return navbarRefs.router.push(...args); | ||
}; | ||
export const navbarEntryOpen = (node) => { | ||
@@ -55,3 +46,11 @@ if ('children' in node) { | ||
}; | ||
export const routeClick = (node) => { | ||
export const pushRoute = (manager, ...args) => { | ||
if (!breakpoints.value.md) { | ||
const metaStore = useStore('meta', manager); | ||
metaStore.menu.visible = false; | ||
} | ||
window.scrollTo(0, 0); | ||
return navbarRefs.router.push(...args); | ||
}; | ||
export const routeClick = (node, manager) => { | ||
if ('collapsed' in node) { | ||
@@ -63,3 +62,3 @@ node.collapsed = node.collapsed | ||
} | ||
return pushRoute({ | ||
pushRoute(manager, { | ||
path: node.path, | ||
@@ -70,9 +69,15 @@ }); | ||
const menuSchema = inject(MENU_SCHEMA_SYMBOL, []); | ||
manager = getGlobalStateManager(); | ||
onMounted(async () => { | ||
const manager = getGlobalStateManager(); | ||
watch(() => menuSchema, async () => { | ||
const navbar = await useNavbar({ | ||
schema: menuSchema, | ||
schema: unref(menuSchema), | ||
}); | ||
Object.assign(navbarRefs, navbar); | ||
}, { | ||
immediate: true, | ||
}); | ||
return { | ||
manager, | ||
menuSchema, | ||
}; | ||
}; |
{ | ||
"name": "@aeria-ui/theme", | ||
"type": "module", | ||
"version": "0.0.60", | ||
"version": "0.0.61", | ||
"description": "", | ||
@@ -14,5 +14,2 @@ "keywords": [], | ||
}, | ||
"exports": { | ||
".": "./dist/index.js" | ||
}, | ||
"files": [ | ||
@@ -29,3 +26,3 @@ "dist" | ||
"peerDependencies": { | ||
"@aeria-ui/core": "^0.0.78", | ||
"@aeria-ui/core": "^0.0.79", | ||
"@aeria-ui/state-management": "^0.0.14", | ||
@@ -32,0 +29,0 @@ "@aeriajs/common": "0.0", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12804
257
1