@canva/intents 2.2.1-beta.0 → 2.2.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.2.1-beta.1 - 2026-02-27
4
+
5
+ ### Fixed
6
+
7
+ - Beta PreviewMedia and Preview types now correctly use full EmailPreview variants throughout RenderPreviewUiRequest, PublishPreviewUiInvocationContext, and ContentPublisherIntent.
8
+
3
9
  ## 2.2.1-beta.0 - 2026-02-24
4
10
 
5
11
  ### Added
package/beta.d.ts CHANGED
@@ -195,24 +195,6 @@ declare interface BasePreview {
195
195
  status: PreviewStatus;
196
196
  }
197
197
 
198
- /**
199
- * @beta
200
- * Beta preview in various states.
201
- */
202
- declare type BetaPreview = ImagePreview | VideoPreview | DocumentPreview | EmailPreview;
203
-
204
- /**
205
- * @beta
206
- * Preview media for a specific media slot.
207
- *
208
- * Contains preview URLs and metadata for images or videos in the design.
209
- * Made for beta preview types.
210
- */
211
- declare type BetaPreviewMedia = {
212
- mediaSlotId: string;
213
- previews: BetaPreview[];
214
- };
215
-
216
198
  /**
217
199
  * @public
218
200
  * Cell containing a boolean value.
@@ -283,10 +265,6 @@ declare type ColumnConfig = {
283
265
  declare namespace content {
284
266
  export {
285
267
  prepareContentPublisher,
286
- ContentPublisherIntent,
287
- RenderPreviewUiInvocationContext,
288
- PublishPreviewUiInvocationContext,
289
- RenderPreviewUiRequest,
290
268
  Disposer,
291
269
  PublishContentRequest,
292
270
  RenderSettingsUiInvocationContext,
@@ -326,10 +304,6 @@ declare namespace content {
326
304
  MaxValueRange,
327
305
  MinMaxValueRange,
328
306
  ValueRange,
329
- PreviewMedia,
330
- BetaPreviewMedia,
331
- Preview,
332
- BetaPreview,
333
307
  DocumentPreview,
334
308
  DocumentPreviewLoading,
335
309
  DocumentPreviewThumbnail,
@@ -361,7 +335,13 @@ declare namespace content {
361
335
  EmailOutputFile,
362
336
  ContentMetadata,
363
337
  DesignContentMetadata,
364
- OutputPageMetadata
338
+ OutputPageMetadata,
339
+ Preview,
340
+ PreviewMedia,
341
+ RenderPreviewUiInvocationContext,
342
+ PublishPreviewUiInvocationContext,
343
+ RenderPreviewUiRequest,
344
+ ContentPublisherIntent
365
345
  }
366
346
  }
367
347
  export { content }
package/content/beta.d.ts CHANGED
@@ -110,28 +110,6 @@ export declare interface BasePreview {
110
110
  status: PreviewStatus;
111
111
  }
112
112
 
113
- /**
114
- * @beta
115
- * Beta preview in various states.
116
- */
117
- declare type BetaPreview = ImagePreview | VideoPreview | DocumentPreview | EmailPreview;
118
- export { BetaPreview }
119
- export { BetaPreview as Preview }
120
-
121
- /**
122
- * @beta
123
- * Preview media for a specific media slot.
124
- *
125
- * Contains preview URLs and metadata for images or videos in the design.
126
- * Made for beta preview types.
127
- */
128
- declare type BetaPreviewMedia = {
129
- mediaSlotId: string;
130
- previews: BetaPreview[];
131
- };
132
- export { BetaPreviewMedia }
133
- export { BetaPreviewMedia as PreviewMedia }
134
-
135
113
  /**
136
114
  * @public
137
115
  * Metadata about the source content used to create an exported file.
@@ -139,7 +117,7 @@ export { BetaPreviewMedia as PreviewMedia }
139
117
  export declare type ContentMetadata = DesignContentMetadata;
140
118
 
141
119
  /**
142
- * @public
120
+ * @beta
143
121
  * Main interface for implementing the ContentPublisher intent.
144
122
  *
145
123
  * Implementing the ContentPublisher intent enables apps to publish contents to external platforms.
@@ -195,7 +173,6 @@ export declare type ContentPublisherIntent = {
195
173
  * ```
196
174
  */
197
175
  getPublishConfiguration: () => Promise<GetPublishConfigurationResponse>;
198
-
199
176
  /**
200
177
  * Renders a user interface for configuring publish settings.
201
178
  *
@@ -306,7 +283,6 @@ export declare type ContentPublisherIntent = {
306
283
  * ```
307
284
  */
308
285
  publishContent: (request: PublishContentRequest) => Promise<PublishContentResponse>;
309
-
310
286
  };
311
287
 
312
288
  /**
@@ -489,13 +465,6 @@ export declare interface EmailPreviewReady extends BasePreview {
489
465
  url: string;
490
466
  }
491
467
 
492
- /**
493
- * Email preview stub used before beta preview type is fully supported.
494
- */
495
- declare interface EmailPreviewStub extends BasePreview {
496
- kind: 'email';
497
- }
498
-
499
468
  /**
500
469
  * @beta
501
470
  * Email file requirements for a media slot, currently only supports HTML bundle format.
@@ -885,7 +854,7 @@ export declare type PostPublishActionRedirect = {
885
854
  };
886
855
 
887
856
  /**
888
- * @public
857
+ * @beta
889
858
  *
890
859
  * Prepares a {@link ContentPublisherIntent|Content Publisher Intent}.
891
860
  *
@@ -912,12 +881,12 @@ export declare type PostPublishActionRedirect = {
912
881
  export declare const prepareContentPublisher: (implementation: ContentPublisherIntent) => void;
913
882
 
914
883
  /**
915
- * @public
884
+ * @beta
916
885
  * Preview item for an image or video.
917
886
  *
918
887
  * Check the `kind` and `status` properties to determine the type and state.
919
888
  */
920
- declare type Preview_2 = ImagePreview | VideoPreview | DocumentPreview | EmailPreviewStub;
889
+ export declare type Preview = ImagePreview | VideoPreview | DocumentPreview | EmailPreview;
921
890
 
922
891
  /**
923
892
  * @public
@@ -926,24 +895,14 @@ declare type Preview_2 = ImagePreview | VideoPreview | DocumentPreview | EmailPr
926
895
  export declare type PreviewKind = 'image' | 'video' | 'document' | 'email';
927
896
 
928
897
  /**
929
- * @public
898
+ * @beta
930
899
  * Preview media for a specific media slot.
931
900
  *
932
901
  * Contains preview URLs and metadata for images or videos in the design.
933
902
  */
934
- declare type PreviewMedia_2 = {
935
- /**
936
- * ID of the media slot this preview belongs to.
937
- *
938
- * Matches a media slot ID from your output type definition.
939
- */
903
+ export declare type PreviewMedia = {
940
904
  mediaSlotId: string;
941
- /**
942
- * Array of preview items for this media slot.
943
- *
944
- * May contain multiple previews if the media slot accepts multiple files.
945
- */
946
- previews: Preview_2[];
905
+ previews: Preview[];
947
906
  };
948
907
 
949
908
  /**
@@ -1085,7 +1044,7 @@ export declare type PublishErrorSettingsUiContext = {
1085
1044
  export declare type PublishFileFormat = 'png' | 'jpg' | 'mp4' | 'pdf_standard' | 'html_bundle' | 'html_standalone';
1086
1045
 
1087
1046
  /**
1088
- * @public
1047
+ * @beta
1089
1048
  * Initial payload provided from cache.
1090
1049
  */
1091
1050
  export declare type PublishPreviewUiInvocationContext = {
@@ -1097,7 +1056,7 @@ export declare type PublishPreviewUiInvocationContext = {
1097
1056
  * Initial preview media to display
1098
1057
  * This will only be used for scheduling and not caching
1099
1058
  */
1100
- previewMedia?: PreviewMedia_2[];
1059
+ previewMedia?: PreviewMedia[];
1101
1060
  /** Information about the current output type being previewed */
1102
1061
  outputType?: OutputType;
1103
1062
  /** Current publish reference, if available */
@@ -1213,21 +1172,21 @@ export declare type RemoteRequestFailedError = {
1213
1172
  };
1214
1173
 
1215
1174
  /**
1216
- * @public
1175
+ * @beta
1217
1176
  * Initial payload provided when the preview UI is rendered.
1218
1177
  * Contains the preview data and settings needed to initialize the preview interface.
1219
1178
  */
1220
1179
  export declare type RenderPreviewUiInvocationContext = PublishPreviewUiInvocationContext;
1221
1180
 
1222
1181
  /**
1223
- * @public
1182
+ * @beta
1224
1183
  * Configuration required for rendering the preview UI.
1225
1184
  *
1226
1185
  * Provides callbacks for managing preview media and responding to preview updates.
1227
1186
  */
1228
1187
  export declare type RenderPreviewUiRequest = {
1229
1188
  /**
1230
- * @public
1189
+ * @beta
1231
1190
  * The initial preview data and context provided when the preview UI is rendered.
1232
1191
  *
1233
1192
  * Contains the initial preview media, output type information, and any existing
@@ -1287,7 +1246,7 @@ export declare type RenderPreviewUiRequest = {
1287
1246
  * ```
1288
1247
  */
1289
1248
  registerOnPreviewChange: (callback: (opts: {
1290
- previewMedia: PreviewMedia_2[];
1249
+ previewMedia: PreviewMedia[];
1291
1250
  /** The output type that the preview data is for */
1292
1251
  outputType: OutputType;
1293
1252
  /** The current publish settings reference, if available */
@@ -2,6 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
+ Object.defineProperty(exports, "prepareContentPublisher", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return prepareContentPublisher;
9
+ }
10
+ });
5
11
  const _version = require("../version");
6
12
  _export_star(require("./public"), exports);
7
13
  function _export_star(from, to) {
@@ -17,4 +23,5 @@ function _export_star(from, to) {
17
23
  });
18
24
  return from;
19
25
  }
26
+ const prepareContentPublisher = canva_sdk.intents.v1.content.prepareContentPublisher;
20
27
  window.__canva__?.sdkRegistration?.registerPackageVersion('intents/content', _version.LATEST_VERSION_BETA, 'beta');
@@ -20,5 +20,5 @@ _export(exports, {
20
20
  }
21
21
  });
22
22
  const LATEST_VERSION = '2.2.0';
23
- const LATEST_VERSION_BETA = '2.2.1-beta.0';
23
+ const LATEST_VERSION_BETA = '2.2.1-beta.1';
24
24
  const LATEST_VERSION_ALPHA = 'NONE';
@@ -1,3 +1,4 @@
1
1
  import { LATEST_VERSION_BETA } from '../version';
2
2
  export * from './public';
3
+ export const prepareContentPublisher = canva_sdk.intents.v1.content.prepareContentPublisher;
3
4
  window.__canva__?.sdkRegistration?.registerPackageVersion('intents/content', LATEST_VERSION_BETA, 'beta');
@@ -1,3 +1,3 @@
1
1
  export const LATEST_VERSION = '2.2.0';
2
- export const LATEST_VERSION_BETA = '2.2.1-beta.0';
2
+ export const LATEST_VERSION_BETA = '2.2.1-beta.1';
3
3
  export const LATEST_VERSION_ALPHA = 'NONE';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canva/intents",
3
- "version": "2.2.1-beta.0",
3
+ "version": "2.2.1-beta.1",
4
4
  "description": "The Canva Apps SDK Intents library",
5
5
  "author": "Canva Pty Ltd.",
6
6
  "license": "SEE LICENSE IN LICENSE.md FILE",