@react-fabric/draw 1.0.0-beta.51 → 1.0.0-beta.52

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.
@@ -112,6 +112,28 @@ var TypeMap = {
112
112
  file: "file-card",
113
113
  card: "data-card"
114
114
  };
115
+
116
+ /**
117
+ * DrawCanvas component to render a Tldraw editor canvas.
118
+ * It allows users to create and manipulate shapes, images, videos, audio, files, and cards.
119
+ * It supports drag-and-drop functionality for adding shapes to the canvas.
120
+ * It also provides a method to export the current pages as snapshots.
121
+ *
122
+ * @param {DrawProps} props - The properties for the component.
123
+ * @returns {JSX.Element} The rendered DrawCanvas component.
124
+ *
125
+ * @example
126
+ * ```jsx
127
+ * <DrawCanvas
128
+ * snapshot={snapshot}
129
+ * onUpdate={(snapshot) => console.log(snapshot)}
130
+ * canvasRef={canvasRef}
131
+ * />
132
+ * ```
133
+ *
134
+ * @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/draw-playground--playground}
135
+ * @see {@link https://tldraw.com/docs/}
136
+ */
115
137
  var DrawCanvas = function DrawCanvas(_ref) {
116
138
  var snapshot = _ref.snapshot,
117
139
  renderer = _ref.renderer,
@@ -112,6 +112,28 @@ var TypeMap = {
112
112
  file: "file-card",
113
113
  card: "data-card"
114
114
  };
115
+
116
+ /**
117
+ * DrawCanvas component to render a Tldraw editor canvas.
118
+ * It allows users to create and manipulate shapes, images, videos, audio, files, and cards.
119
+ * It supports drag-and-drop functionality for adding shapes to the canvas.
120
+ * It also provides a method to export the current pages as snapshots.
121
+ *
122
+ * @param {DrawProps} props - The properties for the component.
123
+ * @returns {JSX.Element} The rendered DrawCanvas component.
124
+ *
125
+ * @example
126
+ * ```jsx
127
+ * <DrawCanvas
128
+ * snapshot={snapshot}
129
+ * onUpdate={(snapshot) => console.log(snapshot)}
130
+ * canvasRef={canvasRef}
131
+ * />
132
+ * ```
133
+ *
134
+ * @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/draw-playground--playground}
135
+ * @see {@link https://tldraw.com/docs/}
136
+ */
115
137
  var DrawCanvas = function DrawCanvas(_ref) {
116
138
  var snapshot = _ref.snapshot,
117
139
  renderer = _ref.renderer,
@@ -10,4 +10,25 @@ export interface DrawProps {
10
10
  exportPages: () => Promise<KeyValue[]>;
11
11
  }>;
12
12
  }
13
+ /**
14
+ * DrawCanvas component to render a Tldraw editor canvas.
15
+ * It allows users to create and manipulate shapes, images, videos, audio, files, and cards.
16
+ * It supports drag-and-drop functionality for adding shapes to the canvas.
17
+ * It also provides a method to export the current pages as snapshots.
18
+ *
19
+ * @param {DrawProps} props - The properties for the component.
20
+ * @returns {JSX.Element} The rendered DrawCanvas component.
21
+ *
22
+ * @example
23
+ * ```jsx
24
+ * <DrawCanvas
25
+ * snapshot={snapshot}
26
+ * onUpdate={(snapshot) => console.log(snapshot)}
27
+ * canvasRef={canvasRef}
28
+ * />
29
+ * ```
30
+ *
31
+ * @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/draw-playground--playground}
32
+ * @see {@link https://tldraw.com/docs/}
33
+ */
13
34
  export declare const DrawCanvas: FC<DrawProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-fabric/draw",
3
- "version": "1.0.0-beta.51",
3
+ "version": "1.0.0-beta.52",
4
4
  "description": "RUF: TLDraw canvas",
5
5
  "author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
6
6
  "license": "MIT",
@@ -33,8 +33,8 @@
33
33
  "watch": "npm-run-all -p watch:rollup watch:dts"
34
34
  },
35
35
  "dependencies": {
36
- "@react-fabric/core": "^1.0.0-beta.51",
37
- "@react-fabric/utilities": "^1.0.0-beta.50",
36
+ "@react-fabric/core": "^1.0.0-beta.52",
37
+ "@react-fabric/utilities": "^1.0.0-beta.52",
38
38
  "@tldraw/assets": "^3.13.1",
39
39
  "@tldraw/editor": "^3.13.1",
40
40
  "@tldraw/tldraw": "^3.13.1",
@@ -54,5 +54,5 @@
54
54
  "node": ">=18.12.0",
55
55
  "npm": ">=8.19.0"
56
56
  },
57
- "gitHead": "a1b04de4663045f82992bff2aef8db26608eac74"
57
+ "gitHead": "0eabb9d88d91af93d657bcc209b226fd576e8260"
58
58
  }
@@ -112,6 +112,27 @@ const TypeMap: KeyValue = {
112
112
  card: "data-card",
113
113
  };
114
114
 
115
+ /**
116
+ * DrawCanvas component to render a Tldraw editor canvas.
117
+ * It allows users to create and manipulate shapes, images, videos, audio, files, and cards.
118
+ * It supports drag-and-drop functionality for adding shapes to the canvas.
119
+ * It also provides a method to export the current pages as snapshots.
120
+ *
121
+ * @param {DrawProps} props - The properties for the component.
122
+ * @returns {JSX.Element} The rendered DrawCanvas component.
123
+ *
124
+ * @example
125
+ * ```jsx
126
+ * <DrawCanvas
127
+ * snapshot={snapshot}
128
+ * onUpdate={(snapshot) => console.log(snapshot)}
129
+ * canvasRef={canvasRef}
130
+ * />
131
+ * ```
132
+ *
133
+ * @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/draw-playground--playground}
134
+ * @see {@link https://tldraw.com/docs/}
135
+ */
115
136
  export const DrawCanvas: FC<DrawProps> = ({
116
137
  snapshot,
117
138
  renderer,