studiocms
Version:
Astro Native CMS for AstroDB. Built from the ground up by the Astro community.
1,215 lines • 387 kB
TypeScript
import type { AstroIntegrationLogger } from 'astro';
import { z } from 'astro/zod';
import { type GridItemInput } from './shared.js';
/**
* A Zod schema that allows validation against one of the following augment schemas:
* - `ComponentRenderAugmentSchema`
* - `PrefixRenderAugmentSchema`
* - `SuffixRenderAugmentSchema`
*
* This union schema is used to validate render augmentations for plugins,
* ensuring that the input matches one of the supported augment schema types.
*/
export declare const RenderAugmentSchema: z.ZodUnion<[z.ZodObject<{
type: z.ZodLiteral<"component">;
id: z.ZodString;
components: z.ZodRecord<z.ZodString, z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "component";
components: Record<string, string>;
id: string;
}, {
type: "component";
components: Record<string, string>;
id: string;
}>, z.ZodObject<{
id: z.ZodString;
components: z.ZodRecord<z.ZodString, z.ZodString>;
} & {
type: z.ZodLiteral<"prefix">;
html: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "prefix";
components: Record<string, string>;
id: string;
html: string;
}, {
type: "prefix";
components: Record<string, string>;
id: string;
html: string;
}>, z.ZodObject<{
id: z.ZodString;
components: z.ZodRecord<z.ZodString, z.ZodString>;
} & {
type: z.ZodLiteral<"suffix">;
html: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "suffix";
components: Record<string, string>;
id: string;
html: string;
}, {
type: "suffix";
components: Record<string, string>;
id: string;
html: string;
}>]>;
/**
* An optional array schema for render augments.
*
* This schema validates an array of `RenderAugmentSchema` objects, or `undefined` if not provided.
* Useful for specifying additional rendering augmentations in a flexible manner.
*/
export declare const RenderAugmentsSchema: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
type: z.ZodLiteral<"component">;
id: z.ZodString;
components: z.ZodRecord<z.ZodString, z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "component";
components: Record<string, string>;
id: string;
}, {
type: "component";
components: Record<string, string>;
id: string;
}>, z.ZodObject<{
id: z.ZodString;
components: z.ZodRecord<z.ZodString, z.ZodString>;
} & {
type: z.ZodLiteral<"prefix">;
html: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "prefix";
components: Record<string, string>;
id: string;
html: string;
}, {
type: "prefix";
components: Record<string, string>;
id: string;
html: string;
}>, z.ZodObject<{
id: z.ZodString;
components: z.ZodRecord<z.ZodString, z.ZodString>;
} & {
type: z.ZodLiteral<"suffix">;
html: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "suffix";
components: Record<string, string>;
id: string;
html: string;
}, {
type: "suffix";
components: Record<string, string>;
id: string;
html: string;
}>]>, "many">>;
/**
* Schema for options used to sanitize HTML content in StudioCMS.
*
* @remarks
* This schema defines the configuration for controlling which elements and attributes
* are allowed, blocked, or dropped during the sanitization process. It also provides
* options for handling components, custom elements, and comments.
*
* @property allowElements - An array of strings specifying elements that should not be removed. All other elements will be dropped.
* @property blockElements - An array of strings specifying elements that should be removed, but their children will be kept.
* @property dropElements - An array of strings specifying elements (including nested elements) that should be removed entirely.
* @property allowAttributes - An object mapping attribute names to arrays of allowed tag names. Only matching attributes will be retained.
* @property dropAttributes - An object mapping attribute names to arrays of tag names for which the attribute should be dropped.
* @property allowComponents - If true, components will be checked against built-in and custom configuration to determine retention. Default is false.
* @property allowCustomElements - If true, custom elements will be checked against built-in and custom configuration to determine retention. Default is false.
* @property allowComments - If true, HTML comments will be retained. Default is false.
*/
export declare const StudioCMSSanitizeOptionsSchema: z.ZodOptional<z.ZodObject<{
/** An Array of strings indicating elements that the sanitizer should not remove. All elements not in the array will be dropped. */
allowElements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
/** An Array of strings indicating elements that the sanitizer should remove. Children will be kept. */
blockElements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
/** An Array of strings indicating elements (including nested elements) that the sanitizer should remove. */
dropElements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
/** An object where each key is the attribute name and the value is an array of allowed tag names. Matching attributes will not be removed. All attributes that are not in the array will be dropped. */
allowAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
/** An object where each key is the attribute name and the value is an array of dropped tag names. Matching attributes will be removed. */
dropAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
/** A boolean value to remove components and their children. If set to true, components will be subject to built-in and custom configuration checks (and will be retained or dropped based on those checks). Default is `false`. */
allowComponents: z.ZodOptional<z.ZodBoolean>;
/** A boolean value to remove custom elements and their children. If set to true, custom elements will be subject to built-in and custom configuration checks (and will be retained or dropped based on those checks). Default is `false` */
allowCustomElements: z.ZodOptional<z.ZodBoolean>;
/** A boolean value to remove HTML comments. Set to true in order to keep comments. Default is `false`. */
allowComments: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
allowElements?: string[] | undefined;
blockElements?: string[] | undefined;
dropElements?: string[] | undefined;
allowAttributes?: Record<string, string[]> | undefined;
dropAttributes?: Record<string, string[]> | undefined;
allowComponents?: boolean | undefined;
allowCustomElements?: boolean | undefined;
allowComments?: boolean | undefined;
}, {
allowElements?: string[] | undefined;
blockElements?: string[] | undefined;
dropElements?: string[] | undefined;
allowAttributes?: Record<string, string[]> | undefined;
dropAttributes?: Record<string, string[]> | undefined;
allowComponents?: boolean | undefined;
allowCustomElements?: boolean | undefined;
allowComments?: boolean | undefined;
}>>;
declare const astroIntegrationLoggerSchema: z.ZodType<AstroIntegrationLogger, z.ZodTypeDef, AstroIntegrationLogger>;
/**
* A schema for a safe plugin list item in StudioCMS.
* This schema omits certain properties from the `StudioCMSPluginSchema`:
* - `integration`
* - `studiocmsMinimumVersion`
* - `sitemaps`
* - `dashboardGridItems`
* - `triggerSitemap`
*
* These properties are excluded to ensure that the plugin list item schema
* only includes the necessary and safe properties for use in the application.
*/
export declare const SafePluginListItemSchema: z.ZodObject<{
/**
* Identifier of the plugin from the package.json
*/
identifier: z.ZodString;
/**
* Label of the plugin to be displayed in the StudioCMS Dashboard
*/
name: z.ZodString;
/**
* If this exists, the plugin will have its own setting page
*/
settingsPage: z.ZodOptional<z.ZodOptional<z.ZodObject<{
fields: z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
name: z.ZodString;
label: z.ZodString;
required: z.ZodOptional<z.ZodBoolean>;
readOnly: z.ZodOptional<z.ZodBoolean>;
} & {
color: z.ZodOptional<z.ZodEnum<["primary", "success", "warning", "danger", "info", "mono"]>>;
} & {
input: z.ZodLiteral<"checkbox">;
defaultChecked: z.ZodOptional<z.ZodBoolean>;
size: z.ZodOptional<z.ZodEnum<["sm", "md", "lg"]>>;
}, "strip", z.ZodTypeAny, {
name: string;
label: string;
input: "checkbox";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultChecked?: boolean | undefined;
size?: "sm" | "md" | "lg" | undefined;
}, {
name: string;
label: string;
input: "checkbox";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultChecked?: boolean | undefined;
size?: "sm" | "md" | "lg" | undefined;
}>, z.ZodObject<{
name: z.ZodString;
label: z.ZodString;
required: z.ZodOptional<z.ZodBoolean>;
readOnly: z.ZodOptional<z.ZodBoolean>;
} & {
placeholder: z.ZodOptional<z.ZodString>;
} & {
input: z.ZodLiteral<"input">;
type: z.ZodOptional<z.ZodEnum<["text", "password", "email", "number", "tel", "url", "search"]>>;
defaultValue: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
name: string;
label: string;
input: "input";
type?: "number" | "text" | "password" | "email" | "tel" | "url" | "search" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
}, {
name: string;
label: string;
input: "input";
type?: "number" | "text" | "password" | "email" | "tel" | "url" | "search" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
}>, z.ZodObject<{
name: z.ZodString;
label: z.ZodString;
required: z.ZodOptional<z.ZodBoolean>;
readOnly: z.ZodOptional<z.ZodBoolean>;
} & {
placeholder: z.ZodOptional<z.ZodString>;
} & {
input: z.ZodLiteral<"textarea">;
defaultValue: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
name: string;
label: string;
input: "textarea";
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
}, {
name: string;
label: string;
input: "textarea";
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
}>, z.ZodObject<{
name: z.ZodString;
label: z.ZodString;
required: z.ZodOptional<z.ZodBoolean>;
readOnly: z.ZodOptional<z.ZodBoolean>;
} & {
color: z.ZodOptional<z.ZodEnum<["primary", "success", "warning", "danger", "info", "mono"]>>;
} & {
input: z.ZodLiteral<"radio">;
direction: z.ZodOptional<z.ZodEnum<["horizontal", "vertical"]>>;
defaultValue: z.ZodOptional<z.ZodString>;
options: z.ZodArray<z.ZodObject<{
label: z.ZodString;
value: z.ZodString;
disabled: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
value: string;
label: string;
disabled?: boolean | undefined;
}, {
value: string;
label: string;
disabled?: boolean | undefined;
}>, "many">;
}, "strip", z.ZodTypeAny, {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "radio";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultValue?: string | undefined;
direction?: "horizontal" | "vertical" | undefined;
}, {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "radio";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultValue?: string | undefined;
direction?: "horizontal" | "vertical" | undefined;
}>, z.ZodObject<{
name: z.ZodString;
label: z.ZodString;
required: z.ZodOptional<z.ZodBoolean>;
readOnly: z.ZodOptional<z.ZodBoolean>;
} & {
placeholder: z.ZodOptional<z.ZodString>;
} & {
input: z.ZodLiteral<"select">;
type: z.ZodOptional<z.ZodEnum<["basic", "search"]>>;
defaultValue: z.ZodOptional<z.ZodString>;
options: z.ZodArray<z.ZodObject<{
label: z.ZodString;
value: z.ZodString;
disabled: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
value: string;
label: string;
disabled?: boolean | undefined;
}, {
value: string;
label: string;
disabled?: boolean | undefined;
}>, "many">;
}, "strip", z.ZodTypeAny, {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "select";
type?: "search" | "basic" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
}, {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "select";
type?: "search" | "basic" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
}>]>, z.ZodObject<{
name: z.ZodString;
label: z.ZodString;
required: z.ZodOptional<z.ZodBoolean>;
readOnly: z.ZodOptional<z.ZodBoolean>;
} & {
input: z.ZodLiteral<"row">;
alignCenter: z.ZodOptional<z.ZodBoolean>;
gapSize: z.ZodOptional<z.ZodEnum<["sm", "md", "lg"]>>;
fields: z.ZodLazy<z.ZodArray<z.ZodUnion<[z.ZodObject<{
name: z.ZodString;
label: z.ZodString;
required: z.ZodOptional<z.ZodBoolean>;
readOnly: z.ZodOptional<z.ZodBoolean>;
} & {
color: z.ZodOptional<z.ZodEnum<["primary", "success", "warning", "danger", "info", "mono"]>>;
} & {
input: z.ZodLiteral<"checkbox">;
defaultChecked: z.ZodOptional<z.ZodBoolean>;
size: z.ZodOptional<z.ZodEnum<["sm", "md", "lg"]>>;
}, "strip", z.ZodTypeAny, {
name: string;
label: string;
input: "checkbox";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultChecked?: boolean | undefined;
size?: "sm" | "md" | "lg" | undefined;
}, {
name: string;
label: string;
input: "checkbox";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultChecked?: boolean | undefined;
size?: "sm" | "md" | "lg" | undefined;
}>, z.ZodObject<{
name: z.ZodString;
label: z.ZodString;
required: z.ZodOptional<z.ZodBoolean>;
readOnly: z.ZodOptional<z.ZodBoolean>;
} & {
placeholder: z.ZodOptional<z.ZodString>;
} & {
input: z.ZodLiteral<"input">;
type: z.ZodOptional<z.ZodEnum<["text", "password", "email", "number", "tel", "url", "search"]>>;
defaultValue: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
name: string;
label: string;
input: "input";
type?: "number" | "text" | "password" | "email" | "tel" | "url" | "search" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
}, {
name: string;
label: string;
input: "input";
type?: "number" | "text" | "password" | "email" | "tel" | "url" | "search" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
}>, z.ZodObject<{
name: z.ZodString;
label: z.ZodString;
required: z.ZodOptional<z.ZodBoolean>;
readOnly: z.ZodOptional<z.ZodBoolean>;
} & {
placeholder: z.ZodOptional<z.ZodString>;
} & {
input: z.ZodLiteral<"textarea">;
defaultValue: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
name: string;
label: string;
input: "textarea";
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
}, {
name: string;
label: string;
input: "textarea";
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
}>, z.ZodObject<{
name: z.ZodString;
label: z.ZodString;
required: z.ZodOptional<z.ZodBoolean>;
readOnly: z.ZodOptional<z.ZodBoolean>;
} & {
color: z.ZodOptional<z.ZodEnum<["primary", "success", "warning", "danger", "info", "mono"]>>;
} & {
input: z.ZodLiteral<"radio">;
direction: z.ZodOptional<z.ZodEnum<["horizontal", "vertical"]>>;
defaultValue: z.ZodOptional<z.ZodString>;
options: z.ZodArray<z.ZodObject<{
label: z.ZodString;
value: z.ZodString;
disabled: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
value: string;
label: string;
disabled?: boolean | undefined;
}, {
value: string;
label: string;
disabled?: boolean | undefined;
}>, "many">;
}, "strip", z.ZodTypeAny, {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "radio";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultValue?: string | undefined;
direction?: "horizontal" | "vertical" | undefined;
}, {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "radio";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultValue?: string | undefined;
direction?: "horizontal" | "vertical" | undefined;
}>, z.ZodObject<{
name: z.ZodString;
label: z.ZodString;
required: z.ZodOptional<z.ZodBoolean>;
readOnly: z.ZodOptional<z.ZodBoolean>;
} & {
placeholder: z.ZodOptional<z.ZodString>;
} & {
input: z.ZodLiteral<"select">;
type: z.ZodOptional<z.ZodEnum<["basic", "search"]>>;
defaultValue: z.ZodOptional<z.ZodString>;
options: z.ZodArray<z.ZodObject<{
label: z.ZodString;
value: z.ZodString;
disabled: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
value: string;
label: string;
disabled?: boolean | undefined;
}, {
value: string;
label: string;
disabled?: boolean | undefined;
}>, "many">;
}, "strip", z.ZodTypeAny, {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "select";
type?: "search" | "basic" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
}, {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "select";
type?: "search" | "basic" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
}>]>, "many">>;
}, "strip", z.ZodTypeAny, {
name: string;
label: string;
input: "row";
fields: ({
name: string;
label: string;
input: "checkbox";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultChecked?: boolean | undefined;
size?: "sm" | "md" | "lg" | undefined;
} | {
name: string;
label: string;
input: "input";
type?: "number" | "text" | "password" | "email" | "tel" | "url" | "search" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
} | {
name: string;
label: string;
input: "textarea";
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
} | {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "radio";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultValue?: string | undefined;
direction?: "horizontal" | "vertical" | undefined;
} | {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "select";
type?: "search" | "basic" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
})[];
required?: boolean | undefined;
readOnly?: boolean | undefined;
alignCenter?: boolean | undefined;
gapSize?: "sm" | "md" | "lg" | undefined;
}, {
name: string;
label: string;
input: "row";
fields: ({
name: string;
label: string;
input: "checkbox";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultChecked?: boolean | undefined;
size?: "sm" | "md" | "lg" | undefined;
} | {
name: string;
label: string;
input: "input";
type?: "number" | "text" | "password" | "email" | "tel" | "url" | "search" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
} | {
name: string;
label: string;
input: "textarea";
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
} | {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "radio";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultValue?: string | undefined;
direction?: "horizontal" | "vertical" | undefined;
} | {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "select";
type?: "search" | "basic" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
})[];
required?: boolean | undefined;
readOnly?: boolean | undefined;
alignCenter?: boolean | undefined;
gapSize?: "sm" | "md" | "lg" | undefined;
}>]>, "many">;
endpoint: z.ZodString;
}, "strip", z.ZodTypeAny, {
fields: ({
name: string;
label: string;
input: "checkbox";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultChecked?: boolean | undefined;
size?: "sm" | "md" | "lg" | undefined;
} | {
name: string;
label: string;
input: "input";
type?: "number" | "text" | "password" | "email" | "tel" | "url" | "search" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
} | {
name: string;
label: string;
input: "textarea";
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
} | {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "radio";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultValue?: string | undefined;
direction?: "horizontal" | "vertical" | undefined;
} | {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "select";
type?: "search" | "basic" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
} | {
name: string;
label: string;
input: "row";
fields: ({
name: string;
label: string;
input: "checkbox";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultChecked?: boolean | undefined;
size?: "sm" | "md" | "lg" | undefined;
} | {
name: string;
label: string;
input: "input";
type?: "number" | "text" | "password" | "email" | "tel" | "url" | "search" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
} | {
name: string;
label: string;
input: "textarea";
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
} | {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "radio";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultValue?: string | undefined;
direction?: "horizontal" | "vertical" | undefined;
} | {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "select";
type?: "search" | "basic" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
})[];
required?: boolean | undefined;
readOnly?: boolean | undefined;
alignCenter?: boolean | undefined;
gapSize?: "sm" | "md" | "lg" | undefined;
})[];
endpoint: string;
}, {
fields: ({
name: string;
label: string;
input: "checkbox";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultChecked?: boolean | undefined;
size?: "sm" | "md" | "lg" | undefined;
} | {
name: string;
label: string;
input: "input";
type?: "number" | "text" | "password" | "email" | "tel" | "url" | "search" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
} | {
name: string;
label: string;
input: "textarea";
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
} | {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "radio";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultValue?: string | undefined;
direction?: "horizontal" | "vertical" | undefined;
} | {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "select";
type?: "search" | "basic" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
} | {
name: string;
label: string;
input: "row";
fields: ({
name: string;
label: string;
input: "checkbox";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultChecked?: boolean | undefined;
size?: "sm" | "md" | "lg" | undefined;
} | {
name: string;
label: string;
input: "input";
type?: "number" | "text" | "password" | "email" | "tel" | "url" | "search" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
} | {
name: string;
label: string;
input: "textarea";
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
} | {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "radio";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultValue?: string | undefined;
direction?: "horizontal" | "vertical" | undefined;
} | {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "select";
type?: "search" | "basic" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
})[];
required?: boolean | undefined;
readOnly?: boolean | undefined;
alignCenter?: boolean | undefined;
gapSize?: "sm" | "md" | "lg" | undefined;
})[];
endpoint: string;
}>>>;
/**
* Navigation Links for use with the `@studiocms/frontend` package to display links in the frontend
*/
frontendNavigationLinks: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
label: z.ZodString;
href: z.ZodString;
}, "strip", z.ZodTypeAny, {
label: string;
href: string;
}, {
label: string;
href: string;
}>, "many">>>;
/**
* Page Type definition. If this is present, the plugin wants to be able to modify the page creation process
*/
pageTypes: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
label: z.ZodString;
identifier: z.ZodString;
description: z.ZodOptional<z.ZodString>;
pageContentComponent: z.ZodOptional<z.ZodString>;
rendererComponent: z.ZodOptional<z.ZodString>;
fields: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
name: z.ZodString;
label: z.ZodString;
required: z.ZodOptional<z.ZodBoolean>;
readOnly: z.ZodOptional<z.ZodBoolean>;
} & {
color: z.ZodOptional<z.ZodEnum<["primary", "success", "warning", "danger", "info", "mono"]>>;
} & {
input: z.ZodLiteral<"checkbox">;
defaultChecked: z.ZodOptional<z.ZodBoolean>;
size: z.ZodOptional<z.ZodEnum<["sm", "md", "lg"]>>;
}, "strip", z.ZodTypeAny, {
name: string;
label: string;
input: "checkbox";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultChecked?: boolean | undefined;
size?: "sm" | "md" | "lg" | undefined;
}, {
name: string;
label: string;
input: "checkbox";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultChecked?: boolean | undefined;
size?: "sm" | "md" | "lg" | undefined;
}>, z.ZodObject<{
name: z.ZodString;
label: z.ZodString;
required: z.ZodOptional<z.ZodBoolean>;
readOnly: z.ZodOptional<z.ZodBoolean>;
} & {
placeholder: z.ZodOptional<z.ZodString>;
} & {
input: z.ZodLiteral<"input">;
type: z.ZodOptional<z.ZodEnum<["text", "password", "email", "number", "tel", "url", "search"]>>;
defaultValue: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
name: string;
label: string;
input: "input";
type?: "number" | "text" | "password" | "email" | "tel" | "url" | "search" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
}, {
name: string;
label: string;
input: "input";
type?: "number" | "text" | "password" | "email" | "tel" | "url" | "search" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
}>, z.ZodObject<{
name: z.ZodString;
label: z.ZodString;
required: z.ZodOptional<z.ZodBoolean>;
readOnly: z.ZodOptional<z.ZodBoolean>;
} & {
placeholder: z.ZodOptional<z.ZodString>;
} & {
input: z.ZodLiteral<"textarea">;
defaultValue: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
name: string;
label: string;
input: "textarea";
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
}, {
name: string;
label: string;
input: "textarea";
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
}>, z.ZodObject<{
name: z.ZodString;
label: z.ZodString;
required: z.ZodOptional<z.ZodBoolean>;
readOnly: z.ZodOptional<z.ZodBoolean>;
} & {
color: z.ZodOptional<z.ZodEnum<["primary", "success", "warning", "danger", "info", "mono"]>>;
} & {
input: z.ZodLiteral<"radio">;
direction: z.ZodOptional<z.ZodEnum<["horizontal", "vertical"]>>;
defaultValue: z.ZodOptional<z.ZodString>;
options: z.ZodArray<z.ZodObject<{
label: z.ZodString;
value: z.ZodString;
disabled: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
value: string;
label: string;
disabled?: boolean | undefined;
}, {
value: string;
label: string;
disabled?: boolean | undefined;
}>, "many">;
}, "strip", z.ZodTypeAny, {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "radio";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultValue?: string | undefined;
direction?: "horizontal" | "vertical" | undefined;
}, {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "radio";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultValue?: string | undefined;
direction?: "horizontal" | "vertical" | undefined;
}>, z.ZodObject<{
name: z.ZodString;
label: z.ZodString;
required: z.ZodOptional<z.ZodBoolean>;
readOnly: z.ZodOptional<z.ZodBoolean>;
} & {
placeholder: z.ZodOptional<z.ZodString>;
} & {
input: z.ZodLiteral<"select">;
type: z.ZodOptional<z.ZodEnum<["basic", "search"]>>;
defaultValue: z.ZodOptional<z.ZodString>;
options: z.ZodArray<z.ZodObject<{
label: z.ZodString;
value: z.ZodString;
disabled: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
value: string;
label: string;
disabled?: boolean | undefined;
}, {
value: string;
label: string;
disabled?: boolean | undefined;
}>, "many">;
}, "strip", z.ZodTypeAny, {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "select";
type?: "search" | "basic" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
}, {
options: {
value: string;
label: string;
disabled?: boolean | undefined;
}[];
name: string;
label: string;
input: "select";
type?: "search" | "basic" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
}>]>, z.ZodObject<{
name: z.ZodString;
label: z.ZodString;
required: z.ZodOptional<z.ZodBoolean>;
readOnly: z.ZodOptional<z.ZodBoolean>;
} & {
input: z.ZodLiteral<"row">;
alignCenter: z.ZodOptional<z.ZodBoolean>;
gapSize: z.ZodOptional<z.ZodEnum<["sm", "md", "lg"]>>;
fields: z.ZodLazy<z.ZodArray<z.ZodUnion<[z.ZodObject<{
name: z.ZodString;
label: z.ZodString;
required: z.ZodOptional<z.ZodBoolean>;
readOnly: z.ZodOptional<z.ZodBoolean>;
} & {
color: z.ZodOptional<z.ZodEnum<["primary", "success", "warning", "danger", "info", "mono"]>>;
} & {
input: z.ZodLiteral<"checkbox">;
defaultChecked: z.ZodOptional<z.ZodBoolean>;
size: z.ZodOptional<z.ZodEnum<["sm", "md", "lg"]>>;
}, "strip", z.ZodTypeAny, {
name: string;
label: string;
input: "checkbox";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultChecked?: boolean | undefined;
size?: "sm" | "md" | "lg" | undefined;
}, {
name: string;
label: string;
input: "checkbox";
required?: boolean | undefined;
readOnly?: boolean | undefined;
color?: "primary" | "success" | "warning" | "danger" | "info" | "mono" | undefined;
defaultChecked?: boolean | undefined;
size?: "sm" | "md" | "lg" | undefined;
}>, z.ZodObject<{
name: z.ZodString;
label: z.ZodString;
required: z.ZodOptional<z.ZodBoolean>;
readOnly: z.ZodOptional<z.ZodBoolean>;
} & {
placeholder: z.ZodOptional<z.ZodString>;
} & {
input: z.ZodLiteral<"input">;
type: z.ZodOptional<z.ZodEnum<["text", "password", "email", "number", "tel", "url", "search"]>>;
defaultValue: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
name: string;
label: string;
input: "input";
type?: "number" | "text" | "password" | "email" | "tel" | "url" | "search" | undefined;
required?: boolean | undefined;
readOnly?: boolean | undefined;
placeholder?: string | undefined;
defaultValue?: string | undefined;
}, {
name: string;
label: string;
input: "input";
type?: "number" | "text"