Skip to content

Variable: authCatalog

Examples / @xmachines/play-react-demo / authCatalog

const authCatalog: Catalog<{
catalog: SchemaType<"object", {
actions: SchemaType<"map", {
description: SchemaType<"string", unknown>;
params: SchemaType<"zod", unknown>;
}>;
components: SchemaType<"map", {
description: SchemaType<"string", unknown>;
example: SchemaType<"any", unknown>;
props: SchemaType<"zod", unknown>;
slots: SchemaType<"array", SchemaType<"string", unknown>>;
}>;
}>;
spec: SchemaType<"object", {
elements: SchemaType<"record", SchemaType<"object", {
children: SchemaType<"array", SchemaType<"string", unknown>>;
props: SchemaType<"propsOf", string>;
repeat: {
inner?: unknown;
kind: "any";
optional: true;
};
slots: {
inner?: SchemaType<"array", SchemaType<..., ...>>;
kind: "record";
optional: true;
};
type: SchemaType<"ref", string>;
visible: {
inner?: unknown;
kind: "any";
optional: true;
};
}>>;
root: SchemaType<"string", unknown>;
}>;
}, {
actions: {
addTask: {
description: "Add a task (sends task.add to the machine)";
params: ZodObject<{
title: ZodString;
}, $strip>;
};
completeTask: {
description: "Mark a task done (sends task.complete to the machine)";
params: ZodObject<{
id: ZodString;
}, $strip>;
};
login: {
description: "Login with username";
params: ZodObject<{
username: ZodString;
}, $strip>;
};
logout: {
description: "Logout and return to home";
};
removeTask: {
description: "Remove a task (sends task.remove to the machine)";
params: ZodObject<{
id: ZodString;
}, $strip>;
};
resetForm: {
description: "Reset a demo form to its defaults (confirm-gated in the spec)";
params: ZodObject<{
form: ZodString;
}, $strip>;
};
route: {
description: "Navigate to a route by path (e.g. '#home', '#login', '#dashboard')";
params: ZodObject<{
params: ZodOptional<ZodRecord<ZodString, ZodString>>;
to: ZodString;
}, $strip>;
};
submitForm: {
description: "Submit a demo form; rejects when the form did not pass validation";
params: ZodObject<{
form: ZodString;
valid: ZodOptional<ZodNullable<ZodBoolean>>;
}, $strip>;
};
};
components: {
About: {
props: ZodObject<{
title: ZodString;
}, $strip>;
};
Button: {
props: ZodObject<{
disabled: ZodOptional<ZodBoolean>;
label: ZodString;
testId: ZodOptional<ZodString>;
variant: ZodOptional<ZodEnum<{
danger: "danger";
primary: "primary";
secondary: "secondary";
}>>;
}, $strip>;
};
Contact: {
props: ZodObject<{
title: ZodString;
}, $strip>;
};
Dashboard: {
props: ZodObject<{
username: ZodString;
welcome: ZodBoolean;
}, $strip>;
};
Field: {
props: ZodObject<{
checks: ZodOptional<ZodArray<ZodCustom<ValidationCheck, ValidationCheck>>>;
formErrors: ZodOptional<ZodRecord<ZodString, ZodArray<ZodString>>>;
inputType: ZodOptional<ZodEnum<{
email: "email";
text: "text";
textarea: "textarea";
}>>;
label: ZodString;
placeholder: ZodOptional<ZodString>;
testId: ZodOptional<ZodString>;
value: ZodOptional<ZodString>;
}, $strip>;
};
Home: {
props: ZodObject<{
title: ZodString;
}, $strip>;
};
Login: {
props: ZodObject<{
title: ZodString;
username: ZodOptional<ZodString>;
}, $strip>;
};
NavBar: {
props: ZodObject<{
isAuthenticated: ZodBoolean;
username: ZodNullable<ZodString>;
}, $strip>;
};
Navigation: {
props: ZodObject<{
currentPath: ZodString;
isAuthenticated: ZodBoolean;
}, $strip>;
};
Overview: {
props: ZodObject<{
title: ZodString;
}, $strip>;
};
Panel: {
props: ZodObject<{
note: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodNull]>>;
testId: ZodOptional<ZodString>;
title: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>;
tone: ZodOptional<ZodEnum<{
danger: "danger";
default: "default";
muted: "muted";
success: "success";
}>>;
}, $strip>;
};
Profile: {
props: ZodObject<{
username: ZodString;
}, $strip>;
};
Settings: {
props: ZodObject<{
section: ZodOptional<ZodString>;
username: ZodString;
}, $strip>;
};
Stats: {
props: ZodObject<{
title: ZodString;
}, $strip>;
};
};
}>;

Defined in: packages/play-react/examples/demo/src/catalog.ts:5