@rizom/brain 0.2.0-alpha.78 → 0.2.0-alpha.79
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/brain.js +1110 -856
- package/dist/deploy.js +4 -4
- package/dist/deploy.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +2 -2
- package/dist/interfaces.js +35 -35
- package/dist/interfaces.js.map +3 -3
- package/dist/plugins.d.ts +8 -2
- package/dist/plugins.js +17 -17
- package/dist/plugins.js.map +7 -7
- package/dist/site.js +803 -188
- package/dist/site.js.map +183 -16
- package/dist/templates.d.ts +19 -4
- package/dist/templates.js +52 -52
- package/dist/templates.js.map +3 -3
- package/package.json +2 -1
package/dist/templates.d.ts
CHANGED
|
@@ -163,6 +163,11 @@ type TemplateInput = z.infer<typeof TemplateSchema>;
|
|
|
163
163
|
*/
|
|
164
164
|
declare const SiteContentEntityTypeSchema: z.ZodEnum<["site-content-preview", "site-content-production"]>;
|
|
165
165
|
type SiteContentEntityType = z.infer<typeof SiteContentEntityTypeSchema>;
|
|
166
|
+
/**
|
|
167
|
+
* Renderer output formats supported by view templates.
|
|
168
|
+
*/
|
|
169
|
+
declare const OutputFormatSchema: z.ZodEnum<["web", "image", "pdf"]>;
|
|
170
|
+
type OutputFormat = z.infer<typeof OutputFormatSchema>;
|
|
166
171
|
/**
|
|
167
172
|
* View template schema
|
|
168
173
|
*/
|
|
@@ -173,16 +178,24 @@ declare const ViewTemplateSchema: z.ZodObject<{
|
|
|
173
178
|
pluginId: z.ZodString;
|
|
174
179
|
renderers: z.ZodObject<{
|
|
175
180
|
web: z.ZodOptional<z.ZodUnion<[z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>, z.ZodString]>>;
|
|
181
|
+
image: z.ZodOptional<z.ZodUnion<[z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>, z.ZodString]>>;
|
|
182
|
+
pdf: z.ZodOptional<z.ZodUnion<[z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>, z.ZodString]>>;
|
|
176
183
|
}, "strip", z.ZodTypeAny, {
|
|
177
184
|
web?: string | ((...args: unknown[]) => unknown) | undefined;
|
|
185
|
+
image?: string | ((...args: unknown[]) => unknown) | undefined;
|
|
186
|
+
pdf?: string | ((...args: unknown[]) => unknown) | undefined;
|
|
178
187
|
}, {
|
|
179
188
|
web?: string | ((...args: unknown[]) => unknown) | undefined;
|
|
189
|
+
image?: string | ((...args: unknown[]) => unknown) | undefined;
|
|
190
|
+
pdf?: string | ((...args: unknown[]) => unknown) | undefined;
|
|
180
191
|
}>;
|
|
181
192
|
}, "strip", z.ZodTypeAny, {
|
|
182
193
|
name: string;
|
|
183
194
|
pluginId: string;
|
|
184
195
|
renderers: {
|
|
185
196
|
web?: string | ((...args: unknown[]) => unknown) | undefined;
|
|
197
|
+
image?: string | ((...args: unknown[]) => unknown) | undefined;
|
|
198
|
+
pdf?: string | ((...args: unknown[]) => unknown) | undefined;
|
|
186
199
|
};
|
|
187
200
|
description?: string | undefined;
|
|
188
201
|
schema?: any;
|
|
@@ -191,6 +204,8 @@ declare const ViewTemplateSchema: z.ZodObject<{
|
|
|
191
204
|
pluginId: string;
|
|
192
205
|
renderers: {
|
|
193
206
|
web?: string | ((...args: unknown[]) => unknown) | undefined;
|
|
207
|
+
image?: string | ((...args: unknown[]) => unknown) | undefined;
|
|
208
|
+
pdf?: string | ((...args: unknown[]) => unknown) | undefined;
|
|
194
209
|
};
|
|
195
210
|
description?: string | undefined;
|
|
196
211
|
schema?: any;
|
|
@@ -199,10 +214,8 @@ declare const ViewTemplateSchema: z.ZodObject<{
|
|
|
199
214
|
* Renderer types for different output formats
|
|
200
215
|
*/
|
|
201
216
|
type WebRenderer<T = unknown> = ComponentType<T> | string;
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
*/
|
|
205
|
-
type OutputFormat = "web";
|
|
217
|
+
type ImageRenderer<T = unknown> = ComponentType<T> | string;
|
|
218
|
+
type PdfRenderer<T = unknown> = ComponentType<T> | string;
|
|
206
219
|
/**
|
|
207
220
|
* View template with support for multiple output formats
|
|
208
221
|
*/
|
|
@@ -213,6 +226,8 @@ interface ViewTemplate<T = unknown> {
|
|
|
213
226
|
pluginId: string;
|
|
214
227
|
renderers: {
|
|
215
228
|
web?: WebRenderer<T>;
|
|
229
|
+
image?: ImageRenderer<T>;
|
|
230
|
+
pdf?: PdfRenderer<T>;
|
|
216
231
|
};
|
|
217
232
|
fullscreen?: boolean;
|
|
218
233
|
providerId?: string;
|