diff --git a/packages/@atjson/offset-annotations/src/annotations/ceros-embed.ts b/packages/@atjson/offset-annotations/src/annotations/ceros-embed.ts index 22ce4939e..e7d5e1798 100644 --- a/packages/@atjson/offset-annotations/src/annotations/ceros-embed.ts +++ b/packages/@atjson/offset-annotations/src/annotations/ceros-embed.ts @@ -1,6 +1,11 @@ import { BlockAnnotation } from "@atjson/document"; -export class CerosEmbed extends BlockAnnotation<{ +export type CerosStudioEmbedAttributes = { + /** + * The type of Ceros experience. + */ + cerosType?: "studio"; + /** * The URL to the Ceros experience. */ @@ -29,7 +34,44 @@ export class CerosEmbed extends BlockAnnotation<{ * A named identifier used to quickly jump to this item */ anchorName?: string; -}> { +}; + +export type CerosFlexInlineEmbedAttributes = { + /** + * The type of Ceros experience. + */ + cerosType: "flex"; + + /** + * The Flex rendering mode. + */ + renderMode: "inline"; + + /** + * The manifest URL for the Ceros Flex experience. + */ + manifestUrl: string; + + /** + * The inline container height for full-height scrolling Flex experiences. + */ + height?: string; + + /** + * Layout information, used to indicate mutually + * exclusive layouts, for example sizes, floats, etc. + */ + layout?: string; + + /** + * A named identifier used to quickly jump to this item + */ + anchorName?: string; +}; + +export class CerosEmbed extends BlockAnnotation< + CerosStudioEmbedAttributes | CerosFlexInlineEmbedAttributes +> { static vendorPrefix = "offset"; static type = "ceros-embed"; } diff --git a/packages/@atjson/renderer-html/src/index.ts b/packages/@atjson/renderer-html/src/index.ts index 2ed1fe8de..dae53799c 100644 --- a/packages/@atjson/renderer-html/src/index.ts +++ b/packages/@atjson/renderer-html/src/index.ts @@ -132,11 +132,25 @@ export default class HTMLRenderer extends Renderer { } *CerosEmbed(embed: Block) { + if (embed.attributes.cerosType === "flex") { + return `
`; + } + + let studioAttributes = embed.attributes; + return `
`,