{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/damdafa-com/json-schema/damdafa-com-mockup-screen-schema.json",
  "title": "MockupScreen",
  "description": "Represents a single screen embedded within a ScreenshotGroup document.\nIdeally, a single group shouldn't exceed ~50-100 screens.",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mockupper-damdafa-com-openapi.json#/components/schemas/MockupScreen",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id"
    },
    "imageUrl": {
      "type": "string",
      "title": "Imageurl"
    },
    "localizedImageUrls": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "string"
          },
          "propertyNames": {
            "$ref": "#/$defs/MockupperLocale"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Localizedimageurls"
    },
    "imagePositionX": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Imagepositionx"
    },
    "imagePositionY": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Imagepositiony"
    },
    "imageScale": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Imagescale"
    },
    "backendRenderSpec": {
      "anyOf": [
        {
          "$ref": "#/$defs/BackendCanvasRenderSpec"
        },
        {
          "type": "null"
        }
      ]
    },
    "localizedBackendRenderSpecs": {
      "anyOf": [
        {
          "additionalProperties": {
            "$ref": "#/$defs/BackendCanvasRenderSpec"
          },
          "propertyNames": {
            "$ref": "#/$defs/MockupperLocale"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Localizedbackendrenderspecs"
    },
    "title": {
      "anyOf": [
        {
          "$ref": "#/$defs/TextElement"
        },
        {
          "type": "null"
        }
      ]
    },
    "description": {
      "anyOf": [
        {
          "$ref": "#/$defs/TextElement"
        },
        {
          "type": "null"
        }
      ]
    },
    "aiInstructions": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Aiinstructions"
    },
    "magnifierSelection": {
      "anyOf": [
        {
          "$ref": "#/$defs/MagnifierSelection"
        },
        {
          "type": "null"
        }
      ]
    },
    "batteryFixEnabled": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Batteryfixenabled",
      "default": false
    },
    "designStyle": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Designstyle"
    },
    "skipGroupDeviceFrame": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Skipgroupdeviceframe"
    },
    "aspectRatio": {
      "$ref": "#/$defs/AspectRatio",
      "default": "9:19.5"
    },
    "devicePosition": {
      "anyOf": [
        {
          "$ref": "#/$defs/DevicePosition"
        },
        {
          "type": "null"
        }
      ]
    },
    "canvasRenderKey": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Canvasrenderkey"
    },
    "canvasRenderVersion": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Canvasrenderversion",
      "default": 1
    },
    "guideScreenshotIds": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Guidescreenshotids"
    },
    "aiAssetUrls": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Aiasseturls"
    },
    "createdAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Createdat"
    },
    "updatedAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Updatedat"
    }
  },
  "type": "object",
  "required": [
    "id",
    "imageUrl"
  ],
  "$defs": {
    "AspectRatio": {
      "type": "string",
      "enum": [
        "9:19.5",
        "3:4",
        "9:16",
        "16:9"
      ],
      "title": "AspectRatio",
      "description": "Centralized canvas defaults for preview rendering."
    },
    "BackendCanvasRenderSpec": {
      "properties": {
        "canvasSizePx": {
          "anyOf": [
            {
              "$ref": "#/$defs/PixelRect"
            },
            {
              "type": "null"
            }
          ]
        },
        "deviceRectPx": {
          "anyOf": [
            {
              "$ref": "#/$defs/PixelRect"
            },
            {
              "type": "null"
            }
          ]
        },
        "imageRectPx": {
          "anyOf": [
            {
              "$ref": "#/$defs/PixelRect"
            },
            {
              "type": "null"
            }
          ]
        },
        "screenViewportRectPx": {
          "anyOf": [
            {
              "$ref": "#/$defs/PixelRect"
            },
            {
              "type": "null"
            }
          ]
        },
        "screenViewportBorderRadiusPx": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Screenviewportborderradiuspx",
          "default": 0.0
        },
        "titleTextLayout": {
          "anyOf": [
            {
              "$ref": "#/$defs/TextLayoutSpecPx"
            },
            {
              "type": "null"
            }
          ]
        },
        "descriptionTextLayout": {
          "anyOf": [
            {
              "$ref": "#/$defs/TextLayoutSpecPx"
            },
            {
              "type": "null"
            }
          ]
        },
        "imageRotationDeg": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Imagerotationdeg",
          "default": 0.0
        },
        "imageBorderRadiusPx": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Imageborderradiuspx",
          "default": 0.0
        },
        "colorBorderEnabled": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Colorborderenabled",
          "default": false
        },
        "colorBorderWidth": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Colorborderwidth",
          "default": 10
        },
        "colorBorderColor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Colorbordercolor",
          "default": "auto"
        }
      },
      "type": "object",
      "title": "BackendCanvasRenderSpec",
      "description": "Backend-only render inputs for pixel-perfect rendering.\n\nThis is intentionally isolated from gesture/editor fields like imagePositionX/Y.\nThe client should persist absolute rectangles in a *known source canvas* coordinate space\n(typically the editor preview canvas). The backend will scale these rects up to the\ncanonical render output size."
    },
    "DevicePosition": {
      "type": "string",
      "enum": [
        "bottom",
        "bottomLeft",
        "bottomRight",
        "center",
        "left",
        "right",
        "top",
        "topLeft",
        "topRight"
      ],
      "title": "DevicePosition"
    },
    "MagnifierSelection": {
      "properties": {
        "xRatio": {
          "type": "number",
          "title": "Xratio"
        },
        "yRatio": {
          "type": "number",
          "title": "Yratio"
        },
        "widthRatio": {
          "type": "number",
          "title": "Widthratio"
        },
        "heightRatio": {
          "type": "number",
          "title": "Heightratio"
        }
      },
      "type": "object",
      "required": [
        "xRatio",
        "yRatio",
        "widthRatio",
        "heightRatio"
      ],
      "title": "MagnifierSelection",
      "description": "Relative coordinates (0.0 to 1.0) defining a selected region on the entire canvas.\nUsed for magnifying part of the mockup for AI generation context."
    },
    "MockupperLocale": {
      "type": "string",
      "enum": [
        "ar-SA",
        "ca",
        "cs",
        "da",
        "de-DE",
        "el",
        "en-AU",
        "en-CA",
        "en-GB",
        "en-US",
        "es-ES",
        "es-MX",
        "fi",
        "fr-CA",
        "fr-FR",
        "he",
        "hi",
        "hr",
        "hu",
        "id",
        "it",
        "ja",
        "ko",
        "ms",
        "nl-NL",
        "no",
        "pl",
        "pt-BR",
        "pt-PT",
        "ro",
        "ru",
        "sk",
        "sv",
        "th",
        "tr",
        "uk",
        "vi",
        "zh-Hans",
        "zh-Hant"
      ],
      "title": "MockupperLocale"
    },
    "PixelRect": {
      "properties": {
        "x": {
          "type": "number",
          "title": "X"
        },
        "y": {
          "type": "number",
          "title": "Y"
        },
        "width": {
          "type": "number",
          "title": "Width"
        },
        "height": {
          "type": "number",
          "title": "Height"
        }
      },
      "type": "object",
      "required": [
        "x",
        "y",
        "width",
        "height"
      ],
      "title": "PixelRect",
      "description": "Rectangle in absolute output pixels."
    },
    "TextAlign": {
      "type": "string",
      "enum": [
        "left",
        "center",
        "right"
      ],
      "title": "TextAlign"
    },
    "TextElement": {
      "properties": {
        "content": {
          "type": "string",
          "title": "Content"
        },
        "translations": {
          "additionalProperties": {
            "type": "string"
          },
          "propertyNames": {
            "$ref": "#/$defs/MockupperLocale"
          },
          "type": "object",
          "title": "Translations"
        },
        "layouts": {
          "additionalProperties": {
            "$ref": "#/$defs/TextElementLayout"
          },
          "propertyNames": {
            "$ref": "#/$defs/MockupperLocale"
          },
          "type": "object",
          "title": "Layouts"
        },
        "fontType": {
          "type": "string",
          "title": "Fonttype"
        },
        "color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Color"
        },
        "visible": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Visible",
          "default": true
        },
        "textAlign": {
          "anyOf": [
            {
              "$ref": "#/$defs/TextAlign"
            },
            {
              "type": "null"
            }
          ]
        },
        "fontSize": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Fontsize"
        },
        "positionX": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Positionx"
        },
        "positionY": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Positiony"
        },
        "wrapperWidthPx": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Wrapperwidthpx"
        }
      },
      "type": "object",
      "required": [
        "content",
        "fontType"
      ],
      "title": "TextElement",
      "description": "Represents text on the canvas.\n- 'content': Holds the text for the ProjectVersion's 'mainLanguage'.\n- 'translations': Holds overrides for 'additionalLanguages' (key=locale code)."
    },
    "TextElementLayout": {
      "properties": {
        "fontSize": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Fontsize"
        },
        "positionX": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Positionx"
        },
        "positionY": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Positiony"
        },
        "wrapperWidthPx": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Wrapperwidthpx"
        },
        "isManuallyAdjusted": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Ismanuallyadjusted",
          "default": false
        }
      },
      "type": "object",
      "title": "TextElementLayout",
      "description": "Layout properties for a specific locale."
    },
    "TextLayoutSpecPx": {
      "properties": {
        "textRectPx": {
          "$ref": "#/$defs/PixelRect"
        },
        "lines": {
          "items": {
            "$ref": "#/$defs/TextLineLayoutPx"
          },
          "type": "array",
          "title": "Lines"
        },
        "fontType": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Fonttype"
        }
      },
      "type": "object",
      "required": [
        "textRectPx"
      ],
      "title": "TextLayoutSpecPx",
      "description": "Pixel-perfect text layout (origin rect + line-by-line layout)."
    },
    "TextLineLayoutPx": {
      "properties": {
        "text": {
          "type": "string",
          "title": "Text"
        },
        "x": {
          "type": "number",
          "title": "X"
        },
        "y": {
          "type": "number",
          "title": "Y"
        },
        "width": {
          "type": "number",
          "title": "Width"
        },
        "height": {
          "type": "number",
          "title": "Height"
        }
      },
      "type": "object",
      "required": [
        "text",
        "x",
        "y",
        "width",
        "height"
      ],
      "title": "TextLineLayoutPx",
      "description": "A single pre-wrapped line as measured by React Native via onTextLayout."
    }
  }
}