histoire
Version:
A fast story book powered by Vite
160 lines • 6.85 kB
TypeScript
import type { HistoireJsonValue } from '@histoire/protocol';
import { z } from 'zod';
/** Accept only ordinary identifiers in declarative object paths. */
export declare const optionPath: z.ZodString;
/** Individual option, including a default of the correct control type. */
export declare const optionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
description: z.ZodOptional<z.ZodString>;
when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<HistoireJsonValue, unknown, z.core.$ZodTypeInternals<HistoireJsonValue, unknown>>>>;
type: z.ZodLiteral<"boolean">;
default: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strict>, z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
description: z.ZodOptional<z.ZodString>;
when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<HistoireJsonValue, unknown, z.core.$ZodTypeInternals<HistoireJsonValue, unknown>>>>;
type: z.ZodLiteral<"string">;
default: z.ZodOptional<z.ZodString>;
}, z.core.$strict>, z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
description: z.ZodOptional<z.ZodString>;
when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<HistoireJsonValue, unknown, z.core.$ZodTypeInternals<HistoireJsonValue, unknown>>>>;
type: z.ZodLiteral<"string-list">;
default: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strict>, z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
description: z.ZodOptional<z.ZodString>;
when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<HistoireJsonValue, unknown, z.core.$ZodTypeInternals<HistoireJsonValue, unknown>>>>;
type: z.ZodLiteral<"enum">;
display: z.ZodOptional<z.ZodEnum<{
segmented: "segmented";
select: "select";
}>>;
choices: z.ZodArray<z.ZodObject<{
value: z.ZodString;
label: z.ZodString;
}, z.core.$strict>>;
default: z.ZodOptional<z.ZodString>;
}, z.core.$strict>], "type">;
/** Strict manifest schema; validation recovers optional fields and array items. */
export declare const manifestSchema: z.ZodObject<{
displayName: z.ZodString;
summary: z.ZodString;
category: z.ZodEnum<{
data: "data";
design: "design";
frameworks: "frameworks";
inspection: "inspection";
testing: "testing";
}>;
frameworks: z.ZodOptional<z.ZodArray<z.ZodString>>;
requires: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
monogram: z.ZodString;
tint: z.ZodEnum<{
amber: "amber";
blue: "blue";
green: "green";
rose: "rose";
sky: "sky";
slate: "slate";
violet: "violet";
}>;
logoUrl: z.ZodOptional<z.ZodURL>;
adds: z.ZodOptional<z.ZodArray<z.ZodObject<{
kind: z.ZodEnum<{
"canvas-view": "canvas-view";
"cli-command": "cli-command";
"inspector-tab": "inspector-tab";
"rail-pane": "rail-pane";
"settings-section": "settings-section";
"story-tests": "story-tests";
"toolbar-tool": "toolbar-tool";
}>;
text: z.ZodString;
contribution: z.ZodOptional<z.ZodString>;
}, z.core.$strict>>>;
access: z.ZodOptional<z.ZodArray<z.ZodEnum<{
"child-process": "child-process";
filesystem: "filesystem";
network: "network";
"story-dom": "story-dom";
"story-frames": "story-frames";
}>>>;
config: z.ZodObject<{
import: z.ZodString;
options: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
description: z.ZodOptional<z.ZodString>;
when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<HistoireJsonValue, unknown, z.core.$ZodTypeInternals<HistoireJsonValue, unknown>>>>;
type: z.ZodLiteral<"boolean">;
default: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strict>, z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
description: z.ZodOptional<z.ZodString>;
when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<HistoireJsonValue, unknown, z.core.$ZodTypeInternals<HistoireJsonValue, unknown>>>>;
type: z.ZodLiteral<"string">;
default: z.ZodOptional<z.ZodString>;
}, z.core.$strict>, z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
description: z.ZodOptional<z.ZodString>;
when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<HistoireJsonValue, unknown, z.core.$ZodTypeInternals<HistoireJsonValue, unknown>>>>;
type: z.ZodLiteral<"string-list">;
default: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strict>, z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
description: z.ZodOptional<z.ZodString>;
when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<HistoireJsonValue, unknown, z.core.$ZodTypeInternals<HistoireJsonValue, unknown>>>>;
type: z.ZodLiteral<"enum">;
display: z.ZodOptional<z.ZodEnum<{
segmented: "segmented";
select: "select";
}>>;
choices: z.ZodArray<z.ZodObject<{
value: z.ZodString;
label: z.ZodString;
}, z.core.$strict>>;
default: z.ZodOptional<z.ZodString>;
}, z.core.$strict>], "type">>>;
}, z.core.$strict>;
recommend: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
dependency: z.ZodString;
reason: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
missing: z.ZodLiteral<true>;
reason: z.ZodString;
}, z.core.$strict>]>>>;
collections: z.ZodOptional<z.ZodArray<z.ZodString>>;
releaseNotes: z.ZodOptional<z.ZodArray<z.ZodObject<{
kind: z.ZodEnum<{
breaking: "breaking";
feature: "feature";
fix: "fix";
}>;
text: z.ZodString;
code: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strict>>>;
migrations: z.ZodOptional<z.ZodArray<z.ZodObject<{
from: z.ZodString;
ops: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
op: z.ZodLiteral<"rename-option">;
from: z.ZodString;
to: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
op: z.ZodLiteral<"remove-option">;
path: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
op: z.ZodLiteral<"set-option">;
path: z.ZodString;
value: z.ZodType<HistoireJsonValue, unknown, z.core.$ZodTypeInternals<HistoireJsonValue, unknown>>;
}, z.core.$strict>], "op">>;
}, z.core.$strict>>>;
}, z.core.$strict>;
//# sourceMappingURL=schema.d.ts.map