@maxlkatze/cms
Version:
A git based Nuxt Module CMS - zero effort, zero cost
16 lines (15 loc) • 846 B
TypeScript
import { type Ref } from 'vue';
import type { ContentValue } from '../../../types/ContentTypes.js';
export declare const useContentSource: () => {
enableCMSMode: () => Promise<void>;
getContentByKey: (key: string, defaultValue: ContentValue) => Ref<ContentValue> | ContentValue;
isCMSUser: Ref<boolean, boolean>;
editContentStorage: {
loadContent: () => Promise<void>;
getChanges: (runtimeContent: Record<string, ContentValue>, editContent: Record<string, ContentValue>) => Record<string, ContentValue>;
updateContentByKey: (key: string, value: ContentValue) => Promise<void>;
revertChangeByKey: (key: string) => Promise<void>;
editContent: Ref<Record<string, ContentValue>, Record<string, ContentValue>>;
changes: import("vue").ComputedRef<Record<string, ContentValue>>;
};
};