UNPKG

@upstart.gg/sdk

Version:

You can test the CLI without recompiling by running:

65 lines (63 loc) 1.69 kB
import { StringEnum } from "../../utils/string-enum.js"; import { Type } from "@sinclair/typebox"; //#region src/shared/bricks/props/background.ts function background(opts = {}) { return Type.Object({ image: Type.String({ title: "Image", description: "The background image. Can be a URL or a data URI", format: "image", examples: ["https://example.com/image.png"] }), size: Type.Optional(StringEnum([ "auto", "cover", "contain" ], { enumNames: [ "Auto", "Cover", "Contain" ], "ai:instructions": "Only use this when the image is set." })), repeat: Type.Optional(StringEnum([ "no-repeat", "repeat", "repeat-x", "repeat-y", "space", "round" ], { enumNames: [ "No repeat", "Repeat", "Repeat horizontally", "Repeat vertically", "Space", "Round" ], "ai:instructions": "Only use this when the image is set." })) }, { "ui:styleId": "styles:background", "ui:field": "background", title: "Background image", ...opts }); } function backgroundColor(options = {}) { return Type.String({ title: "Background color", "ai:instructions": "Must be formated like `bg-<variant>-<shade>`, variants being primary, secondary, accent and neutral, or base and shades between 100 and 900, except the base with takes shades betwen 100 and 300 only.", pattern: "^bg-(primary|secondary|accent|neutral|base)-?(50|100|200|300|400|500|600|700|800|900)?$", "ui:field": "color", "ui:color-type": "background", "ui:styleId": "styles:backgroundColor", "ui:responsive": "desktop", ...options }); } //#endregion export { background, backgroundColor }; //# sourceMappingURL=background.js.map