Skip to content

Apps SDK — Intents API

Prepare Content Publisher

API reference for the prepareContentPublisher method.

Prepares a Content Publisher Intent.

Usage

tsx
import { prepareContentPublisher } from "@canva/intents/content";

prepareContentPublisher({
 getPublishConfiguration: async (params) => {
   // Implement the logic to get the publish configuration
 },
 renderSettingsUi: (params) => {
   // Implement the UI for settings view
 },
 renderPreviewUi: (params) => {
   // Implement the UI for preview view
 },
 publishContent: async (params) => {
   // Implement the logic to publish the content
 },
});

Parameters

<Prop.List> <Prop name="implementation" required type="ContentPublisherIntent" sourceLineNumbers={[1007]}> Main interface for implementing the ContentPublisher intent.

Implementing the ContentPublisher intent enables apps to publish contents to external platforms.
This allows users to configure publish settings, preview their designs, and share with others.

The publishing flow follows this process:

1. User initiates publish action
2. Your app provides publish configuration via `getPublishConfiguration`
3. User selects an output type
4. Your app renders settings UI via `renderSettingsUi`
5. Your app renders preview UI via `renderPreviewUi`
6. User reviews settings and preview
7. Your app publishes the content via `publishContent`

&lt;PillAccordion defaultExpanded={true} title={&lt;&gt;Properties of &lt;strong&gt;implementation&lt;/strong&gt;&lt;/&gt;}&gt;
  &lt;Prop.List&gt;
    &lt;Prop name="getPublishConfiguration" required type="function" sourceLineNumbers={[189]}&gt;
      Provides the configuration for the publishing platform.

      This action is called when the user initiates the publish flow and needs to
      select an output type for the target platform.

      Use this to define different publishing configurations for your platform,
      such as social media posts, videos, or other output types.

      &lt;Prop.Extras&gt;
        **Example: Defining publish configuration for a social media platform**

        ```ts
        import type { GetPublishConfigurationResponse } from '@canva/intents/content';

        async function getPublishConfiguration(): Promise<GetPublishConfigurationResponse> {
          return {
            status: 'completed',
            outputTypes: [
              {
                id: 'instagram_post',
                displayName: 'Instagram Post',
                mediaSlots: [
                  {
                    id: 'main_image',
                    displayName: 'Post Image',
                    fileCount: { min: 1, max: 10 },
                    accepts: {
                      image: { format: 'jpg', aspectRatio: { min: 0.8, max: 1.91 } }
                    }
                  }
                ]
              }
            ]
          };
        }
        ```
      &lt;/Prop.Extras&gt;

      **Returns**

      A promise resolving to the publish configuration or an error. This is a `Promise` that resolves with the following object:

      &lt;Tabs&gt;
        &lt;Tab name="GetPublishConfigurationCompleted"&gt;
          Successful response from getting publish configuration.

          &lt;Prop.List&gt;
            &lt;Prop name="status" required type="string" sourceLineNumbers={[543]}&gt;
              The only valid value is `"completed"`.
            &lt;/Prop&gt;

            &lt;Prop name="outputTypes" required type="OutputTypeConfiguration[]" sourceLineNumbers={[550]}&gt;
              Array of available output types for your platform.

              Define different output types for various content formats that
              your platform supports (e.g., posts, stories, videos).

              &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;outputTypes&lt;/strong&gt;&lt;/&gt;}&gt;
                &lt;Prop.List&gt;
                  &lt;Prop name="id" required type="string" sourceLineNumbers={[937]}&gt;
                    Unique identifier for this output type.

                    Use descriptive IDs like `"instagram_post"` or `"youtube_video"`.
                  &lt;/Prop&gt;

                  &lt;Prop name="displayName" required type="string" sourceLineNumbers={[944]}&gt;
                    User-facing name for this output type.

                    This is displayed to users when selecting where to publish.
                    Examples: `"Instagram Post"`, `"YouTube Video"`, `"Twitter Post"`.
                  &lt;/Prop&gt;

                  &lt;Prop name="mediaSlots" required type="object[]" sourceLineNumbers={[953]}&gt;
                    Array of media slots defining what content is needed.

                    Each slot represents a piece of media required for publishing,
                    such as a main image, thumbnail, or video.
                    The MediaSlot.selection field is omitted here because apps
                    do not provide selection data when defining output types.

                    &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;mediaSlots&lt;/strong&gt;&lt;/&gt;}&gt;
                      &lt;Prop.List&gt;
                        &lt;Prop name="id" required type="string" sourceLineNumbers={[732]}&gt;
                          Unique identifier for this media slot within the output type.
                        &lt;/Prop&gt;

                        &lt;Prop name="displayName" required type="string" sourceLineNumbers={[738]}&gt;
                          User-facing name for this media slot.

                          Examples: `"Post Image"`, `"Video Thumbnail"`, `"Main Video"`.
                        &lt;/Prop&gt;

                        &lt;Prop name="accepts" required type="object" sourceLineNumbers={[761]}&gt;
                          File type requirements for this slot.

                          Note the following behavior:

                          * Provide at least one of `image` or `video`
                          * If both are provided, files for this slot may be either images or videos; each file
                            must satisfy the corresponding requirement for its media type
                          * To restrict the slot to a single media type, provide only that requirement
                          * `fileCount` applies across all files accepted by the slot regardless of media type
                          * Document output types will show image previews (PNG thumbnail) in preview UI

                          &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;accepts&lt;/strong&gt;&lt;/&gt;}&gt;
                            &lt;Prop.List&gt;
                              &lt;Prop name="image" type="ImageRequirement" sourceLineNumbers={[762]}&gt;
                                Image file requirements for a media slot.

                                Specifies format, aspect ratio, and size constraints for images.

                                &lt;Prop.Extras&gt;
                                  **Example: Image requirements for social media post**

                                  ```ts
                                  const imageReq: ImageRequirement = {
                                    format: 'jpg',
                                    aspectRatio: { min: 0.8, max: 1.91 },
                                  };
                                  ```
                                &lt;/Prop.Extras&gt;

                                &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;image&lt;/strong&gt;&lt;/&gt;}&gt;
                                  &lt;Prop.List&gt;
                                    &lt;Prop name="format" required type="PublishFileFormat" sourceLineNumbers={[65]}&gt;
                                      File format for this requirement.

                                      &lt;Prop.Extras&gt;
                                        **Available values**:

                                        * `"png"`
                                        * `"jpg"`
                                        * `"mp4"`
                                        * `"pdf_standard"`
                                        * `"html_bundle"`
                                        * `"html_standalone"`
                                      &lt;/Prop.Extras&gt;
                                    &lt;/Prop&gt;

                                    &lt;Prop name="aspectRatio" type="ValueRange" sourceLineNumbers={[656]}&gt;
                                      Aspect ratio constraint (width / height).

                                      Examples:

                                      * `{ exact: 16/9 }`: Widescreen (16:9)
                                      * `{ min: 0.8, max: 1.91 }`: Instagram range

                                      &lt;Tabs&gt;
                                        &lt;Tab name="ExactValueRange"&gt;
                                          Exact value range constraint.

                                          &lt;Prop.Extras&gt;
                                            **Example: Exact value range**

                                            ```ts
                                            const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                            ```
                                          &lt;/Prop.Extras&gt;

                                          &lt;Prop.List /&gt;
                                        &lt;/Tab&gt;

                                        &lt;Tab name="MinValueRange"&gt;
                                          Minimum value range constraint.

                                          &lt;Prop.Extras&gt;
                                            **Example: Minimum value range**

                                            ```ts
                                            const minValue: ValueRange = { min: 3 }; // At least 3
                                            ```
                                          &lt;/Prop.Extras&gt;

                                          &lt;Prop.List /&gt;
                                        &lt;/Tab&gt;

                                        &lt;Tab name="MaxValueRange"&gt;
                                          Maximum value range constraint.

                                          &lt;Prop.Extras&gt;
                                            **Example: Maximum value range**

                                            ```ts
                                            const maxValue: ValueRange = { max: 10 }; // At most 10
                                            ```
                                          &lt;/Prop.Extras&gt;

                                          &lt;Prop.List /&gt;
                                        &lt;/Tab&gt;

                                        &lt;Tab name="MinMaxValueRange"&gt;
                                          Minimum and maximum value range constraint.
                                          Ranges are inclusive `(min ≤ value ≤ max)`.

                                          &lt;Prop.Extras&gt;
                                            **Example: Minimum and maximum value range**

                                            ```ts
                                            const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                            ```
                                          &lt;/Prop.Extras&gt;

                                          &lt;Prop.List /&gt;
                                        &lt;/Tab&gt;
                                      &lt;/Tabs&gt;
                                    &lt;/Prop&gt;

                                    &lt;Prop name="format" required type="string" sourceLineNumbers={[661]}&gt;
                                      &lt;Prop.Extras&gt;
                                        **Available values**:

                                        * `"jpg"`
                                        * `"png"`
                                      &lt;/Prop.Extras&gt;
                                    &lt;/Prop&gt;

                                    &lt;Prop name="allowTransparentBackground" type="boolean" sourceLineNumbers={[678]}&gt;
                                      Controls transparent-background support for PNG exports.

                                      * Only applies when `format` is `'png'`
                                      * If omitted or `false`, Canva exports a standard opaque PNG
                                      * If `true`, Canva shows a `Transparent background` toggle in the publish flow
                                      * Users without the required Canva entitlement may be prompted to upgrade before a transparent export is produced

                                      &lt;Prop.Extras&gt;
                                        **Default value**: `false`
                                      &lt;/Prop.Extras&gt;
                                    &lt;/Prop&gt;
                                  &lt;/Prop.List&gt;
                                &lt;/PillAccordion&gt;
                              &lt;/Prop&gt;

                              &lt;Prop name="video" type="VideoRequirement" sourceLineNumbers={[763]}&gt;
                                Video file requirements for a media slot.

                                Specifies format, aspect ratio, duration, and size constraints for videos.

                                &lt;Prop.Extras&gt;
                                  **Example: Video requirements for YouTube**

                                  ```ts
                                  const videoReq: VideoRequirement = {
                                    format: 'mp4',
                                    aspectRatio: { exact: 16/9 },
                                    durationMs: { min: 1000, max: 600000 },
                                  };
                                  ```
                                &lt;/Prop.Extras&gt;

                                &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;video&lt;/strong&gt;&lt;/&gt;}&gt;
                                  &lt;Prop.List&gt;
                                    &lt;Prop name="format" required type="string" sourceLineNumbers={[1706]}&gt;
                                      Supported video format.

                                      The only valid value is `"mp4"`.
                                    &lt;/Prop&gt;

                                    &lt;Prop name="aspectRatio" type="ValueRange" sourceLineNumbers={[1714]}&gt;
                                      Aspect ratio constraint (width / height).

                                      Examples:

                                      * `{ exact: 16/9 }`: Widescreen
                                      * `{ exact: 9/16 }`: Vertical/Story format

                                      &lt;Tabs&gt;
                                        &lt;Tab name="ExactValueRange"&gt;
                                          Exact value range constraint.

                                          &lt;Prop.Extras&gt;
                                            **Example: Exact value range**

                                            ```ts
                                            const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                            ```
                                          &lt;/Prop.Extras&gt;

                                          &lt;Prop.List /&gt;
                                        &lt;/Tab&gt;

                                        &lt;Tab name="MinValueRange"&gt;
                                          Minimum value range constraint.

                                          &lt;Prop.Extras&gt;
                                            **Example: Minimum value range**

                                            ```ts
                                            const minValue: ValueRange = { min: 3 }; // At least 3
                                            ```
                                          &lt;/Prop.Extras&gt;

                                          &lt;Prop.List /&gt;
                                        &lt;/Tab&gt;

                                        &lt;Tab name="MaxValueRange"&gt;
                                          Maximum value range constraint.

                                          &lt;Prop.Extras&gt;
                                            **Example: Maximum value range**

                                            ```ts
                                            const maxValue: ValueRange = { max: 10 }; // At most 10
                                            ```
                                          &lt;/Prop.Extras&gt;

                                          &lt;Prop.List /&gt;
                                        &lt;/Tab&gt;

                                        &lt;Tab name="MinMaxValueRange"&gt;
                                          Minimum and maximum value range constraint.
                                          Ranges are inclusive `(min ≤ value ≤ max)`.

                                          &lt;Prop.Extras&gt;
                                            **Example: Minimum and maximum value range**

                                            ```ts
                                            const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                            ```
                                          &lt;/Prop.Extras&gt;

                                          &lt;Prop.List /&gt;
                                        &lt;/Tab&gt;
                                      &lt;/Tabs&gt;
                                    &lt;/Prop&gt;

                                    &lt;Prop name="durationMs" type="ValueRange" sourceLineNumbers={[1722]}&gt;
                                      Duration constraint in milliseconds.

                                      Examples:

                                      * `{ max: 60000 }`: Maximum 60 seconds
                                      * `{ min: 3000, max: 600000 }`: Between 3 seconds and 10 minutes

                                      &lt;Tabs&gt;
                                        &lt;Tab name="ExactValueRange"&gt;
                                          Exact value range constraint.

                                          &lt;Prop.Extras&gt;
                                            **Example: Exact value range**

                                            ```ts
                                            const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                            ```
                                          &lt;/Prop.Extras&gt;

                                          &lt;Prop.List /&gt;
                                        &lt;/Tab&gt;

                                        &lt;Tab name="MinValueRange"&gt;
                                          Minimum value range constraint.

                                          &lt;Prop.Extras&gt;
                                            **Example: Minimum value range**

                                            ```ts
                                            const minValue: ValueRange = { min: 3 }; // At least 3
                                            ```
                                          &lt;/Prop.Extras&gt;

                                          &lt;Prop.List /&gt;
                                        &lt;/Tab&gt;

                                        &lt;Tab name="MaxValueRange"&gt;
                                          Maximum value range constraint.

                                          &lt;Prop.Extras&gt;
                                            **Example: Maximum value range**

                                            ```ts
                                            const maxValue: ValueRange = { max: 10 }; // At most 10
                                            ```
                                          &lt;/Prop.Extras&gt;

                                          &lt;Prop.List /&gt;
                                        &lt;/Tab&gt;

                                        &lt;Tab name="MinMaxValueRange"&gt;
                                          Minimum and maximum value range constraint.
                                          Ranges are inclusive `(min ≤ value ≤ max)`.

                                          &lt;Prop.Extras&gt;
                                            **Example: Minimum and maximum value range**

                                            ```ts
                                            const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                            ```
                                          &lt;/Prop.Extras&gt;

                                          &lt;Prop.List /&gt;
                                        &lt;/Tab&gt;
                                      &lt;/Tabs&gt;
                                    &lt;/Prop&gt;
                                  &lt;/Prop.List&gt;
                                &lt;/PillAccordion&gt;
                              &lt;/Prop&gt;

                              &lt;Prop name="document" type="DocumentRequirement" sourceLineNumbers={[764]}&gt;
                                Document file requirements for a media slot.

                                Note: Document output types use image previews (PNG thumbnails) in the preview UI.
                                The actual document file is only generated for the final output in OutputMedia.

                                &lt;Prop.Extras&gt;
                                  **Example: Document requirements**

                                  ```ts
                                  const documentReq: DocumentRequirement = {
                                    format: 'pdf_standard',
                                    size: 'a4',
                                  };
                                  ```
                                &lt;/Prop.Extras&gt;

                                &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;document&lt;/strong&gt;&lt;/&gt;}&gt;
                                  &lt;Prop.List&gt;
                                    &lt;Prop name="format" required type="string" sourceLineNumbers={[418]}&gt;
                                      Supported document export format.
                                      Currently supports PDF standard format.

                                      The only valid value is `"pdf_standard"`.
                                    &lt;/Prop&gt;

                                    &lt;Prop name="size" required type="DocumentSize" sourceLineNumbers={[422]}&gt;
                                      The document size of the export file.

                                      &lt;Prop.Extras&gt;
                                        **Available values**:

                                        * `"a4"`
                                        * `"a3"`
                                        * `"letter"`
                                        * `"legal"`
                                      &lt;/Prop.Extras&gt;
                                    &lt;/Prop&gt;
                                  &lt;/Prop.List&gt;
                                &lt;/PillAccordion&gt;
                              &lt;/Prop&gt;

                              &lt;Prop name="email" type="EmailRequirement" sourceLineNumbers={[768]}&gt;
                                Email output types will show a single html file (canva hosted assets) preview in preview UI

                                &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;email&lt;/strong&gt;&lt;/&gt;}&gt;
                                  &lt;Prop.List&gt;
                                    &lt;Prop name="format" required type="string" sourceLineNumbers={[508]}&gt;
                                      File format for this requirement.

                                      &lt;Prop.Extras&gt;
                                        **Available values**:

                                        * `"html_bundle"`
                                        * `"html_standalone"`
                                      &lt;/Prop.Extras&gt;
                                    &lt;/Prop&gt;
                                  &lt;/Prop.List&gt;
                                &lt;/PillAccordion&gt;
                              &lt;/Prop&gt;
                            &lt;/Prop.List&gt;
                          &lt;/PillAccordion&gt;
                        &lt;/Prop&gt;

                        &lt;Prop name="fileCount" type="ValueRange" sourceLineNumbers={[748]}&gt;
                          Number of files accepted in this slot.

                          Use this to specify single or multiple file requirements.
                          Examples:

                          * `{ exact: 1 }`: Exactly one file
                          * `{ min: 1, max: 10 }`: Between 1 and 10 files
                          * undefined: Any number of files

                          &lt;Tabs&gt;
                            &lt;Tab name="ExactValueRange"&gt;
                              Exact value range constraint.

                              &lt;Prop.Extras&gt;
                                **Example: Exact value range**

                                ```ts
                                const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                ```
                              &lt;/Prop.Extras&gt;

                              &lt;Prop.List /&gt;
                            &lt;/Tab&gt;

                            &lt;Tab name="MinValueRange"&gt;
                              Minimum value range constraint.

                              &lt;Prop.Extras&gt;
                                **Example: Minimum value range**

                                ```ts
                                const minValue: ValueRange = { min: 3 }; // At least 3
                                ```
                              &lt;/Prop.Extras&gt;

                              &lt;Prop.List /&gt;
                            &lt;/Tab&gt;

                            &lt;Tab name="MaxValueRange"&gt;
                              Maximum value range constraint.

                              &lt;Prop.Extras&gt;
                                **Example: Maximum value range**

                                ```ts
                                const maxValue: ValueRange = { max: 10 }; // At most 10
                                ```
                              &lt;/Prop.Extras&gt;

                              &lt;Prop.List /&gt;
                            &lt;/Tab&gt;

                            &lt;Tab name="MinMaxValueRange"&gt;
                              Minimum and maximum value range constraint.
                              Ranges are inclusive `(min ≤ value ≤ max)`.

                              &lt;Prop.Extras&gt;
                                **Example: Minimum and maximum value range**

                                ```ts
                                const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                ```
                              &lt;/Prop.Extras&gt;

                              &lt;Prop.List /&gt;
                            &lt;/Tab&gt;
                          &lt;/Tabs&gt;
                        &lt;/Prop&gt;
                      &lt;/Prop.List&gt;
                    &lt;/PillAccordion&gt;
                  &lt;/Prop&gt;
                &lt;/Prop.List&gt;
              &lt;/PillAccordion&gt;
            &lt;/Prop&gt;
          &lt;/Prop.List&gt;
        &lt;/Tab&gt;

        &lt;Tab name="GetPublishConfigurationError"&gt;
          GetPublishConfigurationError error indicating a custom error occurred.

          &lt;Prop.List&gt;
            &lt;Prop name="status" required type="string" sourceLineNumbers={[23]}&gt;
              The only valid value is `"app_error"`.
            &lt;/Prop&gt;

            &lt;Prop name="message" required type="string" sourceLineNumbers={[34]}&gt;
              (required) The raw error message, for logging purposes. It will not display in the UI.
              To display custom error messages in the UI use `localizedMessageId`.

              This should typically be the javascript error.message or a REST JSON error message
              body passed without modification.

              WARNING: Do not include personally identifiable information (PII) in this
              message, such as names, emails, usernames, etc.
            &lt;/Prop&gt;

            &lt;Prop name="localizedMessageId" type="string" sourceLineNumbers={[41]}&gt;
              (optional) Message ID of the translated error message that will be
              displayed to the user. The message ID should be present and uploaded in
              your translation file. If omitted, Canva will display a generic error
              message.
            &lt;/Prop&gt;

            &lt;Prop name="httpCode" type="number" sourceLineNumbers={[43]}&gt;
              HTTP status code, if applicable
            &lt;/Prop&gt;

            &lt;Prop name="appDefinedPayload" type="string" sourceLineNumbers={[48]}&gt;
              Used only by app developer. Canva does not use this value. Use this to pass
              additional information like JSON to your settings frame.
            &lt;/Prop&gt;

            &lt;Prop name="errorCause" type="ErrorCause" sourceLineNumbers={[54]}&gt;
              (optional) Source of the error if it relates to a component on the Canva
              UI. When present, the error may render near a relevant Canva component.
              When omitted, the cause is considered unspecified or "generic".

              &lt;Prop.Extras&gt;
                **Available values**:

                * `"invalid_selection"`
                * `"invalid_format"`
              &lt;/Prop.Extras&gt;
            &lt;/Prop&gt;
          &lt;/Prop.List&gt;
        &lt;/Tab&gt;
      &lt;/Tabs&gt;
    &lt;/Prop&gt;

    &lt;Prop name="renderSettingsUi" required type="function" sourceLineNumbers={[219]}&gt;
      Renders a user interface for configuring publish settings.

      This action is called after the user selects an output type. Your UI should
      allow users to configure platform-specific settings such as captions, tags,
      privacy settings, or publishing destinations.

      Use the `updatePublishSettings` callback to save user settings and validate them.
      Settings are stored in the `publishRef` string (maximum 32KB).

      &lt;Prop.Extras&gt;
        **Example: Rendering a settings UI with publish configuration**

        ```ts
        import { createRoot } from 'react-dom/client';
        import type { RenderSettingsUiRequest } from '@canva/intents/content';

        function renderSettingsUi(request: RenderSettingsUiRequest): void {
          const SettingsUiApp = () => (
             <AppUiProvider>
              <SettingsUi request={request} />
            </AppUiProvider>
          );

          createRoot().render(<SettingsUiApp />)
        }
        ```
      &lt;/Prop.Extras&gt;

      **Parameters**

      &lt;Prop.List&gt;
        &lt;Prop name="request" required type="RenderSettingsUiRequest" sourceLineNumbers={[219]}&gt;
          Configuration and callbacks for the publish settings UI.

          &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;request&lt;/strong&gt;&lt;/&gt;}&gt;
            &lt;Prop.List&gt;
              &lt;Prop name="invocationContext" required type="RenderSettingsUiInvocationContext" sourceLineNumbers={[1415]}&gt;
                The initial settings and context provided when the settings UI is rendered.

                Contains any previously saved publish settings and information about the current output type being configured.
                Use this to restore the UI to its previous state or initialise it with appropriate defaults.

                &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;invocationContext&lt;/strong&gt;&lt;/&gt;}&gt;
                  &lt;Prop.List&gt;
                    &lt;Prop name="reason" required type="string" sourceLineNumbers={[1279]}&gt;
                      Initial settings and context provided when the settings UI is rendered.

                      The only valid value is `"publish"`.
                    &lt;/Prop&gt;

                    &lt;Prop name="publishRef" type="string" sourceLineNumbers={[1281]}&gt;
                      Current publish reference to populate the UI, if any exist
                    &lt;/Prop&gt;

                    &lt;Prop name="outputType" type="OutputType" sourceLineNumbers={[1283]}&gt;
                      Information about the current output type being configured

                      &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;outputType&lt;/strong&gt;&lt;/&gt;}&gt;
                        &lt;Prop.List&gt;
                          &lt;Prop name="id" required type="string" sourceLineNumbers={[887]}&gt;
                            Unique identifier for this output type.

                            Use descriptive IDs like `"instagram_post"` or `"youtube_video"`.
                          &lt;/Prop&gt;

                          &lt;Prop name="displayName" required type="string" sourceLineNumbers={[894]}&gt;
                            User-facing name for this output type.

                            This is displayed to users when selecting where to publish.
                            Examples: `"Instagram Post"`, `"YouTube Video"`, `"Twitter Post"`.
                          &lt;/Prop&gt;

                          &lt;Prop name="mediaSlots" required type="MediaSlot[]" sourceLineNumbers={[901]}&gt;
                            Array of media slots defining what content is needed.

                            Each slot represents a piece of media required for publishing,
                            such as a main image, thumbnail, or video.

                            &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;mediaSlots&lt;/strong&gt;&lt;/&gt;}&gt;
                              &lt;Prop.List&gt;
                                &lt;Prop name="id" required type="string" sourceLineNumbers={[732]}&gt;
                                  Unique identifier for this media slot within the output type.
                                &lt;/Prop&gt;

                                &lt;Prop name="displayName" required type="string" sourceLineNumbers={[738]}&gt;
                                  User-facing name for this media slot.

                                  Examples: `"Post Image"`, `"Video Thumbnail"`, `"Main Video"`.
                                &lt;/Prop&gt;

                                &lt;Prop name="accepts" required type="object" sourceLineNumbers={[761]}&gt;
                                  File type requirements for this slot.

                                  Note the following behavior:

                                  * Provide at least one of `image` or `video`
                                  * If both are provided, files for this slot may be either images or videos; each file
                                    must satisfy the corresponding requirement for its media type
                                  * To restrict the slot to a single media type, provide only that requirement
                                  * `fileCount` applies across all files accepted by the slot regardless of media type
                                  * Document output types will show image previews (PNG thumbnail) in preview UI

                                  &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;accepts&lt;/strong&gt;&lt;/&gt;}&gt;
                                    &lt;Prop.List&gt;
                                      &lt;Prop name="image" type="ImageRequirement" sourceLineNumbers={[762]}&gt;
                                        Image file requirements for a media slot.

                                        Specifies format, aspect ratio, and size constraints for images.

                                        &lt;Prop.Extras&gt;
                                          **Example: Image requirements for social media post**

                                          ```ts
                                          const imageReq: ImageRequirement = {
                                            format: 'jpg',
                                            aspectRatio: { min: 0.8, max: 1.91 },
                                          };
                                          ```
                                        &lt;/Prop.Extras&gt;

                                        &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;image&lt;/strong&gt;&lt;/&gt;}&gt;
                                          &lt;Prop.List&gt;
                                            &lt;Prop name="format" required type="PublishFileFormat" sourceLineNumbers={[65]}&gt;
                                              File format for this requirement.

                                              &lt;Prop.Extras&gt;
                                                **Available values**:

                                                * `"png"`
                                                * `"jpg"`
                                                * `"mp4"`
                                                * `"pdf_standard"`
                                                * `"html_bundle"`
                                                * `"html_standalone"`
                                              &lt;/Prop.Extras&gt;
                                            &lt;/Prop&gt;

                                            &lt;Prop name="aspectRatio" type="ValueRange" sourceLineNumbers={[656]}&gt;
                                              Aspect ratio constraint (width / height).

                                              Examples:

                                              * `{ exact: 16/9 }`: Widescreen (16:9)
                                              * `{ min: 0.8, max: 1.91 }`: Instagram range

                                              &lt;Tabs&gt;
                                                &lt;Tab name="ExactValueRange"&gt;
                                                  Exact value range constraint.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Exact value range**

                                                    ```ts
                                                    const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;

                                                &lt;Tab name="MinValueRange"&gt;
                                                  Minimum value range constraint.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Minimum value range**

                                                    ```ts
                                                    const minValue: ValueRange = { min: 3 }; // At least 3
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;

                                                &lt;Tab name="MaxValueRange"&gt;
                                                  Maximum value range constraint.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Maximum value range**

                                                    ```ts
                                                    const maxValue: ValueRange = { max: 10 }; // At most 10
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;

                                                &lt;Tab name="MinMaxValueRange"&gt;
                                                  Minimum and maximum value range constraint.
                                                  Ranges are inclusive `(min ≤ value ≤ max)`.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Minimum and maximum value range**

                                                    ```ts
                                                    const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;
                                              &lt;/Tabs&gt;
                                            &lt;/Prop&gt;

                                            &lt;Prop name="format" required type="string" sourceLineNumbers={[661]}&gt;
                                              &lt;Prop.Extras&gt;
                                                **Available values**:

                                                * `"jpg"`
                                                * `"png"`
                                              &lt;/Prop.Extras&gt;
                                            &lt;/Prop&gt;

                                            &lt;Prop name="allowTransparentBackground" type="boolean" sourceLineNumbers={[678]}&gt;
                                              Controls transparent-background support for PNG exports.

                                              * Only applies when `format` is `'png'`
                                              * If omitted or `false`, Canva exports a standard opaque PNG
                                              * If `true`, Canva shows a `Transparent background` toggle in the publish flow
                                              * Users without the required Canva entitlement may be prompted to upgrade before a transparent export is produced

                                              &lt;Prop.Extras&gt;
                                                **Default value**: `false`
                                              &lt;/Prop.Extras&gt;
                                            &lt;/Prop&gt;
                                          &lt;/Prop.List&gt;
                                        &lt;/PillAccordion&gt;
                                      &lt;/Prop&gt;

                                      &lt;Prop name="video" type="VideoRequirement" sourceLineNumbers={[763]}&gt;
                                        Video file requirements for a media slot.

                                        Specifies format, aspect ratio, duration, and size constraints for videos.

                                        &lt;Prop.Extras&gt;
                                          **Example: Video requirements for YouTube**

                                          ```ts
                                          const videoReq: VideoRequirement = {
                                            format: 'mp4',
                                            aspectRatio: { exact: 16/9 },
                                            durationMs: { min: 1000, max: 600000 },
                                          };
                                          ```
                                        &lt;/Prop.Extras&gt;

                                        &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;video&lt;/strong&gt;&lt;/&gt;}&gt;
                                          &lt;Prop.List&gt;
                                            &lt;Prop name="format" required type="string" sourceLineNumbers={[1706]}&gt;
                                              Supported video format.

                                              The only valid value is `"mp4"`.
                                            &lt;/Prop&gt;

                                            &lt;Prop name="aspectRatio" type="ValueRange" sourceLineNumbers={[1714]}&gt;
                                              Aspect ratio constraint (width / height).

                                              Examples:

                                              * `{ exact: 16/9 }`: Widescreen
                                              * `{ exact: 9/16 }`: Vertical/Story format

                                              &lt;Tabs&gt;
                                                &lt;Tab name="ExactValueRange"&gt;
                                                  Exact value range constraint.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Exact value range**

                                                    ```ts
                                                    const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;

                                                &lt;Tab name="MinValueRange"&gt;
                                                  Minimum value range constraint.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Minimum value range**

                                                    ```ts
                                                    const minValue: ValueRange = { min: 3 }; // At least 3
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;

                                                &lt;Tab name="MaxValueRange"&gt;
                                                  Maximum value range constraint.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Maximum value range**

                                                    ```ts
                                                    const maxValue: ValueRange = { max: 10 }; // At most 10
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;

                                                &lt;Tab name="MinMaxValueRange"&gt;
                                                  Minimum and maximum value range constraint.
                                                  Ranges are inclusive `(min ≤ value ≤ max)`.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Minimum and maximum value range**

                                                    ```ts
                                                    const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;
                                              &lt;/Tabs&gt;
                                            &lt;/Prop&gt;

                                            &lt;Prop name="durationMs" type="ValueRange" sourceLineNumbers={[1722]}&gt;
                                              Duration constraint in milliseconds.

                                              Examples:

                                              * `{ max: 60000 }`: Maximum 60 seconds
                                              * `{ min: 3000, max: 600000 }`: Between 3 seconds and 10 minutes

                                              &lt;Tabs&gt;
                                                &lt;Tab name="ExactValueRange"&gt;
                                                  Exact value range constraint.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Exact value range**

                                                    ```ts
                                                    const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;

                                                &lt;Tab name="MinValueRange"&gt;
                                                  Minimum value range constraint.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Minimum value range**

                                                    ```ts
                                                    const minValue: ValueRange = { min: 3 }; // At least 3
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;

                                                &lt;Tab name="MaxValueRange"&gt;
                                                  Maximum value range constraint.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Maximum value range**

                                                    ```ts
                                                    const maxValue: ValueRange = { max: 10 }; // At most 10
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;

                                                &lt;Tab name="MinMaxValueRange"&gt;
                                                  Minimum and maximum value range constraint.
                                                  Ranges are inclusive `(min ≤ value ≤ max)`.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Minimum and maximum value range**

                                                    ```ts
                                                    const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;
                                              &lt;/Tabs&gt;
                                            &lt;/Prop&gt;
                                          &lt;/Prop.List&gt;
                                        &lt;/PillAccordion&gt;
                                      &lt;/Prop&gt;

                                      &lt;Prop name="document" type="DocumentRequirement" sourceLineNumbers={[764]}&gt;
                                        Document file requirements for a media slot.

                                        Note: Document output types use image previews (PNG thumbnails) in the preview UI.
                                        The actual document file is only generated for the final output in OutputMedia.

                                        &lt;Prop.Extras&gt;
                                          **Example: Document requirements**

                                          ```ts
                                          const documentReq: DocumentRequirement = {
                                            format: 'pdf_standard',
                                            size: 'a4',
                                          };
                                          ```
                                        &lt;/Prop.Extras&gt;

                                        &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;document&lt;/strong&gt;&lt;/&gt;}&gt;
                                          &lt;Prop.List&gt;
                                            &lt;Prop name="format" required type="string" sourceLineNumbers={[418]}&gt;
                                              Supported document export format.
                                              Currently supports PDF standard format.

                                              The only valid value is `"pdf_standard"`.
                                            &lt;/Prop&gt;

                                            &lt;Prop name="size" required type="DocumentSize" sourceLineNumbers={[422]}&gt;
                                              The document size of the export file.

                                              &lt;Prop.Extras&gt;
                                                **Available values**:

                                                * `"a4"`
                                                * `"a3"`
                                                * `"letter"`
                                                * `"legal"`
                                              &lt;/Prop.Extras&gt;
                                            &lt;/Prop&gt;
                                          &lt;/Prop.List&gt;
                                        &lt;/PillAccordion&gt;
                                      &lt;/Prop&gt;

                                      &lt;Prop name="email" type="EmailRequirement" sourceLineNumbers={[768]}&gt;
                                        Email output types will show a single html file (canva hosted assets) preview in preview UI

                                        &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;email&lt;/strong&gt;&lt;/&gt;}&gt;
                                          &lt;Prop.List&gt;
                                            &lt;Prop name="format" required type="string" sourceLineNumbers={[508]}&gt;
                                              File format for this requirement.

                                              &lt;Prop.Extras&gt;
                                                **Available values**:

                                                * `"html_bundle"`
                                                * `"html_standalone"`
                                              &lt;/Prop.Extras&gt;
                                            &lt;/Prop&gt;
                                          &lt;/Prop.List&gt;
                                        &lt;/PillAccordion&gt;
                                      &lt;/Prop&gt;
                                    &lt;/Prop.List&gt;
                                  &lt;/PillAccordion&gt;
                                &lt;/Prop&gt;

                                &lt;Prop name="fileCount" type="ValueRange" sourceLineNumbers={[748]}&gt;
                                  Number of files accepted in this slot.

                                  Use this to specify single or multiple file requirements.
                                  Examples:

                                  * `{ exact: 1 }`: Exactly one file
                                  * `{ min: 1, max: 10 }`: Between 1 and 10 files
                                  * undefined: Any number of files

                                  &lt;Tabs&gt;
                                    &lt;Tab name="ExactValueRange"&gt;
                                      Exact value range constraint.

                                      &lt;Prop.Extras&gt;
                                        **Example: Exact value range**

                                        ```ts
                                        const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                        ```
                                      &lt;/Prop.Extras&gt;

                                      &lt;Prop.List /&gt;
                                    &lt;/Tab&gt;

                                    &lt;Tab name="MinValueRange"&gt;
                                      Minimum value range constraint.

                                      &lt;Prop.Extras&gt;
                                        **Example: Minimum value range**

                                        ```ts
                                        const minValue: ValueRange = { min: 3 }; // At least 3
                                        ```
                                      &lt;/Prop.Extras&gt;

                                      &lt;Prop.List /&gt;
                                    &lt;/Tab&gt;

                                    &lt;Tab name="MaxValueRange"&gt;
                                      Maximum value range constraint.

                                      &lt;Prop.Extras&gt;
                                        **Example: Maximum value range**

                                        ```ts
                                        const maxValue: ValueRange = { max: 10 }; // At most 10
                                        ```
                                      &lt;/Prop.Extras&gt;

                                      &lt;Prop.List /&gt;
                                    &lt;/Tab&gt;

                                    &lt;Tab name="MinMaxValueRange"&gt;
                                      Minimum and maximum value range constraint.
                                      Ranges are inclusive `(min ≤ value ≤ max)`.

                                      &lt;Prop.Extras&gt;
                                        **Example: Minimum and maximum value range**

                                        ```ts
                                        const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                        ```
                                      &lt;/Prop.Extras&gt;

                                      &lt;Prop.List /&gt;
                                    &lt;/Tab&gt;
                                  &lt;/Tabs&gt;
                                &lt;/Prop&gt;

                                &lt;Prop name="selection" readonly type="MediaSelection[]" sourceLineNumbers={[779]}&gt;
                                  Current selection for this slot.

                                  Canva populates this only when returning OutputType in Settings UI contexts
                                  such as RenderSettingsUiInvocationContext and PublishSettingsSettingsUiContext.
                                  Apps should not set this value when defining output types in
                                  ContentPublisherIntent.getPublishConfiguration.

                                  &lt;Tabs&gt;
                                    &lt;Tab name="ImageSelection"&gt;
                                      Selection metadata for an image media item.

                                      &lt;Prop.List&gt;
                                        &lt;Prop name="kind" required type="string" sourceLineNumbers={[686]}&gt;
                                          The only valid value is `"image"`.
                                        &lt;/Prop&gt;

                                        &lt;Prop name="selectionMetadata" type="SelectionDesignMetadata[]" sourceLineNumbers={[124]}&gt;
                                          Metadata about the source content represented by this selection.

                                          &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;selectionMetadata&lt;/strong&gt;&lt;/&gt;}&gt;
                                            &lt;Prop.List&gt;
                                              &lt;Prop name="type" required type="string" sourceLineNumbers={[1487]}&gt;
                                                The only valid value is `"design"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="designToken" required type="string" sourceLineNumbers={[1491]}&gt;
                                                A signed JWT token containing the design id
                                              &lt;/Prop&gt;

                                              &lt;Prop name="title" required type="string | undefined" sourceLineNumbers={[1495]}&gt;
                                                The user given title of the design
                                              &lt;/Prop&gt;
                                            &lt;/Prop.List&gt;
                                          &lt;/PillAccordion&gt;
                                        &lt;/Prop&gt;
                                      &lt;/Prop.List&gt;
                                    &lt;/Tab&gt;

                                    &lt;Tab name="VideoSelection"&gt;
                                      Selection metadata for a video media item.

                                      &lt;Prop.List&gt;
                                        &lt;Prop name="kind" required type="string" sourceLineNumbers={[1731]}&gt;
                                          The only valid value is `"video"`.
                                        &lt;/Prop&gt;

                                        &lt;Prop name="durationMs" required type="number" sourceLineNumbers={[1735]}&gt;
                                          Duration of the selected video in milliseconds.
                                        &lt;/Prop&gt;

                                        &lt;Prop name="selectionMetadata" type="SelectionDesignMetadata[]" sourceLineNumbers={[124]}&gt;
                                          Metadata about the source content represented by this selection.

                                          &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;selectionMetadata&lt;/strong&gt;&lt;/&gt;}&gt;
                                            &lt;Prop.List&gt;
                                              &lt;Prop name="type" required type="string" sourceLineNumbers={[1487]}&gt;
                                                The only valid value is `"design"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="designToken" required type="string" sourceLineNumbers={[1491]}&gt;
                                                A signed JWT token containing the design id
                                              &lt;/Prop&gt;

                                              &lt;Prop name="title" required type="string | undefined" sourceLineNumbers={[1495]}&gt;
                                                The user given title of the design
                                              &lt;/Prop&gt;
                                            &lt;/Prop.List&gt;
                                          &lt;/PillAccordion&gt;
                                        &lt;/Prop&gt;
                                      &lt;/Prop.List&gt;
                                    &lt;/Tab&gt;

                                    &lt;Tab name="DocumentSelection"&gt;
                                      Selection metadata for a document media item.

                                      &lt;Prop.List&gt;
                                        &lt;Prop name="kind" required type="string" sourceLineNumbers={[430]}&gt;
                                          The only valid value is `"document"`.
                                        &lt;/Prop&gt;

                                        &lt;Prop name="selectionMetadata" type="SelectionDesignMetadata[]" sourceLineNumbers={[124]}&gt;
                                          Metadata about the source content represented by this selection.

                                          &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;selectionMetadata&lt;/strong&gt;&lt;/&gt;}&gt;
                                            &lt;Prop.List&gt;
                                              &lt;Prop name="type" required type="string" sourceLineNumbers={[1487]}&gt;
                                                The only valid value is `"design"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="designToken" required type="string" sourceLineNumbers={[1491]}&gt;
                                                A signed JWT token containing the design id
                                              &lt;/Prop&gt;

                                              &lt;Prop name="title" required type="string | undefined" sourceLineNumbers={[1495]}&gt;
                                                The user given title of the design
                                              &lt;/Prop&gt;
                                            &lt;/Prop.List&gt;
                                          &lt;/PillAccordion&gt;
                                        &lt;/Prop&gt;
                                      &lt;/Prop.List&gt;
                                    &lt;/Tab&gt;

                                    &lt;Tab name="EmailSelection"&gt;
                                      Selection metadata for an email media item.

                                      &lt;Prop.List&gt;
                                        &lt;Prop name="kind" required type="string" sourceLineNumbers={[516]}&gt;
                                          The only valid value is `"email"`.
                                        &lt;/Prop&gt;

                                        &lt;Prop name="selectionMetadata" type="SelectionDesignMetadata[]" sourceLineNumbers={[124]}&gt;
                                          Metadata about the source content represented by this selection.

                                          &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;selectionMetadata&lt;/strong&gt;&lt;/&gt;}&gt;
                                            &lt;Prop.List&gt;
                                              &lt;Prop name="type" required type="string" sourceLineNumbers={[1487]}&gt;
                                                The only valid value is `"design"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="designToken" required type="string" sourceLineNumbers={[1491]}&gt;
                                                A signed JWT token containing the design id
                                              &lt;/Prop&gt;

                                              &lt;Prop name="title" required type="string | undefined" sourceLineNumbers={[1495]}&gt;
                                                The user given title of the design
                                              &lt;/Prop&gt;
                                            &lt;/Prop.List&gt;
                                          &lt;/PillAccordion&gt;
                                        &lt;/Prop&gt;
                                      &lt;/Prop.List&gt;
                                    &lt;/Tab&gt;
                                  &lt;/Tabs&gt;
                                &lt;/Prop&gt;
                              &lt;/Prop.List&gt;
                            &lt;/PillAccordion&gt;
                          &lt;/Prop&gt;
                        &lt;/Prop.List&gt;
                      &lt;/PillAccordion&gt;
                    &lt;/Prop&gt;
                  &lt;/Prop.List&gt;
                &lt;/PillAccordion&gt;
              &lt;/Prop&gt;

              &lt;Prop name="updatePublishSettings" required type="function" sourceLineNumbers={[1446]}&gt;
                Callback to save and validate the user's publish settings.

                Call this function whenever the user modifies their settings to:

                * Save the settings for later use in `publishContent`
                * Validate that required fields are filled
                * Enable or disable the publish button based on validity

                Store all necessary publishing information in the `publishRef` string.
                This will be provided to your `publishContent` method when the user publishes.

                &lt;Prop.Extras&gt;
                  **Throws**

                  Will throw `CanvaError('bad_request')` if PublishSettings.publishRef exceeds 32KB.

                  **Example: Updating settings as user types**

                  ```ts
                  // As user fills in form fields, update settings
                  function handleCaptionChange(caption: string) {
                    const settings = { caption, tags: currentTags };
                    const publishRef = JSON.stringify(settings);

                    updatePublishSettings({
                      publishRef,
                      validityState: caption ? 'valid' : 'invalid_missing_required_fields'
                    });
                  }
                  ```
                &lt;/Prop.Extras&gt;

                **Parameters**

                &lt;Prop.List&gt;
                  &lt;Prop name="publishSettings" required type="PublishSettings" sourceLineNumbers={[1446]}&gt;
                    Configuration for publish settings.

                    Contains the user's settings and their validation state. Use this to
                    control whether the publish button is enabled.

                    &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;publishSettings&lt;/strong&gt;&lt;/&gt;}&gt;
                      &lt;Prop.List&gt;
                        &lt;Prop name="validityState" required type="PublishRefValidityState" sourceLineNumbers={[1252]}&gt;
                          Validation state of the publish settings.

                          Controls whether the publish button is enabled:

                          * `"valid"`: Settings are complete and valid, publish button is enabled
                          * `"invalid_missing_required_fields"`: Required settings are missing, publish button is disabled
                          * `"invalid_authentication_required"`: User must authenticate before publishing can proceed

                          &lt;Prop.Extras&gt;
                            **Available values**:

                            * `"valid"`
                            * `"invalid_missing_required_fields"`
                            * `"invalid_authentication_required"`
                          &lt;/Prop.Extras&gt;
                        &lt;/Prop&gt;

                        &lt;Prop name="publishRef" type="string" sourceLineNumbers={[1242]}&gt;
                          Serialized platform-specific settings for publishing.

                          Store all information your app needs to publish the content in this string.
                          This might include:

                          * Captions or descriptions
                          * Tags or hashtags
                          * Privacy settings
                          * Publishing destination (account, page, etc.)
                          * Scheduling information

                          This reference will be provided to your `publishContent` method when publishing.

                          Maximum size: 32KB

                          &lt;Prop.Extras&gt;
                            **Example: Serializing settings**

                            ```ts
                            const settings = {
                              caption: 'Check out my design!',
                              tags: ['design', 'creative'],
                              privacy: 'public'
                            };
                            const publishRef = JSON.stringify(settings);
                            ```
                          &lt;/Prop.Extras&gt;
                        &lt;/Prop&gt;
                      &lt;/Prop.List&gt;
                    &lt;/PillAccordion&gt;
                  &lt;/Prop&gt;
                &lt;/Prop.List&gt;

                **Returns**

                A promise that resolves when the settings are successfully saved. This is a `Promise` that resolves with the following object:

                &lt;Prop.List&gt;
                  &lt;Prop name="status" required type="string" sourceLineNumbers={[1530]}&gt;
                    The only valid value is `"completed"`.
                  &lt;/Prop&gt;
                &lt;/Prop.List&gt;
              &lt;/Prop&gt;

              &lt;Prop name="registerOnContextChange" required type="function" sourceLineNumbers={[1476]}&gt;
                Registers a callback to be invoked when the settings UI context changes.

                This callback is triggered when:

                * the user changes the output type in the publish flow.
                * an error occurs in the publish flow.

                Use this to respond to Canva changes and update your settings UI accordingly.

                &lt;Prop.Extras&gt;
                  **Example: Adapting UI for different output types**

                  ```ts
                  registerOnContextChange({
                    onContextChange: (ctx) => {
                      if (ctx.reason === 'publish_settings') {
                        if (ctx.outputType.id === 'instagram_post') {
                          showHashtagField();
                        }
                      }
                      if (ctx.reason === 'publish_error') {
                        setError(ctx.error);
                      }
                    }
                  });
                  ```
                &lt;/Prop.Extras&gt;

                **Parameters**

                &lt;Prop.List&gt;
                  &lt;Prop name="opts" required type="object" sourceLineNumbers={[1476]}&gt;
                    The options for registering a callback.

                    &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;opts&lt;/strong&gt;&lt;/&gt;}&gt;
                      &lt;Prop.List&gt;
                        &lt;Prop name="onContextChange" required type="OnContextChange" sourceLineNumbers={[1477]}&gt;
                          **Parameters**

                          &lt;Prop.List&gt;
                            &lt;Prop name="context" required type="SettingsUiContext" sourceLineNumbers={[809]}&gt;
                              Context information for the publish settings UI.

                              &lt;Tabs&gt;
                                &lt;Tab name="PublishSettingsSettingsUiContext"&gt;
                                  Provides information about the current state of the settings UI to help
                                  you adapt the interface based on the selected output type.

                                  &lt;Prop.List&gt;
                                    &lt;Prop name="reason" required type="string" sourceLineNumbers={[1261]}&gt;
                                      The only valid value is `"publish_settings"`.
                                    &lt;/Prop&gt;

                                    &lt;Prop name="outputType" required type="OutputType" sourceLineNumbers={[1268]}&gt;
                                      The currently selected output type.

                                      Use this to customize your settings UI based on the requirements
                                      of different output types.

                                      &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;outputType&lt;/strong&gt;&lt;/&gt;}&gt;
                                        &lt;Prop.List&gt;
                                          &lt;Prop name="id" required type="string" sourceLineNumbers={[887]}&gt;
                                            Unique identifier for this output type.

                                            Use descriptive IDs like `"instagram_post"` or `"youtube_video"`.
                                          &lt;/Prop&gt;

                                          &lt;Prop name="displayName" required type="string" sourceLineNumbers={[894]}&gt;
                                            User-facing name for this output type.

                                            This is displayed to users when selecting where to publish.
                                            Examples: `"Instagram Post"`, `"YouTube Video"`, `"Twitter Post"`.
                                          &lt;/Prop&gt;

                                          &lt;Prop name="mediaSlots" required type="MediaSlot[]" sourceLineNumbers={[901]}&gt;
                                            Array of media slots defining what content is needed.

                                            Each slot represents a piece of media required for publishing,
                                            such as a main image, thumbnail, or video.

                                            &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;mediaSlots&lt;/strong&gt;&lt;/&gt;}&gt;
                                              &lt;Prop.List&gt;
                                                &lt;Prop name="id" required type="string" sourceLineNumbers={[732]}&gt;
                                                  Unique identifier for this media slot within the output type.
                                                &lt;/Prop&gt;

                                                &lt;Prop name="displayName" required type="string" sourceLineNumbers={[738]}&gt;
                                                  User-facing name for this media slot.

                                                  Examples: `"Post Image"`, `"Video Thumbnail"`, `"Main Video"`.
                                                &lt;/Prop&gt;

                                                &lt;Prop name="accepts" required type="object" sourceLineNumbers={[761]}&gt;
                                                  File type requirements for this slot.

                                                  Note the following behavior:

                                                  * Provide at least one of `image` or `video`
                                                  * If both are provided, files for this slot may be either images or videos; each file
                                                    must satisfy the corresponding requirement for its media type
                                                  * To restrict the slot to a single media type, provide only that requirement
                                                  * `fileCount` applies across all files accepted by the slot regardless of media type
                                                  * Document output types will show image previews (PNG thumbnail) in preview UI

                                                  &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;accepts&lt;/strong&gt;&lt;/&gt;}&gt;
                                                    &lt;Prop.List&gt;
                                                      &lt;Prop name="image" type="ImageRequirement" sourceLineNumbers={[762]}&gt;
                                                        Image file requirements for a media slot.

                                                        Specifies format, aspect ratio, and size constraints for images.

                                                        &lt;Prop.Extras&gt;
                                                          **Example: Image requirements for social media post**

                                                          ```ts
                                                          const imageReq: ImageRequirement = {
                                                            format: 'jpg',
                                                            aspectRatio: { min: 0.8, max: 1.91 },
                                                          };
                                                          ```
                                                        &lt;/Prop.Extras&gt;

                                                        &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;image&lt;/strong&gt;&lt;/&gt;}&gt;
                                                          &lt;Prop.List&gt;
                                                            &lt;Prop name="format" required type="PublishFileFormat" sourceLineNumbers={[65]}&gt;
                                                              File format for this requirement.

                                                              &lt;Prop.Extras&gt;
                                                                **Available values**:

                                                                * `"png"`
                                                                * `"jpg"`
                                                                * `"mp4"`
                                                                * `"pdf_standard"`
                                                                * `"html_bundle"`
                                                                * `"html_standalone"`
                                                              &lt;/Prop.Extras&gt;
                                                            &lt;/Prop&gt;

                                                            &lt;Prop name="aspectRatio" type="ValueRange" sourceLineNumbers={[656]}&gt;
                                                              Aspect ratio constraint (width / height).

                                                              Examples:

                                                              * `{ exact: 16/9 }`: Widescreen (16:9)
                                                              * `{ min: 0.8, max: 1.91 }`: Instagram range

                                                              &lt;Tabs&gt;
                                                                &lt;Tab name="ExactValueRange"&gt;
                                                                  Exact value range constraint.

                                                                  &lt;Prop.Extras&gt;
                                                                    **Example: Exact value range**

                                                                    ```ts
                                                                    const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                                                    ```
                                                                  &lt;/Prop.Extras&gt;

                                                                  &lt;Prop.List /&gt;
                                                                &lt;/Tab&gt;

                                                                &lt;Tab name="MinValueRange"&gt;
                                                                  Minimum value range constraint.

                                                                  &lt;Prop.Extras&gt;
                                                                    **Example: Minimum value range**

                                                                    ```ts
                                                                    const minValue: ValueRange = { min: 3 }; // At least 3
                                                                    ```
                                                                  &lt;/Prop.Extras&gt;

                                                                  &lt;Prop.List /&gt;
                                                                &lt;/Tab&gt;

                                                                &lt;Tab name="MaxValueRange"&gt;
                                                                  Maximum value range constraint.

                                                                  &lt;Prop.Extras&gt;
                                                                    **Example: Maximum value range**

                                                                    ```ts
                                                                    const maxValue: ValueRange = { max: 10 }; // At most 10
                                                                    ```
                                                                  &lt;/Prop.Extras&gt;

                                                                  &lt;Prop.List /&gt;
                                                                &lt;/Tab&gt;

                                                                &lt;Tab name="MinMaxValueRange"&gt;
                                                                  Minimum and maximum value range constraint.
                                                                  Ranges are inclusive `(min ≤ value ≤ max)`.

                                                                  &lt;Prop.Extras&gt;
                                                                    **Example: Minimum and maximum value range**

                                                                    ```ts
                                                                    const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                                                    ```
                                                                  &lt;/Prop.Extras&gt;

                                                                  &lt;Prop.List /&gt;
                                                                &lt;/Tab&gt;
                                                              &lt;/Tabs&gt;
                                                            &lt;/Prop&gt;

                                                            &lt;Prop name="format" required type="string" sourceLineNumbers={[661]}&gt;
                                                              &lt;Prop.Extras&gt;
                                                                **Available values**:

                                                                * `"jpg"`
                                                                * `"png"`
                                                              &lt;/Prop.Extras&gt;
                                                            &lt;/Prop&gt;

                                                            &lt;Prop name="allowTransparentBackground" type="boolean" sourceLineNumbers={[678]}&gt;
                                                              Controls transparent-background support for PNG exports.

                                                              * Only applies when `format` is `'png'`
                                                              * If omitted or `false`, Canva exports a standard opaque PNG
                                                              * If `true`, Canva shows a `Transparent background` toggle in the publish flow
                                                              * Users without the required Canva entitlement may be prompted to upgrade before a transparent export is produced

                                                              &lt;Prop.Extras&gt;
                                                                **Default value**: `false`
                                                              &lt;/Prop.Extras&gt;
                                                            &lt;/Prop&gt;
                                                          &lt;/Prop.List&gt;
                                                        &lt;/PillAccordion&gt;
                                                      &lt;/Prop&gt;

                                                      &lt;Prop name="video" type="VideoRequirement" sourceLineNumbers={[763]}&gt;
                                                        Video file requirements for a media slot.

                                                        Specifies format, aspect ratio, duration, and size constraints for videos.

                                                        &lt;Prop.Extras&gt;
                                                          **Example: Video requirements for YouTube**

                                                          ```ts
                                                          const videoReq: VideoRequirement = {
                                                            format: 'mp4',
                                                            aspectRatio: { exact: 16/9 },
                                                            durationMs: { min: 1000, max: 600000 },
                                                          };
                                                          ```
                                                        &lt;/Prop.Extras&gt;

                                                        &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;video&lt;/strong&gt;&lt;/&gt;}&gt;
                                                          &lt;Prop.List&gt;
                                                            &lt;Prop name="format" required type="string" sourceLineNumbers={[1706]}&gt;
                                                              Supported video format.

                                                              The only valid value is `"mp4"`.
                                                            &lt;/Prop&gt;

                                                            &lt;Prop name="aspectRatio" type="ValueRange" sourceLineNumbers={[1714]}&gt;
                                                              Aspect ratio constraint (width / height).

                                                              Examples:

                                                              * `{ exact: 16/9 }`: Widescreen
                                                              * `{ exact: 9/16 }`: Vertical/Story format

                                                              &lt;Tabs&gt;
                                                                &lt;Tab name="ExactValueRange"&gt;
                                                                  Exact value range constraint.

                                                                  &lt;Prop.Extras&gt;
                                                                    **Example: Exact value range**

                                                                    ```ts
                                                                    const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                                                    ```
                                                                  &lt;/Prop.Extras&gt;

                                                                  &lt;Prop.List /&gt;
                                                                &lt;/Tab&gt;

                                                                &lt;Tab name="MinValueRange"&gt;
                                                                  Minimum value range constraint.

                                                                  &lt;Prop.Extras&gt;
                                                                    **Example: Minimum value range**

                                                                    ```ts
                                                                    const minValue: ValueRange = { min: 3 }; // At least 3
                                                                    ```
                                                                  &lt;/Prop.Extras&gt;

                                                                  &lt;Prop.List /&gt;
                                                                &lt;/Tab&gt;

                                                                &lt;Tab name="MaxValueRange"&gt;
                                                                  Maximum value range constraint.

                                                                  &lt;Prop.Extras&gt;
                                                                    **Example: Maximum value range**

                                                                    ```ts
                                                                    const maxValue: ValueRange = { max: 10 }; // At most 10
                                                                    ```
                                                                  &lt;/Prop.Extras&gt;

                                                                  &lt;Prop.List /&gt;
                                                                &lt;/Tab&gt;

                                                                &lt;Tab name="MinMaxValueRange"&gt;
                                                                  Minimum and maximum value range constraint.
                                                                  Ranges are inclusive `(min ≤ value ≤ max)`.

                                                                  &lt;Prop.Extras&gt;
                                                                    **Example: Minimum and maximum value range**

                                                                    ```ts
                                                                    const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                                                    ```
                                                                  &lt;/Prop.Extras&gt;

                                                                  &lt;Prop.List /&gt;
                                                                &lt;/Tab&gt;
                                                              &lt;/Tabs&gt;
                                                            &lt;/Prop&gt;

                                                            &lt;Prop name="durationMs" type="ValueRange" sourceLineNumbers={[1722]}&gt;
                                                              Duration constraint in milliseconds.

                                                              Examples:

                                                              * `{ max: 60000 }`: Maximum 60 seconds
                                                              * `{ min: 3000, max: 600000 }`: Between 3 seconds and 10 minutes

                                                              &lt;Tabs&gt;
                                                                &lt;Tab name="ExactValueRange"&gt;
                                                                  Exact value range constraint.

                                                                  &lt;Prop.Extras&gt;
                                                                    **Example: Exact value range**

                                                                    ```ts
                                                                    const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                                                    ```
                                                                  &lt;/Prop.Extras&gt;

                                                                  &lt;Prop.List /&gt;
                                                                &lt;/Tab&gt;

                                                                &lt;Tab name="MinValueRange"&gt;
                                                                  Minimum value range constraint.

                                                                  &lt;Prop.Extras&gt;
                                                                    **Example: Minimum value range**

                                                                    ```ts
                                                                    const minValue: ValueRange = { min: 3 }; // At least 3
                                                                    ```
                                                                  &lt;/Prop.Extras&gt;

                                                                  &lt;Prop.List /&gt;
                                                                &lt;/Tab&gt;

                                                                &lt;Tab name="MaxValueRange"&gt;
                                                                  Maximum value range constraint.

                                                                  &lt;Prop.Extras&gt;
                                                                    **Example: Maximum value range**

                                                                    ```ts
                                                                    const maxValue: ValueRange = { max: 10 }; // At most 10
                                                                    ```
                                                                  &lt;/Prop.Extras&gt;

                                                                  &lt;Prop.List /&gt;
                                                                &lt;/Tab&gt;

                                                                &lt;Tab name="MinMaxValueRange"&gt;
                                                                  Minimum and maximum value range constraint.
                                                                  Ranges are inclusive `(min ≤ value ≤ max)`.

                                                                  &lt;Prop.Extras&gt;
                                                                    **Example: Minimum and maximum value range**

                                                                    ```ts
                                                                    const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                                                    ```
                                                                  &lt;/Prop.Extras&gt;

                                                                  &lt;Prop.List /&gt;
                                                                &lt;/Tab&gt;
                                                              &lt;/Tabs&gt;
                                                            &lt;/Prop&gt;
                                                          &lt;/Prop.List&gt;
                                                        &lt;/PillAccordion&gt;
                                                      &lt;/Prop&gt;

                                                      &lt;Prop name="document" type="DocumentRequirement" sourceLineNumbers={[764]}&gt;
                                                        Document file requirements for a media slot.

                                                        Note: Document output types use image previews (PNG thumbnails) in the preview UI.
                                                        The actual document file is only generated for the final output in OutputMedia.

                                                        &lt;Prop.Extras&gt;
                                                          **Example: Document requirements**

                                                          ```ts
                                                          const documentReq: DocumentRequirement = {
                                                            format: 'pdf_standard',
                                                            size: 'a4',
                                                          };
                                                          ```
                                                        &lt;/Prop.Extras&gt;

                                                        &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;document&lt;/strong&gt;&lt;/&gt;}&gt;
                                                          &lt;Prop.List&gt;
                                                            &lt;Prop name="format" required type="string" sourceLineNumbers={[418]}&gt;
                                                              Supported document export format.
                                                              Currently supports PDF standard format.

                                                              The only valid value is `"pdf_standard"`.
                                                            &lt;/Prop&gt;

                                                            &lt;Prop name="size" required type="DocumentSize" sourceLineNumbers={[422]}&gt;
                                                              The document size of the export file.

                                                              &lt;Prop.Extras&gt;
                                                                **Available values**:

                                                                * `"a4"`
                                                                * `"a3"`
                                                                * `"letter"`
                                                                * `"legal"`
                                                              &lt;/Prop.Extras&gt;
                                                            &lt;/Prop&gt;
                                                          &lt;/Prop.List&gt;
                                                        &lt;/PillAccordion&gt;
                                                      &lt;/Prop&gt;

                                                      &lt;Prop name="email" type="EmailRequirement" sourceLineNumbers={[768]}&gt;
                                                        Email output types will show a single html file (canva hosted assets) preview in preview UI

                                                        &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;email&lt;/strong&gt;&lt;/&gt;}&gt;
                                                          &lt;Prop.List&gt;
                                                            &lt;Prop name="format" required type="string" sourceLineNumbers={[508]}&gt;
                                                              File format for this requirement.

                                                              &lt;Prop.Extras&gt;
                                                                **Available values**:

                                                                * `"html_bundle"`
                                                                * `"html_standalone"`
                                                              &lt;/Prop.Extras&gt;
                                                            &lt;/Prop&gt;
                                                          &lt;/Prop.List&gt;
                                                        &lt;/PillAccordion&gt;
                                                      &lt;/Prop&gt;
                                                    &lt;/Prop.List&gt;
                                                  &lt;/PillAccordion&gt;
                                                &lt;/Prop&gt;

                                                &lt;Prop name="fileCount" type="ValueRange" sourceLineNumbers={[748]}&gt;
                                                  Number of files accepted in this slot.

                                                  Use this to specify single or multiple file requirements.
                                                  Examples:

                                                  * `{ exact: 1 }`: Exactly one file
                                                  * `{ min: 1, max: 10 }`: Between 1 and 10 files
                                                  * undefined: Any number of files

                                                  &lt;Tabs&gt;
                                                    &lt;Tab name="ExactValueRange"&gt;
                                                      Exact value range constraint.

                                                      &lt;Prop.Extras&gt;
                                                        **Example: Exact value range**

                                                        ```ts
                                                        const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                                        ```
                                                      &lt;/Prop.Extras&gt;

                                                      &lt;Prop.List /&gt;
                                                    &lt;/Tab&gt;

                                                    &lt;Tab name="MinValueRange"&gt;
                                                      Minimum value range constraint.

                                                      &lt;Prop.Extras&gt;
                                                        **Example: Minimum value range**

                                                        ```ts
                                                        const minValue: ValueRange = { min: 3 }; // At least 3
                                                        ```
                                                      &lt;/Prop.Extras&gt;

                                                      &lt;Prop.List /&gt;
                                                    &lt;/Tab&gt;

                                                    &lt;Tab name="MaxValueRange"&gt;
                                                      Maximum value range constraint.

                                                      &lt;Prop.Extras&gt;
                                                        **Example: Maximum value range**

                                                        ```ts
                                                        const maxValue: ValueRange = { max: 10 }; // At most 10
                                                        ```
                                                      &lt;/Prop.Extras&gt;

                                                      &lt;Prop.List /&gt;
                                                    &lt;/Tab&gt;

                                                    &lt;Tab name="MinMaxValueRange"&gt;
                                                      Minimum and maximum value range constraint.
                                                      Ranges are inclusive `(min ≤ value ≤ max)`.

                                                      &lt;Prop.Extras&gt;
                                                        **Example: Minimum and maximum value range**

                                                        ```ts
                                                        const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                                        ```
                                                      &lt;/Prop.Extras&gt;

                                                      &lt;Prop.List /&gt;
                                                    &lt;/Tab&gt;
                                                  &lt;/Tabs&gt;
                                                &lt;/Prop&gt;

                                                &lt;Prop name="selection" readonly type="MediaSelection[]" sourceLineNumbers={[779]}&gt;
                                                  Current selection for this slot.

                                                  Canva populates this only when returning OutputType in Settings UI contexts
                                                  such as RenderSettingsUiInvocationContext and PublishSettingsSettingsUiContext.
                                                  Apps should not set this value when defining output types in
                                                  ContentPublisherIntent.getPublishConfiguration.

                                                  &lt;Tabs&gt;
                                                    &lt;Tab name="ImageSelection"&gt;
                                                      Selection metadata for an image media item.

                                                      &lt;Prop.List&gt;
                                                        &lt;Prop name="kind" required type="string" sourceLineNumbers={[686]}&gt;
                                                          The only valid value is `"image"`.
                                                        &lt;/Prop&gt;

                                                        &lt;Prop name="selectionMetadata" type="SelectionDesignMetadata[]" sourceLineNumbers={[124]}&gt;
                                                          Metadata about the source content represented by this selection.

                                                          &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;selectionMetadata&lt;/strong&gt;&lt;/&gt;}&gt;
                                                            &lt;Prop.List&gt;
                                                              &lt;Prop name="type" required type="string" sourceLineNumbers={[1487]}&gt;
                                                                The only valid value is `"design"`.
                                                              &lt;/Prop&gt;

                                                              &lt;Prop name="designToken" required type="string" sourceLineNumbers={[1491]}&gt;
                                                                A signed JWT token containing the design id
                                                              &lt;/Prop&gt;

                                                              &lt;Prop name="title" required type="string | undefined" sourceLineNumbers={[1495]}&gt;
                                                                The user given title of the design
                                                              &lt;/Prop&gt;
                                                            &lt;/Prop.List&gt;
                                                          &lt;/PillAccordion&gt;
                                                        &lt;/Prop&gt;
                                                      &lt;/Prop.List&gt;
                                                    &lt;/Tab&gt;

                                                    &lt;Tab name="VideoSelection"&gt;
                                                      Selection metadata for a video media item.

                                                      &lt;Prop.List&gt;
                                                        &lt;Prop name="kind" required type="string" sourceLineNumbers={[1731]}&gt;
                                                          The only valid value is `"video"`.
                                                        &lt;/Prop&gt;

                                                        &lt;Prop name="durationMs" required type="number" sourceLineNumbers={[1735]}&gt;
                                                          Duration of the selected video in milliseconds.
                                                        &lt;/Prop&gt;

                                                        &lt;Prop name="selectionMetadata" type="SelectionDesignMetadata[]" sourceLineNumbers={[124]}&gt;
                                                          Metadata about the source content represented by this selection.

                                                          &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;selectionMetadata&lt;/strong&gt;&lt;/&gt;}&gt;
                                                            &lt;Prop.List&gt;
                                                              &lt;Prop name="type" required type="string" sourceLineNumbers={[1487]}&gt;
                                                                The only valid value is `"design"`.
                                                              &lt;/Prop&gt;

                                                              &lt;Prop name="designToken" required type="string" sourceLineNumbers={[1491]}&gt;
                                                                A signed JWT token containing the design id
                                                              &lt;/Prop&gt;

                                                              &lt;Prop name="title" required type="string | undefined" sourceLineNumbers={[1495]}&gt;
                                                                The user given title of the design
                                                              &lt;/Prop&gt;
                                                            &lt;/Prop.List&gt;
                                                          &lt;/PillAccordion&gt;
                                                        &lt;/Prop&gt;
                                                      &lt;/Prop.List&gt;
                                                    &lt;/Tab&gt;

                                                    &lt;Tab name="DocumentSelection"&gt;
                                                      Selection metadata for a document media item.

                                                      &lt;Prop.List&gt;
                                                        &lt;Prop name="kind" required type="string" sourceLineNumbers={[430]}&gt;
                                                          The only valid value is `"document"`.
                                                        &lt;/Prop&gt;

                                                        &lt;Prop name="selectionMetadata" type="SelectionDesignMetadata[]" sourceLineNumbers={[124]}&gt;
                                                          Metadata about the source content represented by this selection.

                                                          &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;selectionMetadata&lt;/strong&gt;&lt;/&gt;}&gt;
                                                            &lt;Prop.List&gt;
                                                              &lt;Prop name="type" required type="string" sourceLineNumbers={[1487]}&gt;
                                                                The only valid value is `"design"`.
                                                              &lt;/Prop&gt;

                                                              &lt;Prop name="designToken" required type="string" sourceLineNumbers={[1491]}&gt;
                                                                A signed JWT token containing the design id
                                                              &lt;/Prop&gt;

                                                              &lt;Prop name="title" required type="string | undefined" sourceLineNumbers={[1495]}&gt;
                                                                The user given title of the design
                                                              &lt;/Prop&gt;
                                                            &lt;/Prop.List&gt;
                                                          &lt;/PillAccordion&gt;
                                                        &lt;/Prop&gt;
                                                      &lt;/Prop.List&gt;
                                                    &lt;/Tab&gt;

                                                    &lt;Tab name="EmailSelection"&gt;
                                                      Selection metadata for an email media item.

                                                      &lt;Prop.List&gt;
                                                        &lt;Prop name="kind" required type="string" sourceLineNumbers={[516]}&gt;
                                                          The only valid value is `"email"`.
                                                        &lt;/Prop&gt;

                                                        &lt;Prop name="selectionMetadata" type="SelectionDesignMetadata[]" sourceLineNumbers={[124]}&gt;
                                                          Metadata about the source content represented by this selection.

                                                          &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;selectionMetadata&lt;/strong&gt;&lt;/&gt;}&gt;
                                                            &lt;Prop.List&gt;
                                                              &lt;Prop name="type" required type="string" sourceLineNumbers={[1487]}&gt;
                                                                The only valid value is `"design"`.
                                                              &lt;/Prop&gt;

                                                              &lt;Prop name="designToken" required type="string" sourceLineNumbers={[1491]}&gt;
                                                                A signed JWT token containing the design id
                                                              &lt;/Prop&gt;

                                                              &lt;Prop name="title" required type="string | undefined" sourceLineNumbers={[1495]}&gt;
                                                                The user given title of the design
                                                              &lt;/Prop&gt;
                                                            &lt;/Prop.List&gt;
                                                          &lt;/PillAccordion&gt;
                                                        &lt;/Prop&gt;
                                                      &lt;/Prop.List&gt;
                                                    &lt;/Tab&gt;
                                                  &lt;/Tabs&gt;
                                                &lt;/Prop&gt;
                                              &lt;/Prop.List&gt;
                                            &lt;/PillAccordion&gt;
                                          &lt;/Prop&gt;
                                        &lt;/Prop.List&gt;
                                      &lt;/PillAccordion&gt;
                                    &lt;/Prop&gt;
                                  &lt;/Prop.List&gt;
                                &lt;/Tab&gt;

                                &lt;Tab name="PublishErrorSettingsUiContext"&gt;
                                  Provides information about an error that occurred in publishContent.

                                  &lt;Prop.List&gt;
                                    &lt;Prop name="reason" required type="string" sourceLineNumbers={[1168]}&gt;
                                      The only valid value is `"publish_error"`.
                                    &lt;/Prop&gt;

                                    &lt;Prop name="error" required type="PublishError" sourceLineNumbers={[1173]}&gt;
                                      The error that occurred. Undefined means no error occurred or the previous
                                      error was cleared by Canva.

                                      &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;error&lt;/strong&gt;&lt;/&gt;}&gt;
                                        &lt;Prop.List /&gt;
                                      &lt;/PillAccordion&gt;
                                    &lt;/Prop&gt;
                                  &lt;/Prop.List&gt;
                                &lt;/Tab&gt;

                                &lt;Tab name="PublishErrorClearedSettingsUiContext"&gt;
                                  Signals that the publish error was cleared.

                                  &lt;Prop.List&gt;
                                    &lt;Prop name="reason" required type="string" sourceLineNumbers={[1160]}&gt;
                                      The only valid value is `"publish_error_cleared"`.
                                    &lt;/Prop&gt;
                                  &lt;/Prop.List&gt;
                                &lt;/Tab&gt;
                              &lt;/Tabs&gt;
                            &lt;/Prop&gt;
                          &lt;/Prop.List&gt;

                          **Returns**

                          `void`
                        &lt;/Prop&gt;
                      &lt;/Prop.List&gt;
                    &lt;/PillAccordion&gt;
                  &lt;/Prop&gt;
                &lt;/Prop.List&gt;

                **Returns**

                A disposer function that cleans up the registered callback.

                () =&gt; `void`
              &lt;/Prop&gt;
            &lt;/Prop.List&gt;
          &lt;/PillAccordion&gt;
        &lt;/Prop&gt;
      &lt;/Prop.List&gt;

      **Returns**

      `void`
    &lt;/Prop&gt;

    &lt;Prop name="renderPreviewUi" required type="function" sourceLineNumbers={[248]}&gt;
      Renders a user interface for previewing the content.

      This action is called after the settings UI is rendered. Your UI should display
      a preview of how the content will appear on the target platform.

      Previews update dynamically as users modify their content or settings. For videos,
      start with lightweight thumbnails and use `requestPreviewUpgrade` to load full
      video previews on demand to optimize performance.

      &lt;Prop.Extras&gt;
        **Example: Rendering a preview UI with video optimization**

        ```ts
        import { createRoot } from 'react-dom/client';
        import type { RenderPreviewUiRequest } from '@canva/intents/content';

        function renderPreviewUi(request: RenderPreviewUiRequest): void {
          const PreviewUiApp = () => (
             <AppUiProvider>
              <PreviewUi request={request} />
            </AppUiProvider>
          );

          createRoot().render(<PreviewUiApp />)
        }
        ```
      &lt;/Prop.Extras&gt;

      **Parameters**

      &lt;Prop.List&gt;
        &lt;Prop name="request" required type="RenderPreviewUiRequest" sourceLineNumbers={[248]}&gt;
          Configuration and callbacks for the preview UI.

          &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;request&lt;/strong&gt;&lt;/&gt;}&gt;
            &lt;Prop.List&gt;
              &lt;Prop name="invocationContext" required type="RenderPreviewUiInvocationContext" sourceLineNumbers={[1331]}&gt;
                The initial preview data and context provided when the preview UI is rendered.

                Contains the initial preview media, output type information, and any existing
                publish settings needed to properly display the preview interface.

                &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;invocationContext&lt;/strong&gt;&lt;/&gt;}&gt;
                  &lt;Prop.List&gt;
                    &lt;Prop name="reason" required type="string" sourceLineNumbers={[1190]}&gt;
                      Initial preview data and context provided when the preview UI is rendered.

                      The only valid value is `"publish"`.
                    &lt;/Prop&gt;

                    &lt;Prop name="previewMedia" type="PreviewMedia[]" sourceLineNumbers={[1195]}&gt;
                      Initial preview media to display
                      This will only be used for scheduling and not caching

                      &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;previewMedia&lt;/strong&gt;&lt;/&gt;}&gt;
                        &lt;Prop.List&gt;
                          &lt;Prop name="mediaSlotId" required type="string" sourceLineNumbers={[1035]}&gt;
                            ID of the media slot this preview belongs to.

                            Matches a media slot ID from your output type definition.
                          &lt;/Prop&gt;

                          &lt;Prop name="previews" required type="Preview[]" sourceLineNumbers={[1041]}&gt;
                            Array of preview items for this media slot.

                            May contain multiple previews if the media slot accepts multiple files.

                            &lt;Tabs&gt;
                              &lt;Tab name="ImagePreview"&gt;
                                Image preview in various states.

                                &lt;Tabs&gt;
                                  &lt;Tab name="ImagePreviewLoading"&gt;
                                    Image preview that is currently being generated.

                                    Display a loading state until the preview transitions to `"ready"` or `"error"`.

                                    &lt;Prop.List&gt;
                                      &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                        Unique identifier for this preview.

                                        Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="kind" required type="string" sourceLineNumbers={[609]}&gt;
                                        Type of media in this preview.

                                        The only valid value is `"image"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="status" required type="string" sourceLineNumbers={[610]}&gt;
                                        Current state of the preview.

                                        The only valid value is `"loading"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[1518]}&gt;
                                        Width of the preview in pixels.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[1522]}&gt;
                                        Height of the preview in pixels.
                                      &lt;/Prop&gt;
                                    &lt;/Prop.List&gt;
                                  &lt;/Tab&gt;

                                  &lt;Tab name="ImagePreviewReady"&gt;
                                    Image preview that is ready to display.

                                    Contains the URL to the preview image.

                                    &lt;Prop.List&gt;
                                      &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                        Unique identifier for this preview.

                                        Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="kind" required type="string" sourceLineNumbers={[620]}&gt;
                                        Type of media in this preview.

                                        The only valid value is `"image"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="status" required type="string" sourceLineNumbers={[621]}&gt;
                                        Current state of the preview.

                                        The only valid value is `"ready"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="format" required type="string" sourceLineNumbers={[625]}&gt;
                                        Image format of the preview.

                                        &lt;Prop.Extras&gt;
                                          **Available values**:

                                          * `"png"`
                                          * `"jpg"`
                                        &lt;/Prop.Extras&gt;
                                      &lt;/Prop&gt;

                                      &lt;Prop name="url" required type="string" sourceLineNumbers={[631]}&gt;
                                        URL to the preview image.

                                        Use this URL to display the preview to users.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[1518]}&gt;
                                        Width of the preview in pixels.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[1522]}&gt;
                                        Height of the preview in pixels.
                                      &lt;/Prop&gt;
                                    &lt;/Prop.List&gt;
                                  &lt;/Tab&gt;

                                  &lt;Tab name="ImagePreviewError"&gt;
                                    Image preview that failed to generate.

                                    Display an error state to the user.

                                    &lt;Prop.List&gt;
                                      &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                        Unique identifier for this preview.

                                        Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="kind" required type="string" sourceLineNumbers={[593]}&gt;
                                        Type of media in this preview.

                                        The only valid value is `"image"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="status" required type="string" sourceLineNumbers={[594]}&gt;
                                        Current state of the preview.

                                        The only valid value is `"error"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="message" required type="string" sourceLineNumbers={[599]}&gt;
                                        The error message to display to the user.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[1518]}&gt;
                                        Width of the preview in pixels.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[1522]}&gt;
                                        Height of the preview in pixels.
                                      &lt;/Prop&gt;
                                    &lt;/Prop.List&gt;
                                  &lt;/Tab&gt;
                                &lt;/Tabs&gt;
                              &lt;/Tab&gt;

                              &lt;Tab name="VideoPreview"&gt;
                                Video preview in various states.

                                Videos transition through states: `"loading"` → `"thumbnail"` → `"upgrading"` → `"ready"`.
                                Start with thumbnails for better performance, then upgrade to full video using `requestPreviewUpgrade`.

                                &lt;Tabs&gt;
                                  &lt;Tab name="VideoPreviewLoading"&gt;
                                    Video preview that is currently being generated.

                                    Display a loading state until the preview transitions to `"thumbnail"` or `"error"`.

                                    &lt;Prop.List&gt;
                                      &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                        Unique identifier for this preview.

                                        Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[1518]}&gt;
                                        Width of the preview in pixels.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[1522]}&gt;
                                        Height of the preview in pixels.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="kind" required type="string" sourceLineNumbers={[1593]}&gt;
                                        Type of media in this preview.

                                        The only valid value is `"video"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="status" required type="string" sourceLineNumbers={[1594]}&gt;
                                        Current state of the preview.

                                        The only valid value is `"loading"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="durationMs" type="number" sourceLineNumbers={[1598]}&gt;
                                        Video duration in milliseconds.
                                      &lt;/Prop&gt;
                                    &lt;/Prop.List&gt;
                                  &lt;/Tab&gt;

                                  &lt;Tab name="VideoPreviewThumbnail"&gt;
                                    Video preview with lightweight thumbnail available.

                                    This is the initial state for video previews. Show the thumbnail image
                                    and call `requestPreviewUpgrade` when the user needs the full video.

                                    &lt;Prop.List&gt;
                                      &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                        Unique identifier for this preview.

                                        Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[1518]}&gt;
                                        Width of the preview in pixels.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[1522]}&gt;
                                        Height of the preview in pixels.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="kind" required type="string" sourceLineNumbers={[1644]}&gt;
                                        Type of media in this preview.

                                        The only valid value is `"video"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="status" required type="string" sourceLineNumbers={[1645]}&gt;
                                        Current state of the preview.

                                        The only valid value is `"thumbnail"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="thumbnailFormat" required type="string" sourceLineNumbers={[1649]}&gt;
                                        Format of the thumbnail image.

                                        &lt;Prop.Extras&gt;
                                          **Available values**:

                                          * `"png"`
                                          * `"jpg"`
                                        &lt;/Prop.Extras&gt;
                                      &lt;/Prop&gt;

                                      &lt;Prop name="thumbnailUrl" required type="string" sourceLineNumbers={[1655]}&gt;
                                        URL to the thumbnail image.

                                        Display this lightweight image until full video is needed.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="durationMs" type="number" sourceLineNumbers={[1659]}&gt;
                                        Video duration in milliseconds.
                                      &lt;/Prop&gt;
                                    &lt;/Prop.List&gt;
                                  &lt;/Tab&gt;

                                  &lt;Tab name="VideoPreviewUpgrading"&gt;
                                    Video preview that is being upgraded from thumbnail to full video.

                                    Display the thumbnail with a loading indicator until the video is ready.

                                    &lt;Prop.List&gt;
                                      &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                        Unique identifier for this preview.

                                        Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[1518]}&gt;
                                        Width of the preview in pixels.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[1522]}&gt;
                                        Height of the preview in pixels.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="kind" required type="string" sourceLineNumbers={[1669]}&gt;
                                        Type of media in this preview.

                                        The only valid value is `"video"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="status" required type="string" sourceLineNumbers={[1670]}&gt;
                                        Current state of the preview.

                                        The only valid value is `"upgrading"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="thumbnailFormat" required type="string" sourceLineNumbers={[1674]}&gt;
                                        Format of the thumbnail image.

                                        &lt;Prop.Extras&gt;
                                          **Available values**:

                                          * `"png"`
                                          * `"jpg"`
                                        &lt;/Prop.Extras&gt;
                                      &lt;/Prop&gt;

                                      &lt;Prop name="thumbnailUrl" required type="string" sourceLineNumbers={[1680]}&gt;
                                        URL to the thumbnail image.

                                        Continue showing the thumbnail while the full video loads.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="durationMs" type="number" sourceLineNumbers={[1684]}&gt;
                                        Video duration in milliseconds.
                                      &lt;/Prop&gt;
                                    &lt;/Prop.List&gt;
                                  &lt;/Tab&gt;

                                  &lt;Tab name="VideoPreviewReady"&gt;
                                    Video preview with full video ready to play.

                                    Contains URLs for both the video and thumbnail.

                                    &lt;Prop.List&gt;
                                      &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                        Unique identifier for this preview.

                                        Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[1518]}&gt;
                                        Width of the preview in pixels.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[1522]}&gt;
                                        Height of the preview in pixels.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="kind" required type="string" sourceLineNumbers={[1608]}&gt;
                                        Type of media in this preview.

                                        The only valid value is `"video"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="status" required type="string" sourceLineNumbers={[1609]}&gt;
                                        Current state of the preview.

                                        The only valid value is `"ready"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="format" required type="string" sourceLineNumbers={[1613]}&gt;
                                        Video format.

                                        The only valid value is `"mp4"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="url" required type="string" sourceLineNumbers={[1619]}&gt;
                                        URL to the full video.

                                        Use this URL in a video player.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="thumbnailFormat" required type="string" sourceLineNumbers={[1623]}&gt;
                                        Format of the thumbnail image.

                                        &lt;Prop.Extras&gt;
                                          **Available values**:

                                          * `"png"`
                                          * `"jpg"`
                                        &lt;/Prop.Extras&gt;
                                      &lt;/Prop&gt;

                                      &lt;Prop name="thumbnailUrl" required type="string" sourceLineNumbers={[1629]}&gt;
                                        URL to the thumbnail image.

                                        Can be used as a poster image for the video player.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="durationMs" type="number" sourceLineNumbers={[1633]}&gt;
                                        Video duration in milliseconds.
                                      &lt;/Prop&gt;
                                    &lt;/Prop.List&gt;
                                  &lt;/Tab&gt;

                                  &lt;Tab name="VideoPreviewError"&gt;
                                    Video preview that failed to generate.

                                    Display an error state to the user.

                                    &lt;Prop.List&gt;
                                      &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                        Unique identifier for this preview.

                                        Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[1518]}&gt;
                                        Width of the preview in pixels.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[1522]}&gt;
                                        Height of the preview in pixels.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="kind" required type="string" sourceLineNumbers={[1577]}&gt;
                                        Type of media in this preview.

                                        The only valid value is `"video"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="status" required type="string" sourceLineNumbers={[1578]}&gt;
                                        Current state of the preview.

                                        The only valid value is `"error"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="message" required type="string" sourceLineNumbers={[1583]}&gt;
                                        The error message to display to the user.
                                      &lt;/Prop&gt;
                                    &lt;/Prop.List&gt;
                                  &lt;/Tab&gt;
                                &lt;/Tabs&gt;
                              &lt;/Tab&gt;

                              &lt;Tab name="DocumentPreview"&gt;
                                Document preview in various states.

                                Documents transition through states: `"loading"` → `"thumbnail"`.
                                Start with a lightweight thumbnail of the first page for quick preview rendering.

                                &lt;Tabs&gt;
                                  &lt;Tab name="DocumentPreviewLoading"&gt;
                                    Document preview that is currently being generated.

                                    Display a loading state until the preview transitions to `"thumbnail"` or `"error"`.

                                    &lt;Prop.List&gt;
                                      &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                        Unique identifier for this preview.

                                        Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="kind" required type="string" sourceLineNumbers={[371]}&gt;
                                        Type of media in this preview.

                                        The only valid value is `"document"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="status" required type="string" sourceLineNumbers={[372]}&gt;
                                        Current state of the preview.

                                        The only valid value is `"loading"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[1518]}&gt;
                                        Width of the preview in pixels.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[1522]}&gt;
                                        Height of the preview in pixels.
                                      &lt;/Prop&gt;
                                    &lt;/Prop.List&gt;
                                  &lt;/Tab&gt;

                                  &lt;Tab name="DocumentPreviewThumbnail"&gt;
                                    Document preview with first page thumbnail available.

                                    This is the initial state for document previews. Show the thumbnail image
                                    of the first page along with the page count to give users a preview of
                                    the document before publishing.

                                    &lt;Prop.List&gt;
                                      &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                        Unique identifier for this preview.

                                        Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="kind" required type="string" sourceLineNumbers={[384]}&gt;
                                        Type of media in this preview.

                                        The only valid value is `"document"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="status" required type="string" sourceLineNumbers={[385]}&gt;
                                        Current state of the preview.

                                        The only valid value is `"thumbnail"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="thumbnailFormat" required type="string" sourceLineNumbers={[389]}&gt;
                                        Format of the thumbnail image.

                                        &lt;Prop.Extras&gt;
                                          **Available values**:

                                          * `"png"`
                                          * `"jpg"`
                                        &lt;/Prop.Extras&gt;
                                      &lt;/Prop&gt;

                                      &lt;Prop name="thumbnailUrl" required type="string" sourceLineNumbers={[395]}&gt;
                                        URL to the first page thumbnail.

                                        Display this lightweight image to preview the document content.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[1518]}&gt;
                                        Width of the preview in pixels.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[1522]}&gt;
                                        Height of the preview in pixels.
                                      &lt;/Prop&gt;
                                    &lt;/Prop.List&gt;
                                  &lt;/Tab&gt;

                                  &lt;Tab name="DocumentPreviewError"&gt;
                                    Document preview that failed to generate.

                                    Display an error state to the user.

                                    &lt;Prop.List&gt;
                                      &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                        Unique identifier for this preview.

                                        Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="kind" required type="string" sourceLineNumbers={[356]}&gt;
                                        Type of media in this preview.

                                        The only valid value is `"document"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="status" required type="string" sourceLineNumbers={[357]}&gt;
                                        Current state of the preview.

                                        The only valid value is `"error"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="message" required type="string" sourceLineNumbers={[361]}&gt;
                                        The error message to display to the user.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[1518]}&gt;
                                        Width of the preview in pixels.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[1522]}&gt;
                                        Height of the preview in pixels.
                                      &lt;/Prop&gt;
                                    &lt;/Prop.List&gt;
                                  &lt;/Tab&gt;
                                &lt;/Tabs&gt;
                              &lt;/Tab&gt;

                              &lt;Tab name="EmailPreview"&gt;
                                Email preview in various states.

                                Display a loading state until the preview transitions to `"ready"` or `"error"`.

                                &lt;Tabs&gt;
                                  &lt;Tab name="EmailPreviewLoading"&gt;
                                    Email preview in a loading state.

                                    Display a loading spinner until the preview transitions to `"ready"` or `"error"`.

                                    &lt;Prop.List&gt;
                                      &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                        Unique identifier for this preview.

                                        Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="kind" required type="string" sourceLineNumbers={[474]}&gt;
                                        Type of media in this preview.

                                        The only valid value is `"email"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="status" required type="string" sourceLineNumbers={[475]}&gt;
                                        Current state of the preview.

                                        The only valid value is `"loading"`.
                                      &lt;/Prop&gt;
                                    &lt;/Prop.List&gt;
                                  &lt;/Tab&gt;

                                  &lt;Tab name="EmailPreviewReady"&gt;
                                    Email preview in a ready state.

                                    Display the email preview.

                                    &lt;Prop.List&gt;
                                      &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                        Unique identifier for this preview.

                                        Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="kind" required type="string" sourceLineNumbers={[485]}&gt;
                                        Type of media in this preview.

                                        The only valid value is `"email"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="status" required type="string" sourceLineNumbers={[486]}&gt;
                                        Current state of the preview.

                                        The only valid value is `"ready"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="url" required type="string" sourceLineNumbers={[490]}&gt;
                                        URL to the single html file that represents the email.
                                      &lt;/Prop&gt;
                                    &lt;/Prop.List&gt;
                                  &lt;/Tab&gt;

                                  &lt;Tab name="EmailPreviewError"&gt;
                                    Email preview in an error state.

                                    Display an error state to the user.

                                    &lt;Prop.List&gt;
                                      &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                        Unique identifier for this preview.

                                        Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="kind" required type="string" sourceLineNumbers={[462]}&gt;
                                        Type of media in this preview.

                                        The only valid value is `"email"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="status" required type="string" sourceLineNumbers={[463]}&gt;
                                        Current state of the preview.

                                        The only valid value is `"error"`.
                                      &lt;/Prop&gt;
                                    &lt;/Prop.List&gt;
                                  &lt;/Tab&gt;
                                &lt;/Tabs&gt;
                              &lt;/Tab&gt;
                            &lt;/Tabs&gt;
                          &lt;/Prop&gt;
                        &lt;/Prop.List&gt;
                      &lt;/PillAccordion&gt;
                    &lt;/Prop&gt;

                    &lt;Prop name="outputType" type="OutputType" sourceLineNumbers={[1197]}&gt;
                      Information about the current output type being previewed

                      &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;outputType&lt;/strong&gt;&lt;/&gt;}&gt;
                        &lt;Prop.List&gt;
                          &lt;Prop name="id" required type="string" sourceLineNumbers={[887]}&gt;
                            Unique identifier for this output type.

                            Use descriptive IDs like `"instagram_post"` or `"youtube_video"`.
                          &lt;/Prop&gt;

                          &lt;Prop name="displayName" required type="string" sourceLineNumbers={[894]}&gt;
                            User-facing name for this output type.

                            This is displayed to users when selecting where to publish.
                            Examples: `"Instagram Post"`, `"YouTube Video"`, `"Twitter Post"`.
                          &lt;/Prop&gt;

                          &lt;Prop name="mediaSlots" required type="MediaSlot[]" sourceLineNumbers={[901]}&gt;
                            Array of media slots defining what content is needed.

                            Each slot represents a piece of media required for publishing,
                            such as a main image, thumbnail, or video.

                            &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;mediaSlots&lt;/strong&gt;&lt;/&gt;}&gt;
                              &lt;Prop.List&gt;
                                &lt;Prop name="id" required type="string" sourceLineNumbers={[732]}&gt;
                                  Unique identifier for this media slot within the output type.
                                &lt;/Prop&gt;

                                &lt;Prop name="displayName" required type="string" sourceLineNumbers={[738]}&gt;
                                  User-facing name for this media slot.

                                  Examples: `"Post Image"`, `"Video Thumbnail"`, `"Main Video"`.
                                &lt;/Prop&gt;

                                &lt;Prop name="accepts" required type="object" sourceLineNumbers={[761]}&gt;
                                  File type requirements for this slot.

                                  Note the following behavior:

                                  * Provide at least one of `image` or `video`
                                  * If both are provided, files for this slot may be either images or videos; each file
                                    must satisfy the corresponding requirement for its media type
                                  * To restrict the slot to a single media type, provide only that requirement
                                  * `fileCount` applies across all files accepted by the slot regardless of media type
                                  * Document output types will show image previews (PNG thumbnail) in preview UI

                                  &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;accepts&lt;/strong&gt;&lt;/&gt;}&gt;
                                    &lt;Prop.List&gt;
                                      &lt;Prop name="image" type="ImageRequirement" sourceLineNumbers={[762]}&gt;
                                        Image file requirements for a media slot.

                                        Specifies format, aspect ratio, and size constraints for images.

                                        &lt;Prop.Extras&gt;
                                          **Example: Image requirements for social media post**

                                          ```ts
                                          const imageReq: ImageRequirement = {
                                            format: 'jpg',
                                            aspectRatio: { min: 0.8, max: 1.91 },
                                          };
                                          ```
                                        &lt;/Prop.Extras&gt;

                                        &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;image&lt;/strong&gt;&lt;/&gt;}&gt;
                                          &lt;Prop.List&gt;
                                            &lt;Prop name="format" required type="PublishFileFormat" sourceLineNumbers={[65]}&gt;
                                              File format for this requirement.

                                              &lt;Prop.Extras&gt;
                                                **Available values**:

                                                * `"png"`
                                                * `"jpg"`
                                                * `"mp4"`
                                                * `"pdf_standard"`
                                                * `"html_bundle"`
                                                * `"html_standalone"`
                                              &lt;/Prop.Extras&gt;
                                            &lt;/Prop&gt;

                                            &lt;Prop name="aspectRatio" type="ValueRange" sourceLineNumbers={[656]}&gt;
                                              Aspect ratio constraint (width / height).

                                              Examples:

                                              * `{ exact: 16/9 }`: Widescreen (16:9)
                                              * `{ min: 0.8, max: 1.91 }`: Instagram range

                                              &lt;Tabs&gt;
                                                &lt;Tab name="ExactValueRange"&gt;
                                                  Exact value range constraint.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Exact value range**

                                                    ```ts
                                                    const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;

                                                &lt;Tab name="MinValueRange"&gt;
                                                  Minimum value range constraint.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Minimum value range**

                                                    ```ts
                                                    const minValue: ValueRange = { min: 3 }; // At least 3
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;

                                                &lt;Tab name="MaxValueRange"&gt;
                                                  Maximum value range constraint.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Maximum value range**

                                                    ```ts
                                                    const maxValue: ValueRange = { max: 10 }; // At most 10
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;

                                                &lt;Tab name="MinMaxValueRange"&gt;
                                                  Minimum and maximum value range constraint.
                                                  Ranges are inclusive `(min ≤ value ≤ max)`.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Minimum and maximum value range**

                                                    ```ts
                                                    const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;
                                              &lt;/Tabs&gt;
                                            &lt;/Prop&gt;

                                            &lt;Prop name="format" required type="string" sourceLineNumbers={[661]}&gt;
                                              &lt;Prop.Extras&gt;
                                                **Available values**:

                                                * `"jpg"`
                                                * `"png"`
                                              &lt;/Prop.Extras&gt;
                                            &lt;/Prop&gt;

                                            &lt;Prop name="allowTransparentBackground" type="boolean" sourceLineNumbers={[678]}&gt;
                                              Controls transparent-background support for PNG exports.

                                              * Only applies when `format` is `'png'`
                                              * If omitted or `false`, Canva exports a standard opaque PNG
                                              * If `true`, Canva shows a `Transparent background` toggle in the publish flow
                                              * Users without the required Canva entitlement may be prompted to upgrade before a transparent export is produced

                                              &lt;Prop.Extras&gt;
                                                **Default value**: `false`
                                              &lt;/Prop.Extras&gt;
                                            &lt;/Prop&gt;
                                          &lt;/Prop.List&gt;
                                        &lt;/PillAccordion&gt;
                                      &lt;/Prop&gt;

                                      &lt;Prop name="video" type="VideoRequirement" sourceLineNumbers={[763]}&gt;
                                        Video file requirements for a media slot.

                                        Specifies format, aspect ratio, duration, and size constraints for videos.

                                        &lt;Prop.Extras&gt;
                                          **Example: Video requirements for YouTube**

                                          ```ts
                                          const videoReq: VideoRequirement = {
                                            format: 'mp4',
                                            aspectRatio: { exact: 16/9 },
                                            durationMs: { min: 1000, max: 600000 },
                                          };
                                          ```
                                        &lt;/Prop.Extras&gt;

                                        &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;video&lt;/strong&gt;&lt;/&gt;}&gt;
                                          &lt;Prop.List&gt;
                                            &lt;Prop name="format" required type="string" sourceLineNumbers={[1706]}&gt;
                                              Supported video format.

                                              The only valid value is `"mp4"`.
                                            &lt;/Prop&gt;

                                            &lt;Prop name="aspectRatio" type="ValueRange" sourceLineNumbers={[1714]}&gt;
                                              Aspect ratio constraint (width / height).

                                              Examples:

                                              * `{ exact: 16/9 }`: Widescreen
                                              * `{ exact: 9/16 }`: Vertical/Story format

                                              &lt;Tabs&gt;
                                                &lt;Tab name="ExactValueRange"&gt;
                                                  Exact value range constraint.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Exact value range**

                                                    ```ts
                                                    const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;

                                                &lt;Tab name="MinValueRange"&gt;
                                                  Minimum value range constraint.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Minimum value range**

                                                    ```ts
                                                    const minValue: ValueRange = { min: 3 }; // At least 3
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;

                                                &lt;Tab name="MaxValueRange"&gt;
                                                  Maximum value range constraint.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Maximum value range**

                                                    ```ts
                                                    const maxValue: ValueRange = { max: 10 }; // At most 10
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;

                                                &lt;Tab name="MinMaxValueRange"&gt;
                                                  Minimum and maximum value range constraint.
                                                  Ranges are inclusive `(min ≤ value ≤ max)`.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Minimum and maximum value range**

                                                    ```ts
                                                    const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;
                                              &lt;/Tabs&gt;
                                            &lt;/Prop&gt;

                                            &lt;Prop name="durationMs" type="ValueRange" sourceLineNumbers={[1722]}&gt;
                                              Duration constraint in milliseconds.

                                              Examples:

                                              * `{ max: 60000 }`: Maximum 60 seconds
                                              * `{ min: 3000, max: 600000 }`: Between 3 seconds and 10 minutes

                                              &lt;Tabs&gt;
                                                &lt;Tab name="ExactValueRange"&gt;
                                                  Exact value range constraint.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Exact value range**

                                                    ```ts
                                                    const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;

                                                &lt;Tab name="MinValueRange"&gt;
                                                  Minimum value range constraint.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Minimum value range**

                                                    ```ts
                                                    const minValue: ValueRange = { min: 3 }; // At least 3
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;

                                                &lt;Tab name="MaxValueRange"&gt;
                                                  Maximum value range constraint.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Maximum value range**

                                                    ```ts
                                                    const maxValue: ValueRange = { max: 10 }; // At most 10
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;

                                                &lt;Tab name="MinMaxValueRange"&gt;
                                                  Minimum and maximum value range constraint.
                                                  Ranges are inclusive `(min ≤ value ≤ max)`.

                                                  &lt;Prop.Extras&gt;
                                                    **Example: Minimum and maximum value range**

                                                    ```ts
                                                    const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                                    ```
                                                  &lt;/Prop.Extras&gt;

                                                  &lt;Prop.List /&gt;
                                                &lt;/Tab&gt;
                                              &lt;/Tabs&gt;
                                            &lt;/Prop&gt;
                                          &lt;/Prop.List&gt;
                                        &lt;/PillAccordion&gt;
                                      &lt;/Prop&gt;

                                      &lt;Prop name="document" type="DocumentRequirement" sourceLineNumbers={[764]}&gt;
                                        Document file requirements for a media slot.

                                        Note: Document output types use image previews (PNG thumbnails) in the preview UI.
                                        The actual document file is only generated for the final output in OutputMedia.

                                        &lt;Prop.Extras&gt;
                                          **Example: Document requirements**

                                          ```ts
                                          const documentReq: DocumentRequirement = {
                                            format: 'pdf_standard',
                                            size: 'a4',
                                          };
                                          ```
                                        &lt;/Prop.Extras&gt;

                                        &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;document&lt;/strong&gt;&lt;/&gt;}&gt;
                                          &lt;Prop.List&gt;
                                            &lt;Prop name="format" required type="string" sourceLineNumbers={[418]}&gt;
                                              Supported document export format.
                                              Currently supports PDF standard format.

                                              The only valid value is `"pdf_standard"`.
                                            &lt;/Prop&gt;

                                            &lt;Prop name="size" required type="DocumentSize" sourceLineNumbers={[422]}&gt;
                                              The document size of the export file.

                                              &lt;Prop.Extras&gt;
                                                **Available values**:

                                                * `"a4"`
                                                * `"a3"`
                                                * `"letter"`
                                                * `"legal"`
                                              &lt;/Prop.Extras&gt;
                                            &lt;/Prop&gt;
                                          &lt;/Prop.List&gt;
                                        &lt;/PillAccordion&gt;
                                      &lt;/Prop&gt;

                                      &lt;Prop name="email" type="EmailRequirement" sourceLineNumbers={[768]}&gt;
                                        Email output types will show a single html file (canva hosted assets) preview in preview UI

                                        &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;email&lt;/strong&gt;&lt;/&gt;}&gt;
                                          &lt;Prop.List&gt;
                                            &lt;Prop name="format" required type="string" sourceLineNumbers={[508]}&gt;
                                              File format for this requirement.

                                              &lt;Prop.Extras&gt;
                                                **Available values**:

                                                * `"html_bundle"`
                                                * `"html_standalone"`
                                              &lt;/Prop.Extras&gt;
                                            &lt;/Prop&gt;
                                          &lt;/Prop.List&gt;
                                        &lt;/PillAccordion&gt;
                                      &lt;/Prop&gt;
                                    &lt;/Prop.List&gt;
                                  &lt;/PillAccordion&gt;
                                &lt;/Prop&gt;

                                &lt;Prop name="fileCount" type="ValueRange" sourceLineNumbers={[748]}&gt;
                                  Number of files accepted in this slot.

                                  Use this to specify single or multiple file requirements.
                                  Examples:

                                  * `{ exact: 1 }`: Exactly one file
                                  * `{ min: 1, max: 10 }`: Between 1 and 10 files
                                  * undefined: Any number of files

                                  &lt;Tabs&gt;
                                    &lt;Tab name="ExactValueRange"&gt;
                                      Exact value range constraint.

                                      &lt;Prop.Extras&gt;
                                        **Example: Exact value range**

                                        ```ts
                                        const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                        ```
                                      &lt;/Prop.Extras&gt;

                                      &lt;Prop.List /&gt;
                                    &lt;/Tab&gt;

                                    &lt;Tab name="MinValueRange"&gt;
                                      Minimum value range constraint.

                                      &lt;Prop.Extras&gt;
                                        **Example: Minimum value range**

                                        ```ts
                                        const minValue: ValueRange = { min: 3 }; // At least 3
                                        ```
                                      &lt;/Prop.Extras&gt;

                                      &lt;Prop.List /&gt;
                                    &lt;/Tab&gt;

                                    &lt;Tab name="MaxValueRange"&gt;
                                      Maximum value range constraint.

                                      &lt;Prop.Extras&gt;
                                        **Example: Maximum value range**

                                        ```ts
                                        const maxValue: ValueRange = { max: 10 }; // At most 10
                                        ```
                                      &lt;/Prop.Extras&gt;

                                      &lt;Prop.List /&gt;
                                    &lt;/Tab&gt;

                                    &lt;Tab name="MinMaxValueRange"&gt;
                                      Minimum and maximum value range constraint.
                                      Ranges are inclusive `(min ≤ value ≤ max)`.

                                      &lt;Prop.Extras&gt;
                                        **Example: Minimum and maximum value range**

                                        ```ts
                                        const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                        ```
                                      &lt;/Prop.Extras&gt;

                                      &lt;Prop.List /&gt;
                                    &lt;/Tab&gt;
                                  &lt;/Tabs&gt;
                                &lt;/Prop&gt;

                                &lt;Prop name="selection" readonly type="MediaSelection[]" sourceLineNumbers={[779]}&gt;
                                  Current selection for this slot.

                                  Canva populates this only when returning OutputType in Settings UI contexts
                                  such as RenderSettingsUiInvocationContext and PublishSettingsSettingsUiContext.
                                  Apps should not set this value when defining output types in
                                  ContentPublisherIntent.getPublishConfiguration.

                                  &lt;Tabs&gt;
                                    &lt;Tab name="ImageSelection"&gt;
                                      Selection metadata for an image media item.

                                      &lt;Prop.List&gt;
                                        &lt;Prop name="kind" required type="string" sourceLineNumbers={[686]}&gt;
                                          The only valid value is `"image"`.
                                        &lt;/Prop&gt;

                                        &lt;Prop name="selectionMetadata" type="SelectionDesignMetadata[]" sourceLineNumbers={[124]}&gt;
                                          Metadata about the source content represented by this selection.

                                          &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;selectionMetadata&lt;/strong&gt;&lt;/&gt;}&gt;
                                            &lt;Prop.List&gt;
                                              &lt;Prop name="type" required type="string" sourceLineNumbers={[1487]}&gt;
                                                The only valid value is `"design"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="designToken" required type="string" sourceLineNumbers={[1491]}&gt;
                                                A signed JWT token containing the design id
                                              &lt;/Prop&gt;

                                              &lt;Prop name="title" required type="string | undefined" sourceLineNumbers={[1495]}&gt;
                                                The user given title of the design
                                              &lt;/Prop&gt;
                                            &lt;/Prop.List&gt;
                                          &lt;/PillAccordion&gt;
                                        &lt;/Prop&gt;
                                      &lt;/Prop.List&gt;
                                    &lt;/Tab&gt;

                                    &lt;Tab name="VideoSelection"&gt;
                                      Selection metadata for a video media item.

                                      &lt;Prop.List&gt;
                                        &lt;Prop name="kind" required type="string" sourceLineNumbers={[1731]}&gt;
                                          The only valid value is `"video"`.
                                        &lt;/Prop&gt;

                                        &lt;Prop name="durationMs" required type="number" sourceLineNumbers={[1735]}&gt;
                                          Duration of the selected video in milliseconds.
                                        &lt;/Prop&gt;

                                        &lt;Prop name="selectionMetadata" type="SelectionDesignMetadata[]" sourceLineNumbers={[124]}&gt;
                                          Metadata about the source content represented by this selection.

                                          &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;selectionMetadata&lt;/strong&gt;&lt;/&gt;}&gt;
                                            &lt;Prop.List&gt;
                                              &lt;Prop name="type" required type="string" sourceLineNumbers={[1487]}&gt;
                                                The only valid value is `"design"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="designToken" required type="string" sourceLineNumbers={[1491]}&gt;
                                                A signed JWT token containing the design id
                                              &lt;/Prop&gt;

                                              &lt;Prop name="title" required type="string | undefined" sourceLineNumbers={[1495]}&gt;
                                                The user given title of the design
                                              &lt;/Prop&gt;
                                            &lt;/Prop.List&gt;
                                          &lt;/PillAccordion&gt;
                                        &lt;/Prop&gt;
                                      &lt;/Prop.List&gt;
                                    &lt;/Tab&gt;

                                    &lt;Tab name="DocumentSelection"&gt;
                                      Selection metadata for a document media item.

                                      &lt;Prop.List&gt;
                                        &lt;Prop name="kind" required type="string" sourceLineNumbers={[430]}&gt;
                                          The only valid value is `"document"`.
                                        &lt;/Prop&gt;

                                        &lt;Prop name="selectionMetadata" type="SelectionDesignMetadata[]" sourceLineNumbers={[124]}&gt;
                                          Metadata about the source content represented by this selection.

                                          &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;selectionMetadata&lt;/strong&gt;&lt;/&gt;}&gt;
                                            &lt;Prop.List&gt;
                                              &lt;Prop name="type" required type="string" sourceLineNumbers={[1487]}&gt;
                                                The only valid value is `"design"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="designToken" required type="string" sourceLineNumbers={[1491]}&gt;
                                                A signed JWT token containing the design id
                                              &lt;/Prop&gt;

                                              &lt;Prop name="title" required type="string | undefined" sourceLineNumbers={[1495]}&gt;
                                                The user given title of the design
                                              &lt;/Prop&gt;
                                            &lt;/Prop.List&gt;
                                          &lt;/PillAccordion&gt;
                                        &lt;/Prop&gt;
                                      &lt;/Prop.List&gt;
                                    &lt;/Tab&gt;

                                    &lt;Tab name="EmailSelection"&gt;
                                      Selection metadata for an email media item.

                                      &lt;Prop.List&gt;
                                        &lt;Prop name="kind" required type="string" sourceLineNumbers={[516]}&gt;
                                          The only valid value is `"email"`.
                                        &lt;/Prop&gt;

                                        &lt;Prop name="selectionMetadata" type="SelectionDesignMetadata[]" sourceLineNumbers={[124]}&gt;
                                          Metadata about the source content represented by this selection.

                                          &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;selectionMetadata&lt;/strong&gt;&lt;/&gt;}&gt;
                                            &lt;Prop.List&gt;
                                              &lt;Prop name="type" required type="string" sourceLineNumbers={[1487]}&gt;
                                                The only valid value is `"design"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="designToken" required type="string" sourceLineNumbers={[1491]}&gt;
                                                A signed JWT token containing the design id
                                              &lt;/Prop&gt;

                                              &lt;Prop name="title" required type="string | undefined" sourceLineNumbers={[1495]}&gt;
                                                The user given title of the design
                                              &lt;/Prop&gt;
                                            &lt;/Prop.List&gt;
                                          &lt;/PillAccordion&gt;
                                        &lt;/Prop&gt;
                                      &lt;/Prop.List&gt;
                                    &lt;/Tab&gt;
                                  &lt;/Tabs&gt;
                                &lt;/Prop&gt;
                              &lt;/Prop.List&gt;
                            &lt;/PillAccordion&gt;
                          &lt;/Prop&gt;
                        &lt;/Prop.List&gt;
                      &lt;/PillAccordion&gt;
                    &lt;/Prop&gt;

                    &lt;Prop name="publishRef" type="string" sourceLineNumbers={[1199]}&gt;
                      Current publish reference, if available
                    &lt;/Prop&gt;
                  &lt;/Prop.List&gt;
                &lt;/PillAccordion&gt;
              &lt;/Prop&gt;

              &lt;Prop name="requestPreviewUpgrade" required type="function" sourceLineNumbers={[1351]}&gt;
                Callback to upgrade video thumbnail previews to full video media.

                Call this function when you need full video previews instead of lightweight thumbnails.
                This helps optimize performance by deferring full video loading until needed.

                Upgrades may complete asynchronously; listen to `registerOnPreviewChange` for updates
                to receive the upgraded video previews.

                &lt;Prop.Extras&gt;
                  **Example: Upgrading video previews on user interaction**

                  ```ts
                  // When user clicks on a video thumbnail, upgrade to full video
                  if (preview.kind === 'video' && preview.status === 'thumbnail') {
                    requestPreviewUpgrade([preview.id]);
                  }
                  ```
                &lt;/Prop.Extras&gt;

                **Parameters**

                &lt;Prop.List&gt;
                  &lt;Prop name="previewIds" required type="string[]" sourceLineNumbers={[1351]}&gt;
                    Array of preview IDs to upgrade from thumbnail to full video
                  &lt;/Prop&gt;
                &lt;/Prop.List&gt;

                **Returns**

                `void`
              &lt;/Prop&gt;

              &lt;Prop name="registerOnPreviewChange" required type="function" sourceLineNumbers={[1384]}&gt;
                Registers a callback to be invoked when preview data changes.

                This callback is triggered when:

                * The design content changes
                * The output type changes
                * Preview media is upgraded from thumbnail to full video
                * Export settings are modified

                Use this to update your preview UI in real-time as users modify their design.

                &lt;Prop.Extras&gt;
                  **Example: Handling preview updates**

                  ```ts
                  const disposer = registerOnPreviewChange(({ previewMedia, outputType, publishRef }) => {
                    // Update your preview UI with the new preview media
                    previewMedia.forEach((media) => {
                      media.previews.forEach((preview) => {
                        if (preview.status === 'ready') {
                          displayPreview(preview);
                        }
                      });
                    });
                  });

                  // Clean up when preview UI is unmounted
                  onUnmount(() => disposer());
                  ```
                &lt;/Prop.Extras&gt;

                **Parameters**

                &lt;Prop.List&gt;
                  &lt;Prop name="callback" required type="function" sourceLineNumbers={[1384]}&gt;
                    The callback invoked when preview data is updated

                    **Parameters**

                    &lt;Prop.List&gt;
                      &lt;Prop name="opts" required type="object" sourceLineNumbers={[1384]}&gt;
                        &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;opts&lt;/strong&gt;&lt;/&gt;}&gt;
                          &lt;Prop.List&gt;
                            &lt;Prop name="previewMedia" required type="PreviewMedia[]" sourceLineNumbers={[1385]}&gt;
                              Preview media for a specific media slot.

                              Contains preview URLs and metadata for images or videos in the design.

                              &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;previewMedia&lt;/strong&gt;&lt;/&gt;}&gt;
                                &lt;Prop.List&gt;
                                  &lt;Prop name="mediaSlotId" required type="string" sourceLineNumbers={[1035]}&gt;
                                    ID of the media slot this preview belongs to.

                                    Matches a media slot ID from your output type definition.
                                  &lt;/Prop&gt;

                                  &lt;Prop name="previews" required type="Preview[]" sourceLineNumbers={[1041]}&gt;
                                    Array of preview items for this media slot.

                                    May contain multiple previews if the media slot accepts multiple files.

                                    &lt;Tabs&gt;
                                      &lt;Tab name="ImagePreview"&gt;
                                        Image preview in various states.

                                        &lt;Tabs&gt;
                                          &lt;Tab name="ImagePreviewLoading"&gt;
                                            Image preview that is currently being generated.

                                            Display a loading state until the preview transitions to `"ready"` or `"error"`.

                                            &lt;Prop.List&gt;
                                              &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                                Unique identifier for this preview.

                                                Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="kind" required type="string" sourceLineNumbers={[609]}&gt;
                                                Type of media in this preview.

                                                The only valid value is `"image"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="status" required type="string" sourceLineNumbers={[610]}&gt;
                                                Current state of the preview.

                                                The only valid value is `"loading"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[1518]}&gt;
                                                Width of the preview in pixels.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[1522]}&gt;
                                                Height of the preview in pixels.
                                              &lt;/Prop&gt;
                                            &lt;/Prop.List&gt;
                                          &lt;/Tab&gt;

                                          &lt;Tab name="ImagePreviewReady"&gt;
                                            Image preview that is ready to display.

                                            Contains the URL to the preview image.

                                            &lt;Prop.List&gt;
                                              &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                                Unique identifier for this preview.

                                                Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="kind" required type="string" sourceLineNumbers={[620]}&gt;
                                                Type of media in this preview.

                                                The only valid value is `"image"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="status" required type="string" sourceLineNumbers={[621]}&gt;
                                                Current state of the preview.

                                                The only valid value is `"ready"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="format" required type="string" sourceLineNumbers={[625]}&gt;
                                                Image format of the preview.

                                                &lt;Prop.Extras&gt;
                                                  **Available values**:

                                                  * `"png"`
                                                  * `"jpg"`
                                                &lt;/Prop.Extras&gt;
                                              &lt;/Prop&gt;

                                              &lt;Prop name="url" required type="string" sourceLineNumbers={[631]}&gt;
                                                URL to the preview image.

                                                Use this URL to display the preview to users.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[1518]}&gt;
                                                Width of the preview in pixels.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[1522]}&gt;
                                                Height of the preview in pixels.
                                              &lt;/Prop&gt;
                                            &lt;/Prop.List&gt;
                                          &lt;/Tab&gt;

                                          &lt;Tab name="ImagePreviewError"&gt;
                                            Image preview that failed to generate.

                                            Display an error state to the user.

                                            &lt;Prop.List&gt;
                                              &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                                Unique identifier for this preview.

                                                Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="kind" required type="string" sourceLineNumbers={[593]}&gt;
                                                Type of media in this preview.

                                                The only valid value is `"image"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="status" required type="string" sourceLineNumbers={[594]}&gt;
                                                Current state of the preview.

                                                The only valid value is `"error"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="message" required type="string" sourceLineNumbers={[599]}&gt;
                                                The error message to display to the user.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[1518]}&gt;
                                                Width of the preview in pixels.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[1522]}&gt;
                                                Height of the preview in pixels.
                                              &lt;/Prop&gt;
                                            &lt;/Prop.List&gt;
                                          &lt;/Tab&gt;
                                        &lt;/Tabs&gt;
                                      &lt;/Tab&gt;

                                      &lt;Tab name="VideoPreview"&gt;
                                        Video preview in various states.

                                        Videos transition through states: `"loading"` → `"thumbnail"` → `"upgrading"` → `"ready"`.
                                        Start with thumbnails for better performance, then upgrade to full video using `requestPreviewUpgrade`.

                                        &lt;Tabs&gt;
                                          &lt;Tab name="VideoPreviewLoading"&gt;
                                            Video preview that is currently being generated.

                                            Display a loading state until the preview transitions to `"thumbnail"` or `"error"`.

                                            &lt;Prop.List&gt;
                                              &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                                Unique identifier for this preview.

                                                Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[1518]}&gt;
                                                Width of the preview in pixels.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[1522]}&gt;
                                                Height of the preview in pixels.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="kind" required type="string" sourceLineNumbers={[1593]}&gt;
                                                Type of media in this preview.

                                                The only valid value is `"video"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="status" required type="string" sourceLineNumbers={[1594]}&gt;
                                                Current state of the preview.

                                                The only valid value is `"loading"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="durationMs" type="number" sourceLineNumbers={[1598]}&gt;
                                                Video duration in milliseconds.
                                              &lt;/Prop&gt;
                                            &lt;/Prop.List&gt;
                                          &lt;/Tab&gt;

                                          &lt;Tab name="VideoPreviewThumbnail"&gt;
                                            Video preview with lightweight thumbnail available.

                                            This is the initial state for video previews. Show the thumbnail image
                                            and call `requestPreviewUpgrade` when the user needs the full video.

                                            &lt;Prop.List&gt;
                                              &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                                Unique identifier for this preview.

                                                Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[1518]}&gt;
                                                Width of the preview in pixels.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[1522]}&gt;
                                                Height of the preview in pixels.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="kind" required type="string" sourceLineNumbers={[1644]}&gt;
                                                Type of media in this preview.

                                                The only valid value is `"video"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="status" required type="string" sourceLineNumbers={[1645]}&gt;
                                                Current state of the preview.

                                                The only valid value is `"thumbnail"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="thumbnailFormat" required type="string" sourceLineNumbers={[1649]}&gt;
                                                Format of the thumbnail image.

                                                &lt;Prop.Extras&gt;
                                                  **Available values**:

                                                  * `"png"`
                                                  * `"jpg"`
                                                &lt;/Prop.Extras&gt;
                                              &lt;/Prop&gt;

                                              &lt;Prop name="thumbnailUrl" required type="string" sourceLineNumbers={[1655]}&gt;
                                                URL to the thumbnail image.

                                                Display this lightweight image until full video is needed.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="durationMs" type="number" sourceLineNumbers={[1659]}&gt;
                                                Video duration in milliseconds.
                                              &lt;/Prop&gt;
                                            &lt;/Prop.List&gt;
                                          &lt;/Tab&gt;

                                          &lt;Tab name="VideoPreviewUpgrading"&gt;
                                            Video preview that is being upgraded from thumbnail to full video.

                                            Display the thumbnail with a loading indicator until the video is ready.

                                            &lt;Prop.List&gt;
                                              &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                                Unique identifier for this preview.

                                                Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[1518]}&gt;
                                                Width of the preview in pixels.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[1522]}&gt;
                                                Height of the preview in pixels.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="kind" required type="string" sourceLineNumbers={[1669]}&gt;
                                                Type of media in this preview.

                                                The only valid value is `"video"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="status" required type="string" sourceLineNumbers={[1670]}&gt;
                                                Current state of the preview.

                                                The only valid value is `"upgrading"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="thumbnailFormat" required type="string" sourceLineNumbers={[1674]}&gt;
                                                Format of the thumbnail image.

                                                &lt;Prop.Extras&gt;
                                                  **Available values**:

                                                  * `"png"`
                                                  * `"jpg"`
                                                &lt;/Prop.Extras&gt;
                                              &lt;/Prop&gt;

                                              &lt;Prop name="thumbnailUrl" required type="string" sourceLineNumbers={[1680]}&gt;
                                                URL to the thumbnail image.

                                                Continue showing the thumbnail while the full video loads.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="durationMs" type="number" sourceLineNumbers={[1684]}&gt;
                                                Video duration in milliseconds.
                                              &lt;/Prop&gt;
                                            &lt;/Prop.List&gt;
                                          &lt;/Tab&gt;

                                          &lt;Tab name="VideoPreviewReady"&gt;
                                            Video preview with full video ready to play.

                                            Contains URLs for both the video and thumbnail.

                                            &lt;Prop.List&gt;
                                              &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                                Unique identifier for this preview.

                                                Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[1518]}&gt;
                                                Width of the preview in pixels.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[1522]}&gt;
                                                Height of the preview in pixels.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="kind" required type="string" sourceLineNumbers={[1608]}&gt;
                                                Type of media in this preview.

                                                The only valid value is `"video"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="status" required type="string" sourceLineNumbers={[1609]}&gt;
                                                Current state of the preview.

                                                The only valid value is `"ready"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="format" required type="string" sourceLineNumbers={[1613]}&gt;
                                                Video format.

                                                The only valid value is `"mp4"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="url" required type="string" sourceLineNumbers={[1619]}&gt;
                                                URL to the full video.

                                                Use this URL in a video player.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="thumbnailFormat" required type="string" sourceLineNumbers={[1623]}&gt;
                                                Format of the thumbnail image.

                                                &lt;Prop.Extras&gt;
                                                  **Available values**:

                                                  * `"png"`
                                                  * `"jpg"`
                                                &lt;/Prop.Extras&gt;
                                              &lt;/Prop&gt;

                                              &lt;Prop name="thumbnailUrl" required type="string" sourceLineNumbers={[1629]}&gt;
                                                URL to the thumbnail image.

                                                Can be used as a poster image for the video player.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="durationMs" type="number" sourceLineNumbers={[1633]}&gt;
                                                Video duration in milliseconds.
                                              &lt;/Prop&gt;
                                            &lt;/Prop.List&gt;
                                          &lt;/Tab&gt;

                                          &lt;Tab name="VideoPreviewError"&gt;
                                            Video preview that failed to generate.

                                            Display an error state to the user.

                                            &lt;Prop.List&gt;
                                              &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                                Unique identifier for this preview.

                                                Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[1518]}&gt;
                                                Width of the preview in pixels.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[1522]}&gt;
                                                Height of the preview in pixels.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="kind" required type="string" sourceLineNumbers={[1577]}&gt;
                                                Type of media in this preview.

                                                The only valid value is `"video"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="status" required type="string" sourceLineNumbers={[1578]}&gt;
                                                Current state of the preview.

                                                The only valid value is `"error"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="message" required type="string" sourceLineNumbers={[1583]}&gt;
                                                The error message to display to the user.
                                              &lt;/Prop&gt;
                                            &lt;/Prop.List&gt;
                                          &lt;/Tab&gt;
                                        &lt;/Tabs&gt;
                                      &lt;/Tab&gt;

                                      &lt;Tab name="DocumentPreview"&gt;
                                        Document preview in various states.

                                        Documents transition through states: `"loading"` → `"thumbnail"`.
                                        Start with a lightweight thumbnail of the first page for quick preview rendering.

                                        &lt;Tabs&gt;
                                          &lt;Tab name="DocumentPreviewLoading"&gt;
                                            Document preview that is currently being generated.

                                            Display a loading state until the preview transitions to `"thumbnail"` or `"error"`.

                                            &lt;Prop.List&gt;
                                              &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                                Unique identifier for this preview.

                                                Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="kind" required type="string" sourceLineNumbers={[371]}&gt;
                                                Type of media in this preview.

                                                The only valid value is `"document"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="status" required type="string" sourceLineNumbers={[372]}&gt;
                                                Current state of the preview.

                                                The only valid value is `"loading"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[1518]}&gt;
                                                Width of the preview in pixels.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[1522]}&gt;
                                                Height of the preview in pixels.
                                              &lt;/Prop&gt;
                                            &lt;/Prop.List&gt;
                                          &lt;/Tab&gt;

                                          &lt;Tab name="DocumentPreviewThumbnail"&gt;
                                            Document preview with first page thumbnail available.

                                            This is the initial state for document previews. Show the thumbnail image
                                            of the first page along with the page count to give users a preview of
                                            the document before publishing.

                                            &lt;Prop.List&gt;
                                              &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                                Unique identifier for this preview.

                                                Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="kind" required type="string" sourceLineNumbers={[384]}&gt;
                                                Type of media in this preview.

                                                The only valid value is `"document"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="status" required type="string" sourceLineNumbers={[385]}&gt;
                                                Current state of the preview.

                                                The only valid value is `"thumbnail"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="thumbnailFormat" required type="string" sourceLineNumbers={[389]}&gt;
                                                Format of the thumbnail image.

                                                &lt;Prop.Extras&gt;
                                                  **Available values**:

                                                  * `"png"`
                                                  * `"jpg"`
                                                &lt;/Prop.Extras&gt;
                                              &lt;/Prop&gt;

                                              &lt;Prop name="thumbnailUrl" required type="string" sourceLineNumbers={[395]}&gt;
                                                URL to the first page thumbnail.

                                                Display this lightweight image to preview the document content.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[1518]}&gt;
                                                Width of the preview in pixels.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[1522]}&gt;
                                                Height of the preview in pixels.
                                              &lt;/Prop&gt;
                                            &lt;/Prop.List&gt;
                                          &lt;/Tab&gt;

                                          &lt;Tab name="DocumentPreviewError"&gt;
                                            Document preview that failed to generate.

                                            Display an error state to the user.

                                            &lt;Prop.List&gt;
                                              &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                                Unique identifier for this preview.

                                                Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="kind" required type="string" sourceLineNumbers={[356]}&gt;
                                                Type of media in this preview.

                                                The only valid value is `"document"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="status" required type="string" sourceLineNumbers={[357]}&gt;
                                                Current state of the preview.

                                                The only valid value is `"error"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="message" required type="string" sourceLineNumbers={[361]}&gt;
                                                The error message to display to the user.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[1518]}&gt;
                                                Width of the preview in pixels.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[1522]}&gt;
                                                Height of the preview in pixels.
                                              &lt;/Prop&gt;
                                            &lt;/Prop.List&gt;
                                          &lt;/Tab&gt;
                                        &lt;/Tabs&gt;
                                      &lt;/Tab&gt;

                                      &lt;Tab name="EmailPreview"&gt;
                                        Email preview in various states.

                                        Display a loading state until the preview transitions to `"ready"` or `"error"`.

                                        &lt;Tabs&gt;
                                          &lt;Tab name="EmailPreviewLoading"&gt;
                                            Email preview in a loading state.

                                            Display a loading spinner until the preview transitions to `"ready"` or `"error"`.

                                            &lt;Prop.List&gt;
                                              &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                                Unique identifier for this preview.

                                                Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="kind" required type="string" sourceLineNumbers={[474]}&gt;
                                                Type of media in this preview.

                                                The only valid value is `"email"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="status" required type="string" sourceLineNumbers={[475]}&gt;
                                                Current state of the preview.

                                                The only valid value is `"loading"`.
                                              &lt;/Prop&gt;
                                            &lt;/Prop.List&gt;
                                          &lt;/Tab&gt;

                                          &lt;Tab name="EmailPreviewReady"&gt;
                                            Email preview in a ready state.

                                            Display the email preview.

                                            &lt;Prop.List&gt;
                                              &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                                Unique identifier for this preview.

                                                Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="kind" required type="string" sourceLineNumbers={[485]}&gt;
                                                Type of media in this preview.

                                                The only valid value is `"email"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="status" required type="string" sourceLineNumbers={[486]}&gt;
                                                Current state of the preview.

                                                The only valid value is `"ready"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="url" required type="string" sourceLineNumbers={[490]}&gt;
                                                URL to the single html file that represents the email.
                                              &lt;/Prop&gt;
                                            &lt;/Prop.List&gt;
                                          &lt;/Tab&gt;

                                          &lt;Tab name="EmailPreviewError"&gt;
                                            Email preview in an error state.

                                            Display an error state to the user.

                                            &lt;Prop.List&gt;
                                              &lt;Prop name="id" required type="string" sourceLineNumbers={[102]}&gt;
                                                Unique identifier for this preview.

                                                Use this ID with `requestPreviewUpgrade` to upgrade video thumbnails.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="kind" required type="string" sourceLineNumbers={[462]}&gt;
                                                Type of media in this preview.

                                                The only valid value is `"email"`.
                                              &lt;/Prop&gt;

                                              &lt;Prop name="status" required type="string" sourceLineNumbers={[463]}&gt;
                                                Current state of the preview.

                                                The only valid value is `"error"`.
                                              &lt;/Prop&gt;
                                            &lt;/Prop.List&gt;
                                          &lt;/Tab&gt;
                                        &lt;/Tabs&gt;
                                      &lt;/Tab&gt;
                                    &lt;/Tabs&gt;
                                  &lt;/Prop&gt;
                                &lt;/Prop.List&gt;
                              &lt;/PillAccordion&gt;
                            &lt;/Prop&gt;

                            &lt;Prop name="outputType" required type="OutputType" sourceLineNumbers={[1387]}&gt;
                              The output type that the preview data is for

                              &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;outputType&lt;/strong&gt;&lt;/&gt;}&gt;
                                &lt;Prop.List&gt;
                                  &lt;Prop name="id" required type="string" sourceLineNumbers={[887]}&gt;
                                    Unique identifier for this output type.

                                    Use descriptive IDs like `"instagram_post"` or `"youtube_video"`.
                                  &lt;/Prop&gt;

                                  &lt;Prop name="displayName" required type="string" sourceLineNumbers={[894]}&gt;
                                    User-facing name for this output type.

                                    This is displayed to users when selecting where to publish.
                                    Examples: `"Instagram Post"`, `"YouTube Video"`, `"Twitter Post"`.
                                  &lt;/Prop&gt;

                                  &lt;Prop name="mediaSlots" required type="MediaSlot[]" sourceLineNumbers={[901]}&gt;
                                    Array of media slots defining what content is needed.

                                    Each slot represents a piece of media required for publishing,
                                    such as a main image, thumbnail, or video.

                                    &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;mediaSlots&lt;/strong&gt;&lt;/&gt;}&gt;
                                      &lt;Prop.List&gt;
                                        &lt;Prop name="id" required type="string" sourceLineNumbers={[732]}&gt;
                                          Unique identifier for this media slot within the output type.
                                        &lt;/Prop&gt;

                                        &lt;Prop name="displayName" required type="string" sourceLineNumbers={[738]}&gt;
                                          User-facing name for this media slot.

                                          Examples: `"Post Image"`, `"Video Thumbnail"`, `"Main Video"`.
                                        &lt;/Prop&gt;

                                        &lt;Prop name="accepts" required type="object" sourceLineNumbers={[761]}&gt;
                                          File type requirements for this slot.

                                          Note the following behavior:

                                          * Provide at least one of `image` or `video`
                                          * If both are provided, files for this slot may be either images or videos; each file
                                            must satisfy the corresponding requirement for its media type
                                          * To restrict the slot to a single media type, provide only that requirement
                                          * `fileCount` applies across all files accepted by the slot regardless of media type
                                          * Document output types will show image previews (PNG thumbnail) in preview UI

                                          &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;accepts&lt;/strong&gt;&lt;/&gt;}&gt;
                                            &lt;Prop.List&gt;
                                              &lt;Prop name="image" type="ImageRequirement" sourceLineNumbers={[762]}&gt;
                                                Image file requirements for a media slot.

                                                Specifies format, aspect ratio, and size constraints for images.

                                                &lt;Prop.Extras&gt;
                                                  **Example: Image requirements for social media post**

                                                  ```ts
                                                  const imageReq: ImageRequirement = {
                                                    format: 'jpg',
                                                    aspectRatio: { min: 0.8, max: 1.91 },
                                                  };
                                                  ```
                                                &lt;/Prop.Extras&gt;

                                                &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;image&lt;/strong&gt;&lt;/&gt;}&gt;
                                                  &lt;Prop.List&gt;
                                                    &lt;Prop name="format" required type="PublishFileFormat" sourceLineNumbers={[65]}&gt;
                                                      File format for this requirement.

                                                      &lt;Prop.Extras&gt;
                                                        **Available values**:

                                                        * `"png"`
                                                        * `"jpg"`
                                                        * `"mp4"`
                                                        * `"pdf_standard"`
                                                        * `"html_bundle"`
                                                        * `"html_standalone"`
                                                      &lt;/Prop.Extras&gt;
                                                    &lt;/Prop&gt;

                                                    &lt;Prop name="aspectRatio" type="ValueRange" sourceLineNumbers={[656]}&gt;
                                                      Aspect ratio constraint (width / height).

                                                      Examples:

                                                      * `{ exact: 16/9 }`: Widescreen (16:9)
                                                      * `{ min: 0.8, max: 1.91 }`: Instagram range

                                                      &lt;Tabs&gt;
                                                        &lt;Tab name="ExactValueRange"&gt;
                                                          Exact value range constraint.

                                                          &lt;Prop.Extras&gt;
                                                            **Example: Exact value range**

                                                            ```ts
                                                            const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                                            ```
                                                          &lt;/Prop.Extras&gt;

                                                          &lt;Prop.List /&gt;
                                                        &lt;/Tab&gt;

                                                        &lt;Tab name="MinValueRange"&gt;
                                                          Minimum value range constraint.

                                                          &lt;Prop.Extras&gt;
                                                            **Example: Minimum value range**

                                                            ```ts
                                                            const minValue: ValueRange = { min: 3 }; // At least 3
                                                            ```
                                                          &lt;/Prop.Extras&gt;

                                                          &lt;Prop.List /&gt;
                                                        &lt;/Tab&gt;

                                                        &lt;Tab name="MaxValueRange"&gt;
                                                          Maximum value range constraint.

                                                          &lt;Prop.Extras&gt;
                                                            **Example: Maximum value range**

                                                            ```ts
                                                            const maxValue: ValueRange = { max: 10 }; // At most 10
                                                            ```
                                                          &lt;/Prop.Extras&gt;

                                                          &lt;Prop.List /&gt;
                                                        &lt;/Tab&gt;

                                                        &lt;Tab name="MinMaxValueRange"&gt;
                                                          Minimum and maximum value range constraint.
                                                          Ranges are inclusive `(min ≤ value ≤ max)`.

                                                          &lt;Prop.Extras&gt;
                                                            **Example: Minimum and maximum value range**

                                                            ```ts
                                                            const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                                            ```
                                                          &lt;/Prop.Extras&gt;

                                                          &lt;Prop.List /&gt;
                                                        &lt;/Tab&gt;
                                                      &lt;/Tabs&gt;
                                                    &lt;/Prop&gt;

                                                    &lt;Prop name="format" required type="string" sourceLineNumbers={[661]}&gt;
                                                      &lt;Prop.Extras&gt;
                                                        **Available values**:

                                                        * `"jpg"`
                                                        * `"png"`
                                                      &lt;/Prop.Extras&gt;
                                                    &lt;/Prop&gt;

                                                    &lt;Prop name="allowTransparentBackground" type="boolean" sourceLineNumbers={[678]}&gt;
                                                      Controls transparent-background support for PNG exports.

                                                      * Only applies when `format` is `'png'`
                                                      * If omitted or `false`, Canva exports a standard opaque PNG
                                                      * If `true`, Canva shows a `Transparent background` toggle in the publish flow
                                                      * Users without the required Canva entitlement may be prompted to upgrade before a transparent export is produced

                                                      &lt;Prop.Extras&gt;
                                                        **Default value**: `false`
                                                      &lt;/Prop.Extras&gt;
                                                    &lt;/Prop&gt;
                                                  &lt;/Prop.List&gt;
                                                &lt;/PillAccordion&gt;
                                              &lt;/Prop&gt;

                                              &lt;Prop name="video" type="VideoRequirement" sourceLineNumbers={[763]}&gt;
                                                Video file requirements for a media slot.

                                                Specifies format, aspect ratio, duration, and size constraints for videos.

                                                &lt;Prop.Extras&gt;
                                                  **Example: Video requirements for YouTube**

                                                  ```ts
                                                  const videoReq: VideoRequirement = {
                                                    format: 'mp4',
                                                    aspectRatio: { exact: 16/9 },
                                                    durationMs: { min: 1000, max: 600000 },
                                                  };
                                                  ```
                                                &lt;/Prop.Extras&gt;

                                                &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;video&lt;/strong&gt;&lt;/&gt;}&gt;
                                                  &lt;Prop.List&gt;
                                                    &lt;Prop name="format" required type="string" sourceLineNumbers={[1706]}&gt;
                                                      Supported video format.

                                                      The only valid value is `"mp4"`.
                                                    &lt;/Prop&gt;

                                                    &lt;Prop name="aspectRatio" type="ValueRange" sourceLineNumbers={[1714]}&gt;
                                                      Aspect ratio constraint (width / height).

                                                      Examples:

                                                      * `{ exact: 16/9 }`: Widescreen
                                                      * `{ exact: 9/16 }`: Vertical/Story format

                                                      &lt;Tabs&gt;
                                                        &lt;Tab name="ExactValueRange"&gt;
                                                          Exact value range constraint.

                                                          &lt;Prop.Extras&gt;
                                                            **Example: Exact value range**

                                                            ```ts
                                                            const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                                            ```
                                                          &lt;/Prop.Extras&gt;

                                                          &lt;Prop.List /&gt;
                                                        &lt;/Tab&gt;

                                                        &lt;Tab name="MinValueRange"&gt;
                                                          Minimum value range constraint.

                                                          &lt;Prop.Extras&gt;
                                                            **Example: Minimum value range**

                                                            ```ts
                                                            const minValue: ValueRange = { min: 3 }; // At least 3
                                                            ```
                                                          &lt;/Prop.Extras&gt;

                                                          &lt;Prop.List /&gt;
                                                        &lt;/Tab&gt;

                                                        &lt;Tab name="MaxValueRange"&gt;
                                                          Maximum value range constraint.

                                                          &lt;Prop.Extras&gt;
                                                            **Example: Maximum value range**

                                                            ```ts
                                                            const maxValue: ValueRange = { max: 10 }; // At most 10
                                                            ```
                                                          &lt;/Prop.Extras&gt;

                                                          &lt;Prop.List /&gt;
                                                        &lt;/Tab&gt;

                                                        &lt;Tab name="MinMaxValueRange"&gt;
                                                          Minimum and maximum value range constraint.
                                                          Ranges are inclusive `(min ≤ value ≤ max)`.

                                                          &lt;Prop.Extras&gt;
                                                            **Example: Minimum and maximum value range**

                                                            ```ts
                                                            const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                                            ```
                                                          &lt;/Prop.Extras&gt;

                                                          &lt;Prop.List /&gt;
                                                        &lt;/Tab&gt;
                                                      &lt;/Tabs&gt;
                                                    &lt;/Prop&gt;

                                                    &lt;Prop name="durationMs" type="ValueRange" sourceLineNumbers={[1722]}&gt;
                                                      Duration constraint in milliseconds.

                                                      Examples:

                                                      * `{ max: 60000 }`: Maximum 60 seconds
                                                      * `{ min: 3000, max: 600000 }`: Between 3 seconds and 10 minutes

                                                      &lt;Tabs&gt;
                                                        &lt;Tab name="ExactValueRange"&gt;
                                                          Exact value range constraint.

                                                          &lt;Prop.Extras&gt;
                                                            **Example: Exact value range**

                                                            ```ts
                                                            const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                                            ```
                                                          &lt;/Prop.Extras&gt;

                                                          &lt;Prop.List /&gt;
                                                        &lt;/Tab&gt;

                                                        &lt;Tab name="MinValueRange"&gt;
                                                          Minimum value range constraint.

                                                          &lt;Prop.Extras&gt;
                                                            **Example: Minimum value range**

                                                            ```ts
                                                            const minValue: ValueRange = { min: 3 }; // At least 3
                                                            ```
                                                          &lt;/Prop.Extras&gt;

                                                          &lt;Prop.List /&gt;
                                                        &lt;/Tab&gt;

                                                        &lt;Tab name="MaxValueRange"&gt;
                                                          Maximum value range constraint.

                                                          &lt;Prop.Extras&gt;
                                                            **Example: Maximum value range**

                                                            ```ts
                                                            const maxValue: ValueRange = { max: 10 }; // At most 10
                                                            ```
                                                          &lt;/Prop.Extras&gt;

                                                          &lt;Prop.List /&gt;
                                                        &lt;/Tab&gt;

                                                        &lt;Tab name="MinMaxValueRange"&gt;
                                                          Minimum and maximum value range constraint.
                                                          Ranges are inclusive `(min ≤ value ≤ max)`.

                                                          &lt;Prop.Extras&gt;
                                                            **Example: Minimum and maximum value range**

                                                            ```ts
                                                            const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                                            ```
                                                          &lt;/Prop.Extras&gt;

                                                          &lt;Prop.List /&gt;
                                                        &lt;/Tab&gt;
                                                      &lt;/Tabs&gt;
                                                    &lt;/Prop&gt;
                                                  &lt;/Prop.List&gt;
                                                &lt;/PillAccordion&gt;
                                              &lt;/Prop&gt;

                                              &lt;Prop name="document" type="DocumentRequirement" sourceLineNumbers={[764]}&gt;
                                                Document file requirements for a media slot.

                                                Note: Document output types use image previews (PNG thumbnails) in the preview UI.
                                                The actual document file is only generated for the final output in OutputMedia.

                                                &lt;Prop.Extras&gt;
                                                  **Example: Document requirements**

                                                  ```ts
                                                  const documentReq: DocumentRequirement = {
                                                    format: 'pdf_standard',
                                                    size: 'a4',
                                                  };
                                                  ```
                                                &lt;/Prop.Extras&gt;

                                                &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;document&lt;/strong&gt;&lt;/&gt;}&gt;
                                                  &lt;Prop.List&gt;
                                                    &lt;Prop name="format" required type="string" sourceLineNumbers={[418]}&gt;
                                                      Supported document export format.
                                                      Currently supports PDF standard format.

                                                      The only valid value is `"pdf_standard"`.
                                                    &lt;/Prop&gt;

                                                    &lt;Prop name="size" required type="DocumentSize" sourceLineNumbers={[422]}&gt;
                                                      The document size of the export file.

                                                      &lt;Prop.Extras&gt;
                                                        **Available values**:

                                                        * `"a4"`
                                                        * `"a3"`
                                                        * `"letter"`
                                                        * `"legal"`
                                                      &lt;/Prop.Extras&gt;
                                                    &lt;/Prop&gt;
                                                  &lt;/Prop.List&gt;
                                                &lt;/PillAccordion&gt;
                                              &lt;/Prop&gt;

                                              &lt;Prop name="email" type="EmailRequirement" sourceLineNumbers={[768]}&gt;
                                                Email output types will show a single html file (canva hosted assets) preview in preview UI

                                                &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;email&lt;/strong&gt;&lt;/&gt;}&gt;
                                                  &lt;Prop.List&gt;
                                                    &lt;Prop name="format" required type="string" sourceLineNumbers={[508]}&gt;
                                                      File format for this requirement.

                                                      &lt;Prop.Extras&gt;
                                                        **Available values**:

                                                        * `"html_bundle"`
                                                        * `"html_standalone"`
                                                      &lt;/Prop.Extras&gt;
                                                    &lt;/Prop&gt;
                                                  &lt;/Prop.List&gt;
                                                &lt;/PillAccordion&gt;
                                              &lt;/Prop&gt;
                                            &lt;/Prop.List&gt;
                                          &lt;/PillAccordion&gt;
                                        &lt;/Prop&gt;

                                        &lt;Prop name="fileCount" type="ValueRange" sourceLineNumbers={[748]}&gt;
                                          Number of files accepted in this slot.

                                          Use this to specify single or multiple file requirements.
                                          Examples:

                                          * `{ exact: 1 }`: Exactly one file
                                          * `{ min: 1, max: 10 }`: Between 1 and 10 files
                                          * undefined: Any number of files

                                          &lt;Tabs&gt;
                                            &lt;Tab name="ExactValueRange"&gt;
                                              Exact value range constraint.

                                              &lt;Prop.Extras&gt;
                                                **Example: Exact value range**

                                                ```ts
                                                const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                                ```
                                              &lt;/Prop.Extras&gt;

                                              &lt;Prop.List /&gt;
                                            &lt;/Tab&gt;

                                            &lt;Tab name="MinValueRange"&gt;
                                              Minimum value range constraint.

                                              &lt;Prop.Extras&gt;
                                                **Example: Minimum value range**

                                                ```ts
                                                const minValue: ValueRange = { min: 3 }; // At least 3
                                                ```
                                              &lt;/Prop.Extras&gt;

                                              &lt;Prop.List /&gt;
                                            &lt;/Tab&gt;

                                            &lt;Tab name="MaxValueRange"&gt;
                                              Maximum value range constraint.

                                              &lt;Prop.Extras&gt;
                                                **Example: Maximum value range**

                                                ```ts
                                                const maxValue: ValueRange = { max: 10 }; // At most 10
                                                ```
                                              &lt;/Prop.Extras&gt;

                                              &lt;Prop.List /&gt;
                                            &lt;/Tab&gt;

                                            &lt;Tab name="MinMaxValueRange"&gt;
                                              Minimum and maximum value range constraint.
                                              Ranges are inclusive `(min ≤ value ≤ max)`.

                                              &lt;Prop.Extras&gt;
                                                **Example: Minimum and maximum value range**

                                                ```ts
                                                const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                                ```
                                              &lt;/Prop.Extras&gt;

                                              &lt;Prop.List /&gt;
                                            &lt;/Tab&gt;
                                          &lt;/Tabs&gt;
                                        &lt;/Prop&gt;

                                        &lt;Prop name="selection" readonly type="MediaSelection[]" sourceLineNumbers={[779]}&gt;
                                          Current selection for this slot.

                                          Canva populates this only when returning OutputType in Settings UI contexts
                                          such as RenderSettingsUiInvocationContext and PublishSettingsSettingsUiContext.
                                          Apps should not set this value when defining output types in
                                          ContentPublisherIntent.getPublishConfiguration.

                                          &lt;Tabs&gt;
                                            &lt;Tab name="ImageSelection"&gt;
                                              Selection metadata for an image media item.

                                              &lt;Prop.List&gt;
                                                &lt;Prop name="kind" required type="string" sourceLineNumbers={[686]}&gt;
                                                  The only valid value is `"image"`.
                                                &lt;/Prop&gt;

                                                &lt;Prop name="selectionMetadata" type="SelectionDesignMetadata[]" sourceLineNumbers={[124]}&gt;
                                                  Metadata about the source content represented by this selection.

                                                  &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;selectionMetadata&lt;/strong&gt;&lt;/&gt;}&gt;
                                                    &lt;Prop.List&gt;
                                                      &lt;Prop name="type" required type="string" sourceLineNumbers={[1487]}&gt;
                                                        The only valid value is `"design"`.
                                                      &lt;/Prop&gt;

                                                      &lt;Prop name="designToken" required type="string" sourceLineNumbers={[1491]}&gt;
                                                        A signed JWT token containing the design id
                                                      &lt;/Prop&gt;

                                                      &lt;Prop name="title" required type="string | undefined" sourceLineNumbers={[1495]}&gt;
                                                        The user given title of the design
                                                      &lt;/Prop&gt;
                                                    &lt;/Prop.List&gt;
                                                  &lt;/PillAccordion&gt;
                                                &lt;/Prop&gt;
                                              &lt;/Prop.List&gt;
                                            &lt;/Tab&gt;

                                            &lt;Tab name="VideoSelection"&gt;
                                              Selection metadata for a video media item.

                                              &lt;Prop.List&gt;
                                                &lt;Prop name="kind" required type="string" sourceLineNumbers={[1731]}&gt;
                                                  The only valid value is `"video"`.
                                                &lt;/Prop&gt;

                                                &lt;Prop name="durationMs" required type="number" sourceLineNumbers={[1735]}&gt;
                                                  Duration of the selected video in milliseconds.
                                                &lt;/Prop&gt;

                                                &lt;Prop name="selectionMetadata" type="SelectionDesignMetadata[]" sourceLineNumbers={[124]}&gt;
                                                  Metadata about the source content represented by this selection.

                                                  &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;selectionMetadata&lt;/strong&gt;&lt;/&gt;}&gt;
                                                    &lt;Prop.List&gt;
                                                      &lt;Prop name="type" required type="string" sourceLineNumbers={[1487]}&gt;
                                                        The only valid value is `"design"`.
                                                      &lt;/Prop&gt;

                                                      &lt;Prop name="designToken" required type="string" sourceLineNumbers={[1491]}&gt;
                                                        A signed JWT token containing the design id
                                                      &lt;/Prop&gt;

                                                      &lt;Prop name="title" required type="string | undefined" sourceLineNumbers={[1495]}&gt;
                                                        The user given title of the design
                                                      &lt;/Prop&gt;
                                                    &lt;/Prop.List&gt;
                                                  &lt;/PillAccordion&gt;
                                                &lt;/Prop&gt;
                                              &lt;/Prop.List&gt;
                                            &lt;/Tab&gt;

                                            &lt;Tab name="DocumentSelection"&gt;
                                              Selection metadata for a document media item.

                                              &lt;Prop.List&gt;
                                                &lt;Prop name="kind" required type="string" sourceLineNumbers={[430]}&gt;
                                                  The only valid value is `"document"`.
                                                &lt;/Prop&gt;

                                                &lt;Prop name="selectionMetadata" type="SelectionDesignMetadata[]" sourceLineNumbers={[124]}&gt;
                                                  Metadata about the source content represented by this selection.

                                                  &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;selectionMetadata&lt;/strong&gt;&lt;/&gt;}&gt;
                                                    &lt;Prop.List&gt;
                                                      &lt;Prop name="type" required type="string" sourceLineNumbers={[1487]}&gt;
                                                        The only valid value is `"design"`.
                                                      &lt;/Prop&gt;

                                                      &lt;Prop name="designToken" required type="string" sourceLineNumbers={[1491]}&gt;
                                                        A signed JWT token containing the design id
                                                      &lt;/Prop&gt;

                                                      &lt;Prop name="title" required type="string | undefined" sourceLineNumbers={[1495]}&gt;
                                                        The user given title of the design
                                                      &lt;/Prop&gt;
                                                    &lt;/Prop.List&gt;
                                                  &lt;/PillAccordion&gt;
                                                &lt;/Prop&gt;
                                              &lt;/Prop.List&gt;
                                            &lt;/Tab&gt;

                                            &lt;Tab name="EmailSelection"&gt;
                                              Selection metadata for an email media item.

                                              &lt;Prop.List&gt;
                                                &lt;Prop name="kind" required type="string" sourceLineNumbers={[516]}&gt;
                                                  The only valid value is `"email"`.
                                                &lt;/Prop&gt;

                                                &lt;Prop name="selectionMetadata" type="SelectionDesignMetadata[]" sourceLineNumbers={[124]}&gt;
                                                  Metadata about the source content represented by this selection.

                                                  &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;selectionMetadata&lt;/strong&gt;&lt;/&gt;}&gt;
                                                    &lt;Prop.List&gt;
                                                      &lt;Prop name="type" required type="string" sourceLineNumbers={[1487]}&gt;
                                                        The only valid value is `"design"`.
                                                      &lt;/Prop&gt;

                                                      &lt;Prop name="designToken" required type="string" sourceLineNumbers={[1491]}&gt;
                                                        A signed JWT token containing the design id
                                                      &lt;/Prop&gt;

                                                      &lt;Prop name="title" required type="string | undefined" sourceLineNumbers={[1495]}&gt;
                                                        The user given title of the design
                                                      &lt;/Prop&gt;
                                                    &lt;/Prop.List&gt;
                                                  &lt;/PillAccordion&gt;
                                                &lt;/Prop&gt;
                                              &lt;/Prop.List&gt;
                                            &lt;/Tab&gt;
                                          &lt;/Tabs&gt;
                                        &lt;/Prop&gt;
                                      &lt;/Prop.List&gt;
                                    &lt;/PillAccordion&gt;
                                  &lt;/Prop&gt;
                                &lt;/Prop.List&gt;
                              &lt;/PillAccordion&gt;
                            &lt;/Prop&gt;

                            &lt;Prop name="publishRef" type="string" sourceLineNumbers={[1389]}&gt;
                              The current publish settings reference, if available
                            &lt;/Prop&gt;
                          &lt;/Prop.List&gt;
                        &lt;/PillAccordion&gt;
                      &lt;/Prop&gt;
                    &lt;/Prop.List&gt;

                    **Returns**

                    `void`
                  &lt;/Prop&gt;
                &lt;/Prop.List&gt;

                **Returns**

                A disposer function that cleans up the registered callback.

                () =&gt; `void`
              &lt;/Prop&gt;
            &lt;/Prop.List&gt;
          &lt;/PillAccordion&gt;
        &lt;/Prop&gt;
      &lt;/Prop.List&gt;

      **Returns**

      `void`
    &lt;/Prop&gt;

    &lt;Prop name="publishContent" required type="function" sourceLineNumbers={[300]}&gt;
      Publishes the content to the external platform.

      This action is called when the user confirms the publish action after reviewing
      settings and preview. Your implementation should send the exported files
      to your platform's API.

      The `outputMedia` contains production-ready files that match the requirements
      specified in your output types. The `publishRef` contains the user's settings
      from the settings UI.

      &lt;Prop.Extras&gt;
        **Example: Publishing content to an external platform**

        ```ts
        import type { PublishContentRequest, PublishContentResponse } from '@canva/intents/content';

        async function publishContent(request: PublishContentRequest): Promise<PublishContentResponse> {
          const { publishRef, outputType, outputMedia } = request;

          try {
            // Parse settings from publishRef
            const settings = publishRef ? JSON.parse(publishRef) : {};

            // Upload files to your platform
            const uploadedFiles = await Promise.all(
              outputMedia.flatMap(media =>
                media.files.map(file => uploadFile(file.url))
              )
            );

            // Create post on your platform
            const result = await createPost({
              files: uploadedFiles,
              caption: settings.caption
            });

            return {
              status: 'completed',
              externalId: result.id,
              externalUrl: result.url
            };
          } catch (error) {
            return {
              status: 'remote_request_failed'
            };
          }
        }
        ```
      &lt;/Prop.Extras&gt;

      **Parameters**

      &lt;Prop.List&gt;
        &lt;Prop name="request" required type="PublishContentRequest" sourceLineNumbers={[300]}&gt;
          Parameters for the publish operation.

          &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;request&lt;/strong&gt;&lt;/&gt;}&gt;
            &lt;Prop.List&gt;
              &lt;Prop name="outputType" required type="OutputTypeConfiguration" sourceLineNumbers={[1132]}&gt;
                The output type selected by the user for this publish operation.

                This matches one of the output types you provided in `getPublishConfiguration`.

                &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;outputType&lt;/strong&gt;&lt;/&gt;}&gt;
                  &lt;Prop.List&gt;
                    &lt;Prop name="id" required type="string" sourceLineNumbers={[937]}&gt;
                      Unique identifier for this output type.

                      Use descriptive IDs like `"instagram_post"` or `"youtube_video"`.
                    &lt;/Prop&gt;

                    &lt;Prop name="displayName" required type="string" sourceLineNumbers={[944]}&gt;
                      User-facing name for this output type.

                      This is displayed to users when selecting where to publish.
                      Examples: `"Instagram Post"`, `"YouTube Video"`, `"Twitter Post"`.
                    &lt;/Prop&gt;

                    &lt;Prop name="mediaSlots" required type="object[]" sourceLineNumbers={[953]}&gt;
                      Array of media slots defining what content is needed.

                      Each slot represents a piece of media required for publishing,
                      such as a main image, thumbnail, or video.
                      The MediaSlot.selection field is omitted here because apps
                      do not provide selection data when defining output types.

                      &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;mediaSlots&lt;/strong&gt;&lt;/&gt;}&gt;
                        &lt;Prop.List&gt;
                          &lt;Prop name="id" required type="string" sourceLineNumbers={[732]}&gt;
                            Unique identifier for this media slot within the output type.
                          &lt;/Prop&gt;

                          &lt;Prop name="displayName" required type="string" sourceLineNumbers={[738]}&gt;
                            User-facing name for this media slot.

                            Examples: `"Post Image"`, `"Video Thumbnail"`, `"Main Video"`.
                          &lt;/Prop&gt;

                          &lt;Prop name="accepts" required type="object" sourceLineNumbers={[761]}&gt;
                            File type requirements for this slot.

                            Note the following behavior:

                            * Provide at least one of `image` or `video`
                            * If both are provided, files for this slot may be either images or videos; each file
                              must satisfy the corresponding requirement for its media type
                            * To restrict the slot to a single media type, provide only that requirement
                            * `fileCount` applies across all files accepted by the slot regardless of media type
                            * Document output types will show image previews (PNG thumbnail) in preview UI

                            &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;accepts&lt;/strong&gt;&lt;/&gt;}&gt;
                              &lt;Prop.List&gt;
                                &lt;Prop name="image" type="ImageRequirement" sourceLineNumbers={[762]}&gt;
                                  Image file requirements for a media slot.

                                  Specifies format, aspect ratio, and size constraints for images.

                                  &lt;Prop.Extras&gt;
                                    **Example: Image requirements for social media post**

                                    ```ts
                                    const imageReq: ImageRequirement = {
                                      format: 'jpg',
                                      aspectRatio: { min: 0.8, max: 1.91 },
                                    };
                                    ```
                                  &lt;/Prop.Extras&gt;

                                  &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;image&lt;/strong&gt;&lt;/&gt;}&gt;
                                    &lt;Prop.List&gt;
                                      &lt;Prop name="format" required type="PublishFileFormat" sourceLineNumbers={[65]}&gt;
                                        File format for this requirement.

                                        &lt;Prop.Extras&gt;
                                          **Available values**:

                                          * `"png"`
                                          * `"jpg"`
                                          * `"mp4"`
                                          * `"pdf_standard"`
                                          * `"html_bundle"`
                                          * `"html_standalone"`
                                        &lt;/Prop.Extras&gt;
                                      &lt;/Prop&gt;

                                      &lt;Prop name="aspectRatio" type="ValueRange" sourceLineNumbers={[656]}&gt;
                                        Aspect ratio constraint (width / height).

                                        Examples:

                                        * `{ exact: 16/9 }`: Widescreen (16:9)
                                        * `{ min: 0.8, max: 1.91 }`: Instagram range

                                        &lt;Tabs&gt;
                                          &lt;Tab name="ExactValueRange"&gt;
                                            Exact value range constraint.

                                            &lt;Prop.Extras&gt;
                                              **Example: Exact value range**

                                              ```ts
                                              const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                              ```
                                            &lt;/Prop.Extras&gt;

                                            &lt;Prop.List /&gt;
                                          &lt;/Tab&gt;

                                          &lt;Tab name="MinValueRange"&gt;
                                            Minimum value range constraint.

                                            &lt;Prop.Extras&gt;
                                              **Example: Minimum value range**

                                              ```ts
                                              const minValue: ValueRange = { min: 3 }; // At least 3
                                              ```
                                            &lt;/Prop.Extras&gt;

                                            &lt;Prop.List /&gt;
                                          &lt;/Tab&gt;

                                          &lt;Tab name="MaxValueRange"&gt;
                                            Maximum value range constraint.

                                            &lt;Prop.Extras&gt;
                                              **Example: Maximum value range**

                                              ```ts
                                              const maxValue: ValueRange = { max: 10 }; // At most 10
                                              ```
                                            &lt;/Prop.Extras&gt;

                                            &lt;Prop.List /&gt;
                                          &lt;/Tab&gt;

                                          &lt;Tab name="MinMaxValueRange"&gt;
                                            Minimum and maximum value range constraint.
                                            Ranges are inclusive `(min ≤ value ≤ max)`.

                                            &lt;Prop.Extras&gt;
                                              **Example: Minimum and maximum value range**

                                              ```ts
                                              const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                              ```
                                            &lt;/Prop.Extras&gt;

                                            &lt;Prop.List /&gt;
                                          &lt;/Tab&gt;
                                        &lt;/Tabs&gt;
                                      &lt;/Prop&gt;

                                      &lt;Prop name="format" required type="string" sourceLineNumbers={[661]}&gt;
                                        &lt;Prop.Extras&gt;
                                          **Available values**:

                                          * `"jpg"`
                                          * `"png"`
                                        &lt;/Prop.Extras&gt;
                                      &lt;/Prop&gt;

                                      &lt;Prop name="allowTransparentBackground" type="boolean" sourceLineNumbers={[678]}&gt;
                                        Controls transparent-background support for PNG exports.

                                        * Only applies when `format` is `'png'`
                                        * If omitted or `false`, Canva exports a standard opaque PNG
                                        * If `true`, Canva shows a `Transparent background` toggle in the publish flow
                                        * Users without the required Canva entitlement may be prompted to upgrade before a transparent export is produced

                                        &lt;Prop.Extras&gt;
                                          **Default value**: `false`
                                        &lt;/Prop.Extras&gt;
                                      &lt;/Prop&gt;
                                    &lt;/Prop.List&gt;
                                  &lt;/PillAccordion&gt;
                                &lt;/Prop&gt;

                                &lt;Prop name="video" type="VideoRequirement" sourceLineNumbers={[763]}&gt;
                                  Video file requirements for a media slot.

                                  Specifies format, aspect ratio, duration, and size constraints for videos.

                                  &lt;Prop.Extras&gt;
                                    **Example: Video requirements for YouTube**

                                    ```ts
                                    const videoReq: VideoRequirement = {
                                      format: 'mp4',
                                      aspectRatio: { exact: 16/9 },
                                      durationMs: { min: 1000, max: 600000 },
                                    };
                                    ```
                                  &lt;/Prop.Extras&gt;

                                  &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;video&lt;/strong&gt;&lt;/&gt;}&gt;
                                    &lt;Prop.List&gt;
                                      &lt;Prop name="format" required type="string" sourceLineNumbers={[1706]}&gt;
                                        Supported video format.

                                        The only valid value is `"mp4"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="aspectRatio" type="ValueRange" sourceLineNumbers={[1714]}&gt;
                                        Aspect ratio constraint (width / height).

                                        Examples:

                                        * `{ exact: 16/9 }`: Widescreen
                                        * `{ exact: 9/16 }`: Vertical/Story format

                                        &lt;Tabs&gt;
                                          &lt;Tab name="ExactValueRange"&gt;
                                            Exact value range constraint.

                                            &lt;Prop.Extras&gt;
                                              **Example: Exact value range**

                                              ```ts
                                              const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                              ```
                                            &lt;/Prop.Extras&gt;

                                            &lt;Prop.List /&gt;
                                          &lt;/Tab&gt;

                                          &lt;Tab name="MinValueRange"&gt;
                                            Minimum value range constraint.

                                            &lt;Prop.Extras&gt;
                                              **Example: Minimum value range**

                                              ```ts
                                              const minValue: ValueRange = { min: 3 }; // At least 3
                                              ```
                                            &lt;/Prop.Extras&gt;

                                            &lt;Prop.List /&gt;
                                          &lt;/Tab&gt;

                                          &lt;Tab name="MaxValueRange"&gt;
                                            Maximum value range constraint.

                                            &lt;Prop.Extras&gt;
                                              **Example: Maximum value range**

                                              ```ts
                                              const maxValue: ValueRange = { max: 10 }; // At most 10
                                              ```
                                            &lt;/Prop.Extras&gt;

                                            &lt;Prop.List /&gt;
                                          &lt;/Tab&gt;

                                          &lt;Tab name="MinMaxValueRange"&gt;
                                            Minimum and maximum value range constraint.
                                            Ranges are inclusive `(min ≤ value ≤ max)`.

                                            &lt;Prop.Extras&gt;
                                              **Example: Minimum and maximum value range**

                                              ```ts
                                              const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                              ```
                                            &lt;/Prop.Extras&gt;

                                            &lt;Prop.List /&gt;
                                          &lt;/Tab&gt;
                                        &lt;/Tabs&gt;
                                      &lt;/Prop&gt;

                                      &lt;Prop name="durationMs" type="ValueRange" sourceLineNumbers={[1722]}&gt;
                                        Duration constraint in milliseconds.

                                        Examples:

                                        * `{ max: 60000 }`: Maximum 60 seconds
                                        * `{ min: 3000, max: 600000 }`: Between 3 seconds and 10 minutes

                                        &lt;Tabs&gt;
                                          &lt;Tab name="ExactValueRange"&gt;
                                            Exact value range constraint.

                                            &lt;Prop.Extras&gt;
                                              **Example: Exact value range**

                                              ```ts
                                              const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                              ```
                                            &lt;/Prop.Extras&gt;

                                            &lt;Prop.List /&gt;
                                          &lt;/Tab&gt;

                                          &lt;Tab name="MinValueRange"&gt;
                                            Minimum value range constraint.

                                            &lt;Prop.Extras&gt;
                                              **Example: Minimum value range**

                                              ```ts
                                              const minValue: ValueRange = { min: 3 }; // At least 3
                                              ```
                                            &lt;/Prop.Extras&gt;

                                            &lt;Prop.List /&gt;
                                          &lt;/Tab&gt;

                                          &lt;Tab name="MaxValueRange"&gt;
                                            Maximum value range constraint.

                                            &lt;Prop.Extras&gt;
                                              **Example: Maximum value range**

                                              ```ts
                                              const maxValue: ValueRange = { max: 10 }; // At most 10
                                              ```
                                            &lt;/Prop.Extras&gt;

                                            &lt;Prop.List /&gt;
                                          &lt;/Tab&gt;

                                          &lt;Tab name="MinMaxValueRange"&gt;
                                            Minimum and maximum value range constraint.
                                            Ranges are inclusive `(min ≤ value ≤ max)`.

                                            &lt;Prop.Extras&gt;
                                              **Example: Minimum and maximum value range**

                                              ```ts
                                              const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                              ```
                                            &lt;/Prop.Extras&gt;

                                            &lt;Prop.List /&gt;
                                          &lt;/Tab&gt;
                                        &lt;/Tabs&gt;
                                      &lt;/Prop&gt;
                                    &lt;/Prop.List&gt;
                                  &lt;/PillAccordion&gt;
                                &lt;/Prop&gt;

                                &lt;Prop name="document" type="DocumentRequirement" sourceLineNumbers={[764]}&gt;
                                  Document file requirements for a media slot.

                                  Note: Document output types use image previews (PNG thumbnails) in the preview UI.
                                  The actual document file is only generated for the final output in OutputMedia.

                                  &lt;Prop.Extras&gt;
                                    **Example: Document requirements**

                                    ```ts
                                    const documentReq: DocumentRequirement = {
                                      format: 'pdf_standard',
                                      size: 'a4',
                                    };
                                    ```
                                  &lt;/Prop.Extras&gt;

                                  &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;document&lt;/strong&gt;&lt;/&gt;}&gt;
                                    &lt;Prop.List&gt;
                                      &lt;Prop name="format" required type="string" sourceLineNumbers={[418]}&gt;
                                        Supported document export format.
                                        Currently supports PDF standard format.

                                        The only valid value is `"pdf_standard"`.
                                      &lt;/Prop&gt;

                                      &lt;Prop name="size" required type="DocumentSize" sourceLineNumbers={[422]}&gt;
                                        The document size of the export file.

                                        &lt;Prop.Extras&gt;
                                          **Available values**:

                                          * `"a4"`
                                          * `"a3"`
                                          * `"letter"`
                                          * `"legal"`
                                        &lt;/Prop.Extras&gt;
                                      &lt;/Prop&gt;
                                    &lt;/Prop.List&gt;
                                  &lt;/PillAccordion&gt;
                                &lt;/Prop&gt;

                                &lt;Prop name="email" type="EmailRequirement" sourceLineNumbers={[768]}&gt;
                                  Email output types will show a single html file (canva hosted assets) preview in preview UI

                                  &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;email&lt;/strong&gt;&lt;/&gt;}&gt;
                                    &lt;Prop.List&gt;
                                      &lt;Prop name="format" required type="string" sourceLineNumbers={[508]}&gt;
                                        File format for this requirement.

                                        &lt;Prop.Extras&gt;
                                          **Available values**:

                                          * `"html_bundle"`
                                          * `"html_standalone"`
                                        &lt;/Prop.Extras&gt;
                                      &lt;/Prop&gt;
                                    &lt;/Prop.List&gt;
                                  &lt;/PillAccordion&gt;
                                &lt;/Prop&gt;
                              &lt;/Prop.List&gt;
                            &lt;/PillAccordion&gt;
                          &lt;/Prop&gt;

                          &lt;Prop name="fileCount" type="ValueRange" sourceLineNumbers={[748]}&gt;
                            Number of files accepted in this slot.

                            Use this to specify single or multiple file requirements.
                            Examples:

                            * `{ exact: 1 }`: Exactly one file
                            * `{ min: 1, max: 10 }`: Between 1 and 10 files
                            * undefined: Any number of files

                            &lt;Tabs&gt;
                              &lt;Tab name="ExactValueRange"&gt;
                                Exact value range constraint.

                                &lt;Prop.Extras&gt;
                                  **Example: Exact value range**

                                  ```ts
                                  const exactValue: ValueRange = { exact: 1 }; // Must be exactly 1
                                  ```
                                &lt;/Prop.Extras&gt;

                                &lt;Prop.List /&gt;
                              &lt;/Tab&gt;

                              &lt;Tab name="MinValueRange"&gt;
                                Minimum value range constraint.

                                &lt;Prop.Extras&gt;
                                  **Example: Minimum value range**

                                  ```ts
                                  const minValue: ValueRange = { min: 3 }; // At least 3
                                  ```
                                &lt;/Prop.Extras&gt;

                                &lt;Prop.List /&gt;
                              &lt;/Tab&gt;

                              &lt;Tab name="MaxValueRange"&gt;
                                Maximum value range constraint.

                                &lt;Prop.Extras&gt;
                                  **Example: Maximum value range**

                                  ```ts
                                  const maxValue: ValueRange = { max: 10 }; // At most 10
                                  ```
                                &lt;/Prop.Extras&gt;

                                &lt;Prop.List /&gt;
                              &lt;/Tab&gt;

                              &lt;Tab name="MinMaxValueRange"&gt;
                                Minimum and maximum value range constraint.
                                Ranges are inclusive `(min ≤ value ≤ max)`.

                                &lt;Prop.Extras&gt;
                                  **Example: Minimum and maximum value range**

                                  ```ts
                                  const minMaxValue: ValueRange = { min: 1, max: 10 }; // Between 1 and 10
                                  ```
                                &lt;/Prop.Extras&gt;

                                &lt;Prop.List /&gt;
                              &lt;/Tab&gt;
                            &lt;/Tabs&gt;
                          &lt;/Prop&gt;
                        &lt;/Prop.List&gt;
                      &lt;/PillAccordion&gt;
                    &lt;/Prop&gt;
                  &lt;/Prop.List&gt;
                &lt;/PillAccordion&gt;
              &lt;/Prop&gt;

              &lt;Prop name="outputMedia" required type="OutputMedia[]" sourceLineNumbers={[1139]}&gt;
                Production-ready exported files matching the requirements from your output type.

                These files are ready to upload to your platform and match the format, size,
                and aspect ratio requirements specified in your media slots.

                &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;outputMedia&lt;/strong&gt;&lt;/&gt;}&gt;
                  &lt;Prop.List&gt;
                    &lt;Prop name="mediaSlotId" required type="string" sourceLineNumbers={[829]}&gt;
                      ID of the media slot these files belong to.

                      Matches a media slot ID from your output type definition.
                    &lt;/Prop&gt;

                    &lt;Prop name="files" required type="OutputFile[]" sourceLineNumbers={[835]}&gt;
                      Array of exported files for this media slot.

                      Files match the requirements specified in your media slot configuration.

                      &lt;Tabs&gt;
                        &lt;Tab name="ImageOutputFile"&gt;
                          Exported image file ready for publishing.

                          &lt;Prop.List&gt;
                            &lt;Prop name="format" required type="PublishFileFormat" sourceLineNumbers={[77]}&gt;
                              File format.

                              &lt;Prop.Extras&gt;
                                **Available values**:

                                * `"png"`
                                * `"jpg"`
                                * `"mp4"`
                                * `"pdf_standard"`
                                * `"html_bundle"`
                                * `"html_standalone"`
                              &lt;/Prop.Extras&gt;
                            &lt;/Prop&gt;

                            &lt;Prop name="url" required type="string" sourceLineNumbers={[83]}&gt;
                              URL to download the exported file.

                              Your app should download from this URL and upload to your platform.
                            &lt;/Prop&gt;

                            &lt;Prop name="contentMetadata" required type="DesignContentMetadata" sourceLineNumbers={[87]}&gt;
                              Metadata about the source content used to create this exported file.

                              &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;contentMetadata&lt;/strong&gt;&lt;/&gt;}&gt;
                                &lt;Prop.List&gt;
                                  &lt;Prop name="type" required type="string" sourceLineNumbers={[309]}&gt;
                                    The only valid value is `"design"`.
                                  &lt;/Prop&gt;

                                  &lt;Prop name="designToken" required type="string" sourceLineNumbers={[313]}&gt;
                                    A signed JWT token containing the design id
                                  &lt;/Prop&gt;

                                  &lt;Prop name="title" required type="string | undefined" sourceLineNumbers={[317]}&gt;
                                    The user given title of the design
                                  &lt;/Prop&gt;

                                  &lt;Prop name="pages" required type="OutputPageMetadata[]" sourceLineNumbers={[321]}&gt;
                                    The pages that make up the exported metadata

                                    &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;pages&lt;/strong&gt;&lt;/&gt;}&gt;
                                      &lt;Prop.List&gt;
                                        &lt;Prop name="pageId" required type="string | undefined" sourceLineNumbers={[846]}&gt;
                                          The unique identifier for the page.
                                        &lt;/Prop&gt;

                                        &lt;Prop name="pageNumber" required type="number" sourceLineNumbers={[850]}&gt;
                                          The position of the page within the design, starting from 1 for the first page.
                                        &lt;/Prop&gt;
                                      &lt;/Prop.List&gt;
                                    &lt;/PillAccordion&gt;
                                  &lt;/Prop&gt;
                                &lt;/Prop.List&gt;
                              &lt;/PillAccordion&gt;
                            &lt;/Prop&gt;

                            &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[573]}&gt;
                              Width of the image in pixels.
                            &lt;/Prop&gt;

                            &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[577]}&gt;
                              Height of the image in pixels.
                            &lt;/Prop&gt;
                          &lt;/Prop.List&gt;
                        &lt;/Tab&gt;

                        &lt;Tab name="VideoOutputFile"&gt;
                          Exported video file ready for publishing.

                          &lt;Prop.List&gt;
                            &lt;Prop name="format" required type="PublishFileFormat" sourceLineNumbers={[77]}&gt;
                              File format.

                              &lt;Prop.Extras&gt;
                                **Available values**:

                                * `"png"`
                                * `"jpg"`
                                * `"mp4"`
                                * `"pdf_standard"`
                                * `"html_bundle"`
                                * `"html_standalone"`
                              &lt;/Prop.Extras&gt;
                            &lt;/Prop&gt;

                            &lt;Prop name="url" required type="string" sourceLineNumbers={[83]}&gt;
                              URL to download the exported file.

                              Your app should download from this URL and upload to your platform.
                            &lt;/Prop&gt;

                            &lt;Prop name="contentMetadata" required type="DesignContentMetadata" sourceLineNumbers={[87]}&gt;
                              Metadata about the source content used to create this exported file.

                              &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;contentMetadata&lt;/strong&gt;&lt;/&gt;}&gt;
                                &lt;Prop.List&gt;
                                  &lt;Prop name="type" required type="string" sourceLineNumbers={[309]}&gt;
                                    The only valid value is `"design"`.
                                  &lt;/Prop&gt;

                                  &lt;Prop name="designToken" required type="string" sourceLineNumbers={[313]}&gt;
                                    A signed JWT token containing the design id
                                  &lt;/Prop&gt;

                                  &lt;Prop name="title" required type="string | undefined" sourceLineNumbers={[317]}&gt;
                                    The user given title of the design
                                  &lt;/Prop&gt;

                                  &lt;Prop name="pages" required type="OutputPageMetadata[]" sourceLineNumbers={[321]}&gt;
                                    The pages that make up the exported metadata

                                    &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;pages&lt;/strong&gt;&lt;/&gt;}&gt;
                                      &lt;Prop.List&gt;
                                        &lt;Prop name="pageId" required type="string | undefined" sourceLineNumbers={[846]}&gt;
                                          The unique identifier for the page.
                                        &lt;/Prop&gt;

                                        &lt;Prop name="pageNumber" required type="number" sourceLineNumbers={[850]}&gt;
                                          The position of the page within the design, starting from 1 for the first page.
                                        &lt;/Prop&gt;
                                      &lt;/Prop.List&gt;
                                    &lt;/PillAccordion&gt;
                                  &lt;/Prop&gt;
                                &lt;/Prop.List&gt;
                              &lt;/PillAccordion&gt;
                            &lt;/Prop&gt;

                            &lt;Prop name="widthPx" required type="number" sourceLineNumbers={[1554]}&gt;
                              Width of the video in pixels.
                            &lt;/Prop&gt;

                            &lt;Prop name="heightPx" required type="number" sourceLineNumbers={[1558]}&gt;
                              Height of the video in pixels.
                            &lt;/Prop&gt;
                          &lt;/Prop.List&gt;
                        &lt;/Tab&gt;

                        &lt;Tab name="DocumentOutputFile"&gt;
                          Exported PDF file ready for publishing.

                          Contains the final PDF document that should be uploaded to your platform.
                          The document format is `pdf_standard` and the file is ready to use.

                          &lt;Prop.List&gt;
                            &lt;Prop name="format" required type="PublishFileFormat" sourceLineNumbers={[77]}&gt;
                              File format.

                              &lt;Prop.Extras&gt;
                                **Available values**:

                                * `"png"`
                                * `"jpg"`
                                * `"mp4"`
                                * `"pdf_standard"`
                                * `"html_bundle"`
                                * `"html_standalone"`
                              &lt;/Prop.Extras&gt;
                            &lt;/Prop&gt;

                            &lt;Prop name="url" required type="string" sourceLineNumbers={[83]}&gt;
                              URL to download the exported file.

                              Your app should download from this URL and upload to your platform.
                            &lt;/Prop&gt;

                            &lt;Prop name="contentMetadata" required type="DesignContentMetadata" sourceLineNumbers={[87]}&gt;
                              Metadata about the source content used to create this exported file.

                              &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;contentMetadata&lt;/strong&gt;&lt;/&gt;}&gt;
                                &lt;Prop.List&gt;
                                  &lt;Prop name="type" required type="string" sourceLineNumbers={[309]}&gt;
                                    The only valid value is `"design"`.
                                  &lt;/Prop&gt;

                                  &lt;Prop name="designToken" required type="string" sourceLineNumbers={[313]}&gt;
                                    A signed JWT token containing the design id
                                  &lt;/Prop&gt;

                                  &lt;Prop name="title" required type="string | undefined" sourceLineNumbers={[317]}&gt;
                                    The user given title of the design
                                  &lt;/Prop&gt;

                                  &lt;Prop name="pages" required type="OutputPageMetadata[]" sourceLineNumbers={[321]}&gt;
                                    The pages that make up the exported metadata

                                    &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;pages&lt;/strong&gt;&lt;/&gt;}&gt;
                                      &lt;Prop.List&gt;
                                        &lt;Prop name="pageId" required type="string | undefined" sourceLineNumbers={[846]}&gt;
                                          The unique identifier for the page.
                                        &lt;/Prop&gt;

                                        &lt;Prop name="pageNumber" required type="number" sourceLineNumbers={[850]}&gt;
                                          The position of the page within the design, starting from 1 for the first page.
                                        &lt;/Prop&gt;
                                      &lt;/Prop.List&gt;
                                    &lt;/PillAccordion&gt;
                                  &lt;/Prop&gt;
                                &lt;/Prop.List&gt;
                              &lt;/PillAccordion&gt;
                            &lt;/Prop&gt;
                          &lt;/Prop.List&gt;
                        &lt;/Tab&gt;
                      &lt;/Tabs&gt;
                    &lt;/Prop&gt;
                  &lt;/Prop.List&gt;
                &lt;/PillAccordion&gt;
              &lt;/Prop&gt;

              &lt;Prop name="publishRef" type="string" sourceLineNumbers={[1126]}&gt;
                Platform-specific settings reference containing user configurations.

                This is the same reference you saved via `updatePublishSettings` in the settings UI.
                Parse this string to retrieve the user's publish settings (e.g., captions, tags, privacy).

                Maximum size: 32KB
              &lt;/Prop&gt;
            &lt;/Prop.List&gt;
          &lt;/PillAccordion&gt;
        &lt;/Prop&gt;
      &lt;/Prop.List&gt;

      **Returns**

      A promise resolving to either a successful result with the published content details or an error. This is a `Promise` that resolves with the following object:

      &lt;Tabs&gt;
        &lt;Tab name="PublishContentCompleted"&gt;
          Successful response from publishing a content.

          &lt;Prop.Extras&gt;
            **Examples**

            **Basic successful publish**

            ```ts
            return {
              status: 'completed',
              externalId: 'post_12345',
              externalUrl: 'https://example.com/posts/12345'
            };
            ```

            **Successful publish with redirect**

            ```ts
            return {
              status: 'completed',
              externalId: 'video_67890',
              externalUrl: 'https://example.com/videos/67890',
              postPublishAction: {
                type: 'redirect',
                url: 'https://example.com/videos/67890/edit'
              }
            };
            ```
          &lt;/Prop.Extras&gt;

          &lt;Prop.List&gt;
            &lt;Prop name="status" required type="string" sourceLineNumbers={[1077]}&gt;
              The only valid value is `"completed"`.
            &lt;/Prop&gt;

            &lt;Prop name="externalId" type="string" sourceLineNumbers={[1085]}&gt;
              Unique identifier returned from your external platform. You can use this for:

              * Tracking published content
              * Fetching insights data for the published content
              * Linking back to the content in future operations
            &lt;/Prop&gt;

            &lt;Prop name="externalUrl" type="string" sourceLineNumbers={[1092]}&gt;
              Direct URL to the published content on your platform.

              Users can visit this URL to view their published content.
              This may be displayed to users or used for sharing.
            &lt;/Prop&gt;

            &lt;Prop name="postPublishAction" type="PostPublishAction" sourceLineNumbers={[1098]}&gt;
              Optional action to perform after publishing completes.

              Currently supports redirecting users to a specific URL after publishing.

              &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;postPublishAction&lt;/strong&gt;&lt;/&gt;}&gt;
                &lt;Prop.List&gt;
                  &lt;Prop name="type" required type="string" sourceLineNumbers={[975]}&gt;
                    The only valid value is `"redirect"`.
                  &lt;/Prop&gt;

                  &lt;Prop name="url" required type="string" sourceLineNumbers={[979]}&gt;
                    The URL to redirect the user to after publishing.
                  &lt;/Prop&gt;
                &lt;/Prop.List&gt;
              &lt;/PillAccordion&gt;
            &lt;/Prop&gt;
          &lt;/Prop.List&gt;
        &lt;/Tab&gt;

        &lt;Tab name="PublishContentError"&gt;
          Error response from publishing a content.

          Return the appropriate error type based on the failure:

          * `"remote_request_failed"`: Network or API errors with your platform
          * `"app_error"`: Custom application errors with optional message

          &lt;Tabs&gt;
            &lt;Tab name="RemoteRequestFailedError"&gt;
              PublishContentError indicating failure of the remote request to the external platform.

              Return this error for:

              * Network connectivity issues
              * API endpoint failures
              * HTTP errors from your platform
              * Timeout errors

              &lt;Prop.Extras&gt;
                **Example: Handling network errors**

                ```ts
                try {
                  await uploadToExternalPlatform(file);
                } catch (error) {
                  return { status: 'remote_request_failed' };
                }
                ```
              &lt;/Prop.Extras&gt;

              &lt;Prop.List&gt;
                &lt;Prop name="status" required type="string" sourceLineNumbers={[1307]}&gt;
                  The only valid value is `"remote_request_failed"`.
                &lt;/Prop&gt;
              &lt;/Prop.List&gt;
            &lt;/Tab&gt;

            &lt;Tab name="AppError"&gt;
              PublishContentError indicating a custom error occurred in your app's implementation.

              Return this for application-specific errors such as:

              * Validation failures
              * Authentication errors
              * Rate limiting
              * Platform-specific restrictions

              &lt;Prop.Extras&gt;
                **Example: Returning custom error with message**

                ```ts
                if (userQuotaExceeded) {
                  return {
                    status: 'app_error',
                    message: 'You have reached your monthly publish limit. Please upgrade your plan.'
                  };
                }
                ```
              &lt;/Prop.Extras&gt;

              &lt;Prop.List&gt;
                &lt;Prop name="status" required type="string" sourceLineNumbers={[23]}&gt;
                  The only valid value is `"app_error"`.
                &lt;/Prop&gt;

                &lt;Prop name="message" required type="string" sourceLineNumbers={[34]}&gt;
                  (required) The raw error message, for logging purposes. It will not display in the UI.
                  To display custom error messages in the UI use `localizedMessageId`.

                  This should typically be the javascript error.message or a REST JSON error message
                  body passed without modification.

                  WARNING: Do not include personally identifiable information (PII) in this
                  message, such as names, emails, usernames, etc.
                &lt;/Prop&gt;

                &lt;Prop name="localizedMessageId" type="string" sourceLineNumbers={[41]}&gt;
                  (optional) Message ID of the translated error message that will be
                  displayed to the user. The message ID should be present and uploaded in
                  your translation file. If omitted, Canva will display a generic error
                  message.
                &lt;/Prop&gt;

                &lt;Prop name="httpCode" type="number" sourceLineNumbers={[43]}&gt;
                  HTTP status code, if applicable
                &lt;/Prop&gt;

                &lt;Prop name="appDefinedPayload" type="string" sourceLineNumbers={[48]}&gt;
                  Used only by app developer. Canva does not use this value. Use this to pass
                  additional information like JSON to your settings frame.
                &lt;/Prop&gt;

                &lt;Prop name="errorCause" type="ErrorCause" sourceLineNumbers={[54]}&gt;
                  (optional) Source of the error if it relates to a component on the Canva
                  UI. When present, the error may render near a relevant Canva component.
                  When omitted, the cause is considered unspecified or "generic".

                  &lt;Prop.Extras&gt;
                    **Available values**:

                    * `"invalid_selection"`
                    * `"invalid_format"`
                  &lt;/Prop.Extras&gt;
                &lt;/Prop&gt;
              &lt;/Prop.List&gt;
            &lt;/Tab&gt;
          &lt;/Tabs&gt;
        &lt;/Tab&gt;
      &lt;/Tabs&gt;
    &lt;/Prop&gt;
  &lt;/Prop.List&gt;
&lt;/PillAccordion&gt;

</Prop> </Prop.List>

Returns

void

Prepare Data Connector

API reference for the intents prepareDataConnector method.

Prepares a DataConnector Intent.

Usage

tsx
import { prepareDataConnector } from "@canva/intents/data";

prepareDataConnector({
 getDataTable: async (params) => {
   // Implement the logic to fetch the data table
 },
 renderSelectionUi: (params) => {
   // Implement the UI for the data table selection
 },
});

Parameters

<Prop.List> <Prop name="implementation" required type="DataConnectorIntent" sourceLineNumbers={[972]}> Main interface for implementing the Data Connector intent.

Implementing the Data Connector intent enables apps to import external data into Canva.
This allows users to select, preview, and refresh data from external sources.

&lt;PillAccordion defaultExpanded={true} title={&lt;&gt;Properties of &lt;strong&gt;implementation&lt;/strong&gt;&lt;/&gt;}&gt;
  &lt;Prop.List&gt;
    &lt;Prop name="getDataTable" required type="function" sourceLineNumbers={[194]}&gt;
      Gets structured data from an external source.

      This action is called in two scenarios:

      * During data selection to preview data before import (when RenderSelectionUiRequest.updateDataRef is called).
      * When refreshing previously imported data (when the user requests an update).

      &lt;Prop.Extras&gt;
        **Example: Getting data from an external source**

        ```ts
        import type { GetDataTableRequest, GetDataTableResponse } from '@canva/intents/data';

        async function getDataTable(request: GetDataTableRequest): Promise<GetDataTableResponse> {
          const { dataSourceRef, limit, signal } = request;

          // Check if the operation has been aborted.
          if (signal.aborted) {
            return { status: 'app_error', message: 'The data fetch operation was cancelled.' };
          }

          // ... data fetching logic using dataSourceRef, limit, and signal ...

          // Placeholder for a successful result.
          return {
            status: 'completed',
            dataTable: { rows: [{ cells: [{ type: 'string', value: 'Fetched data' }] }] }
          };
        }
        ```
      &lt;/Prop.Extras&gt;

      **Parameters**

      &lt;Prop.List&gt;
        &lt;Prop name="request" required type="GetDataTableRequest" sourceLineNumbers={[194]}&gt;
          Parameters for the data fetching operation.

          &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;request&lt;/strong&gt;&lt;/&gt;}&gt;
            &lt;Prop.List&gt;
              &lt;Prop name="dataSourceRef" required type="DataSourceRef" sourceLineNumbers={[544]}&gt;
                Reference to the data source to fetch.

                This contains the information needed to identify and retrieve the specific data
                that was previously selected by the user.

                Use this to query your external data service.

                &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;dataSourceRef&lt;/strong&gt;&lt;/&gt;}&gt;
                  &lt;Prop.List&gt;
                    &lt;Prop name="source" required type="string" sourceLineNumbers={[282]}&gt;
                      Information needed to identify and retrieve data from your source.

                      This string should contain all the information your app needs to
                      fetch the exact data selection later. Typically, this is a serialized
                      object with query parameters, identifiers, or filters.

                      You are responsible for encoding and decoding this value appropriately.

                      Maximum size: 5KB
                    &lt;/Prop&gt;

                    &lt;Prop name="title" type="string" sourceLineNumbers={[291]}&gt;
                      A human-readable description of the data reference.

                      This title may be displayed to users in the Canva interface to help
                      them identify the data source.

                      Maximum length: 255 characters
                    &lt;/Prop&gt;
                  &lt;/Prop.List&gt;
                &lt;/PillAccordion&gt;
              &lt;/Prop&gt;

              &lt;Prop name="limit" required type="DataTableLimit" sourceLineNumbers={[555]}&gt;
                Maximum row and column limits for the imported data.

                Your app must ensure the returned data does not exceed these limits.

                If the requested data would exceed these limits, either:

                * Truncate the data to fit within limits, or
                * Return a 'data\_table\_limit\_exceeded' error

                &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;limit&lt;/strong&gt;&lt;/&gt;}&gt;
                  &lt;Prop.List&gt;
                    &lt;Prop name="row" required type="number" sourceLineNumbers={[381]}&gt;
                      The maximum number of rows allowed.

                      Your app should ensure data does not exceed this limit.
                    &lt;/Prop&gt;

                    &lt;Prop name="column" required type="number" sourceLineNumbers={[387]}&gt;
                      The maximum number of columns allowed.

                      Your app should ensure data does not exceed this limit.
                    &lt;/Prop&gt;
                  &lt;/Prop.List&gt;
                &lt;/PillAccordion&gt;
              &lt;/Prop&gt;

              &lt;Prop name="signal" required type="AbortSignal" sourceLineNumbers={[561]}&gt;
                Standard DOM AbortSignal for cancellation support.

                Your app should monitor this signal and abort any ongoing operations if it becomes aborted.
              &lt;/Prop&gt;
            &lt;/Prop.List&gt;
          &lt;/PillAccordion&gt;
        &lt;/Prop&gt;
      &lt;/Prop.List&gt;

      **Returns**

      A promise resolving to either a successful result with data or an error. This is a `Promise` that resolves with the following object:

      &lt;Tabs&gt;
        &lt;Tab name="GetDataTableCompleted"&gt;
          Successful result from `getDataTable` action.

          &lt;Prop.List&gt;
            &lt;Prop name="status" required type="string" sourceLineNumbers={[514]}&gt;
              Indicates the operation completed successfully

              The only valid value is `"completed"`.
            &lt;/Prop&gt;

            &lt;Prop name="dataTable" required type="DataTable" sourceLineNumbers={[518]}&gt;
              The fetched data formatted as a data table.

              &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;dataTable&lt;/strong&gt;&lt;/&gt;}&gt;
                &lt;Prop.List&gt;
                  &lt;Prop name="rows" required type="DataTableRow[]" sourceLineNumbers={[345]}&gt;
                    The data rows containing the actual values.

                    Each row contains an array of cells with typed data values.

                    &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;rows&lt;/strong&gt;&lt;/&gt;}&gt;
                      &lt;Prop.List&gt;
                        &lt;Prop name="cells" required type="DataTableCell&lt;DataType&gt;[]" sourceLineNumbers={[439]}&gt;
                          Array of cells containing the data values.

                          Each cell must have a type that matches the corresponding column definition (if provided).

                          &lt;Tabs&gt;
                            &lt;Tab name="date"&gt;
                              Cell containing a date value.

                              &lt;Prop.Extras&gt;
                                **Example: Creating a date cell**

                                ```ts
                                import type { DateDataTableCell } from '@canva/intents/data';

                                const todayCell: DateDataTableCell = {
                                  type: 'date',
                                  value: Math.floor(Date.now() / 1000) // Unix timestamp in seconds
                                };

                                const emptyDateCell: DateDataTableCell = {
                                  type: 'date',
                                  value: undefined
                                };
                                ```
                              &lt;/Prop.Extras&gt;

                              &lt;Prop.List&gt;
                                &lt;Prop name="type" required type="string" sourceLineNumbers={[482]}&gt;
                                  Indicates this cell contains a date value.

                                  The only valid value is `"date"`.
                                &lt;/Prop&gt;

                                &lt;Prop name="value" required type="number | undefined" sourceLineNumbers={[488]}&gt;
                                  Unix timestamp in seconds representing the date.

                                  Use `undefined` for an empty cell.
                                &lt;/Prop&gt;
                              &lt;/Prop.List&gt;
                            &lt;/Tab&gt;

                            &lt;Tab name="string"&gt;
                              Cell containing a text value.

                              &lt;Prop.Extras&gt;
                                **Example: Creating a string cell**

                                ```ts
                                import type { StringDataTableCell } from '@canva/intents/data';

                                const nameCell: StringDataTableCell = {
                                  type: 'string',
                                  value: 'John Doe'
                                };

                                const emptyStringCell: StringDataTableCell = {
                                  type: 'string',
                                  value: undefined
                                };
                                ```
                              &lt;/Prop.Extras&gt;

                              &lt;Prop.List&gt;
                                &lt;Prop name="type" required type="string" sourceLineNumbers={[1058]}&gt;
                                  Indicates this cell contains a string value.

                                  The only valid value is `"string"`.
                                &lt;/Prop&gt;

                                &lt;Prop name="value" required type="string | undefined" sourceLineNumbers={[1066]}&gt;
                                  Text content of the cell.

                                  Maximum length: 10,000 characters

                                  Use `undefined` for an empty cell.
                                &lt;/Prop&gt;
                              &lt;/Prop.List&gt;
                            &lt;/Tab&gt;

                            &lt;Tab name="number"&gt;
                              Cell containing a numeric value.

                              &lt;Prop.Extras&gt;
                                **Example: Creating a number cell**

                                ```ts
                                import type { NumberCellMetadata, NumberDataTableCell } from '@canva/intents/data';

                                const priceCell: NumberDataTableCell = {
                                  type: 'number',
                                  value: 29.99,
                                  metadata: { formatting: '[$$]#,##0.00' }
                                };

                                const quantityCell: NumberDataTableCell = {
                                  type: 'number',
                                  value: 150
                                };

                                const emptyNumberCell: NumberDataTableCell = {
                                  type: 'number',
                                  value: undefined
                                };
                                ```
                              &lt;/Prop.Extras&gt;

                              &lt;Prop.List&gt;
                                &lt;Prop name="type" required type="string" sourceLineNumbers={[878]}&gt;
                                  Indicates this cell contains a number value.

                                  The only valid value is `"number"`.
                                &lt;/Prop&gt;

                                &lt;Prop name="value" required type="number | undefined" sourceLineNumbers={[893]}&gt;
                                  Numeric value within safe integer range.

                                  Valid range: `Number.MIN_SAFE_INTEGER` to `Number.MAX_SAFE_INTEGER`

                                  Invalid values:

                                  * Infinity or -Infinity
                                  * NaN
                                  * Negative zero (-0)
                                  * Denormalized numbers

                                  Use `undefined` for an empty cell.
                                &lt;/Prop&gt;

                                &lt;Prop name="metadata" type="NumberCellMetadata" sourceLineNumbers={[905]}&gt;
                                  Optional formatting information for displaying the number.

                                  &lt;Prop.Extras&gt;
                                    **Example: Applying display formatting to a number**

                                    ```ts
                                    import type { NumberCellMetadata } from '@canva/intents/data';

                                    const currencyFormatting: NumberCellMetadata = { formatting: '[$USD]#,##0.00' };
                                    const percentageFormatting: NumberCellMetadata = { formatting: '0.00%' };
                                    ```
                                  &lt;/Prop.Extras&gt;

                                  &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;metadata&lt;/strong&gt;&lt;/&gt;}&gt;
                                    &lt;Prop.List&gt;
                                      &lt;Prop name="formatting" type="string" sourceLineNumbers={[846]}&gt;
                                        Formatting pattern using Office Open XML Format.

                                        These patterns control how numbers are displayed to users,
                                        including currency symbols, decimal places, and separators.
                                      &lt;/Prop&gt;
                                    &lt;/Prop.List&gt;
                                  &lt;/PillAccordion&gt;
                                &lt;/Prop&gt;
                              &lt;/Prop.List&gt;
                            &lt;/Tab&gt;

                            &lt;Tab name="boolean"&gt;
                              Cell containing a boolean value.

                              &lt;Prop.Extras&gt;
                                **Examples**

                                **Creating a boolean cell**

                                ```ts
                                import type { BooleanDataTableCell } from '@canva/intents/data';

                                const isActiveCell: BooleanDataTableCell = {
                                  type: 'boolean',
                                  value: true
                                };
                                ```

                                **Creating a boolean cell with false value**

                                ```ts
                                import type { BooleanDataTableCell } from '@canva/intents/data';

                                const isCompleteCell: BooleanDataTableCell = {
                                  type: 'boolean',
                                  value: false
                                };
                                ```

                                **Creating an empty boolean cell**

                                ```ts
                                import type { BooleanDataTableCell } from '@canva/intents/data';

                                const emptyBooleanCell: BooleanDataTableCell = {
                                  type: 'boolean',
                                  value: undefined
                                };
                                ```
                              &lt;/Prop.Extras&gt;

                              &lt;Prop.List&gt;
                                &lt;Prop name="type" required type="string" sourceLineNumbers={[124]}&gt;
                                  Indicates this cell contains a boolean value.

                                  The only valid value is `"boolean"`.
                                &lt;/Prop&gt;

                                &lt;Prop name="value" required type="boolean | undefined" sourceLineNumbers={[130]}&gt;
                                  Boolean value (true or false).

                                  Use `undefined` for an empty cell.
                                &lt;/Prop&gt;
                              &lt;/Prop.List&gt;
                            &lt;/Tab&gt;

                            &lt;Tab name="media"&gt;
                              Cell containing a media collection (images) value.

                              &lt;Prop.Extras&gt;
                                **Examples**

                                **Creating a media cell with an image**

                                ```ts
                                import type { MediaCollectionDataTableCell } from '@canva/intents/data';

                                const mediaCell: MediaCollectionDataTableCell = {
                                  type: 'media',
                                  value: [{
                                    type: 'image_upload',
                                    url: 'https://www.canva.dev/example-assets/image-import/image.jpg',
                                    mimeType: 'image/jpeg',
                                    thumbnailUrl: 'https://www.canva.dev/example-assets/image-import/thumbnail.jpg',
                                    aiDisclosure: 'none'
                                  }]
                                };
                                ```

                                **Creating an empty media cell**

                                ```ts
                                import type { MediaCollectionDataTableCell } from '@canva/intents/data';

                                const emptyMediaCell: MediaCollectionDataTableCell = {
                                  type: 'media',
                                  value: []
                                };
                                ```
                              &lt;/Prop.Extras&gt;

                              &lt;Prop.List&gt;
                                &lt;Prop name="type" required type="string" sourceLineNumbers={[789]}&gt;
                                  Indicates this cell contains a media collection.

                                  The only valid value is `"media"`.
                                &lt;/Prop&gt;

                                &lt;Prop name="value" required type="object[]" sourceLineNumbers={[795]}&gt;
                                  Media collection values.

                                  Use empty array for an empty cell.

                                  &lt;Tabs&gt;
                                    &lt;Tab name="DataTableImageUpload"&gt;
                                      Options for uploading an image asset to the user's private media library.

                                      &lt;Prop.List&gt;
                                        &lt;Prop name="type" required type="string" sourceLineNumbers={[368]}&gt;
                                          Indicates this value contains options for image uploading.

                                          The only valid value is `"image_upload"`.
                                        &lt;/Prop&gt;

                                        &lt;Prop name="url" required type="string" sourceLineNumbers={[683]}&gt;
                                          The URL of the image file to upload.
                                          This can be an external URL or a data URL.

                                          Requirements for external URLs:

                                          * Must use HTTPS
                                          * Must return a `200` status code
                                          * `Content-Type` must match the file's MIME type
                                          * Must be publicly accessible (i.e. not a localhost URL)
                                          * Must not redirect
                                          * Must not contain an IP address
                                          * Maximum length: 4096 characters
                                          * Must not contain whitespace
                                          * Must not contain these characters: `&gt;`, `&lt;`, `{`, `}`, `^`, backticks
                                          * Maximum file size: 50MB

                                          Requirements for data URLs:

                                          * Must include `;base64` for base64-encoded data
                                          * Maximum size: 10MB (10 × 1024 × 1024 characters)

                                          Requirements for SVGs:

                                          * Disallowed elements:
                                            * `a`
                                            * `altglyph`
                                            * `altglyphdef`
                                            * `altglyphitem`
                                            * `animate`
                                            * `animatemotion`
                                            * `animatetransform`
                                            * `cursor`
                                            * `discard`
                                            * `font`
                                            * `font-face`
                                            * `font-face-format`
                                            * `font-face-name`
                                            * `font-face-src`
                                            * `font-face-uri`
                                            * `foreignobject`
                                            * `glyph`
                                            * `glyphref`
                                            * `missing-glyph`
                                            * `mpath`
                                            * `script`
                                            * `set`
                                            * `switch`
                                            * `tref`
                                          * Disallowed attributes:
                                            * `crossorigin`
                                            * `lang`
                                            * `media`
                                            * `onload`
                                            * `ping`
                                            * `referrerpolicy`
                                            * `rel`
                                            * `rendering-intent`
                                            * `requiredextensions`
                                            * `requiredfeatures`
                                            * `systemlanguage`
                                            * `tabindex`
                                            * `transform-origin`
                                            * `unicode`
                                            * `vector-effect`
                                          * The `href` attribute of an `image` element only supports data URLs for PNG and JPEG images.
                                          * The URL in the `href` attribute must not point to a location outside of the SVG.
                                          * The `style` attribute must not use the `mix-blend-mode` property.
                                        &lt;/Prop&gt;

                                        &lt;Prop name="mimeType" required type="ImageMimeType" sourceLineNumbers={[687]}&gt;
                                          The MIME type of the image file.

                                          &lt;Prop.Extras&gt;
                                            **Available values**:

                                            * `"image/jpeg"`
                                            * `"image/heic"`
                                            * `"image/png"`
                                            * `"image/svg+xml"`
                                            * `"image/webp"`
                                            * `"image/tiff"`
                                          &lt;/Prop.Extras&gt;
                                        &lt;/Prop&gt;

                                        &lt;Prop name="thumbnailUrl" required type="string" sourceLineNumbers={[705]}&gt;
                                          The URL of a thumbnail image to display while the image is queued for upload.
                                          This can be an external URL or a data URL.

                                          Requirements for external URLs:

                                          * Must use HTTPS
                                          * Must support Cross-Origin Resource Sharing
                                          * Must be a PNG, JPEG, or SVG file
                                          * Maximum length: 4096 characters

                                          Requirements for data URLs:

                                          * Must include `;base64` for base64-encoded data
                                          * Maximum size: 10MB (10 × 1024 × 1024 characters)
                                        &lt;/Prop&gt;

                                        &lt;Prop name="aiDisclosure" required type="AiDisclosure" sourceLineNumbers={[745]}&gt;
                                          A disclosure identifying if the app generated this image using AI

                                          Helps users make informed decisions about the content they interact with.
                                          See AiDisclosure for the full definition.

                                          **App Generated**

                                          'app\_generated' indicates when the app creates or significantly alters an asset using AI. Includes when
                                          the app requests a third-party service to take similar action on an image using AI.

                                          Required for the following cases (this list is not exhaustive):

                                          | Case                                                            | Reason                               |
                                          | --------------------------------------------------------------- | ------------------------------------ |
                                          | AI generates a new image from scratch                           | Creates new creative content         |
                                          | AI changes the style of the image e.g. makes it cartoon         | Significantly alters the style       |
                                          | AI removes an object and replaces it with new content           | Creates new creative content         |
                                          | AI changes the facial expression of a person in an image        | Can alter content's original meaning |
                                          | AI composites multiple images together                          | Significantly alters context         |
                                          | AI expands an image by generating new content to fill the edges | Creates new creative content         |
                                          | AI replaces background by generating new content                | Creates new creative content         |

                                          **None**

                                          'none' indicates when the app doesn't create or significantly alter an asset using AI, or as a part of a request
                                          to third-party hosted content.

                                          Required for the following cases (this list is not exhaustive):

                                          | Case                                               | Reason                                    |
                                          | -------------------------------------------------- | ----------------------------------------- |
                                          | Asset comes from an asset library                  | Didn't generate the asset itself          |
                                          | AI corrects red eyes                               | A minor correction                        |
                                          | AI removes background without replacement          | Doesn't change original meaning by itself |
                                          | AI changes the color of an object in an image      | Doesn't change original meaning by itself |
                                          | AI detects image defects and suggests manual fixes | Didn't change the asset itself            |
                                          | AI adjusts brightness and contrast on an image     | Doesn't change original meaning by itself |
                                          | AI upscales an image                               | Doesn't change original meaning by itself |

                                          &lt;Prop.Extras&gt;
                                            **Available values**:

                                            * `"app_generated"`
                                            * `"none"`
                                          &lt;/Prop.Extras&gt;
                                        &lt;/Prop&gt;

                                        &lt;Prop name="name" type="string" sourceLineNumbers={[605]}&gt;
                                          A human-readable name for the image asset.

                                          This name is displayed in the user's media library and helps users identify
                                          and find the asset later. If not provided, Canva will generate a name based
                                          on the asset's URL or a unique identifier.

                                          Requirements:

                                          * Minimum length: 1 character (empty strings are not allowed)
                                          * Maximum length: 255 characters
                                        &lt;/Prop&gt;
                                      &lt;/Prop.List&gt;
                                    &lt;/Tab&gt;

                                    &lt;Tab name="DataTableVideoUpload"&gt;
                                      Options for uploading a video asset to the user's private media library.

                                      &lt;Prop.List&gt;
                                        &lt;Prop name="type" required type="string" sourceLineNumbers={[450]}&gt;
                                          Indicates this value contains options for video uploading.

                                          The only valid value is `"video_upload"`.
                                        &lt;/Prop&gt;

                                        &lt;Prop name="url" required type="string" sourceLineNumbers={[1151]}&gt;
                                          The URL of the video file to upload.

                                          Requirements:

                                          * Must use HTTPS
                                          * Must return a `200` status code
                                          * `Content-Type` must match the file's MIME type
                                          * Must be publicly accessible (i.e. not a localhost URL)
                                          * Must not redirect
                                          * Must not contain an IP address
                                          * Maximum length: 4096 characters
                                          * Must not contain whitespace
                                          * Must not contain these characters: `&gt;`, `&lt;`, `{`, `}`, `^`, backticks
                                          * Maximum file size: 1000MB (1GB)
                                        &lt;/Prop&gt;

                                        &lt;Prop name="mimeType" required type="VideoMimeType" sourceLineNumbers={[1155]}&gt;
                                          The MIME type of the video file.

                                          &lt;Prop.Extras&gt;
                                            **Available values**:

                                            * `"video/avi"`
                                            * `"video/x-msvideo"`
                                            * `"image/gif"`
                                            * `"video/x-m4v"`
                                            * `"video/x-matroska"`
                                            * `"video/quicktime"`
                                            * `"video/mp4"`
                                            * `"video/mpeg"`
                                            * `"video/webm"`
                                            * `"application/json"`
                                          &lt;/Prop.Extras&gt;
                                        &lt;/Prop&gt;

                                        &lt;Prop name="thumbnailImageUrl" required type="string" sourceLineNumbers={[1187]}&gt;
                                          The URL of a thumbnail image to use as a fallback if `thumbnailVideoUrl` isn't provided.
                                          This can be an external URL or a data URL.

                                          Requirements for external URLs:

                                          * Must use HTTPS
                                          * Must support Cross-Origin Resource Sharing
                                          * Must be a PNG, JPEG, or SVG file
                                          * Maximum length: 4096 characters

                                          Requirements for data URLs:

                                          * Must include `;base64` for base64-encoded data
                                          * Maximum size: 10MB (10 × 1024 × 1024 characters)
                                          * The dimensions of the thumbnail must match the video's aspect ratio to prevent the thumbnail from appearing squashed or stretched
                                        &lt;/Prop&gt;

                                        &lt;Prop name="aiDisclosure" required type="AiDisclosure" sourceLineNumbers={[1225]}&gt;
                                          A disclosure identifying if the app generated this video using AI.

                                          Helps users make informed decisions about the content they interact with.
                                          See AiDisclosure for the full definition.

                                          **App Generated**

                                          'app\_generated' indicates when the app creates or significantly alters an asset using AI. Includes when
                                          the app requests a third-party service to take similar action on a video using AI.

                                          Required for the following cases (this list is not exhaustive):

                                          | Case                                                           | Reason                         |
                                          | -------------------------------------------------------------- | ------------------------------ |
                                          | AI generates a new video from scratch                          | Creates new creative content   |
                                          | AI changes the style of the video e.g. makes it cartoon        | Significantly alters the style |
                                          | AI adds subtitles that rely on subjective interpretation       | Creates new creative content   |
                                          | AI expands a video by generating new content to fill the edges | Creates new creative content   |
                                          | AI animates an image                                           | Creates new creative content   |
                                          | AI fixes defects e.g. blur in a video by generating details    | Creates new creative content   |
                                          | AI generates a talking head presenter                          | Creates new creative content   |

                                          **None**

                                          'none' indicates when the app doesn't create or significantly alter an asset using AI, or as a part of
                                          a request to third-party hosted content.

                                          Required for the following cases (this list is not exhaustive):

                                          | Case                                                     | Reason                                    |
                                          | -------------------------------------------------------- | ----------------------------------------- |
                                          | Asset comes from an asset library                        | Didn't generate the asset itself          |
                                          | AI corrects red eyes                                     | A minor correction                        |
                                          | AI adjusts brightness and contrast on a video            | Doesn't change original meaning by itself |
                                          | AI creates a slow motion effect in a video               | Doesn't change original meaning by itself |
                                          | AI adds AI word-by-word transcribed subtitles to a video | Doesn't change original meaning by itself |

                                          &lt;Prop.Extras&gt;
                                            **Available values**:

                                            * `"app_generated"`
                                            * `"none"`
                                          &lt;/Prop.Extras&gt;
                                        &lt;/Prop&gt;

                                        &lt;Prop name="name" type="string" sourceLineNumbers={[1126]}&gt;
                                          A human-readable name for the video asset.

                                          This name is displayed in the user's media library and helps users identify
                                          and find the asset later. If not provided, Canva will generate a name based
                                          on the asset's URL or a unique identifier.

                                          Requirements:

                                          * Minimum length: 1 character (empty strings are not allowed)
                                          * Maximum length: 255 characters
                                        &lt;/Prop&gt;

                                        &lt;Prop name="thumbnailVideoUrl" type="string" sourceLineNumbers={[1168]}&gt;
                                          The URL of a thumbnail video to display while the video is queued for upload.

                                          Requirements:

                                          * Must use HTTPS
                                          * Must support Cross-Origin Resource Sharing
                                          * Maximum length: 4096 characters
                                          * The dimensions of the thumbnail video must match the video's aspect ratio to prevent the thumbnail from appearing squashed or stretched
                                          * Must not be an AVI file. Although our APIs support uploading AVI videos, Canva can't preview them because of native support of browsers
                                        &lt;/Prop&gt;
                                      &lt;/Prop.List&gt;
                                    &lt;/Tab&gt;
                                  &lt;/Tabs&gt;
                                &lt;/Prop&gt;
                              &lt;/Prop.List&gt;
                            &lt;/Tab&gt;
                          &lt;/Tabs&gt;
                        &lt;/Prop&gt;
                      &lt;/Prop.List&gt;
                    &lt;/PillAccordion&gt;
                  &lt;/Prop&gt;

                  &lt;Prop name="columnConfigs" type="ColumnConfig[]" sourceLineNumbers={[339]}&gt;
                    Column definitions with names and data types.

                    These help Canva interpret and display your data correctly.

                    &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;columnConfigs&lt;/strong&gt;&lt;/&gt;}&gt;
                      &lt;Prop.List&gt;
                        &lt;Prop name="name" required type="string | undefined" sourceLineNumbers={[143]}&gt;
                          Name for the column, displayed as header text.

                          If `undefined`, the column will have no header text.
                        &lt;/Prop&gt;

                        &lt;Prop name="type" required type="object" sourceLineNumbers={[150]}&gt;
                          Expected data type for cells in this column.

                          Use a specific `DataType` for columns with consistent types,
                          or `'variant'` for columns that may contain mixed types.

                          &lt;Tabs&gt;
                            &lt;Tab name="DataType"&gt;
                              Data types supported for table cells.

                              &lt;Prop.Extras&gt;
                                **Available values**:

                                * `"string"`
                                * `"number"`
                                * `"date"`
                                * `"boolean"`
                                * `"media"`
                              &lt;/Prop.Extras&gt;
                            &lt;/Tab&gt;

                            &lt;Tab name="string"&gt;
                              The only valid value is `"variant"`.
                            &lt;/Tab&gt;
                          &lt;/Tabs&gt;
                        &lt;/Prop&gt;
                      &lt;/Prop.List&gt;
                    &lt;/PillAccordion&gt;
                  &lt;/Prop&gt;
                &lt;/Prop.List&gt;
              &lt;/PillAccordion&gt;
            &lt;/Prop&gt;

            &lt;Prop name="metadata" type="DataTableMetadata" sourceLineNumbers={[522]}&gt;
              Optional metadata providing additional context about the data.

              &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;metadata&lt;/strong&gt;&lt;/&gt;}&gt;
                &lt;Prop.List&gt;
                  &lt;Prop name="description" type="string" sourceLineNumbers={[400]}&gt;
                    A human-readable description of the dataset.

                    This description helps users understand what data they are importing.
                  &lt;/Prop&gt;

                  &lt;Prop name="providerInfo" type="object" sourceLineNumbers={[404]}&gt;
                    Information about the data provider or source.

                    &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;providerInfo&lt;/strong&gt;&lt;/&gt;}&gt;
                      &lt;Prop.List&gt;
                        &lt;Prop name="name" required type="string" sourceLineNumbers={[408]}&gt;
                          Name of the data provider.
                        &lt;/Prop&gt;

                        &lt;Prop name="url" type="string" sourceLineNumbers={[412]}&gt;
                          URL to the provider's website or related resource.
                        &lt;/Prop&gt;
                      &lt;/Prop.List&gt;
                    &lt;/PillAccordion&gt;
                  &lt;/Prop&gt;
                &lt;/Prop.List&gt;
              &lt;/PillAccordion&gt;
            &lt;/Prop&gt;
          &lt;/Prop.List&gt;
        &lt;/Tab&gt;

        &lt;Tab name="GetDataTableError"&gt;
          Error results that can be returned from `getDataTable` method.

          &lt;Tabs&gt;
            &lt;Tab name="OutdatedSourceRefError"&gt;
              GetDataTableError indicating the data source reference is no longer valid.
              This will trigger a re-selection flow for the user.

              &lt;Prop.List&gt;
                &lt;Prop name="status" required type="string" sourceLineNumbers={[927]}&gt;
                  The data source reference is no longer valid.

                  Return this error when the DataSourceRef cannot be used to retrieve data,
                  for example:

                  * The referenced dataset has been deleted
                  * Access permissions have changed
                  * The structure of the data has fundamentally changed

                  This will trigger a re-selection flow, allowing the user to choose a new
                  data source.

                  The only valid value is `"outdated_source_ref"`.
                &lt;/Prop&gt;
              &lt;/Prop.List&gt;
            &lt;/Tab&gt;

            &lt;Tab name="RemoteRequestFailedError"&gt;
              GetDataTableError indicating failure to fetch data from the external source.
              Typically due to network issues or API failures.

              &lt;Prop.List&gt;
                &lt;Prop name="status" required type="string" sourceLineNumbers={[986]}&gt;
                  Failed to fetch data from the external source.

                  Return this error for network issues, API failures, or other
                  connectivity problems that prevent data retrieval.

                  The only valid value is `"remote_request_failed"`.
                &lt;/Prop&gt;
              &lt;/Prop.List&gt;
            &lt;/Tab&gt;

            &lt;Tab name="AppError"&gt;
              GetDataTableError indicating custom error occurred in the app's implementation.
              This can be used to indicate specific issues that are not covered by other error types.

              &lt;Prop.List&gt;
                &lt;Prop name="status" required type="string" sourceLineNumbers={[54]}&gt;
                  A custom error occurred in your app.

                  Return this for application-specific errors that don't fit
                  the other categories. Include a descriptive message explaining
                  the error to the user.

                  The only valid value is `"app_error"`.
                &lt;/Prop&gt;

                &lt;Prop name="message" type="string" sourceLineNumbers={[58]}&gt;
                  Optional message explaining the error.
                &lt;/Prop&gt;
              &lt;/Prop.List&gt;
            &lt;/Tab&gt;
          &lt;/Tabs&gt;
        &lt;/Tab&gt;
      &lt;/Tabs&gt;
    &lt;/Prop&gt;

    &lt;Prop name="renderSelectionUi" required type="function" sourceLineNumbers={[222]}&gt;
      Renders a user interface for selecting and configuring data from your external sources.

      &lt;Prop.Extras&gt;
        **Example: Rendering a data selection UI**

        ```ts
        import type { RenderSelectionUiRequest } from '@canva/intents/data';

        async function renderSelectionUi(request: RenderSelectionUiRequest): Promise<void> {
          // UI rendering logic.
          // Example: if user selects data 'ref123'.
          const selectedRef = { source: 'ref123', title: 'My Selected Table' };
          try {
            const result = await request.updateDataRef(selectedRef);
            if (result.status === 'completed') {
              console.log('Selection valid and preview updated.');
            } else {
              console.error('Selection error:', result.status);
            }
          } catch (error) {
             console.error('An unexpected error occurred during data ref update:', error);
          }
        }
        ```
      &lt;/Prop.Extras&gt;

      **Parameters**

      &lt;Prop.List&gt;
        &lt;Prop name="request" required type="RenderSelectionUiRequest" sourceLineNumbers={[222]}&gt;
          Configuration and callbacks for the data selection UI.

          &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;request&lt;/strong&gt;&lt;/&gt;}&gt;
            &lt;Prop.List&gt;
              &lt;Prop name="invocationContext" required type="InvocationContext" sourceLineNumbers={[1005]}&gt;
                Context information about why the data selection UI is being launched.

                Use this to adapt your UI for different scenarios:

                * 'data\_selection': Initial data selection or editing existing data
                * 'outdated\_source\_ref': Previous reference is no longer valid, guide user to reselect
                * 'app\_error': Custom error occurred, show error message and recovery options

                When `dataSourceRef` is provided, pre-populate your UI with this selection.

                &lt;Tabs&gt;
                  &lt;Tab name="DataSelectionInvocationContext"&gt;
                    InvocationContext indicating initial data selection flow or edit of existing data.

                    &lt;Prop.List&gt;
                      &lt;Prop name="reason" required type="string" sourceLineNumbers={[241]}&gt;
                        Initial data selection or editing existing data.

                        This is the standard flow when:

                        * A user is selecting data for the first time
                        * A user is editing a previous selection

                        If `dataSourceRef` is provided, this indicates an edit flow, and you should
                        pre-populate your UI with this selection.

                        The only valid value is `"data_selection"`.
                      &lt;/Prop&gt;

                      &lt;Prop name="dataSourceRef" type="DataSourceRef" sourceLineNumbers={[245]}&gt;
                        If dataSourceRef is provided, this is an edit of existing data flow and UI should be pre-populated.

                        &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;dataSourceRef&lt;/strong&gt;&lt;/&gt;}&gt;
                          &lt;Prop.List&gt;
                            &lt;Prop name="source" required type="string" sourceLineNumbers={[282]}&gt;
                              Information needed to identify and retrieve data from your source.

                              This string should contain all the information your app needs to
                              fetch the exact data selection later. Typically, this is a serialized
                              object with query parameters, identifiers, or filters.

                              You are responsible for encoding and decoding this value appropriately.

                              Maximum size: 5KB
                            &lt;/Prop&gt;

                            &lt;Prop name="title" type="string" sourceLineNumbers={[291]}&gt;
                              A human-readable description of the data reference.

                              This title may be displayed to users in the Canva interface to help
                              them identify the data source.

                              Maximum length: 255 characters
                            &lt;/Prop&gt;
                          &lt;/Prop.List&gt;
                        &lt;/PillAccordion&gt;
                      &lt;/Prop&gt;
                    &lt;/Prop.List&gt;
                  &lt;/Tab&gt;

                  &lt;Tab name="OutdatedSourceRefInvocationContext"&gt;
                    InvocationContext indicating an error occurred because the previously selected data source reference is no longer valid.
                    Triggered when getDataTable returned 'outdated\_source\_ref' during data refresh.
                    UI should guide the user to reselect or reconfigure their data.

                    &lt;Prop.List&gt;
                      &lt;Prop name="reason" required type="string" sourceLineNumbers={[946]}&gt;
                        Previously selected data source reference is no longer valid.

                        This occurs when `getDataTable` returned 'outdated\_source\_ref' during a
                        refresh attempt. Your UI should guide the user to select a new data source
                        or update their selection.

                        The outdated reference is provided to help you suggest an appropriate replacement.

                        The only valid value is `"outdated_source_ref"`.
                      &lt;/Prop&gt;

                      &lt;Prop name="dataSourceRef" type="DataSourceRef" sourceLineNumbers={[950]}&gt;
                        The outdated data source reference that caused the error during refresh.

                        &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;dataSourceRef&lt;/strong&gt;&lt;/&gt;}&gt;
                          &lt;Prop.List&gt;
                            &lt;Prop name="source" required type="string" sourceLineNumbers={[282]}&gt;
                              Information needed to identify and retrieve data from your source.

                              This string should contain all the information your app needs to
                              fetch the exact data selection later. Typically, this is a serialized
                              object with query parameters, identifiers, or filters.

                              You are responsible for encoding and decoding this value appropriately.

                              Maximum size: 5KB
                            &lt;/Prop&gt;

                            &lt;Prop name="title" type="string" sourceLineNumbers={[291]}&gt;
                              A human-readable description of the data reference.

                              This title may be displayed to users in the Canva interface to help
                              them identify the data source.

                              Maximum length: 255 characters
                            &lt;/Prop&gt;
                          &lt;/Prop.List&gt;
                        &lt;/PillAccordion&gt;
                      &lt;/Prop&gt;
                    &lt;/Prop.List&gt;
                  &lt;/Tab&gt;

                  &lt;Tab name="AppErrorInvocationContext"&gt;
                    InvocationContext indicating a custom error occurred during data refresh.
                    Triggered when getDataTable returned 'app\_error' status.
                    UI should display the error message and help users recover.

                    &lt;Prop.List&gt;
                      &lt;Prop name="reason" required type="string" sourceLineNumbers={[75]}&gt;
                        A custom error occurred during data refresh.

                        This occurs when `getDataTable` returned 'app\_error' during a refresh attempt.
                        Your UI should display the error message and help users recover from the specific
                        issue.

                        The only valid value is `"app_error"`.
                      &lt;/Prop&gt;

                      &lt;Prop name="dataSourceRef" type="DataSourceRef" sourceLineNumbers={[79]}&gt;
                        The data source reference that caused the error during refresh.

                        &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;dataSourceRef&lt;/strong&gt;&lt;/&gt;}&gt;
                          &lt;Prop.List&gt;
                            &lt;Prop name="source" required type="string" sourceLineNumbers={[282]}&gt;
                              Information needed to identify and retrieve data from your source.

                              This string should contain all the information your app needs to
                              fetch the exact data selection later. Typically, this is a serialized
                              object with query parameters, identifiers, or filters.

                              You are responsible for encoding and decoding this value appropriately.

                              Maximum size: 5KB
                            &lt;/Prop&gt;

                            &lt;Prop name="title" type="string" sourceLineNumbers={[291]}&gt;
                              A human-readable description of the data reference.

                              This title may be displayed to users in the Canva interface to help
                              them identify the data source.

                              Maximum length: 255 characters
                            &lt;/Prop&gt;
                          &lt;/Prop.List&gt;
                        &lt;/PillAccordion&gt;
                      &lt;/Prop&gt;

                      &lt;Prop name="message" type="string" sourceLineNumbers={[83]}&gt;
                        The error message to display to the user.
                      &lt;/Prop&gt;
                    &lt;/Prop.List&gt;
                  &lt;/Tab&gt;
                &lt;/Tabs&gt;
              &lt;/Prop&gt;

              &lt;Prop name="limit" required type="DataTableLimit" sourceLineNumbers={[1013]}&gt;
                Maximum allowed rows and columns for the imported data.

                Your UI should inform users of these constraints and prevent or warn about
                selections that would exceed them. This helps users understand why certain
                data sets might not be available for selection.

                &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;limit&lt;/strong&gt;&lt;/&gt;}&gt;
                  &lt;Prop.List&gt;
                    &lt;Prop name="row" required type="number" sourceLineNumbers={[381]}&gt;
                      The maximum number of rows allowed.

                      Your app should ensure data does not exceed this limit.
                    &lt;/Prop&gt;

                    &lt;Prop name="column" required type="number" sourceLineNumbers={[387]}&gt;
                      The maximum number of columns allowed.

                      Your app should ensure data does not exceed this limit.
                    &lt;/Prop&gt;
                  &lt;/Prop.List&gt;
                &lt;/PillAccordion&gt;
              &lt;/Prop&gt;

              &lt;Prop name="updateDataRef" required type="function" sourceLineNumbers={[1032]}&gt;
                Callback to preview selected data before finalizing import.

                Call this function when the user selects data to:

                1. Show a preview of the selected data to the user
                2. Validate that the selection meets system requirements

                Calling this function will trigger your `getDataTable` implementation.
                Wait for the promise to resolve to determine if the selection is valid.

                &lt;Prop.Extras&gt;
                  **Throws**

                  Will throw CanvaError('bad\_request') if

                  1. DataSourceRef.source exceeds 5kb.
                  2. DataSourceRef.title exceeds 255 characters.
                  3. GetDataTableCompleted.dataTable exceeds DataTableLimit or contains invalid data.
                &lt;/Prop.Extras&gt;

                **Parameters**

                &lt;Prop.List&gt;
                  &lt;Prop name="dataSourceRef" required type="DataSourceRef" sourceLineNumbers={[1032]}&gt;
                    Reference object identifying the selected data

                    &lt;PillAccordion defaultExpanded={false} title={&lt;&gt;Properties of &lt;strong&gt;dataSourceRef&lt;/strong&gt;&lt;/&gt;}&gt;
                      &lt;Prop.List&gt;
                        &lt;Prop name="source" required type="string" sourceLineNumbers={[282]}&gt;
                          Information needed to identify and retrieve data from your source.

                          This string should contain all the information your app needs to
                          fetch the exact data selection later. Typically, this is a serialized
                          object with query parameters, identifiers, or filters.

                          You are responsible for encoding and decoding this value appropriately.

                          Maximum size: 5KB
                        &lt;/Prop&gt;

                        &lt;Prop name="title" type="string" sourceLineNumbers={[291]}&gt;
                          A human-readable description of the data reference.

                          This title may be displayed to users in the Canva interface to help
                          them identify the data source.

                          Maximum length: 255 characters
                        &lt;/Prop&gt;
                      &lt;/Prop.List&gt;
                    &lt;/PillAccordion&gt;
                  &lt;/Prop&gt;
                &lt;/Prop.List&gt;

                **Returns**

                Promise resolving to success or an error result. This is a `Promise` that resolves with the following object:

                &lt;Tabs&gt;
                  &lt;Tab name="UpdateDataRefCompleted"&gt;
                    Successful result from the RenderSelectionUiRequest.updateDataRef callback.

                    &lt;Prop.List&gt;
                      &lt;Prop name="status" required type="string" sourceLineNumbers={[1077]}&gt;
                        The data selection was successful and can be previewed.

                        The only valid value is `"completed"`.
                      &lt;/Prop&gt;
                    &lt;/Prop.List&gt;
                  &lt;/Tab&gt;

                  &lt;Tab name="GetDataTableError"&gt;
                    Error results that can be returned from `getDataTable` method.

                    &lt;Tabs&gt;
                      &lt;Tab name="OutdatedSourceRefError"&gt;
                        GetDataTableError indicating the data source reference is no longer valid.
                        This will trigger a re-selection flow for the user.

                        &lt;Prop.List&gt;
                          &lt;Prop name="status" required type="string" sourceLineNumbers={[927]}&gt;
                            The data source reference is no longer valid.

                            Return this error when the DataSourceRef cannot be used to retrieve data,
                            for example:

                            * The referenced dataset has been deleted
                            * Access permissions have changed
                            * The structure of the data has fundamentally changed

                            This will trigger a re-selection flow, allowing the user to choose a new
                            data source.

                            The only valid value is `"outdated_source_ref"`.
                          &lt;/Prop&gt;
                        &lt;/Prop.List&gt;
                      &lt;/Tab&gt;

                      &lt;Tab name="RemoteRequestFailedError"&gt;
                        GetDataTableError indicating failure to fetch data from the external source.
                        Typically due to network issues or API failures.

                        &lt;Prop.List&gt;
                          &lt;Prop name="status" required type="string" sourceLineNumbers={[986]}&gt;
                            Failed to fetch data from the external source.

                            Return this error for network issues, API failures, or other
                            connectivity problems that prevent data retrieval.

                            The only valid value is `"remote_request_failed"`.
                          &lt;/Prop&gt;
                        &lt;/Prop.List&gt;
                      &lt;/Tab&gt;

                      &lt;Tab name="AppError"&gt;
                        GetDataTableError indicating custom error occurred in the app's implementation.
                        This can be used to indicate specific issues that are not covered by other error types.

                        &lt;Prop.List&gt;
                          &lt;Prop name="status" required type="string" sourceLineNumbers={[54]}&gt;
                            A custom error occurred in your app.

                            Return this for application-specific errors that don't fit
                            the other categories. Include a descriptive message explaining
                            the error to the user.

                            The only valid value is `"app_error"`.
                          &lt;/Prop&gt;

                          &lt;Prop name="message" type="string" sourceLineNumbers={[58]}&gt;
                            Optional message explaining the error.
                          &lt;/Prop&gt;
                        &lt;/Prop.List&gt;
                      &lt;/Tab&gt;
                    &lt;/Tabs&gt;
                  &lt;/Tab&gt;
                &lt;/Tabs&gt;
              &lt;/Prop&gt;
            &lt;/Prop.List&gt;
          &lt;/PillAccordion&gt;
        &lt;/Prop&gt;
      &lt;/Prop.List&gt;

      **Returns**

      `void`
    &lt;/Prop&gt;
  &lt;/Prop.List&gt;
&lt;/PillAccordion&gt;

</Prop> </Prop.List>

Returns

void

Prepare Design Editor

API reference for the intents prepareDesignEditor method.

Prepares a DesignEditor Intent.

Usage

tsx
import { prepareDesignEditor } from '@canva/intents/design';

prepareDesignEditor({
 render: async () => {
   // TODO: Implement the logic to render your app's UI
 },
});

Parameters

<Prop.List> <Prop name="implementation" required type="DesignEditorIntent" sourceLineNumbers={[39]}> Main interface for implementing the DesignEditor intent.

Implementing the DesignEditor Intent enables apps to assist users in editing designs,
by presenting interactive and creative tooling alongside the Canva design surface.

&lt;PillAccordion defaultExpanded={true} title={&lt;&gt;Properties of &lt;strong&gt;implementation&lt;/strong&gt;&lt;/&gt;}&gt;
  &lt;Prop.List&gt;
    &lt;Prop name="render" required type="function" sourceLineNumbers={[20]}&gt;
      Renders the UI containing the app’s functionality.

      &lt;Prop.Extras&gt;
        **Example**

        ```tsx
        function render() {
          // render your UI using your preferred framework
        }
        ```
      &lt;/Prop.Extras&gt;

      **Returns**

      `void`
    &lt;/Prop&gt;
  &lt;/Prop.List&gt;
&lt;/PillAccordion&gt;

</Prop> </Prop.List>

Returns

void

Intents Changelog

The latest changes for the Canva Apps SDK @canva/intents package.

2.5.0 - 2026-04-09

Changed

  • Increased the publishRef size limit from 5KB to 32KB, allowing apps to store more complex publishing settings.

Added

  • Add selection metadata in MediaSelection
  • Enable apps to support transparent PNG exports in publish flow by adding optional allowTransparentBackground capability to ImageRequirement

2.4.0 - 2026-03-23

Added

  • Launch the new Email media type to public, enabling publishing and selection of email pages.

2.3.1 - 2026-03-12

Fixed

  • Re-export data types from the intents/data public API that were accidentally removed during a refactor
  • Rename Selection type to MediaSelection for clarity

2.3.0 - 2026-03-06

Added

  • Promoted Selection, ImageSelection, VideoSelection, DocumentSelection, EmailSelection types and MediaSlot.selection field from beta to public

2.2.0 - 2026-02-06

Added

  • Added invocation context to provide initial state when rendering UIs

2.1.2 - 2026-02-03

Fixed

  • Fix missing id and status fields in Content Publisher email preview type

2.1.1 - 2026-01-30

Changed

  • Update NPM readme

2.1.0 - 2026-01-30

Added

  • Added a CHANGELOG.md to track changes.
  • Added a test harness method initTestEnvionment which can be imported from @canva/intents/test
  • Promoted the Content Publisher Intent API from beta to general availability

2.0.0 - 2025-06-12

Added

  • Added the new @canva/intents package at version 2.0.0 with the brand new Data Connector intent.

Canva Developer Documentation SOP Site