@finema/core 1.4.10 → 1.4.11

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/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "1.4.10",
3
+ "version": "1.4.11",
4
4
  "configKey": "core",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.7.4"
package/dist/module.mjs CHANGED
@@ -2,7 +2,7 @@ import { defineNuxtModule, createResolver, installModule, addPlugin, addComponen
2
2
  import 'lodash-es';
3
3
 
4
4
  const name = "@finema/core";
5
- const version = "1.4.10";
5
+ const version = "1.4.11";
6
6
 
7
7
  const colors = {
8
8
  black: "#20243E",
@@ -0,0 +1,38 @@
1
+ import { type BreadcrumbLink } from '#ui/types';
2
+ export interface IDefinePageItem {
3
+ title?: string;
4
+ sub_title?: string;
5
+ isHideBreadcrumbs?: boolean;
6
+ breadcrumbs?: BreadcrumbLink[];
7
+ }
8
+ export declare const useApp: import("pinia").StoreDefinition<"_app", import("pinia")._UnwrapAll<Pick<{
9
+ pageMeta: any;
10
+ sidebar: import("vue").Ref<any[]>;
11
+ defineSEO: (payload: {
12
+ title?: string;
13
+ description?: string;
14
+ image?: string;
15
+ }) => void;
16
+ definePage: (payload: IDefinePageItem) => void;
17
+ defineSidebar: (items: BreadcrumbLink[]) => void;
18
+ }, any>>, Pick<{
19
+ pageMeta: any;
20
+ sidebar: import("vue").Ref<any[]>;
21
+ defineSEO: (payload: {
22
+ title?: string;
23
+ description?: string;
24
+ image?: string;
25
+ }) => void;
26
+ definePage: (payload: IDefinePageItem) => void;
27
+ defineSidebar: (items: BreadcrumbLink[]) => void;
28
+ }, any>, Pick<{
29
+ pageMeta: any;
30
+ sidebar: import("vue").Ref<any[]>;
31
+ defineSEO: (payload: {
32
+ title?: string;
33
+ description?: string;
34
+ image?: string;
35
+ }) => void;
36
+ definePage: (payload: IDefinePageItem) => void;
37
+ defineSidebar: (items: BreadcrumbLink[]) => void;
38
+ }, any>>;
@@ -0,0 +1,32 @@
1
+ import { reactive, useSeoMeta } from "#imports";
2
+ import { defineStore } from "pinia";
3
+ import { ref } from "vue";
4
+ export const useApp = defineStore("_app", () => {
5
+ const pageMeta = reactive({});
6
+ const sidebar = ref([]);
7
+ const defineSEO = (payload) => {
8
+ useSeoMeta({
9
+ title: payload.title,
10
+ ogTitle: payload.title,
11
+ description: payload.description,
12
+ ogDescription: payload.description,
13
+ ogImage: payload.image
14
+ });
15
+ };
16
+ const definePage = (payload) => {
17
+ pageMeta.title = payload.title;
18
+ pageMeta.sub_title = payload.sub_title;
19
+ pageMeta.isHideBreadcrumbs = payload.isHideBreadcrumbs;
20
+ pageMeta.breadcrumbs = payload.breadcrumbs;
21
+ };
22
+ const defineSidebar = (items) => {
23
+ sidebar.value = items;
24
+ };
25
+ return {
26
+ pageMeta,
27
+ sidebar,
28
+ defineSEO,
29
+ definePage,
30
+ defineSidebar
31
+ };
32
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "1.4.10",
3
+ "version": "1.4.11",
4
4
  "repository": "https://gitlab.finema.co/finema/ui-kit",
5
5
  "license": "MIT",
6
6
  "author": "Finema Dev Core Team",