@canva/intents 2.1.0 → 2.1.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.1.1 - 2026-01-30
4
+
5
+ ### Changed
6
+
7
+ - Update NPM readme
8
+
3
9
  ## 2.1.0 - 2026-01-30
4
10
 
5
11
  ### Added
package/README.md CHANGED
@@ -22,6 +22,7 @@ An "intent" represents a specific user workflow an app can support. For example:
22
22
 
23
23
  - Users can select and import data from an app which implements the **Data Connector** intent.
24
24
  - An app is able to present interactive and creative tooling alongside the Canva design surface by implementing the **Design Editor** intent.
25
+ - Users can publish their Canva designs directly to external platforms.
25
26
 
26
27
  The `@canva/intents` package encompasses **all available intents**, exporting each intent's type information and prepare function, grouped by domain.
27
28
  This allows your app to prepare one or more intents while keeping each intent's implementation modular and type-safe.
@@ -30,6 +31,7 @@ Currently supported intents:
30
31
 
31
32
  - [`Data Connector`](#data-connector-example)
32
33
  - [`Design Editor`](#design-editor-example)
34
+ - [`Content Publisher`](#content-publisher-example)
33
35
 
34
36
  New intents will be added to this package in the future.
35
37
 
@@ -97,6 +99,69 @@ prepareDesignEditor({
97
99
  });
98
100
  ```
99
101
 
102
+ ### Content Publisher example
103
+
104
+ ```ts
105
+ import { prepareContentPublisher } from "@canva/intents/content";
106
+
107
+ prepareContentPublisher({
108
+ renderSettingsUi: ({
109
+ updatePublishSettings,
110
+ registerOnContextChange,
111
+ }) => {
112
+ root.render(
113
+ <AppUiProvider>
114
+ <SettingUi
115
+ updatePublishSettings={updatePublishSettings}
116
+ registerOnContextChange={registerOnContextChange}
117
+ />
118
+ </AppUiProvider>,
119
+ );
120
+ },
121
+
122
+ renderPreviewUi: ({ registerOnPreviewChange }) => {
123
+ root.render(
124
+ <AppUiProvider>
125
+ <PreviewUi registerOnPreviewChange={registerOnPreviewChange} />
126
+ </AppUiProvider>,
127
+ );
128
+ },
129
+
130
+ getPublishConfiguration: async () => {
131
+ return {
132
+ status: "completed",
133
+ outputTypes: [
134
+ {
135
+ id: "post",
136
+ displayName: "Post",
137
+ mediaSlots: [
138
+ {
139
+ id: "media",
140
+ displayName: "Media",
141
+ fileCount: { exact: 1 },
142
+ accepts: {
143
+ image: {
144
+ format: "png",
145
+ },
146
+ },
147
+ },
148
+ ],
149
+ },
150
+ ],
151
+ };
152
+ },
153
+
154
+ publishContent: async (request: PublishContentRequest) => {
155
+ // logic to upload media to your platform here
156
+ return {
157
+ status: "completed",
158
+ externalId: "1234567890",
159
+ externalUrl: "https://example.com/posts/1234567890",
160
+ };
161
+ },
162
+ });
163
+ ```
164
+
100
165
  ## Related packages
101
166
 
102
167
  The Apps SDK is made up of the following packages:
@@ -19,6 +19,6 @@ _export(exports, {
19
19
  return LATEST_VERSION_BETA;
20
20
  }
21
21
  });
22
- const LATEST_VERSION = '2.1.0';
22
+ const LATEST_VERSION = '2.1.1';
23
23
  const LATEST_VERSION_BETA = '2.0.2-beta.3';
24
24
  const LATEST_VERSION_ALPHA = 'NONE';
@@ -1,3 +1,3 @@
1
- export const LATEST_VERSION = '2.1.0';
1
+ export const LATEST_VERSION = '2.1.1';
2
2
  export const LATEST_VERSION_BETA = '2.0.2-beta.3';
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.1.0",
3
+ "version": "2.1.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",