@canva/cli 1.2.0 → 1.3.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canva/cli",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "The official Canva CLI.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Canva Pty Ltd.",
@@ -31,8 +31,7 @@
31
31
  "lib"
32
32
  ],
33
33
  "dependencies": {
34
- "ink": "5.1.0",
35
- "react": "18.3.1",
34
+ "ink": "6.3.1",
36
35
  "@modelcontextprotocol/sdk": "1.17.4",
37
36
  "react-docgen-typescript": "2.4.0"
38
37
  },
@@ -43,6 +42,15 @@
43
42
  "starter kit"
44
43
  ],
45
44
  "engines": {
46
- "node": ">=16"
45
+ "node": ">=20.10.0"
46
+ },
47
+ "overrides": {
48
+ "@types/react": "^19.0.0",
49
+ "@inkjs/ui": {
50
+ "ink": "$ink"
51
+ },
52
+ "ink-gradient": {
53
+ "ink": "$ink"
54
+ }
47
55
  }
48
56
  }
@@ -6,15 +6,17 @@
6
6
  "license": "SEE LICENSE IN LICENSE.md",
7
7
  "author": "Canva Pty Ltd.",
8
8
  "dependencies": {
9
- "@canva/app-ui-kit": "^4.10.0",
9
+ "@canva/app-i18n-kit": "^1.1.1",
10
+ "@canva/app-ui-kit": "^5.0.1",
10
11
  "@canva/asset": "^2.2.1",
11
12
  "@canva/design": "^2.7.2",
12
13
  "@canva/error": "^2.1.0",
13
14
  "@canva/platform": "^2.2.0",
14
15
  "@canva/user": "^2.1.1",
15
16
  "cookie-parser": "1.4.7",
16
- "react": "18.3.1",
17
- "react-dom": "18.3.1"
17
+ "react": "19.1.1",
18
+ "react-dom": "19.1.1",
19
+ "react-intl": "7.1.11"
18
20
  },
19
21
  "devDependencies": {
20
22
  "@canva/cli": ">= 0.0.1-beta.13",
@@ -30,8 +32,8 @@
30
32
  "@types/node-forge": "1.3.14",
31
33
  "@types/nodemon": "1.19.6",
32
34
  "@types/prompts": "2.4.9",
33
- "@types/react": "18.3.12",
34
- "@types/react-dom": "18.3.1",
35
+ "@types/react": "19.1.13",
36
+ "@types/react-dom": "19.1.9",
35
37
  "@types/webpack-env": "1.18.8",
36
38
  "chalk": "4.1.2",
37
39
  "cli-table3": "0.6.5",
@@ -71,8 +73,8 @@
71
73
  "canva-apps-sdk"
72
74
  ],
73
75
  "engines": {
74
- "node": "^18 || ^20.10.0",
75
- "npm": "^9 || ^10"
76
+ "node": ">=20.10.0",
77
+ "npm": "^10 || ^11"
76
78
  },
77
79
  "canvaCliMetadata": {
78
80
  "metaFields": [
@@ -18,9 +18,9 @@
18
18
  "postinstall": "ts-node ./scripts/copy_env.ts"
19
19
  },
20
20
  "dependencies": {
21
- "@canva/app-components": "^1.3.1",
22
- "@canva/app-i18n-kit": "^1.0.3",
23
- "@canva/app-ui-kit": "^4.10.0",
21
+ "@canva/app-components": "^2.0.0",
22
+ "@canva/app-i18n-kit": "^1.1.1",
23
+ "@canva/app-ui-kit": "^5.0.1",
24
24
  "@canva/asset": "^2.2.1",
25
25
  "@canva/design": "^2.7.2",
26
26
  "@canva/error": "^2.1.0",
@@ -28,9 +28,9 @@
28
28
  "@canva/user": "^2.1.1",
29
29
  "cookie-parser": "1.4.7",
30
30
  "cors": "2.8.5",
31
- "react": "18.3.1",
32
- "react-dom": "18.3.1",
33
- "react-intl": "6.8.7"
31
+ "react": "19.1.1",
32
+ "react-dom": "19.1.1",
33
+ "react-intl": "7.1.11"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@canva/app-eslint-plugin": "^1.0.0-beta.5",
@@ -52,8 +52,8 @@
52
52
  "@types/node-forge": "1.3.14",
53
53
  "@types/nodemon": "1.19.6",
54
54
  "@types/prompts": "2.4.9",
55
- "@types/react": "18.3.12",
56
- "@types/react-dom": "18.3.1",
55
+ "@types/react": "19.1.13",
56
+ "@types/react-dom": "19.1.9",
57
57
  "@types/webpack-env": "1.18.8",
58
58
  "chalk": "4.1.2",
59
59
  "cli-table3": "0.6.5",
@@ -19,18 +19,18 @@
19
19
  "postinstall": "ts-node ./scripts/copy_env.ts"
20
20
  },
21
21
  "dependencies": {
22
- "@canva/app-i18n-kit": "^1.0.3",
23
- "@canva/app-ui-kit": "^4.10.0",
22
+ "@canva/app-i18n-kit": "^1.1.1",
23
+ "@canva/app-ui-kit": "^5.0.1",
24
24
  "@canva/asset": "^2.2.1",
25
25
  "@canva/design": "^2.7.2",
26
26
  "@canva/error": "^2.1.0",
27
27
  "@canva/intents": "^2.0.0",
28
28
  "@canva/platform": "^2.2.0",
29
29
  "@canva/user": "^2.1.1",
30
- "react": "18.3.1",
31
- "react-dom": "18.3.1",
30
+ "react": "19.1.1",
31
+ "react-dom": "19.1.1",
32
32
  "react-error-boundary": "6.0.0",
33
- "react-intl": "6.8.7",
33
+ "react-intl": "7.1.11",
34
34
  "react-router-dom": "7.8.2"
35
35
  },
36
36
  "devDependencies": {
@@ -50,8 +50,8 @@
50
50
  "@types/node-fetch": "2.6.13",
51
51
  "@types/node-forge": "1.3.14",
52
52
  "@types/nodemon": "1.19.6",
53
- "@types/react": "18.3.12",
54
- "@types/react-dom": "18.3.1",
53
+ "@types/react": "19.1.13",
54
+ "@types/react-dom": "19.1.9",
55
55
  "@types/webpack-env": "1.18.8",
56
56
  "chalk": "4.1.2",
57
57
  "cli-table3": "0.6.5",
@@ -9,6 +9,7 @@ import {
9
9
  SearchInputMenu,
10
10
  SlidersIcon,
11
11
  } from "@canva/app-ui-kit";
12
+ import type { ReactNode } from "react";
12
13
  import { useState } from "react";
13
14
  import { useIntl } from "react-intl";
14
15
  import { filterMenu } from "./messages";
@@ -18,7 +19,7 @@ interface SearchFilterProps {
18
19
  onChange: (value: string) => void;
19
20
  filterCount: number;
20
21
  resetFilters: () => void;
21
- children?: React.ReactNode;
22
+ children?: ReactNode;
22
23
  }
23
24
 
24
25
  export const SearchFilter = ({
@@ -1,6 +1,7 @@
1
1
  import type { RenderSelectionUiRequest } from "@canva/intents/data";
2
2
  import type { AccessTokenResponse } from "@canva/user";
3
3
  import { auth } from "@canva/user";
4
+ import type { ReactNode } from "react";
4
5
  import { createContext, useCallback, useState } from "react";
5
6
  import type { APIResponseItem, DataSourceHandler } from "src/api/data_source";
6
7
  import { type DataSourceConfig } from "src/api/data_source";
@@ -43,7 +44,7 @@ export const AppContext = createContext<AppContextType>({
43
44
  /**
44
45
  * Provides application-wide state and methods using React Context.
45
46
  * @param {object} props - The props object.
46
- * @param {React.ReactNode} props.children - The children components wrapped by the provider.
47
+ * @param {ReactNode} props.children - The children components wrapped by the provider.
47
48
  * @returns {JSX.Element} The provider component.
48
49
  * @description This provider component wraps the entire application to provide application-wide state and methods using React Context.
49
50
  * It manages state related to app errors, filter parameters, and authentication.
@@ -55,7 +56,7 @@ export const ContextProvider = ({
55
56
  children,
56
57
  }: {
57
58
  renderSelectionUiRequest: RenderSelectionUiRequest;
58
- children: React.ReactNode;
59
+ children: ReactNode;
59
60
  }): JSX.Element => {
60
61
  const [appError, setAppError] = useState<string>("");
61
62
  const [request] = useState<RenderSelectionUiRequest>(
@@ -1,10 +1,11 @@
1
+ import type { ReactNode } from "react";
1
2
  import { useEffect } from "react";
2
3
  import { useNavigate } from "react-router-dom";
3
4
  import { Paths } from "src/paths";
4
5
  import { useAppContext } from "../context";
5
6
 
6
7
  interface ProtectedRouteProps {
7
- children: React.ReactNode;
8
+ children: ReactNode;
8
9
  }
9
10
 
10
11
  /**
@@ -18,8 +18,8 @@
18
18
  "postinstall": "ts-node ./scripts/copy_env.ts"
19
19
  },
20
20
  "dependencies": {
21
- "@canva/app-i18n-kit": "^1.0.3",
22
- "@canva/app-ui-kit": "^4.10.0",
21
+ "@canva/app-i18n-kit": "^1.1.1",
22
+ "@canva/app-ui-kit": "^5.0.1",
23
23
  "@canva/asset": "^2.2.1",
24
24
  "@canva/design": "^2.7.2",
25
25
  "@canva/error": "^2.1.0",
@@ -29,10 +29,10 @@
29
29
  "cors": "2.8.5",
30
30
  "html-react-parser": "5.2.6",
31
31
  "obscenity": "0.4.4",
32
- "react": "18.3.1",
33
- "react-dom": "18.3.1",
32
+ "react": "19.1.1",
33
+ "react-dom": "19.1.1",
34
34
  "react-error-boundary": "6.0.0",
35
- "react-intl": "6.8.7",
35
+ "react-intl": "7.1.11",
36
36
  "react-router-dom": "7.8.2"
37
37
  },
38
38
  "devDependencies": {
@@ -54,8 +54,8 @@
54
54
  "@types/node-forge": "1.3.14",
55
55
  "@types/nodemon": "1.19.6",
56
56
  "@types/prompts": "2.4.9",
57
- "@types/react": "18.3.12",
58
- "@types/react-dom": "18.3.1",
57
+ "@types/react": "19.1.13",
58
+ "@types/react-dom": "19.1.9",
59
59
  "@types/webpack": "5.28.5",
60
60
  "@types/webpack-dev-server": "4.7.2",
61
61
  "@types/webpack-env": "1.18.8",
@@ -2,6 +2,7 @@ import { Grid, ImageCard, Rows, Text } from "@canva/app-ui-kit";
2
2
  import type { QueuedImage } from "@canva/asset";
3
3
  import { upload } from "@canva/asset";
4
4
  import { addElementAtPoint, ui } from "@canva/design";
5
+ import type { DragEvent } from "react";
5
6
  import { FormattedMessage, useIntl } from "react-intl";
6
7
  import type { ImageType } from "src/api";
7
8
  import { useAppContext } from "src/context";
@@ -28,7 +29,7 @@ export const ImageGrid = () => {
28
29
  const { generatedImages } = useAppContext();
29
30
 
30
31
  const onDragStart = async (
31
- event: React.DragEvent<HTMLElement>,
32
+ event: DragEvent<HTMLElement>,
32
33
  image: ImageType,
33
34
  ) => {
34
35
  const parentNode = event.currentTarget.parentElement;
@@ -87,7 +88,7 @@ export const ImageGrid = () => {
87
88
  alt={image.label}
88
89
  thumbnailHeight={THUMBNAIL_HEIGHT}
89
90
  borderRadius="standard"
90
- onDragStart={(event: React.DragEvent<HTMLElement>) =>
91
+ onDragStart={(event: DragEvent<HTMLElement>) =>
91
92
  onDragStart(event, image)
92
93
  }
93
94
  />
@@ -4,10 +4,10 @@ import { TestAppUiProvider } from "@canva/app-ui-kit";
4
4
  import { getPlatformInfo, requestOpenExternalUrl } from "@canva/platform";
5
5
  import type { RenderResult } from "@testing-library/react";
6
6
  import { fireEvent, render } from "@testing-library/react";
7
- import React from "react";
7
+ import type { ReactNode } from "react";
8
8
  import { RemainingCredits } from "../remaining_credits";
9
9
 
10
- function renderInTestProvider(node: React.ReactNode): RenderResult {
10
+ function renderInTestProvider(node: ReactNode): RenderResult {
11
11
  return render(
12
12
  // In a test environment, you should wrap your apps in `TestAppI18nProvider` and `TestAppUiProvider`, rather than `AppI18nProvider` and `AppUiProvider`
13
13
  <TestAppI18nProvider>
@@ -19,16 +19,16 @@
19
19
  "postinstall": "ts-node ./scripts/copy_env.ts"
20
20
  },
21
21
  "dependencies": {
22
- "@canva/app-i18n-kit": "^1.0.3",
23
- "@canva/app-ui-kit": "^4.10.0",
22
+ "@canva/app-i18n-kit": "^1.1.1",
23
+ "@canva/app-ui-kit": "^5.0.1",
24
24
  "@canva/asset": "^2.2.1",
25
25
  "@canva/design": "^2.7.2",
26
26
  "@canva/error": "^2.1.0",
27
27
  "@canva/platform": "^2.2.0",
28
28
  "@canva/user": "^2.1.1",
29
- "react": "18.3.1",
30
- "react-dom": "18.3.1",
31
- "react-intl": "6.8.7"
29
+ "react": "19.1.1",
30
+ "react-dom": "19.1.1",
31
+ "react-intl": "7.1.11"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@canva/app-eslint-plugin": "^1.0.0-beta.5",
@@ -47,8 +47,8 @@
47
47
  "@types/node-fetch": "2.6.13",
48
48
  "@types/node-forge": "1.3.14",
49
49
  "@types/nodemon": "1.19.6",
50
- "@types/react": "18.3.12",
51
- "@types/react-dom": "18.3.1",
50
+ "@types/react": "19.1.13",
51
+ "@types/react-dom": "19.1.9",
52
52
  "@types/webpack-env": "1.18.8",
53
53
  "chalk": "4.1.2",
54
54
  "cli-table3": "0.6.5",
@@ -4,11 +4,11 @@ import { TestAppUiProvider } from "@canva/app-ui-kit";
4
4
  import { requestOpenExternalUrl } from "@canva/platform";
5
5
  import { fireEvent, render } from "@testing-library/react";
6
6
  import type { RenderResult } from "@testing-library/react";
7
- import React from "react";
7
+ import type { ReactNode } from "react";
8
8
  import { useAddElement } from "utils/use_add_element";
9
9
  import { App, DOCS_URL } from "../app";
10
10
 
11
- function renderInTestProvider(node: React.ReactNode): RenderResult {
11
+ function renderInTestProvider(node: ReactNode): RenderResult {
12
12
  return render(
13
13
  // In a test environment, you should wrap your apps in `TestAppI18nProvider` and `TestAppUiProvider`, rather than `AppI18nProvider` and `AppUiProvider`
14
14
  <TestAppI18nProvider>