/* * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT. */ import { l } from "@atproto/lex"; import * as EmbedDefs from "./defs.defs.js"; const $nsid = "app.bsky.embed.gallery"; export { $nsid }; type Main = { $type?: "app.bsky.embed.gallery"; /** * The schema-level maxLength of 20 is a future-proof ceiling. Clients should currently enforce a soft limit of 10 items in authoring UIs. */ "items":(l.$Typed | l.Unknown$TypedObject)[] }; export type { Main }; const main = /*#__PURE__*/ l.typedObject
($nsid, "main", /*#__PURE__*/ l.object({"items":/*#__PURE__*/ l.array(/*#__PURE__*/ l.typedUnion([/*#__PURE__*/ l.typedRef((() => image) as any)], false), {"maxLength":20})})); export { main }; export const $type = $nsid; export const $isTypeOf = /*#__PURE__*/ main.isTypeOf.bind(main); export const $build = /*#__PURE__*/ main.build.bind(main); export const $assert = /*#__PURE__*/ main.assert.bind(main); export const $check = /*#__PURE__*/ main.check.bind(main); export const $cast = /*#__PURE__*/ main.cast.bind(main); export const $ifMatches = /*#__PURE__*/ main.ifMatches.bind(main); export const $matches = /*#__PURE__*/ main.matches.bind(main); export const $parse = /*#__PURE__*/ main.parse.bind(main); export const $safeParse = /*#__PURE__*/ main.safeParse.bind(main); export const $validate = /*#__PURE__*/ main.validate.bind(main); export const $safeValidate = /*#__PURE__*/ main.safeValidate.bind(main); type View = { $type?: "app.bsky.embed.gallery#view";"items":(l.$Typed | l.Unknown$TypedObject)[] }; export type { View }; const view = /*#__PURE__*/ l.typedObject($nsid, "view", /*#__PURE__*/ l.object({"items":/*#__PURE__*/ l.array(/*#__PURE__*/ l.typedUnion([/*#__PURE__*/ l.typedRef((() => viewImage) as any)], false), )})); export { view }; type Image = { $type?: "app.bsky.embed.gallery#image"; /** * Alt text description of the image, for accessibility. */ "alt":string;"image":l.BlobRef;"aspectRatio":EmbedDefs.AspectRatio }; export type { Image }; const image = /*#__PURE__*/ l.typedObject($nsid, "image", /*#__PURE__*/ l.object({"alt":/*#__PURE__*/ l.string(),"image":/*#__PURE__*/ l.blob({"accept":["image/*"],"maxSize":2000000}),"aspectRatio":/*#__PURE__*/ l.ref((() => EmbedDefs.aspectRatio) as any)})); export { image }; type ViewImage = { $type?: "app.bsky.embed.gallery#viewImage"; /** * Alt text description of the image, for accessibility. */ "alt":string; /** * Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View. */ "fullsize":l.UriString; /** * Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View. */ "thumbnail":l.UriString;"aspectRatio":EmbedDefs.AspectRatio }; export type { ViewImage }; const viewImage = /*#__PURE__*/ l.typedObject($nsid, "viewImage", /*#__PURE__*/ l.object({"alt":/*#__PURE__*/ l.string(),"fullsize":/*#__PURE__*/ l.string({"format":"uri"}),"thumbnail":/*#__PURE__*/ l.string({"format":"uri"}),"aspectRatio":/*#__PURE__*/ l.ref((() => EmbedDefs.aspectRatio) as any)})); export { viewImage };