gavaengine 0.1.2 → 2.0.0
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/DashboardSplashTrigger-CRpueuUi.d.ts +154 -0
- package/dist/auth/index.d.ts +42 -0
- package/dist/auth/index.js +12 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/{chunk-D5PTZWTT.js → chunk-4LM22T36.js} +2 -2
- package/dist/chunk-MC3FBYWV.js +534 -0
- package/dist/chunk-MC3FBYWV.js.map +1 -0
- package/dist/chunk-QO42DDRU.js +113 -0
- package/dist/chunk-QO42DDRU.js.map +1 -0
- package/dist/{chunk-3C3AAR3S.js → chunk-YSVQQBBU.js} +474 -50
- package/dist/chunk-YSVQQBBU.js.map +1 -0
- package/dist/components/index.d.ts +64 -132
- package/dist/components/index.js +22 -2
- package/dist/content/index.d.ts +45 -0
- package/dist/content/index.js +38 -0
- package/dist/content/index.js.map +1 -0
- package/dist/handlers/index.d.ts +60 -3
- package/dist/handlers/index.js +477 -126
- package/dist/handlers/index.js.map +1 -1
- package/dist/i18n/index.d.ts +114 -0
- package/dist/i18n/index.js +249 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/{index-B1ZYC5TP.d.ts → index-CCsSC4nF.d.ts} +119 -2
- package/dist/index.d.ts +45 -7
- package/dist/index.js +226 -39
- package/dist/index.js.map +1 -1
- package/dist/providers/index.d.ts +3 -2
- package/dist/providers/index.js +2 -2
- package/dist/types-X07o_zKf.d.ts +198 -0
- package/dist/types-d8-k_4dN.d.ts +19 -0
- package/package.json +16 -1
- package/dist/chunk-3C3AAR3S.js.map +0 -1
- package/dist/chunk-BVLJYZ6T.js +0 -252
- package/dist/chunk-BVLJYZ6T.js.map +0 -1
- package/dist/types-BZgSeTU8.d.ts +0 -101
- /package/dist/{chunk-D5PTZWTT.js.map → chunk-4LM22T36.js.map} +0 -0
|
@@ -1,6 +1,108 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { G as
|
|
3
|
+
import { G as GEAuthAdapter } from './types-d8-k_4dN.js';
|
|
4
|
+
import { G as GEContentType, c as GEActions } from './types-X07o_zKf.js';
|
|
5
|
+
|
|
6
|
+
interface GELocale {
|
|
7
|
+
content: {
|
|
8
|
+
articles: string;
|
|
9
|
+
newArticle: string;
|
|
10
|
+
titlePlaceholder: string;
|
|
11
|
+
excerptPlaceholder: string;
|
|
12
|
+
slugPlaceholder: string;
|
|
13
|
+
authorPlaceholder: string;
|
|
14
|
+
category: string;
|
|
15
|
+
selectCategory: string;
|
|
16
|
+
excerpt: string;
|
|
17
|
+
author: string;
|
|
18
|
+
slugUrl: string;
|
|
19
|
+
noArticles: string;
|
|
20
|
+
noArticlesSearch: string;
|
|
21
|
+
searchArticles: string;
|
|
22
|
+
coverImageLabel: string;
|
|
23
|
+
coverImageHint: string;
|
|
24
|
+
viewArticle: string;
|
|
25
|
+
untitled: string;
|
|
26
|
+
};
|
|
27
|
+
editor: {
|
|
28
|
+
publish: string;
|
|
29
|
+
unpublish: string;
|
|
30
|
+
saveDraft: string;
|
|
31
|
+
revisions: string;
|
|
32
|
+
saving: string;
|
|
33
|
+
saved: string;
|
|
34
|
+
saveError: string;
|
|
35
|
+
noRevisions: string;
|
|
36
|
+
restore: string;
|
|
37
|
+
restoreConfirm: string;
|
|
38
|
+
beforeRestore: string;
|
|
39
|
+
publishedNote: string;
|
|
40
|
+
preview: string;
|
|
41
|
+
placeholder: string;
|
|
42
|
+
};
|
|
43
|
+
media: {
|
|
44
|
+
media: string;
|
|
45
|
+
noMedia: string;
|
|
46
|
+
noMediaSearch: string;
|
|
47
|
+
chooseFile: string;
|
|
48
|
+
dragHint: string;
|
|
49
|
+
uploadHint: string;
|
|
50
|
+
mediaLibrary: string;
|
|
51
|
+
uploadNew: string;
|
|
52
|
+
searchFiles: string;
|
|
53
|
+
selectImage: string;
|
|
54
|
+
noImages: string;
|
|
55
|
+
noImagesSearch: string;
|
|
56
|
+
copyUrl: string;
|
|
57
|
+
editImage: string;
|
|
58
|
+
restoreOriginal: string;
|
|
59
|
+
freeAspect: string;
|
|
60
|
+
};
|
|
61
|
+
users: {
|
|
62
|
+
users: string;
|
|
63
|
+
name: string;
|
|
64
|
+
email: string;
|
|
65
|
+
password: string;
|
|
66
|
+
passwordEditHint: string;
|
|
67
|
+
role: string;
|
|
68
|
+
createdAt: string;
|
|
69
|
+
actions: string;
|
|
70
|
+
createUser: string;
|
|
71
|
+
unauthorized: string;
|
|
72
|
+
notAuthenticated: string;
|
|
73
|
+
allFieldsRequired: string;
|
|
74
|
+
passwordMinLength: string;
|
|
75
|
+
emailExists: string;
|
|
76
|
+
invalidRole: string;
|
|
77
|
+
cannotDeleteSelf: string;
|
|
78
|
+
};
|
|
79
|
+
common: {
|
|
80
|
+
statistics: string;
|
|
81
|
+
settings: string;
|
|
82
|
+
delete: string;
|
|
83
|
+
edit: string;
|
|
84
|
+
search: string;
|
|
85
|
+
draft: string;
|
|
86
|
+
published: string;
|
|
87
|
+
all: string;
|
|
88
|
+
drafts: string;
|
|
89
|
+
loading: string;
|
|
90
|
+
confirm: string;
|
|
91
|
+
cancel: string;
|
|
92
|
+
apply: string;
|
|
93
|
+
change: string;
|
|
94
|
+
logout: string;
|
|
95
|
+
saveChanges: string;
|
|
96
|
+
updated: string;
|
|
97
|
+
status: string;
|
|
98
|
+
title: string;
|
|
99
|
+
deleteConfirm: (title: string) => string;
|
|
100
|
+
unpublishConfirm: (title: string) => string;
|
|
101
|
+
deleteUserConfirm: (name: string) => string;
|
|
102
|
+
totalArticles: (count: number) => string;
|
|
103
|
+
totalFiles: (count: number) => string;
|
|
104
|
+
};
|
|
105
|
+
}
|
|
4
106
|
|
|
5
107
|
interface GavaEngineConfig {
|
|
6
108
|
branding: {
|
|
@@ -14,6 +116,20 @@ interface GavaEngineConfig {
|
|
|
14
116
|
canPublish: (role: string) => boolean;
|
|
15
117
|
adminRole: string;
|
|
16
118
|
};
|
|
119
|
+
statuses: {
|
|
120
|
+
draft: string;
|
|
121
|
+
published: string;
|
|
122
|
+
};
|
|
123
|
+
locale: string;
|
|
124
|
+
models: {
|
|
125
|
+
article: string;
|
|
126
|
+
articleRevision: string;
|
|
127
|
+
articleView: string;
|
|
128
|
+
media: string;
|
|
129
|
+
user: string;
|
|
130
|
+
};
|
|
131
|
+
auth?: GEAuthAdapter;
|
|
132
|
+
contentTypes?: GEContentType[];
|
|
17
133
|
categories: string[];
|
|
18
134
|
upload: {
|
|
19
135
|
endpoint: string;
|
|
@@ -132,6 +248,7 @@ interface GavaEngineConfig {
|
|
|
132
248
|
untitled: string;
|
|
133
249
|
};
|
|
134
250
|
}
|
|
251
|
+
declare function localeToStrings(locale: GELocale): GavaEngineConfig["strings"];
|
|
135
252
|
declare const DEFAULT_CONFIG: GavaEngineConfig;
|
|
136
253
|
declare function defineConfig(overrides?: Partial<GavaEngineConfig>): GavaEngineConfig;
|
|
137
254
|
|
|
@@ -176,4 +293,4 @@ declare function ThemeProvider({ children }: {
|
|
|
176
293
|
|
|
177
294
|
declare function ThemeToggle(): react_jsx_runtime.JSX.Element;
|
|
178
295
|
|
|
179
|
-
export { ActionsProvider as A, ConfigProvider as C, DEFAULT_CONFIG as D, type
|
|
296
|
+
export { ActionsProvider as A, ConfigProvider as C, DEFAULT_CONFIG as D, type GELocale as G, SessionProvider as S, ThemeProvider as T, type GavaEngineConfig as a, GavaEngineProvider as b, SplashProvider as c, ThemeToggle as d, defineConfig as e, useGavaConfig as f, useSplash as g, localeToStrings as l, useGavaActions as u };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { G as GavaEngineConfig } from './index-
|
|
2
|
-
export { A as ActionsProvider, C as ConfigProvider, D as DEFAULT_CONFIG,
|
|
3
|
-
|
|
4
|
-
export {
|
|
1
|
+
import { G as GELocale, a as GavaEngineConfig } from './index-CCsSC4nF.js';
|
|
2
|
+
export { A as ActionsProvider, C as ConfigProvider, D as DEFAULT_CONFIG, b as GavaEngineProvider, S as SessionProvider, c as SplashProvider, T as ThemeProvider, d as ThemeToggle, e as defineConfig, l as localeToStrings, u as useGavaActions, f as useGavaConfig, g as useSplash } from './index-CCsSC4nF.js';
|
|
3
|
+
import { G as GEContentType } from './types-X07o_zKf.js';
|
|
4
|
+
export { c as GEActions, d as GEActionsV2, e as GEArticle, a as GEContentActions, b as GEFieldDef, f as GEFieldType, g as GEMedia, h as GERevision, i as GESession, j as GEUser, k as articlesContentType, l as createLegacyActions, m as defineContentType } from './types-X07o_zKf.js';
|
|
5
|
+
export { A as ArticleEditor, a as ArticleList, C as CoverImageUpload, D as DashboardNavbar, b as DashboardSplashTrigger, c as DraggableYoutube, d as DraggableYoutubeView, E as EditorToolbar, I as ImageEditModal, M as MediaGrid, e as MediaPickerModal, R as ResizableImage, f as ResizableImageView, g as RevisionPanel, S as SplashScreen, h as StatCard, U as UserForm, i as UserTable, V as VideoExtension, j as VideoView } from './DashboardSplashTrigger-CRpueuUi.js';
|
|
6
|
+
export { G as GEAuthAdapter, a as GEAuthSession, b as GEAuthUser } from './types-d8-k_4dN.js';
|
|
7
|
+
export { AuthProvider, createNextAuthAdapter, useGavaAuth } from './auth/index.js';
|
|
5
8
|
import 'react/jsx-runtime';
|
|
6
9
|
import 'react';
|
|
7
10
|
import '@tiptap/react';
|
|
@@ -9,6 +12,18 @@ import '@tiptap/core';
|
|
|
9
12
|
import '@tiptap/extension-youtube';
|
|
10
13
|
import 'lucide-react';
|
|
11
14
|
|
|
15
|
+
declare const it: GELocale;
|
|
16
|
+
|
|
17
|
+
declare const en: GELocale;
|
|
18
|
+
|
|
19
|
+
declare function loadLocale(locale: string): GELocale;
|
|
20
|
+
declare function defineLocale(locale: GELocale): GELocale;
|
|
21
|
+
declare function mergeLocales(base: GELocale, overrides: DeepPartial<GELocale>): GELocale;
|
|
22
|
+
declare function registerLocale(key: string, locale: GELocale): void;
|
|
23
|
+
type DeepPartial<T> = {
|
|
24
|
+
[P in keyof T]?: T[P] extends (...args: any[]) => any ? T[P] : T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
25
|
+
};
|
|
26
|
+
|
|
12
27
|
declare function createArticleHandlers(prisma: any, config: GavaEngineConfig): {
|
|
13
28
|
getArticles(): Promise<any>;
|
|
14
29
|
getArticleById(id: string): Promise<any>;
|
|
@@ -69,7 +84,7 @@ declare function createUserHandlers(prisma: any, config: GavaEngineConfig): {
|
|
|
69
84
|
}>;
|
|
70
85
|
};
|
|
71
86
|
|
|
72
|
-
declare function createMediaHandlers(prisma: any,
|
|
87
|
+
declare function createMediaHandlers(prisma: any, config: GavaEngineConfig): {
|
|
73
88
|
getMedia(search?: string): Promise<any>;
|
|
74
89
|
deleteMedia(userId: string, userRole: string, id: string, deleteFileFromDisk?: (path: string) => Promise<void>): Promise<{
|
|
75
90
|
success: boolean;
|
|
@@ -92,7 +107,7 @@ declare function createUploadHandler(prisma: any, config: GavaEngineConfig, stor
|
|
|
92
107
|
}, uploaderId: string): Promise<UploadResult>;
|
|
93
108
|
};
|
|
94
109
|
|
|
95
|
-
declare function buildCredentialsProvider(prisma: any): {
|
|
110
|
+
declare function buildCredentialsProvider(prisma: any, config?: GavaEngineConfig): {
|
|
96
111
|
credentials: {
|
|
97
112
|
email: {};
|
|
98
113
|
password: {};
|
|
@@ -127,4 +142,27 @@ declare function createAuthUtils(config: GavaEngineConfig): {
|
|
|
127
142
|
isAdmin(role: string): boolean;
|
|
128
143
|
};
|
|
129
144
|
|
|
130
|
-
|
|
145
|
+
interface ContentHandlers {
|
|
146
|
+
getAll(options?: {
|
|
147
|
+
search?: string;
|
|
148
|
+
status?: string;
|
|
149
|
+
orderBy?: Record<string, "asc" | "desc">;
|
|
150
|
+
}): Promise<any[]>;
|
|
151
|
+
getById(id: string): Promise<any | null>;
|
|
152
|
+
create(data?: Record<string, any>): Promise<string>;
|
|
153
|
+
update(id: string, data: Record<string, any>): Promise<{
|
|
154
|
+
success: boolean;
|
|
155
|
+
}>;
|
|
156
|
+
delete(id: string): Promise<{
|
|
157
|
+
success: boolean;
|
|
158
|
+
}>;
|
|
159
|
+
publish?(userId: string, id: string): Promise<{
|
|
160
|
+
success: boolean;
|
|
161
|
+
}>;
|
|
162
|
+
unpublish?(id: string): Promise<{
|
|
163
|
+
success: boolean;
|
|
164
|
+
}>;
|
|
165
|
+
}
|
|
166
|
+
declare function createContentHandlers(prisma: any, contentType: GEContentType, config: GavaEngineConfig): ContentHandlers;
|
|
167
|
+
|
|
168
|
+
export { type ContentHandlers, type FileStorage, GEContentType, GELocale, GavaEngineConfig, type UploadResult, buildAuthCallbacks, buildCredentialsProvider, createArticleHandlers, createAuthUtils, createContentHandlers, createMediaHandlers, createRevisionHandlers, createUploadHandler, createUserHandlers, defineLocale, en, it, loadLocale, mergeLocales, registerLocale };
|