@vibecms/core 0.1.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/engine/index.d.mts +4 -0
- package/dist/engine/index.d.ts +4 -0
- package/dist/engine/index.js +1226 -0
- package/dist/engine/index.js.map +1 -0
- package/dist/engine/index.mjs +1184 -0
- package/dist/engine/index.mjs.map +1 -0
- package/dist/hooks/index.d.mts +27 -0
- package/dist/hooks/index.d.ts +27 -0
- package/dist/hooks/index.js +75 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/index.mjs +47 -0
- package/dist/hooks/index.mjs.map +1 -0
- package/dist/index-C3P1J_of.d.ts +339 -0
- package/dist/index-CO4uwTdH.d.mts +339 -0
- package/dist/index.css +2326 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +412 -0
- package/dist/index.d.ts +412 -0
- package/dist/index.js +3715 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +3587 -0
- package/dist/index.mjs.map +1 -0
- package/dist/storage/index.d.mts +32 -0
- package/dist/storage/index.d.ts +32 -0
- package/dist/storage/index.js +103 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/index.mjs +75 -0
- package/dist/storage/index.mjs.map +1 -0
- package/dist/types-BkDsDmQJ.d.mts +83 -0
- package/dist/types-BkDsDmQJ.d.ts +83 -0
- package/dist/ui/index.d.mts +127 -0
- package/dist/ui/index.d.ts +127 -0
- package/dist/ui/index.js +1119 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/index.mjs +1030 -0
- package/dist/ui/index.mjs.map +1 -0
- package/dist/vite-plugin.d.mts +8 -0
- package/dist/vite-plugin.d.ts +8 -0
- package/dist/vite-plugin.js +193 -0
- package/dist/vite-plugin.js.map +1 -0
- package/dist/vite-plugin.mjs +165 -0
- package/dist/vite-plugin.mjs.map +1 -0
- package/package.json +89 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
export { AuthorCard, Button, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, ScrollArea, ScrollBar, SeoData, SeoHead, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Switch, TeamMemberData, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buttonVariants } from './ui/index.js';
|
|
2
|
+
export { A as AuthProvider, B as BrowserEngine, D as DevEngine, N as NodeEngine, V as VibeAccessRule, a as VibeBlockRegistration, b as VibeCollection, c as VibeConfig, d as VibeEngine, e as VibeEvent, f as VibeEventType, g as VibeRole, h as VibeUser, W as WebhookConfig, i as assertValidCollection, j as assertValidCommitOid, k as assertValidSlug, l as canEditCollection, m as defineConfig, n as getCollectionSchema, o as getCustomBlockComponent, p as initVibeEngine, q as populate, r as registerCollectionSchemas, s as registerCustomBlocks, t as resolveUserRole, u as sanitizeRedirectPath, v as validateCollection, w as validateCollectionData, x as validateCommitOid, y as validateSlug, z as vibeEvents } from './index-C3P1J_of.js';
|
|
3
|
+
export { useVibeContent, useVibeDocument } from './hooks/index.js';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { C as CommitAuthor } from './types-BkDsDmQJ.js';
|
|
6
|
+
export { H as HistoryEntry, b as ListItemMeta, L as ListOptions, M as MediaResult, R as ReadOptions, c as StorageContext, S as StorageDriver, a as SyncEngine, V as VibeEngineConfig, W as WriteOptions } from './types-BkDsDmQJ.js';
|
|
7
|
+
export { GitStorageDriver, VercelBlobDriver, VercelBlobDriverConfig } from './storage/index.js';
|
|
8
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
|
+
import React__default from 'react';
|
|
10
|
+
import '@base-ui/react';
|
|
11
|
+
import 'class-variance-authority/types';
|
|
12
|
+
import 'class-variance-authority';
|
|
13
|
+
import 'cmdk';
|
|
14
|
+
import '@base-ui/react/dialog';
|
|
15
|
+
import '@base-ui/react/popover';
|
|
16
|
+
import '@base-ui/react/tooltip';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Standard SEO fields that can be merged into any page or post schema.
|
|
20
|
+
*/
|
|
21
|
+
declare const seoSchema: z.ZodObject<{
|
|
22
|
+
seoTitle: z.ZodOptional<z.ZodString>;
|
|
23
|
+
seoDescription: z.ZodOptional<z.ZodString>;
|
|
24
|
+
ogImage: z.ZodOptional<z.ZodString>;
|
|
25
|
+
keywords: z.ZodOptional<z.ZodString>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
/**
|
|
28
|
+
* Standard publishing fields for tracking draft/published state and dates.
|
|
29
|
+
* `scheduledPublishAt` enables scheduled publishing — content will auto-publish
|
|
30
|
+
* when the current time passes this ISO 8601 datetime.
|
|
31
|
+
*/
|
|
32
|
+
declare const publishingSchema: z.ZodObject<{
|
|
33
|
+
isPublished: z.ZodDefault<z.ZodBoolean>;
|
|
34
|
+
publishDate: z.ZodOptional<z.ZodString>;
|
|
35
|
+
scheduledPublishAt: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
/**
|
|
38
|
+
* Standard media gallery schema block.
|
|
39
|
+
*/
|
|
40
|
+
declare const mediaGallerySchema: z.ZodObject<{
|
|
41
|
+
images: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
42
|
+
url: z.ZodString;
|
|
43
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
44
|
+
caption: z.ZodOptional<z.ZodString>;
|
|
45
|
+
}, z.core.$strip>>>;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
|
|
48
|
+
declare const heroBlockSchema: z.ZodObject<{
|
|
49
|
+
_type: z.ZodLiteral<"hero">;
|
|
50
|
+
title: z.ZodString;
|
|
51
|
+
subtitle: z.ZodString;
|
|
52
|
+
cta: z.ZodString;
|
|
53
|
+
backgroundColor: z.ZodDefault<z.ZodString>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
declare const featuresBlockSchema: z.ZodObject<{
|
|
56
|
+
_type: z.ZodLiteral<"features">;
|
|
57
|
+
items: z.ZodArray<z.ZodObject<{
|
|
58
|
+
icon: z.ZodDefault<z.ZodString>;
|
|
59
|
+
title: z.ZodString;
|
|
60
|
+
description: z.ZodString;
|
|
61
|
+
}, z.core.$strip>>;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
declare const logoCloudBlockSchema: z.ZodObject<{
|
|
64
|
+
_type: z.ZodLiteral<"logo-cloud">;
|
|
65
|
+
title: z.ZodOptional<z.ZodString>;
|
|
66
|
+
logos: z.ZodArray<z.ZodObject<{
|
|
67
|
+
image: z.ZodString;
|
|
68
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
69
|
+
link: z.ZodOptional<z.ZodString>;
|
|
70
|
+
}, z.core.$strip>>;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
declare const faqBlockSchema: z.ZodObject<{
|
|
73
|
+
_type: z.ZodLiteral<"faq">;
|
|
74
|
+
title: z.ZodDefault<z.ZodString>;
|
|
75
|
+
items: z.ZodArray<z.ZodObject<{
|
|
76
|
+
question: z.ZodString;
|
|
77
|
+
answer: z.ZodString;
|
|
78
|
+
}, z.core.$strip>>;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
declare const testimonialsBlockSchema: z.ZodObject<{
|
|
81
|
+
_type: z.ZodLiteral<"testimonials">;
|
|
82
|
+
title: z.ZodOptional<z.ZodString>;
|
|
83
|
+
items: z.ZodArray<z.ZodObject<{
|
|
84
|
+
quote: z.ZodString;
|
|
85
|
+
author: z.ZodString;
|
|
86
|
+
role: z.ZodOptional<z.ZodString>;
|
|
87
|
+
image: z.ZodOptional<z.ZodString>;
|
|
88
|
+
rating: z.ZodDefault<z.ZodNumber>;
|
|
89
|
+
}, z.core.$strip>>;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
declare const pricingBlockSchema: z.ZodObject<{
|
|
92
|
+
_type: z.ZodLiteral<"pricing">;
|
|
93
|
+
title: z.ZodDefault<z.ZodString>;
|
|
94
|
+
subtitle: z.ZodOptional<z.ZodString>;
|
|
95
|
+
plans: z.ZodArray<z.ZodObject<{
|
|
96
|
+
name: z.ZodString;
|
|
97
|
+
priceMonthly: z.ZodString;
|
|
98
|
+
priceYearly: z.ZodString;
|
|
99
|
+
highlighted: z.ZodDefault<z.ZodBoolean>;
|
|
100
|
+
features: z.ZodArray<z.ZodObject<{
|
|
101
|
+
feature: z.ZodString;
|
|
102
|
+
included: z.ZodDefault<z.ZodBoolean>;
|
|
103
|
+
}, z.core.$strip>>;
|
|
104
|
+
ctaText: z.ZodString;
|
|
105
|
+
ctaUrl: z.ZodString;
|
|
106
|
+
}, z.core.$strip>>;
|
|
107
|
+
}, z.core.$strip>;
|
|
108
|
+
declare const videoBlockSchema: z.ZodObject<{
|
|
109
|
+
_type: z.ZodLiteral<"video">;
|
|
110
|
+
url: z.ZodString;
|
|
111
|
+
caption: z.ZodOptional<z.ZodString>;
|
|
112
|
+
autoplay: z.ZodDefault<z.ZodBoolean>;
|
|
113
|
+
}, z.core.$strip>;
|
|
114
|
+
declare const formFieldSchema: z.ZodObject<{
|
|
115
|
+
_fieldType: z.ZodEnum<{
|
|
116
|
+
number: "number";
|
|
117
|
+
select: "select";
|
|
118
|
+
textarea: "textarea";
|
|
119
|
+
text: "text";
|
|
120
|
+
checkbox: "checkbox";
|
|
121
|
+
radio: "radio";
|
|
122
|
+
tel: "tel";
|
|
123
|
+
email: "email";
|
|
124
|
+
date: "date";
|
|
125
|
+
file: "file";
|
|
126
|
+
}>;
|
|
127
|
+
label: z.ZodString;
|
|
128
|
+
name: z.ZodString;
|
|
129
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
130
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
131
|
+
options: z.ZodOptional<z.ZodString>;
|
|
132
|
+
helpText: z.ZodOptional<z.ZodString>;
|
|
133
|
+
width: z.ZodDefault<z.ZodEnum<{
|
|
134
|
+
full: "full";
|
|
135
|
+
half: "half";
|
|
136
|
+
}>>;
|
|
137
|
+
}, z.core.$strip>;
|
|
138
|
+
declare const formBlockSchema: z.ZodObject<{
|
|
139
|
+
_type: z.ZodLiteral<"form">;
|
|
140
|
+
title: z.ZodOptional<z.ZodString>;
|
|
141
|
+
description: z.ZodOptional<z.ZodString>;
|
|
142
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
143
|
+
_fieldType: z.ZodEnum<{
|
|
144
|
+
number: "number";
|
|
145
|
+
select: "select";
|
|
146
|
+
textarea: "textarea";
|
|
147
|
+
text: "text";
|
|
148
|
+
checkbox: "checkbox";
|
|
149
|
+
radio: "radio";
|
|
150
|
+
tel: "tel";
|
|
151
|
+
email: "email";
|
|
152
|
+
date: "date";
|
|
153
|
+
file: "file";
|
|
154
|
+
}>;
|
|
155
|
+
label: z.ZodString;
|
|
156
|
+
name: z.ZodString;
|
|
157
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
158
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
159
|
+
options: z.ZodOptional<z.ZodString>;
|
|
160
|
+
helpText: z.ZodOptional<z.ZodString>;
|
|
161
|
+
width: z.ZodDefault<z.ZodEnum<{
|
|
162
|
+
full: "full";
|
|
163
|
+
half: "half";
|
|
164
|
+
}>>;
|
|
165
|
+
}, z.core.$strip>>;
|
|
166
|
+
submitLabel: z.ZodDefault<z.ZodString>;
|
|
167
|
+
successMessage: z.ZodDefault<z.ZodString>;
|
|
168
|
+
action: z.ZodDefault<z.ZodEnum<{
|
|
169
|
+
email: "email";
|
|
170
|
+
webhook: "webhook";
|
|
171
|
+
}>>;
|
|
172
|
+
target: z.ZodOptional<z.ZodString>;
|
|
173
|
+
privacyConsentText: z.ZodDefault<z.ZodString>;
|
|
174
|
+
privacyConsentRequired: z.ZodDefault<z.ZodBoolean>;
|
|
175
|
+
}, z.core.$strip>;
|
|
176
|
+
declare const ctaBannerBlockSchema: z.ZodObject<{
|
|
177
|
+
_type: z.ZodLiteral<"cta">;
|
|
178
|
+
title: z.ZodString;
|
|
179
|
+
subtitle: z.ZodString;
|
|
180
|
+
buttonText: z.ZodString;
|
|
181
|
+
buttonUrl: z.ZodString;
|
|
182
|
+
backgroundColor: z.ZodDefault<z.ZodString>;
|
|
183
|
+
textColor: z.ZodDefault<z.ZodString>;
|
|
184
|
+
}, z.core.$strip>;
|
|
185
|
+
declare const blockSchema: z.ZodType<any>;
|
|
186
|
+
declare const tabsBlockSchema: z.ZodObject<{
|
|
187
|
+
_type: z.ZodLiteral<"tabs">;
|
|
188
|
+
tabs: z.ZodArray<z.ZodObject<{
|
|
189
|
+
title: z.ZodString;
|
|
190
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
191
|
+
blocks: z.ZodDefault<z.ZodLazy<z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
192
|
+
}, z.core.$strip>>;
|
|
193
|
+
}, z.core.$strip>;
|
|
194
|
+
declare const gridBlockSchema: z.ZodObject<{
|
|
195
|
+
_type: z.ZodLiteral<"grid">;
|
|
196
|
+
columns: z.ZodDefault<z.ZodEnum<{
|
|
197
|
+
1: "1";
|
|
198
|
+
2: "2";
|
|
199
|
+
3: "3";
|
|
200
|
+
4: "4";
|
|
201
|
+
}>>;
|
|
202
|
+
blocks: z.ZodDefault<z.ZodLazy<z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
203
|
+
}, z.core.$strip>;
|
|
204
|
+
|
|
205
|
+
type VibeUIType = 'text' | 'rich-text' | 'gallery' | 'image' | 'boolean' | 'number' | 'object' | 'array' | 'color-picker' | 'icon-picker' | 'reference' | 'reference-array';
|
|
206
|
+
interface VibeFieldOptions {
|
|
207
|
+
collection?: string;
|
|
208
|
+
}
|
|
209
|
+
declare function vibeField<T extends z.ZodTypeAny>(schema: T, uiType: VibeUIType, options?: VibeFieldOptions): T;
|
|
210
|
+
declare function vibeConditional<T extends z.ZodTypeAny>(schema: T, dependsOnField: string, expectedValue: string | boolean | number): T;
|
|
211
|
+
declare function getVibeUIType(schema: z.ZodTypeAny): VibeUIType | undefined;
|
|
212
|
+
declare function getReferenceCollection(schema: z.ZodTypeAny): string | undefined;
|
|
213
|
+
declare function getConditionalLogic(schema: z.ZodTypeAny): {
|
|
214
|
+
field: string;
|
|
215
|
+
value: string;
|
|
216
|
+
} | undefined;
|
|
217
|
+
|
|
218
|
+
interface SchedulerEngine {
|
|
219
|
+
read: (c: string, s: string) => Promise<any>;
|
|
220
|
+
write: (c: string, s: string, d: any) => Promise<void>;
|
|
221
|
+
list: (c: string) => Promise<any[]>;
|
|
222
|
+
commit?: (message: string, author?: CommitAuthor) => Promise<void>;
|
|
223
|
+
push?: (token: string) => Promise<void>;
|
|
224
|
+
}
|
|
225
|
+
interface SchedulerOptions {
|
|
226
|
+
/** If true, auto-commit changes after publishing. Default: true */
|
|
227
|
+
autoCommit?: boolean;
|
|
228
|
+
/** If provided along with autoCommit, also push to remote after commit */
|
|
229
|
+
pushToken?: string;
|
|
230
|
+
/** Author for the auto-commit */
|
|
231
|
+
author?: CommitAuthor;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Process scheduled publications across all collections.
|
|
235
|
+
* Call this from a cron job, API route, or serverless function.
|
|
236
|
+
*
|
|
237
|
+
* Returns the list of documents that were published.
|
|
238
|
+
*/
|
|
239
|
+
declare function processScheduledPublications(engine: SchedulerEngine, collections: string[], options?: SchedulerOptions): Promise<{
|
|
240
|
+
collection: string;
|
|
241
|
+
slug: string;
|
|
242
|
+
}[]>;
|
|
243
|
+
|
|
244
|
+
interface VibeTextProps {
|
|
245
|
+
/** Initial content value (from server-side VibeEngine.read()) */
|
|
246
|
+
value: string;
|
|
247
|
+
/** The field path for editor integration (e.g. "blocks.0.title" or "tagline") */
|
|
248
|
+
fieldPath: string;
|
|
249
|
+
/** Collection name for live-update matching */
|
|
250
|
+
collection?: string;
|
|
251
|
+
/** Document slug for live-update matching */
|
|
252
|
+
slug?: string;
|
|
253
|
+
/** HTML tag to render. Default: 'span' */
|
|
254
|
+
as?: keyof React__default.JSX.IntrinsicElements;
|
|
255
|
+
/** Additional className */
|
|
256
|
+
className?: string;
|
|
257
|
+
/** Additional props passed to the rendered element */
|
|
258
|
+
[key: string]: any;
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Inline-editable text primitive. Place this anywhere in your existing layout
|
|
262
|
+
* to make a single text field CMS-editable.
|
|
263
|
+
*
|
|
264
|
+
* Usage:
|
|
265
|
+
* <VibeText value={settings.tagline} fieldPath="tagline" collection="settings" slug="site" />
|
|
266
|
+
*
|
|
267
|
+
* In production: renders as a plain element with no overhead.
|
|
268
|
+
* In editor mode: highlights on hover, clicks focus the field in the editor sidebar.
|
|
269
|
+
*/
|
|
270
|
+
declare function VibeText({ value, fieldPath, collection, slug, as: Tag, className, ...rest }: VibeTextProps): react_jsx_runtime.JSX.Element;
|
|
271
|
+
|
|
272
|
+
interface VibeImageProps {
|
|
273
|
+
/** Image URL (from server-side VibeEngine.read()) */
|
|
274
|
+
src: string;
|
|
275
|
+
/** Alt text */
|
|
276
|
+
alt?: string;
|
|
277
|
+
/** The field path for editor integration (e.g. "coverImage" or "blocks.0.image") */
|
|
278
|
+
fieldPath: string;
|
|
279
|
+
/** Collection name for live-update matching */
|
|
280
|
+
collection?: string;
|
|
281
|
+
/** Document slug for live-update matching */
|
|
282
|
+
slug?: string;
|
|
283
|
+
/** Additional className */
|
|
284
|
+
className?: string;
|
|
285
|
+
/** Width */
|
|
286
|
+
width?: number | string;
|
|
287
|
+
/** Height */
|
|
288
|
+
height?: number | string;
|
|
289
|
+
/** Additional props passed to the img element */
|
|
290
|
+
[key: string]: any;
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Inline-editable image primitive. Place this anywhere in your existing layout
|
|
294
|
+
* to make a single image field CMS-editable.
|
|
295
|
+
*
|
|
296
|
+
* Usage:
|
|
297
|
+
* <VibeImage src={page.heroImage} fieldPath="heroImage" collection="pages" slug="about" />
|
|
298
|
+
*
|
|
299
|
+
* In production: renders as a plain <img> with no overhead.
|
|
300
|
+
* In editor mode: highlights on hover, clicks focus the field in the editor sidebar.
|
|
301
|
+
*/
|
|
302
|
+
declare function VibeImage({ src, alt, fieldPath, collection, slug, className, width, height, ...rest }: VibeImageProps): react_jsx_runtime.JSX.Element | null;
|
|
303
|
+
|
|
304
|
+
interface VibeRichTextProps {
|
|
305
|
+
/** HTML content (from server-side VibeEngine.read()) */
|
|
306
|
+
html: string;
|
|
307
|
+
/** The field path for editor integration */
|
|
308
|
+
fieldPath: string;
|
|
309
|
+
/** Collection name for live-update matching */
|
|
310
|
+
collection?: string;
|
|
311
|
+
/** Document slug for live-update matching */
|
|
312
|
+
slug?: string;
|
|
313
|
+
/** HTML tag to render. Default: 'div' */
|
|
314
|
+
as?: keyof React__default.JSX.IntrinsicElements;
|
|
315
|
+
/** Additional className */
|
|
316
|
+
className?: string;
|
|
317
|
+
/** Additional props passed to the rendered element */
|
|
318
|
+
[key: string]: any;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Inline-editable rich text primitive. Renders sanitized HTML content
|
|
322
|
+
* that can be edited via the CMS sidebar.
|
|
323
|
+
*
|
|
324
|
+
* Usage:
|
|
325
|
+
* <VibeRichText html={page.description} fieldPath="description" collection="pages" slug="about" />
|
|
326
|
+
*
|
|
327
|
+
* In production: renders as a plain div with dangerouslySetInnerHTML.
|
|
328
|
+
* In editor mode: highlights on hover, clicks focus the field in the editor sidebar.
|
|
329
|
+
*/
|
|
330
|
+
declare function VibeRichText({ html, fieldPath, collection, slug, as: Tag, className, ...rest }: VibeRichTextProps): react_jsx_runtime.JSX.Element;
|
|
331
|
+
|
|
332
|
+
interface VibeOverlayConfig {
|
|
333
|
+
auth?: {
|
|
334
|
+
getSession(): Promise<{
|
|
335
|
+
user: any;
|
|
336
|
+
accessToken?: string;
|
|
337
|
+
} | null>;
|
|
338
|
+
signIn?(): void;
|
|
339
|
+
};
|
|
340
|
+
collections?: Record<string, {
|
|
341
|
+
name: string;
|
|
342
|
+
schema: any;
|
|
343
|
+
}>;
|
|
344
|
+
singletons?: Record<string, {
|
|
345
|
+
name: string;
|
|
346
|
+
schema: any;
|
|
347
|
+
}>;
|
|
348
|
+
blocks?: Array<{
|
|
349
|
+
type: string;
|
|
350
|
+
component: any;
|
|
351
|
+
}>;
|
|
352
|
+
contentDir?: string;
|
|
353
|
+
publicDir?: string;
|
|
354
|
+
media?: {
|
|
355
|
+
driver: any;
|
|
356
|
+
};
|
|
357
|
+
access?: Array<{
|
|
358
|
+
email: string;
|
|
359
|
+
role: string;
|
|
360
|
+
}>;
|
|
361
|
+
webhooks?: Array<{
|
|
362
|
+
url: string;
|
|
363
|
+
events: string[];
|
|
364
|
+
secret?: string;
|
|
365
|
+
}>;
|
|
366
|
+
}
|
|
367
|
+
interface VibeOverlayProps {
|
|
368
|
+
/** Your vibe.config.ts export */
|
|
369
|
+
config: VibeOverlayConfig;
|
|
370
|
+
/** Position of the docked panel (desktop/tablet). Default: 'right' */
|
|
371
|
+
position?: 'left' | 'right';
|
|
372
|
+
/** Initial panel width in px. Default: 420 */
|
|
373
|
+
panelWidth?: number;
|
|
374
|
+
/** Custom content to render inside the editor panel (e.g. your own <Editor /> component) */
|
|
375
|
+
children?: React__default.ReactNode;
|
|
376
|
+
}
|
|
377
|
+
interface VibeOverlayContextValue {
|
|
378
|
+
isActive: boolean;
|
|
379
|
+
toggle: () => void;
|
|
380
|
+
focusedField: string | null;
|
|
381
|
+
isMobile: boolean;
|
|
382
|
+
}
|
|
383
|
+
declare const useVibeOverlay: () => VibeOverlayContextValue;
|
|
384
|
+
declare function VibeOverlay({ config, position, panelWidth: initialWidth, children, }: VibeOverlayProps): react_jsx_runtime.JSX.Element | null;
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* VibeCMS License Key Validation
|
|
388
|
+
*
|
|
389
|
+
* Key format: vibe_<base64url-payload>.<base64url-ed25519-signature>
|
|
390
|
+
*
|
|
391
|
+
* Payload: { sub, plan, iat, exp, kid }
|
|
392
|
+
* Signature: Ed25519 over raw payload bytes
|
|
393
|
+
*
|
|
394
|
+
* Validation is two-tier:
|
|
395
|
+
* 1. Local fast-path: Ed25519 signature + expiry check (synchronous)
|
|
396
|
+
* 2. Remote async check: revocation + usage logging (non-blocking)
|
|
397
|
+
*/
|
|
398
|
+
type VibePlan = 'starter' | 'pro' | 'team' | 'enterprise';
|
|
399
|
+
interface LicensePayload {
|
|
400
|
+
/** Customer identifier (email or ID) */
|
|
401
|
+
sub: string;
|
|
402
|
+
/** License plan tier */
|
|
403
|
+
plan: VibePlan;
|
|
404
|
+
/** Issued-at timestamp (seconds since epoch) */
|
|
405
|
+
iat: number;
|
|
406
|
+
/** Expiration timestamp (seconds since epoch) */
|
|
407
|
+
exp: number;
|
|
408
|
+
/** Key ID for individual revocation */
|
|
409
|
+
kid: string;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
export { CommitAuthor, type LicensePayload, type VibeFieldOptions, VibeImage, VibeOverlay, type VibePlan, VibeRichText, VibeText, type VibeUIType, blockSchema, ctaBannerBlockSchema, faqBlockSchema, featuresBlockSchema, formBlockSchema, formFieldSchema, getConditionalLogic, getReferenceCollection, getVibeUIType, gridBlockSchema, heroBlockSchema, logoCloudBlockSchema, mediaGallerySchema, pricingBlockSchema, processScheduledPublications, publishingSchema, seoSchema, tabsBlockSchema, testimonialsBlockSchema, useVibeOverlay, vibeConditional, vibeField, videoBlockSchema };
|