cross-stitch - v2.0.0
    Preparing search index...

    Type Alias CrossStitchPattern

    CrossStitchPattern: ZodObject<
        {
            colors: ZodArray<
                ZodObject<
                    {
                        hex: ZodOptional<ZodString>;
                        id: $ZodBranded<ZodNumber, "ColorId", "out">;
                        name: ZodString;
                        strands: ZodArray<
                            ZodObject<
                                {
                                    brand: ZodEnum<
                                        {
                                            Anchor: "Anchor";
                                            Appletons: "Appletons";
                                            Cosmo: "Cosmo";
                                            DMC: "DMC";
                                            "J&P Coats": "J&P Coats";
                                            Kreinik: "Kreinik";
                                            Madeira: "Madeira";
                                            Presencia: "Presencia";
                                            Sullivans: "Sullivans";
                                            Unbranded: "Unbranded";
                                        },
                                    >;
                                    code: ZodString;
                                    hex: ZodOptional<ZodString>;
                                    name: ZodString;
                                    strandCount: ZodDefault<ZodNumber>;
                                },
                                $strip,
                            >,
                        >;
                        symbol: ZodString;
                    },
                    $strip,
                >,
            >;
            fabric: ZodOptional<
                ZodObject<
                    {
                        count: ZodNumber;
                        hex: ZodOptional<ZodString>;
                        kind: ZodOptional<ZodString>;
                    },
                    $strip,
                >,
            >;
            metadata: ZodOptional<
                ZodObject<
                    {
                        author: ZodOptional<ZodString>;
                        copyright: ZodOptional<ZodString>;
                        notes: ZodOptional<ZodString>;
                        title: ZodOptional<ZodString>;
                    },
                    $strip,
                >,
            >;
            schemaVersion: ZodLiteral<1>;
            stitches: ZodArray<
                ZodDiscriminatedUnion<
                    [
                        ZodObject<
                            {
                                colorId: $ZodBranded<ZodNumber, "ColorId", "out">;
                                kind: ZodLiteral<"full">;
                                x: $ZodBranded<ZodNumber, "CellCoordinate", "out">;
                                y: $ZodBranded<ZodNumber, "CellCoordinate", "out">;
                            },
                            $strip,
                        >,
                        ZodObject<
                            {
                                angle: ZodEnum<{ "bl-tr": "bl-tr"; "tl-br": "tl-br" }>;
                                colorId: $ZodBranded<ZodNumber, "ColorId", "out">;
                                kind: ZodLiteral<"half">;
                                x: $ZodBranded<ZodNumber, "CellCoordinate", "out">;
                                y: $ZodBranded<ZodNumber, "CellCoordinate", "out">;
                            },
                            $strip,
                        >,
                        ZodObject<
                            {
                                colorId: $ZodBranded<ZodNumber, "ColorId", "out">;
                                kind: ZodLiteral<"quarter">;
                                placement: ZodEnum<
                                    {
                                        "bottom-left": "bottom-left";
                                        "bottom-right": "bottom-right";
                                        "top-left": "top-left";
                                        "top-right": "top-right";
                                    },
                                >;
                                x: $ZodBranded<ZodNumber, "CellCoordinate", "out">;
                                y: $ZodBranded<ZodNumber, "CellCoordinate", "out">;
                            },
                            $strip,
                        >,
                    ],
                    "kind",
                >,
            >;
        },
        $strip,
    >

    A complete cross stitch pattern.

    Beyond per-field validation, this enforces that color ids and symbols are unique across the palette and that every stitch references a color that exists.