@canva/intents 2.3.0 → 2.3.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,12 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.3.1 - 2026-03-12
4
+
5
+ ### Fixed
6
+
7
+ - Re-export data types from the intents/data public API that were accidentally removed during a refactor
8
+ - Rename `Selection` type to `MediaSelection` for clarity
9
+
3
10
  ## 2.3.0 - 2026-03-06
4
11
 
5
12
  ### Added
@@ -600,6 +600,15 @@ export declare type MaxValueRange = {
600
600
  max: number;
601
601
  };
602
602
 
603
+ /**
604
+ * @public
605
+ * Metadata about a selected media item in a media slot.
606
+ *
607
+ * Canva populates this when returning {@link OutputType} in Settings UI contexts.
608
+ * Apps should not set this value.
609
+ */
610
+ export declare type MediaSelection = ImageSelection | VideoSelection | DocumentSelection | EmailSelection;
611
+
603
612
  /**
604
613
  * @public
605
614
  * Configuration for a media slot within an output type.
@@ -669,7 +678,7 @@ export declare type MediaSlot = {
669
678
  * Apps should not set this value when defining output types in
670
679
  * {@link ContentPublisherIntent.getPublishConfiguration}.
671
680
  */
672
- readonly selection?: readonly Selection_2[];
681
+ readonly selection?: readonly MediaSelection[];
673
682
  };
674
683
 
675
684
  /**
@@ -1371,16 +1380,6 @@ export declare type RenderSettingsUiRequest = {
1371
1380
  }) => Disposer;
1372
1381
  };
1373
1382
 
1374
- /**
1375
- * @public
1376
- * Metadata about a selected media item in a media slot.
1377
- *
1378
- * Canva populates this when returning {@link OutputType} in Settings UI contexts.
1379
- * Apps should not set this value.
1380
- */
1381
- declare type Selection_2 = ImageSelection | VideoSelection | DocumentSelection | EmailSelection;
1382
- export { Selection_2 as Selection }
1383
-
1384
1383
  /**
1385
1384
  * @public
1386
1385
  * Context information for the publish settings UI.
package/data/index.d.ts CHANGED
@@ -117,7 +117,7 @@ declare type AppErrorInvocationContext = {
117
117
  * };
118
118
  * ```
119
119
  */
120
- declare type BooleanDataTableCell = {
120
+ export declare type BooleanDataTableCell = {
121
121
  /**
122
122
  * Indicates this cell contains a boolean value.
123
123
  */
@@ -134,7 +134,7 @@ declare type BooleanDataTableCell = {
134
134
  * @public
135
135
  * Configuration for a table column.
136
136
  */
137
- declare type ColumnConfig = {
137
+ export declare type ColumnConfig = {
138
138
  /**
139
139
  * Name for the column, displayed as header text.
140
140
  *
@@ -330,7 +330,7 @@ export declare type DataSourceRef = {
330
330
  * };
331
331
  * ```
332
332
  */
333
- declare type DataTable = {
333
+ export declare type DataTable = {
334
334
  /**
335
335
  * Column definitions with names and data types.
336
336
  *
@@ -349,7 +349,7 @@ declare type DataTable = {
349
349
  * @public
350
350
  * Generic type for table cells that resolves to a specific cell type.
351
351
  */
352
- declare type DataTableCell<T extends DataType = DataType> = {
352
+ export declare type DataTableCell<T extends DataType = DataType> = {
353
353
  date: DateDataTableCell;
354
354
  string: StringDataTableCell;
355
355
  number: NumberDataTableCell;
@@ -361,7 +361,7 @@ declare type DataTableCell<T extends DataType = DataType> = {
361
361
  * @public
362
362
  * Options for uploading an image asset to the user's private media library.
363
363
  */
364
- declare type DataTableImageUpload = Omit<ImageUploadOptions, 'type' | 'parentRef'> & {
364
+ export declare type DataTableImageUpload = Omit<ImageUploadOptions, 'type' | 'parentRef'> & {
365
365
  /**
366
366
  * Indicates this value contains options for image uploading.
367
367
  */
@@ -372,7 +372,7 @@ declare type DataTableImageUpload = Omit<ImageUploadOptions, 'type' | 'parentRef
372
372
  * @public
373
373
  * Maximum dimensions for imported data tables.
374
374
  */
375
- declare type DataTableLimit = {
375
+ export declare type DataTableLimit = {
376
376
  /**
377
377
  * The maximum number of rows allowed.
378
378
  *
@@ -430,7 +430,7 @@ export declare type DataTableMetadata = {
430
430
  * };
431
431
  * ```
432
432
  */
433
- declare type DataTableRow = {
433
+ export declare type DataTableRow = {
434
434
  /**
435
435
  * Array of cells containing the data values.
436
436
  *
@@ -443,7 +443,7 @@ declare type DataTableRow = {
443
443
  * @public
444
444
  * Options for uploading a video asset to the user's private media library.
445
445
  */
446
- declare type DataTableVideoUpload = Omit<VideoUploadOptions, 'type' | 'parentRef'> & {
446
+ export declare type DataTableVideoUpload = Omit<VideoUploadOptions, 'type' | 'parentRef'> & {
447
447
  /**
448
448
  * Indicates this value contains options for video uploading.
449
449
  */
@@ -454,7 +454,7 @@ declare type DataTableVideoUpload = Omit<VideoUploadOptions, 'type' | 'parentRef
454
454
  * @public
455
455
  * Data types supported for table cells.
456
456
  */
457
- declare type DataType = 'string' | 'number' | 'date' | 'boolean' | 'media';
457
+ export declare type DataType = 'string' | 'number' | 'date' | 'boolean' | 'media';
458
458
 
459
459
  /**
460
460
  * @public
@@ -475,7 +475,7 @@ declare type DataType = 'string' | 'number' | 'date' | 'boolean' | 'media';
475
475
  * };
476
476
  * ```
477
477
  */
478
- declare type DateDataTableCell = {
478
+ export declare type DateDataTableCell = {
479
479
  /**
480
480
  * Indicates this cell contains a date value.
481
481
  */
@@ -782,7 +782,7 @@ export declare type InvocationContext = DataSelectionInvocationContext | Outdate
782
782
  * };
783
783
  * ```
784
784
  */
785
- declare type MediaCollectionDataTableCell = {
785
+ export declare type MediaCollectionDataTableCell = {
786
786
  /**
787
787
  * Indicates this cell contains a media collection.
788
788
  */
@@ -836,7 +836,7 @@ declare type Never<T> = {
836
836
  * };
837
837
  * ```
838
838
  */
839
- declare type NumberCellMetadata = {
839
+ export declare type NumberCellMetadata = {
840
840
  /**
841
841
  * Formatting pattern using Office Open XML Format.
842
842
  *
@@ -871,7 +871,7 @@ declare type NumberCellMetadata = {
871
871
  * };
872
872
  * ```
873
873
  */
874
- declare type NumberDataTableCell = {
874
+ export declare type NumberDataTableCell = {
875
875
  /**
876
876
  * Indicates this cell contains a number value.
877
877
  */
@@ -1051,7 +1051,7 @@ export declare type RenderSelectionUiRequest = {
1051
1051
  * };
1052
1052
  * ```
1053
1053
  */
1054
- declare type StringDataTableCell = {
1054
+ export declare type StringDataTableCell = {
1055
1055
  /**
1056
1056
  * Indicates this cell contains a string value.
1057
1057
  */
package/index.d.ts CHANGED
@@ -297,7 +297,7 @@ declare namespace content {
297
297
  ImageRequirement,
298
298
  VideoRequirement,
299
299
  DocumentRequirement,
300
- Selection_2 as Selection,
300
+ MediaSelection,
301
301
  ImageSelection,
302
302
  VideoSelection,
303
303
  DocumentSelection,
@@ -535,7 +535,21 @@ declare namespace data {
535
535
  DataTableMetadata,
536
536
  GetDataTableError,
537
537
  UpdateDataRefResponse,
538
- DataSourceRef
538
+ DataSourceRef,
539
+ DataTableLimit,
540
+ DataType,
541
+ DataTable,
542
+ ColumnConfig,
543
+ DataTableRow,
544
+ DataTableCell,
545
+ DateDataTableCell,
546
+ StringDataTableCell,
547
+ NumberDataTableCell,
548
+ NumberCellMetadata,
549
+ BooleanDataTableCell,
550
+ MediaCollectionDataTableCell,
551
+ DataTableImageUpload,
552
+ DataTableVideoUpload
539
553
  }
540
554
  }
541
555
  export { data }
@@ -1528,6 +1542,15 @@ declare type MediaCollectionDataTableCell = {
1528
1542
  value: (DataTableImageUpload | DataTableVideoUpload)[];
1529
1543
  };
1530
1544
 
1545
+ /**
1546
+ * @public
1547
+ * Metadata about a selected media item in a media slot.
1548
+ *
1549
+ * Canva populates this when returning {@link OutputType} in Settings UI contexts.
1550
+ * Apps should not set this value.
1551
+ */
1552
+ declare type MediaSelection = ImageSelection | VideoSelection | DocumentSelection | EmailSelection;
1553
+
1531
1554
  /**
1532
1555
  * @public
1533
1556
  * Configuration for a media slot within an output type.
@@ -1597,7 +1620,7 @@ declare type MediaSlot = {
1597
1620
  * Apps should not set this value when defining output types in
1598
1621
  * {@link ContentPublisherIntent.getPublishConfiguration}.
1599
1622
  */
1600
- readonly selection?: readonly Selection_2[];
1623
+ readonly selection?: readonly MediaSelection[];
1601
1624
  };
1602
1625
 
1603
1626
  /**
@@ -2554,15 +2577,6 @@ declare type RenderSettingsUiRequest = {
2554
2577
  }) => Disposer;
2555
2578
  };
2556
2579
 
2557
- /**
2558
- * @public
2559
- * Metadata about a selected media item in a media slot.
2560
- *
2561
- * Canva populates this when returning {@link OutputType} in Settings UI contexts.
2562
- * Apps should not set this value.
2563
- */
2564
- declare type Selection_2 = ImageSelection | VideoSelection | DocumentSelection | EmailSelection;
2565
-
2566
2580
  /**
2567
2581
  * @public
2568
2582
  * Context information for the publish settings UI.
@@ -19,6 +19,6 @@ _export(exports, {
19
19
  return LATEST_VERSION_BETA;
20
20
  }
21
21
  });
22
- const LATEST_VERSION = '2.3.0';
22
+ const LATEST_VERSION = '2.3.1';
23
23
  const LATEST_VERSION_BETA = '2.2.1-beta.1';
24
24
  const LATEST_VERSION_ALPHA = 'NONE';
@@ -1,3 +1,3 @@
1
- export const LATEST_VERSION = '2.3.0';
1
+ export const LATEST_VERSION = '2.3.1';
2
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.3.0",
3
+ "version": "2.3.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",