@oneclick.dev/cms-kit 0.0.117 → 0.0.119

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.
Files changed (48) hide show
  1. package/dist/chart-CAmUIEtB.js +82 -0
  2. package/dist/chart-DJkKL3jS.cjs +82 -0
  3. package/dist/charts.cjs +1 -1
  4. package/dist/charts.d.ts +1 -1
  5. package/dist/charts.js +1 -1
  6. package/dist/chunk-DY6MoR0Z.cjs +1 -0
  7. package/dist/chunk-DpHrC4oO.js +1 -0
  8. package/dist/cms-kit.cjs +1 -1
  9. package/dist/cms-kit.js +1 -1
  10. package/dist/components/ui/chart/ChartContainer.vue.d.ts +25 -0
  11. package/dist/components/ui/chart/ChartLegendContent.vue.d.ts +12 -0
  12. package/dist/components/ui/chart/ChartStyle.vue.d.ts +7 -0
  13. package/dist/components/ui/chart/ChartTooltipContent.vue.d.ts +32 -0
  14. package/dist/components/ui/flow-builder/components/nodes/NodeContextMenu.vue.d.ts +32 -0
  15. package/dist/components/ui/flow-builder/components/toolbars/DefaultToolbar.vue.d.ts +43 -0
  16. package/dist/components.cjs +53 -53
  17. package/dist/components.css +1 -1
  18. package/dist/components.d.ts +1 -1
  19. package/dist/components.js +71 -75
  20. package/dist/composables/index.d.ts +2 -0
  21. package/dist/composables/useCms.d.ts +4 -0
  22. package/dist/composables-B025TiVC.js +1 -0
  23. package/dist/composables-DSF8jtq1.cjs +1 -0
  24. package/dist/dist-CJX2bd1a.cjs +1 -0
  25. package/dist/dist-CL6Px27r.js +1 -0
  26. package/dist/flow-builder-BsoABRwv.cjs +1 -0
  27. package/dist/flow-builder-D_IHjMdV.js +1 -0
  28. package/dist/flow-builder.cjs +1 -1
  29. package/dist/flow-builder.d.ts +1 -1
  30. package/dist/flow-builder.js +1 -1
  31. package/dist/index.css +1 -1
  32. package/dist/index.d.ts +4 -564
  33. package/dist/lib/composables.d.ts +312 -0
  34. package/dist/lib/interpolation.d.ts +14 -0
  35. package/dist/lib/postMessageAwait.d.ts +1 -0
  36. package/dist/lib/utils.d.ts +16 -0
  37. package/dist/types/custom-modules.d.ts +117 -0
  38. package/dist/types/index.d.ts +2 -0
  39. package/dist/types/integrations.d.ts +21 -0
  40. package/package.json +58 -57
  41. package/dist/composables-Bc4gRFOx.js +0 -1
  42. package/dist/composables-Bf3QwiWe.cjs +0 -1
  43. package/dist/index-BbRkYNgJ.cjs +0 -82
  44. package/dist/index-DPMTYxRM.cjs +0 -1
  45. package/dist/index-Dtueb9la.js +0 -82
  46. package/dist/index-IJyvgbJH.cjs +0 -1
  47. package/dist/index-YMaY4uuk.js +0 -1
  48. package/dist/index-lmHRQuzf.js +0 -1
@@ -0,0 +1,312 @@
1
+ import { Ref } from 'vue';
2
+ import { FirestoreQueryParams, SendMailParams } from '../types/integrations';
3
+ import { FetchOptions } from 'ofetch';
4
+ export declare const useIntegrationActionBuilder: () => {
5
+ showBuilder: (variableContext: Variable[], action?: any) => Promise<Object | null>;
6
+ onConfirm: (action: Object) => void;
7
+ onCancel: () => void;
8
+ builderState: Ref<BuilderState>;
9
+ };
10
+ export declare const useIntegrations: () => {
11
+ getProjectIntegrations: (projectId: string) => Promise<any>;
12
+ getProjectIntegration: (projectId: string, integrationId: string) => Promise<any>;
13
+ };
14
+ export declare const useAgencyIntegrations: () => {
15
+ getAgencyIntegrations: () => Promise<any>;
16
+ getAgencyIntegration: (integrationId: string) => Promise<any>;
17
+ };
18
+ export declare const useIntegrationActions: (integrationId: string) => {
19
+ fireAction: (action: any, variableContext: Record<string, any>) => Promise<any>;
20
+ };
21
+ export declare const useMediaLibrary: () => {
22
+ getMediaSources: (projectSlug: string) => Promise<any>;
23
+ getMediaSource: (projectSlug: string, sourceId: string) => Promise<any>;
24
+ createMediaSource: (projectSlug: string, params: MediaSourceCreateParams) => Promise<any>;
25
+ updateMediaSource: (projectSlug: string, sourceId: string, params: MediaSourceUpdateParams) => Promise<any>;
26
+ deleteMediaSource: (projectSlug: string, sourceId: string) => Promise<any>;
27
+ uploadFile: (sourceId: string, file: File, path?: string) => Promise<any>;
28
+ getStorageContent: (sourceId: string, path?: string) => Promise<any>;
29
+ deleteStorageFile: (sourceId: string, filePath: string) => Promise<any>;
30
+ renameStorageFile: (sourceId: string, fileUrl: string, oldPath: string, newName: string) => Promise<any>;
31
+ moveStorageFile: (sourceId: string, fileUrl: string, oldPath: string, newFolderPath: string) => Promise<any>;
32
+ };
33
+ export declare const useProjectService: () => {};
34
+ export declare const useModuleBreadcrumbs: (factory: () => BreadcrumbItem[]) => {};
35
+ export declare const useQueryBuilder: () => {};
36
+ export declare const useModule: () => ReturnType<UseModule>;
37
+ export declare const useModulePermissions: () => ReturnType<UseModulePermissions>;
38
+ export declare const useModuleRoute: () => ReturnType<UseModuleRoute>;
39
+ export declare const useModuleStorage: () => ReturnType<UseModuleStorage>;
40
+ export declare const useLogs: () => ReturnType<UseLogs>;
41
+ export declare const useUtilsService: () => ReturnType<UseUtilsService>;
42
+ export declare const useFormBuilder: () => ReturnType<UseFormBuilder>;
43
+ export declare const useFlowBuilder: () => ReturnType<UseFlowBuilder>;
44
+ export declare const useConfirmation: () => ReturnType<UseConfirmation>;
45
+ export declare const useFirebaseIntegration: (projectId: string) => {
46
+ add: (collection: string, data: Record<string, any>) => Promise<any>;
47
+ find: (collection: string, query?: FirestoreQueryParams) => Promise<any>;
48
+ get: (collectionOrPath: string, id?: string) => Promise<any>;
49
+ update: (collectionOrPath: string, id: string | undefined | null, data: Record<string, any>) => Promise<any>;
50
+ remove: (collectionOrPath: string, id?: string) => Promise<any>;
51
+ };
52
+ export declare const useMailer: (integrationId: string) => {
53
+ sendMail: (...opts: SendMailParams[]) => Promise<any>;
54
+ };
55
+ export declare const useAI: (integrationId: string) => {
56
+ generateObject: (schema: any, prompt: string, options?: any) => Promise<any>;
57
+ };
58
+ export declare const useProjectSettings: () => {
59
+ project: any;
60
+ refreshProject: () => Promise<void>;
61
+ getTimezone: () => string;
62
+ getOffset: () => number;
63
+ getOffsetInMinutes: () => number;
64
+ formatDate: (date: string | Date) => string;
65
+ getCurrency: () => string;
66
+ formatCurrency: (amount: number, currency?: string) => string;
67
+ };
68
+ export declare const useCustomDialog: () => {
69
+ customDialogStack: CustomDialogState[];
70
+ openCustomDialog: (layout: string, variables: Variable[]) => Promise<any>;
71
+ closeCustomDialog: (id: number, result: any) => void;
72
+ };
73
+ export declare const useModuleOverlay: () => {
74
+ openInOverlay: (moduleId: string, params?: Record<string, string>) => void;
75
+ overlayState: OverlayState;
76
+ };
77
+ export declare const useModuleApi: () => {
78
+ get: <T = any>(path: string, options?: FetchOptions) => Promise<T>;
79
+ post: <T = any>(path: string, options?: FetchOptions) => Promise<T>;
80
+ patch: <T = any>(path: string, options?: FetchOptions) => Promise<T>;
81
+ del: <T = any>(path: string, options?: FetchOptions) => Promise<T>;
82
+ };
83
+ export declare const useGoogleServiceAccountIntegration: (integrationId: string) => {
84
+ getGeoPoint: (address: string) => Promise<{
85
+ lat: number;
86
+ lng: number;
87
+ }>;
88
+ };
89
+ export declare const useOverlayParams: () => Ref<Record<string, any>, Record<string, any>>;
90
+ export declare const useRoute: () => {
91
+ path: string;
92
+ fullPath: string;
93
+ name?: string | null;
94
+ params: Record<string, any>;
95
+ query: Record<string, any>;
96
+ hash: string;
97
+ meta?: Record<string, any>;
98
+ matched?: any[];
99
+ };
100
+ export declare const useRouter: () => {
101
+ push: (to: CmsRouterLocation) => Promise<any> | void;
102
+ replace: (to: CmsRouterLocation) => Promise<any> | void;
103
+ back: () => void;
104
+ };
105
+ export declare const useOverlayStack: () => {
106
+ stack: string[];
107
+ push(id: string): void;
108
+ pop(id: string): void;
109
+ isTop(id: string): boolean;
110
+ };
111
+ export type UseIntegrationActionBuilder = () => {
112
+ showBuilder: (variableContext: Variable[], action?: any) => Promise<Object | null>;
113
+ onConfirm: (action: Object) => void;
114
+ onCancel: () => void;
115
+ builderState: Ref<BuilderState>;
116
+ };
117
+ export type UseIntegrations = () => {
118
+ getProjectIntegrations: (projectId: string) => Promise<any>;
119
+ getProjectIntegration: (projectId: string, integrationId: string) => Promise<any>;
120
+ };
121
+ export type UseAgencyIntegrations = () => {
122
+ getAgencyIntegrations: () => Promise<any>;
123
+ getAgencyIntegration: (integrationId: string) => Promise<any>;
124
+ };
125
+ export type UseIntegrationActions = (integrationId: string) => {
126
+ fireAction: (action: any, variableContext: Record<string, any>) => Promise<any>;
127
+ };
128
+ export type UseMediaLibrary = () => {
129
+ getMediaSources: (projectSlug: string) => Promise<any>;
130
+ getMediaSource: (projectSlug: string, sourceId: string) => Promise<any>;
131
+ createMediaSource: (projectSlug: string, params: MediaSourceCreateParams) => Promise<any>;
132
+ updateMediaSource: (projectSlug: string, sourceId: string, params: MediaSourceUpdateParams) => Promise<any>;
133
+ deleteMediaSource: (projectSlug: string, sourceId: string) => Promise<any>;
134
+ uploadFile: (sourceId: string, file: File, path?: string) => Promise<any>;
135
+ getStorageContent: (sourceId: string, path?: string) => Promise<any>;
136
+ deleteStorageFile: (sourceId: string, filePath: string) => Promise<any>;
137
+ renameStorageFile: (sourceId: string, fileUrl: string, oldPath: string, newName: string) => Promise<any>;
138
+ moveStorageFile: (sourceId: string, fileUrl: string, oldPath: string, newFolderPath: string) => Promise<any>;
139
+ };
140
+ export type UseProjectService = () => {};
141
+ export type UseModuleBreadcrumbs = (factory: () => BreadcrumbItem[]) => {};
142
+ export type UseQueryBuilder = () => {};
143
+ export type UseModule = () => {
144
+ config: Record<string, any>;
145
+ };
146
+ export type UseModulePermissions = () => {
147
+ isAdmin: () => boolean;
148
+ isSuperAdmin: () => boolean;
149
+ hasPermission: (permission: string) => boolean;
150
+ hasAnyPermission: (...permissions: string[]) => boolean;
151
+ hasEveryPermission: (...permissions: string[]) => boolean;
152
+ };
153
+ export type UseModuleRoute = () => {
154
+ navigateTo: (path?: string | number) => void;
155
+ projectId: string;
156
+ moduleId: string;
157
+ basePath: string;
158
+ params: Record<string, string>;
159
+ query: Record<string, string>;
160
+ pageComponent: any;
161
+ };
162
+ export type UseModuleStorage = () => {
163
+ getModuleData: (key: string) => any;
164
+ setModuleData: (key: string, value: any) => void;
165
+ removeModuleData: (key: string) => void;
166
+ clearModuleData: () => void;
167
+ };
168
+ export type UseLogs = () => {
169
+ log: (message: string, data?: any) => void;
170
+ logWarning: (message: string, data?: any) => void;
171
+ logError: (message: string, data?: any) => void;
172
+ };
173
+ export type UseUtilsService = () => {
174
+ urlToBase64: (url: string) => Promise<{
175
+ base64: string;
176
+ contentType: string;
177
+ }>;
178
+ };
179
+ export type UseFormBuilder = () => {
180
+ formBuilderStack: any[];
181
+ openFormBuilder: (config?: any) => Promise<any>;
182
+ closeFormBuilder: (id: number, result: any) => void;
183
+ };
184
+ export type UseFlowBuilder = () => {
185
+ flowBuilderStack: FlowBuilderState[];
186
+ openFlowBuilder: (workflow: any, config?: any, externalVariables?: any[], formBuilderExtensions?: any[], flowBuilderExtensions?: any[]) => Promise<any>;
187
+ closeFlowBuilder: (id: number, result: any) => void;
188
+ runFlow: (workflow: any, context: any, formBuilderExtensions?: any[], flowBuilderExtensions?: any[]) => Promise<any>;
189
+ };
190
+ export type UseConfirmation = () => {
191
+ confirm: (message: string, title?: string, confirmText?: string) => Promise<boolean>;
192
+ };
193
+ export type UseFirebaseIntegration = (projectId: string) => {
194
+ add: (collection: string, data: Record<string, any>) => Promise<any>;
195
+ find: (collection: string, query?: FirestoreQueryParams) => Promise<any>;
196
+ get: (collectionOrPath: string, id?: string) => Promise<any>;
197
+ update: (collectionOrPath: string, id: string | undefined | null, data: Record<string, any>) => Promise<any>;
198
+ remove: (collectionOrPath: string, id?: string) => Promise<any>;
199
+ };
200
+ export type UseMailer = (integrationId: string) => {
201
+ sendMail: (...opts: SendMailParams[]) => Promise<any>;
202
+ };
203
+ export type UseAI = (integrationId: string) => {
204
+ generateObject: (schema: any, prompt: string, options?: any) => Promise<any>;
205
+ };
206
+ export type UseProjectSettings = () => {
207
+ project: any;
208
+ refreshProject: () => Promise<void>;
209
+ getTimezone: () => string;
210
+ getOffset: () => number;
211
+ getOffsetInMinutes: () => number;
212
+ formatDate: (date: string | Date) => string;
213
+ getCurrency: () => string;
214
+ formatCurrency: (amount: number, currency?: string) => string;
215
+ };
216
+ export type UseCustomDialog = () => {
217
+ customDialogStack: CustomDialogState[];
218
+ openCustomDialog: (layout: string, variables: Variable[]) => Promise<any>;
219
+ closeCustomDialog: (id: number, result: any) => void;
220
+ };
221
+ export type UseModuleOverlay = () => {
222
+ openInOverlay: (moduleId: string, params?: Record<string, string>) => void;
223
+ overlayState: OverlayState;
224
+ };
225
+ export type UseOverlayParams = () => Ref<Record<string, any>>;
226
+ export type UseGoogleServiceAccountIntegration = (integrationId: string) => {
227
+ getGeoPoint: (address: string) => Promise<{
228
+ lat: number;
229
+ lng: number;
230
+ }>;
231
+ };
232
+ export type UseModuleApi = () => {
233
+ get: <T = any>(path: string, options?: FetchOptions) => Promise<T>;
234
+ post: <T = any>(path: string, options?: FetchOptions) => Promise<T>;
235
+ patch: <T = any>(path: string, options?: FetchOptions) => Promise<T>;
236
+ del: <T = any>(path: string, options?: FetchOptions) => Promise<T>;
237
+ };
238
+ export type UseRoute = () => {
239
+ path: string;
240
+ fullPath: string;
241
+ name?: string | null;
242
+ params: Record<string, any>;
243
+ query: Record<string, any>;
244
+ hash: string;
245
+ meta?: Record<string, any>;
246
+ matched?: any[];
247
+ };
248
+ export type UseRouter = () => {
249
+ push: (to: CmsRouterLocation) => Promise<any> | void;
250
+ replace: (to: CmsRouterLocation) => Promise<any> | void;
251
+ back: () => void;
252
+ };
253
+ export type UseOverlayStack = () => {
254
+ stack: string[];
255
+ push(id: string): void;
256
+ pop(id: string): void;
257
+ isTop(id: string): boolean;
258
+ };
259
+ interface Variable {
260
+ name: string;
261
+ type: string;
262
+ value: any;
263
+ }
264
+ interface BuilderState {
265
+ show: boolean;
266
+ variableContext: Variable[];
267
+ resolve: ((value: Object | null) => void) | null;
268
+ action?: any;
269
+ }
270
+ interface MediaSourceCreateParams {
271
+ name: string;
272
+ integrationId: string;
273
+ path: string;
274
+ allowUserFolders: boolean;
275
+ }
276
+ interface MediaSourceUpdateParams {
277
+ name?: string;
278
+ integrationId?: string;
279
+ path?: string;
280
+ allowUserFolders?: boolean;
281
+ }
282
+ interface FlowBuilderState {
283
+ id: number;
284
+ show: boolean;
285
+ config: any;
286
+ workflow: any;
287
+ resolve: ((val: any) => void) | null;
288
+ }
289
+ interface CustomDialogState {
290
+ id: number;
291
+ show: boolean;
292
+ layout: string;
293
+ variables: any;
294
+ resolve: ((result: any) => void) | null;
295
+ }
296
+ interface OverlayState {
297
+ show: boolean;
298
+ projectId: string;
299
+ moduleId: string;
300
+ params: Record<string, string>;
301
+ }
302
+ interface BreadcrumbItem {
303
+ text: string;
304
+ href?: string;
305
+ }
306
+ export type CmsRouterLocation = string | {
307
+ name?: string;
308
+ path?: string;
309
+ params?: Record<string, any>;
310
+ query?: Record<string, any>;
311
+ };
312
+ export {};
@@ -0,0 +1,14 @@
1
+ export declare function interpolateTemplateFromVariableContext(template: string, variableContext: Variable[]): unknown;
2
+ export declare function interpolateTemplateFromVariableObject(template: string, variableContext: Record<string, any>, mode?: 'text' | 'js'): unknown;
3
+ interface InterpolationSegment {
4
+ start: number;
5
+ end: number;
6
+ expression: string;
7
+ }
8
+ export declare function findInterpolationSegments(template: string): InterpolationSegment[];
9
+ interface Variable {
10
+ name: string;
11
+ type: string;
12
+ value: any;
13
+ }
14
+ export {};
@@ -0,0 +1 @@
1
+ export declare function postMessageAwait<T>(target: Window, type: string, message: any, targetOrigin: string, timeoutMs?: number): Promise<T>;
@@ -0,0 +1,16 @@
1
+ import { Updater } from '@tanstack/vue-table';
2
+ import { Ref } from 'vue';
3
+ import { ClassValue } from 'clsx';
4
+ export declare function cn(...inputs: ClassValue[]): string;
5
+ export declare function valueUpdater<T extends Updater<any>>(updaterOrValue: T, ref: Ref): void;
6
+ /**
7
+ * Replaces **bold** markers with control-char placeholders.
8
+ * Call BEFORE interpolation so variable values can't inject bold.
9
+ */
10
+ export declare function markInlineBold(text: string): string;
11
+ /**
12
+ * HTML-escapes text and converts bold placeholders to <strong> tags.
13
+ * Call AFTER interpolation on the result of markInlineBold.
14
+ */
15
+ export declare function renderMarkedHtml(text: string): string;
16
+ export declare function formatFileSize(size: number): string;
@@ -0,0 +1,117 @@
1
+ export interface ModuleMetadata {
2
+ name: string;
3
+ description: string;
4
+ icon?: string;
5
+ version?: string;
6
+ author?: string;
7
+ tags?: string[];
8
+ }
9
+ export type SettingType = 'checkbox' | 'input' | 'textarea' | 'select' | 'radio' | 'number' | 'color' | 'resource' | 'mediaSource' | 'dataQuery' | 'flow' | 'form';
10
+ export interface BaseSetting<T> {
11
+ label: string;
12
+ description?: string;
13
+ type: SettingType;
14
+ default?: T;
15
+ required?: boolean;
16
+ valuesFrom?: string;
17
+ visibility?: {
18
+ dependsOn: string[];
19
+ visibleWhen: Record<string, (val: any) => boolean>;
20
+ enabledWhen?: Record<string, (val: any) => boolean>;
21
+ };
22
+ }
23
+ export interface SelectSetting extends BaseSetting<string> {
24
+ type: 'select' | 'radio';
25
+ options?: {
26
+ label: string;
27
+ value: string;
28
+ }[];
29
+ predefinedOptions?: 'languages' | 'countries' | 'timezones' | 'currencies';
30
+ multiple?: boolean;
31
+ }
32
+ export interface CheckboxSetting extends BaseSetting<boolean> {
33
+ type: 'checkbox';
34
+ }
35
+ export interface InputSetting extends BaseSetting<string> {
36
+ type: 'input' | 'textarea' | 'color';
37
+ }
38
+ export interface NumberSetting extends BaseSetting<number> {
39
+ type: 'number';
40
+ }
41
+ export interface ResourceSetting extends BaseSetting<string> {
42
+ type: 'resource';
43
+ accept?: string[];
44
+ }
45
+ export interface MediaSourceSetting extends BaseSetting<string> {
46
+ type: 'mediaSource';
47
+ multiple?: boolean;
48
+ }
49
+ export interface DataQuerySetting extends BaseSetting<string> {
50
+ type: 'dataQuery';
51
+ accept?: string[];
52
+ integrationKey?: string;
53
+ }
54
+ export interface FlowSetting extends BaseSetting<any> {
55
+ type: 'flow';
56
+ }
57
+ export interface FormSetting extends BaseSetting<any> {
58
+ type: 'form';
59
+ }
60
+ export type ModuleSetting = SelectSetting | CheckboxSetting | InputSetting | NumberSetting | ResourceSetting | MediaSourceSetting | DataQuerySetting | FlowSetting | FormSetting;
61
+ export type ModuleSettingsSchema = Record<string, ModuleSetting>;
62
+ /** ----------------- config groups ----------------- **/
63
+ export type ConditionOperator = 'isNotEmpty' | 'isEmpty' | 'equals' | 'notEquals';
64
+ export interface FieldCondition {
65
+ operator: ConditionOperator;
66
+ value?: any;
67
+ }
68
+ export type GroupConditions = Record<string, ConditionOperator | FieldCondition>;
69
+ export interface SettingGroup<F extends ModuleSettingsSchema = ModuleSettingsSchema> {
70
+ _group: true;
71
+ label?: string;
72
+ description?: string;
73
+ visibleWhen: GroupConditions;
74
+ fields: F;
75
+ }
76
+ export type ModuleConfigSchema = Record<string, ModuleSetting | SettingGroup>;
77
+ export declare function configGroup<const F extends ModuleSettingsSchema>(opts: {
78
+ label?: string;
79
+ description?: string;
80
+ visibleWhen: GroupConditions;
81
+ fields: F & ValidateSettingDefaults<F>;
82
+ }): SettingGroup<F>;
83
+ /** Evaluate group conditions against current config values */
84
+ export declare function evaluateGroupConditions(conditions: GroupConditions, configValues: Record<string, any>): boolean;
85
+ /** Flatten a ModuleConfigSchema (with possible groups) into a flat settings map */
86
+ export declare function flattenConfigSchema(schema: ModuleConfigSchema): ModuleSettingsSchema;
87
+ /** ----------------- value typing ----------------- **/
88
+ type ScalarForType<T extends SettingType> = T extends 'checkbox' ? boolean : T extends 'number' ? number : T extends 'input' | 'textarea' | 'color' | 'resource' | 'dataQuery' ? string : T extends 'mediaSource' ? string : T extends 'select' | 'radio' ? string : T extends 'flow' ? any : T extends 'form' ? any : never;
89
+ type ArrayizeIfMultiple<S, TSetting> = TSetting extends {
90
+ multiple: true;
91
+ } ? S[] : S;
92
+ type ValueTypeFromSetting<TSetting extends ModuleSetting> = ArrayizeIfMultiple<ScalarForType<TSetting['type']>, TSetting>;
93
+ type Simplify<T> = {
94
+ [K in keyof T]: T[K];
95
+ };
96
+ type UnionToIntersection<U> = (U extends any ? (x: U) => void : never) extends (x: infer I) => void ? I : never;
97
+ type TopLevelValues<TSchema extends ModuleConfigSchema> = {
98
+ [K in keyof TSchema as TSchema[K] extends ModuleSetting ? K : never]: TSchema[K] extends ModuleSetting ? ValueTypeFromSetting<TSchema[K]> : never;
99
+ };
100
+ type GroupFieldValues<TSchema extends ModuleConfigSchema> = {
101
+ [K in keyof TSchema]: TSchema[K] extends SettingGroup<infer F> ? {
102
+ [FK in keyof F]: ValueTypeFromSetting<F[FK]>;
103
+ } : {};
104
+ }[keyof TSchema];
105
+ export type ResolveConfig<TSchema extends ModuleConfigSchema> = Simplify<TopLevelValues<TSchema> & UnionToIntersection<GroupFieldValues<TSchema>>>;
106
+ type ValidateSettingDefaults<TSchema extends ModuleSettingsSchema> = {
107
+ [K in keyof TSchema]: TSchema[K] extends {
108
+ default: infer D;
109
+ } ? (D extends ValueTypeFromSetting<TSchema[K]> ? TSchema[K] : never) : TSchema[K];
110
+ };
111
+ type ValidateDefaults<TSchema extends ModuleConfigSchema> = {
112
+ [K in keyof TSchema]: TSchema[K] extends SettingGroup ? TSchema[K] : TSchema[K] extends ModuleSetting ? TSchema[K] extends {
113
+ default: infer D;
114
+ } ? (D extends ValueTypeFromSetting<TSchema[K]> ? TSchema[K] : never) : TSchema[K] : TSchema[K];
115
+ };
116
+ export declare function defineModuleConfig<const S extends ModuleConfigSchema>(schema: S & ValidateDefaults<S>): S & ValidateDefaults<S>;
117
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './custom-modules';
2
+ export * from './integrations';
@@ -0,0 +1,21 @@
1
+ export interface FirestoreQueryParams {
2
+ filters?: FirestoreQueryParamFilter[];
3
+ sorts?: FirestoreQueryParamSort[];
4
+ limit?: number;
5
+ startAt?: string;
6
+ endAt?: string;
7
+ }
8
+ export interface FirestoreQueryParamFilter {
9
+ field: string;
10
+ operator: '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-contains' | 'in' | 'not-in' | 'array-contains-any';
11
+ value: any;
12
+ }
13
+ export interface FirestoreQueryParamSort {
14
+ field: string;
15
+ direction: 'asc' | 'desc';
16
+ }
17
+ export interface SendMailParams {
18
+ to: string;
19
+ subject: string;
20
+ body: string;
21
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneclick.dev/cms-kit",
3
- "version": "0.0.117",
3
+ "version": "0.0.119",
4
4
  "type": "module",
5
5
  "main": "./dist/cms-kit.cjs",
6
6
  "module": "./dist/cms-kit.js",
@@ -38,10 +38,10 @@
38
38
  "README.md"
39
39
  ],
40
40
  "peerDependencies": {
41
- "@vue-flow/core": "^1.47.0",
42
- "emoji-mart-vue-fast": "^15.0.5",
43
- "lucide-vue-next": "^0.554.0",
44
- "nuxt": "^3",
41
+ "@lucide/vue": "1.14.0",
42
+ "@vue-flow/core": "1.48.2",
43
+ "emoji-mart-vue-fast": "15.0.5",
44
+ "nuxt": "^4",
45
45
  "vue": "^3.3.0",
46
46
  "vue-sonner": "2.0.7"
47
47
  },
@@ -52,59 +52,60 @@
52
52
  "build:watch": "vite build --watch"
53
53
  },
54
54
  "devDependencies": {
55
- "@tailwindcss/cli": "^4.1.17",
56
- "@vitejs/plugin-vue": "^6.0.1",
57
- "@vue-flow/core": "^1.47.0",
58
- "vite": "^7.2.2",
59
- "vite-plugin-dts": "^4.5.4"
55
+ "@tailwindcss/cli": "4.3.0",
56
+ "@vitejs/plugin-vue": "6.0.6",
57
+ "@vue-flow/core": "1.48.2",
58
+ "@vue/language-core": "~3.1.8",
59
+ "vite": "8.0.12",
60
+ "vite-plugin-dts": "5.0.0"
60
61
  },
61
62
  "dependencies": {
62
- "@codemirror/autocomplete": "^6.19.1",
63
- "@codemirror/commands": "^6.10.0",
64
- "@codemirror/lang-javascript": "^6.2.4",
65
- "@codemirror/language": "^6.11.3",
66
- "@codemirror/state": "^6.5.2",
67
- "@codemirror/theme-one-dark": "^6.1.3",
68
- "@codemirror/view": "^6.38.8",
69
- "@dagrejs/dagre": "^1.1.8",
70
- "@dicebear/collection": "^9.2.4",
71
- "@dicebear/core": "^9.2.4",
72
- "@internationalized/date": "^3.8.2",
73
- "@tanstack/vue-table": "^8.21.3",
74
- "@tiptap/core": "3.20.0",
75
- "@tiptap/extension-bubble-menu": "3.20.0",
76
- "@tiptap/extension-highlight": "3.20.0",
77
- "@tiptap/extension-link": "3.20.0",
78
- "@tiptap/extension-placeholder": "3.20.0",
79
- "@tiptap/extension-subscript": "3.20.0",
80
- "@tiptap/extension-superscript": "3.20.0",
81
- "@tiptap/extension-text-align": "3.20.0",
82
- "@tiptap/extension-underline": "3.20.0",
83
- "@tiptap/pm": "3.20.0",
84
- "@tiptap/starter-kit": "3.20.0",
85
- "@tiptap/vue-3": "3.20.0",
86
- "@unovis/ts": "^1.5.2",
87
- "@unovis/vue": "^1.5.2",
88
- "@vue-flow/background": "^1.3.2",
89
- "@vue-flow/controls": "^1.1.3",
90
- "@vue-flow/minimap": "^1.5.4",
91
- "@vue-flow/node-toolbar": "^1.1.1",
92
- "@vueuse/core": "^14.0.0",
93
- "@zxing/browser": "^0.1.5",
94
- "class-variance-authority": "^0.7.1",
95
- "clsx": "^2.1.1",
96
- "graphlib": "^2.1.8",
97
- "gsap": "^3.13.0",
98
- "lz-string": "^1.5.0",
99
- "motion-v": "^1.7.4",
100
- "qrcode": "^1.5.4",
101
- "reka-ui": "^2.6.0",
102
- "tailwind-merge": "^3.4.0",
103
- "tailwindcss": "^4.1.17",
104
- "vaul-vue": "^0.4.1",
105
- "vee-validate": "^4.15.1",
106
- "vue-grid-layout-v3": "^3.1.2",
107
- "vue-input-otp": "^0.3.2",
108
- "world-countries": "^5.1.0"
63
+ "@codemirror/autocomplete": "6.20.2",
64
+ "@codemirror/commands": "6.10.3",
65
+ "@codemirror/lang-javascript": "6.2.5",
66
+ "@codemirror/language": "6.12.3",
67
+ "@codemirror/state": "6.6.0",
68
+ "@codemirror/theme-one-dark": "6.1.3",
69
+ "@codemirror/view": "6.42.1",
70
+ "@dagrejs/dagre": "3.0.0",
71
+ "@dicebear/collection": "9.4.2",
72
+ "@dicebear/core": "9.4.2",
73
+ "@internationalized/date": "3.12.1",
74
+ "@tanstack/vue-table": "8.21.3",
75
+ "@tiptap/core": "3.23.4",
76
+ "@tiptap/extension-bubble-menu": "3.23.4",
77
+ "@tiptap/extension-highlight": "3.23.4",
78
+ "@tiptap/extension-link": "3.23.4",
79
+ "@tiptap/extension-placeholder": "3.23.4",
80
+ "@tiptap/extension-subscript": "3.23.4",
81
+ "@tiptap/extension-superscript": "3.23.4",
82
+ "@tiptap/extension-text-align": "3.23.4",
83
+ "@tiptap/extension-underline": "3.23.4",
84
+ "@tiptap/pm": "3.23.4",
85
+ "@tiptap/starter-kit": "3.23.4",
86
+ "@tiptap/vue-3": "3.23.4",
87
+ "@unovis/ts": "1.6.5",
88
+ "@unovis/vue": "1.6.5",
89
+ "@vue-flow/background": "1.3.2",
90
+ "@vue-flow/controls": "1.1.3",
91
+ "@vue-flow/minimap": "1.5.4",
92
+ "@vue-flow/node-toolbar": "1.1.1",
93
+ "@vueuse/core": "14.3.0",
94
+ "@zxing/browser": "0.2.0",
95
+ "class-variance-authority": "0.7.1",
96
+ "clsx": "2.1.1",
97
+ "graphlib": "2.1.8",
98
+ "gsap": "3.15.0",
99
+ "lz-string": "1.5.0",
100
+ "ofetch": "1.5.1",
101
+ "qrcode": "1.5.4",
102
+ "reka-ui": "2.9.7",
103
+ "tailwind-merge": "3.6.0",
104
+ "tailwindcss": "4.3.0",
105
+ "vaul-vue": "0.4.1",
106
+ "vee-validate": "4.15.1",
107
+ "vue-grid-layout-v3": "3.1.2",
108
+ "vue-input-otp": "0.3.2",
109
+ "world-countries": "5.1.0"
109
110
  }
110
111
  }