@oneclick.dev/cms-kit 0.0.17 → 0.0.19

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.es.js CHANGED
@@ -77599,6 +77599,7 @@ const useModulePermissions = () => getCmsComposable("cms-useModulePermissions");
77599
77599
  const useFirebaseIntegration = () => getCmsComposable("cms-useFirebaseIntegration");
77600
77600
  const useNavigateToModuleRoute = () => getCmsComposable("cms-useNavigateToModuleRoute");
77601
77601
  const useModuleStorage = () => getCmsComposable("cms-useModuleStorage");
77602
+ const useLogs = () => getCmsComposable("cms-useLogs");
77602
77603
  const _sfc_main$3g = /* @__PURE__ */ defineComponent({
77603
77604
  __name: "InterpolationField",
77604
77605
  props: {
@@ -122566,7 +122567,7 @@ const _sfc_main$1_ = /* @__PURE__ */ defineComponent({
122566
122567
  return 0;
122567
122568
  });
122568
122569
  });
122569
- watch(() => activeSourceId.value, async () => {
122570
+ watch$1(() => activeSourceId.value, async () => {
122570
122571
  activeSource.value = await getMediaSource(project.value, activeSourceId.value);
122571
122572
  setEffectiveBasePath();
122572
122573
  currentPath.value = activeSource.value.path;
@@ -142314,6 +142315,7 @@ export {
142314
142315
  useIntegrationActions$1 as useIntegrationActions,
142315
142316
  useIntegrations,
142316
142317
  useLayout,
142318
+ useLogs,
142317
142319
  useMediaLibrary$1 as useMediaLibrary,
142318
142320
  useModulePermissions,
142319
142321
  useModuleStorage,
@@ -5,29 +5,40 @@ export declare const useMediaLibrary: () => any;
5
5
  export declare const useProjectService: () => any;
6
6
  export declare const useBreadcrumbs: () => any;
7
7
  export declare const useQueryBuilder: () => any;
8
- export declare const useModulePermissions: () => {
8
+ type UseModulePermissions = () => {
9
9
  isAdmin: () => boolean;
10
10
  isSuperAdmin: () => boolean;
11
11
  hasPermission: (permission: string) => boolean;
12
12
  hasPermissionOR: (...permissions: string[]) => boolean;
13
13
  hasPermissionAND: (...permissions: string[]) => boolean;
14
14
  };
15
- export declare const useFirebaseIntegration: () => {
15
+ export declare const useModulePermissions: () => UseModulePermissions;
16
+ type UseFirebaseIntegration = (projectId: string) => {
16
17
  add: (collection: string, data: Record<string, any>) => Promise<any>;
17
18
  find: (collection: string, query?: Record<string, any>) => Promise<any>;
18
19
  get: (collection: string, doc: string) => Promise<any>;
19
20
  update: (collection: string, id: string, data: Record<string, any>) => Promise<any>;
20
21
  remove: (collection: string, id: string) => Promise<any>;
21
22
  };
22
- export declare const useNavigateToModuleRoute: () => {
23
+ export declare const useFirebaseIntegration: () => UseFirebaseIntegration;
24
+ type UseNavigateToModuleRoute = () => {
23
25
  navigateTo: (path?: string | number) => void;
24
26
  basePath: string;
25
27
  params: Record<string, string>;
26
28
  pageComponent: any;
27
29
  };
28
- export declare const useModuleStorage: () => {
30
+ export declare const useNavigateToModuleRoute: () => UseNavigateToModuleRoute;
31
+ type UseModuleStorage = () => {
29
32
  getModuleData: (key: string) => any;
30
33
  setModuleData: (key: string, value: any) => void;
31
34
  removeModuleData: (key: string) => void;
32
35
  clearModuleData: () => void;
33
36
  };
37
+ export declare const useModuleStorage: () => UseModuleStorage;
38
+ type UseLogs = () => {
39
+ log: (message: string, data?: any) => void;
40
+ logWarning: (message: string, data?: any) => void;
41
+ logError: (message: string, data?: any) => void;
42
+ };
43
+ export declare const useLogs: () => UseLogs;
44
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneclick.dev/cms-kit",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.es.js",