components/elements/SelectWidget/schema.jsjavascript
/**
 * Content-block contract of the "selectWidget" element (pattern:
 * StoryTitle/schema.js). Option ids reference view ids (usually a story's
 * first slide) - checked by scripts/validate-content.mjs.
 */
export default {
  type: "selectWidget",
  region: "content",
  required: ["options"],
  properties: {
    orientation: { enum: ["portrait", "landscape"] },
    options: {
      type: "array",
      items: {
        type: "object",
        required: ["id", "text"],
        additionalProperties: false,
        properties: {
          id: { type: "string", minLength: 1 },
          text: { type: "string" },
          icon: { type: "string", pattern: "^/assets/.+" },
        },
      },
    },
  },
};