@react-fabric/draw 1.0.0-beta.8 → 1.0.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.
Files changed (57) hide show
  1. package/dist/cjs/index.js +32 -0
  2. package/dist/esm/index.js +31 -0
  3. package/dist/types/index.d.ts +26 -1
  4. package/package.json +15 -17
  5. package/src/index.ts +21 -18
  6. package/dist/cjs/_virtual/_commonjsHelpers.js +0 -7
  7. package/dist/cjs/_virtual/dom-to-image.js +0 -5
  8. package/dist/cjs/node_modules/dom-to-image/src/dom-to-image.js +0 -777
  9. package/dist/cjs/packages/draw/src/canvas/DrawCanvas.js +0 -326
  10. package/dist/cjs/packages/draw/src/canvas/DrawContext.js +0 -22
  11. package/dist/cjs/packages/draw/src/canvas/shapes/avatar/AvatarShapeTool.js +0 -271
  12. package/dist/cjs/packages/draw/src/canvas/shapes/avatar/IdleState.js +0 -59
  13. package/dist/cjs/packages/draw/src/canvas/shapes/avatar/PointingState.js +0 -84
  14. package/dist/cjs/packages/draw/src/canvas/shapes/avatar/type.js +0 -36
  15. package/dist/cjs/packages/draw/src/canvas/shapes/custom/AudioShape.js +0 -152
  16. package/dist/cjs/packages/draw/src/canvas/shapes/custom/CardShape.js +0 -115
  17. package/dist/cjs/packages/draw/src/canvas/shapes/custom/FileShape.js +0 -128
  18. package/dist/cjs/packages/draw/src/canvas/shapes/custom/ImageShape.js +0 -137
  19. package/dist/cjs/packages/draw/src/canvas/shapes/custom/VideoShape.js +0 -160
  20. package/dist/cjs/packages/draw/src/index.js +0 -7
  21. package/dist/esm/_virtual/_commonjsHelpers.js +0 -7
  22. package/dist/esm/_virtual/dom-to-image.js +0 -5
  23. package/dist/esm/node_modules/dom-to-image/src/dom-to-image.js +0 -777
  24. package/dist/esm/packages/draw/src/canvas/DrawCanvas.js +0 -325
  25. package/dist/esm/packages/draw/src/canvas/DrawContext.js +0 -21
  26. package/dist/esm/packages/draw/src/canvas/shapes/avatar/AvatarShapeTool.js +0 -270
  27. package/dist/esm/packages/draw/src/canvas/shapes/avatar/IdleState.js +0 -59
  28. package/dist/esm/packages/draw/src/canvas/shapes/avatar/PointingState.js +0 -84
  29. package/dist/esm/packages/draw/src/canvas/shapes/avatar/type.js +0 -36
  30. package/dist/esm/packages/draw/src/canvas/shapes/custom/AudioShape.js +0 -152
  31. package/dist/esm/packages/draw/src/canvas/shapes/custom/CardShape.js +0 -115
  32. package/dist/esm/packages/draw/src/canvas/shapes/custom/FileShape.js +0 -128
  33. package/dist/esm/packages/draw/src/canvas/shapes/custom/ImageShape.js +0 -137
  34. package/dist/esm/packages/draw/src/canvas/shapes/custom/VideoShape.js +0 -160
  35. package/dist/esm/packages/draw/src/index.js +0 -3
  36. package/dist/types/canvas/DrawCanvas.d.ts +0 -13
  37. package/dist/types/canvas/DrawContext.d.ts +0 -6
  38. package/dist/types/canvas/shapes/avatar/AvatarShapeTool.d.ts +0 -37
  39. package/dist/types/canvas/shapes/avatar/IdleState.d.ts +0 -8
  40. package/dist/types/canvas/shapes/avatar/PointingState.d.ts +0 -13
  41. package/dist/types/canvas/shapes/avatar/type.d.ts +0 -9
  42. package/dist/types/canvas/shapes/custom/AudioShape.d.ts +0 -18
  43. package/dist/types/canvas/shapes/custom/CardShape.d.ts +0 -23
  44. package/dist/types/canvas/shapes/custom/FileShape.d.ts +0 -18
  45. package/dist/types/canvas/shapes/custom/ImageShape.d.ts +0 -29
  46. package/dist/types/canvas/shapes/custom/VideoShape.d.ts +0 -32
  47. package/src/canvas/DrawCanvas.tsx +0 -291
  48. package/src/canvas/DrawContext.tsx +0 -36
  49. package/src/canvas/shapes/avatar/AvatarShapeTool.tsx +0 -234
  50. package/src/canvas/shapes/avatar/IdleState.ts +0 -61
  51. package/src/canvas/shapes/avatar/PointingState.ts +0 -97
  52. package/src/canvas/shapes/avatar/type.ts +0 -41
  53. package/src/canvas/shapes/custom/AudioShape.tsx +0 -134
  54. package/src/canvas/shapes/custom/CardShape.tsx +0 -106
  55. package/src/canvas/shapes/custom/FileShape.tsx +0 -101
  56. package/src/canvas/shapes/custom/ImageShape.tsx +0 -138
  57. package/src/canvas/shapes/custom/VideoShape.tsx +0 -170
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * React Fabric
5
+ * @version 1.0.0
6
+ * @license MIT
7
+ * @copyright 2024 Adarsh Pastakia
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to deal
11
+ * in the Software without restriction, including without limitation the rights
12
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in all
17
+ * copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ * SOFTWARE.
26
+ */
27
+
28
+ var DRAW_PACKAGE = "@react-fabric/draw";
29
+ var DRAW_VERSION = "1.0.0";
30
+
31
+ exports.DRAW_PACKAGE = DRAW_PACKAGE;
32
+ exports.DRAW_VERSION = DRAW_VERSION;
@@ -0,0 +1,31 @@
1
+ 'use client';
2
+
3
+ /**
4
+ * React Fabric
5
+ * @version 1.0.0
6
+ * @license MIT
7
+ * @copyright 2024 Adarsh Pastakia
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to deal
11
+ * in the Software without restriction, including without limitation the rights
12
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in all
17
+ * copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ * SOFTWARE.
26
+ */
27
+
28
+ var DRAW_PACKAGE = "@react-fabric/draw";
29
+ var DRAW_VERSION = "1.0.0";
30
+
31
+ export { DRAW_PACKAGE, DRAW_VERSION };
@@ -1 +1,26 @@
1
- export { DrawCanvas } from "./canvas/DrawCanvas";
1
+ /**
2
+ * React Fabric
3
+ * @version 1.0.0
4
+ * @license MIT
5
+ * @copyright 2024 Adarsh Pastakia
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ */
25
+ export declare const DRAW_PACKAGE = "@react-fabric/draw";
26
+ export declare const DRAW_VERSION = "1.0.0";
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@react-fabric/draw",
3
- "version": "1.0.0-beta.8",
3
+ "version": "1.0.1",
4
4
  "description": "RUF: TLDraw canvas",
5
5
  "author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
6
6
  "license": "MIT",
7
- "repository": "https://github.com/adarshpastakia/react-ui-framework/tree/main/packages/draw",
7
+ "repository": "https://github.com/adarshpastakia/react-fabric/tree/main/packages/draw",
8
8
  "source": "src/index.ts",
9
9
  "main": "dist/cjs/index.js",
10
10
  "module": "dist/esm/index.js",
@@ -22,8 +22,6 @@
22
22
  "registry": "https://registry.npmjs.org/"
23
23
  },
24
24
  "scripts": {
25
- "makelink": "yarn link",
26
- "removelink": "yarn unlink",
27
25
  "prebuild": "rm -rf ./dist",
28
26
  "build:dts": "tsc -p ./tsconfig.build.json",
29
27
  "build:rollup": "rollup -c ../../rollup.config.mjs",
@@ -33,22 +31,22 @@
33
31
  "watch": "npm-run-all -p watch:rollup watch:dts"
34
32
  },
35
33
  "dependencies": {
36
- "@react-fabric/core": "^1.0.0-beta.8",
37
- "@react-fabric/utilities": "^1.0.0-beta.8",
38
- "@tldraw/assets": "^3.3.1",
39
- "@tldraw/editor": "^3.3.1",
40
- "@tldraw/tldraw": "^3.3.1",
41
- "classnames": "^2.5.1"
34
+ "@excalidraw/excalidraw": "^0.18.1",
35
+ "@faker-js/faker": "10.6.0",
36
+ "@react-fabric/core": "^1.0.1",
37
+ "@react-fabric/utilities": "^1.0.1",
38
+ "axios": "1.20.0",
39
+ "dom-to-image": "~2.6.0"
42
40
  },
43
41
  "peerDependencies": {
44
- "i18next": "^23.15.1",
45
- "react": ">=18.0.0 <20.0.0",
46
- "react-dom": ">=18.0.0 <20.0.0",
47
- "react-i18next": "^15.0.2"
42
+ "i18next": "~26.3.6",
43
+ "react": "~19.3.0",
44
+ "react-dom": "~19.3.0",
45
+ "react-i18next": "~17.0.11"
48
46
  },
49
47
  "engines": {
50
- "node": ">=18.12.0",
51
- "npm": ">=8.19.0"
48
+ "node": ">=24.0.0",
49
+ "npm": ">=11.0.0"
52
50
  },
53
- "gitHead": "9f1ede6e9629c9e79121354332cdebabad5878c5"
51
+ "gitHead": "1419a9df05b5e3850e1d2b4e896ab63df702c7e8"
54
52
  }
package/src/index.ts CHANGED
@@ -1,24 +1,27 @@
1
- /*
1
+ /**
2
2
  * React Fabric
3
- * @version: 1.0.0
3
+ * @version 1.0.0
4
+ * @license MIT
5
+ * @copyright 2024 Adarsh Pastakia
4
6
  *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
5
13
  *
6
- * The MIT License (MIT)
7
- * Copyright (c) 2024 Adarsh Pastakia
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
8
16
  *
9
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
10
- * and associated documentation files (the "Software"), to deal in the Software without restriction,
11
- * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
12
- * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
13
- * subject to the following conditions:
14
- *
15
- * The above copyright notice and this permission notice shall be included in all copies or substantial
16
- * portions of the Software.
17
- *
18
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
19
- * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
22
24
  */
23
25
 
24
- export { DrawCanvas } from "./canvas/DrawCanvas";
26
+ export const DRAW_PACKAGE = "@react-fabric/draw";
27
+ export const DRAW_VERSION = "1.0.0";
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- function getDefaultExportFromCjs (x) {
4
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
5
- }
6
-
7
- exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- var domToImage = {exports: {}};
4
-
5
- exports.__module = domToImage;