haoxin-excalidraw-sdk 0.18.7
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/README.md +45 -0
- package/package.json +139 -0
package/README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Excalidraw
|
|
2
|
+
|
|
3
|
+
**Excalidraw** is exported as a component to be directly embedded in your project.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Use `npm` or `yarn` to install the package.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install react react-dom @excalidraw/excalidraw
|
|
11
|
+
# or
|
|
12
|
+
yarn add react react-dom @excalidraw/excalidraw
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
> **Note**: If you don't want to wait for the next stable release and try out the unreleased changes, use `@excalidraw/excalidraw@next`.
|
|
16
|
+
|
|
17
|
+
#### Self-hosting fonts
|
|
18
|
+
|
|
19
|
+
By default, Excalidraw will try to download all the used fonts from the [CDN](https://esm.run/@excalidraw/excalidraw/dist/prod).
|
|
20
|
+
|
|
21
|
+
For self-hosting purposes, you'll have to copy the content of the folder `node_modules/@excalidraw/excalidraw/dist/prod/fonts` to the path where your assets should be served from (i.e. `public/` directory in your project). In that case, you should also set `window.EXCALIDRAW_ASSET_PATH` to the very same path, i.e. `/` in case it's in the root:
|
|
22
|
+
|
|
23
|
+
```js
|
|
24
|
+
<script>window.EXCALIDRAW_ASSET_PATH = "/";</script>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Dimensions of Excalidraw
|
|
28
|
+
|
|
29
|
+
Excalidraw takes _100%_ of `width` and `height` of the containing block so make sure the container in which you render Excalidraw has non zero dimensions.
|
|
30
|
+
|
|
31
|
+
## Demo
|
|
32
|
+
|
|
33
|
+
Go to [CodeSandbox](https://codesandbox.io/p/sandbox/github/excalidraw/excalidraw/tree/master/examples/with-script-in-browser) example.
|
|
34
|
+
|
|
35
|
+
## Integration
|
|
36
|
+
|
|
37
|
+
Head over to the [docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/integration).
|
|
38
|
+
|
|
39
|
+
## API
|
|
40
|
+
|
|
41
|
+
Head over to the [docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api).
|
|
42
|
+
|
|
43
|
+
## Contributing
|
|
44
|
+
|
|
45
|
+
Head over to the [docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/contributing).
|
package/package.json
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "haoxin-excalidraw-sdk",
|
|
3
|
+
"version": "0.18.7",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"types": "./dist/types/excalidraw/index.d.ts",
|
|
6
|
+
"main": "./dist/prod/index.js",
|
|
7
|
+
"module": "./dist/prod/index.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
"./common/*": {
|
|
10
|
+
"types": "./dist/types/common/src/*.d.ts"
|
|
11
|
+
},
|
|
12
|
+
"./element/*": {
|
|
13
|
+
"types": "./dist/types/element/src/*.d.ts"
|
|
14
|
+
},
|
|
15
|
+
"./math/*": {
|
|
16
|
+
"types": "./dist/types/math/src/*.d.ts"
|
|
17
|
+
},
|
|
18
|
+
"./utils/*": {
|
|
19
|
+
"types": "./dist/types/utils/src/*.d.ts"
|
|
20
|
+
},
|
|
21
|
+
"./*": {
|
|
22
|
+
"types": "./dist/types/excalidraw/*.d.ts"
|
|
23
|
+
},
|
|
24
|
+
"./index.css": {
|
|
25
|
+
"development": "./dist/dev/index.css",
|
|
26
|
+
"production": "./dist/prod/index.css"
|
|
27
|
+
},
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/types/excalidraw/index.d.ts",
|
|
30
|
+
"development": "./dist/dev/index.js",
|
|
31
|
+
"production": "./dist/prod/index.js",
|
|
32
|
+
"default": "./dist/prod/index.js"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist/*"
|
|
37
|
+
],
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public"
|
|
40
|
+
},
|
|
41
|
+
"description": "Excalidraw as a React component",
|
|
42
|
+
"license": "MIT",
|
|
43
|
+
"keywords": [
|
|
44
|
+
"excalidraw",
|
|
45
|
+
"excalidraw-embed",
|
|
46
|
+
"react",
|
|
47
|
+
"npm",
|
|
48
|
+
"npm excalidraw"
|
|
49
|
+
],
|
|
50
|
+
"browserslist": {
|
|
51
|
+
"production": [
|
|
52
|
+
">0.2%",
|
|
53
|
+
"not dead",
|
|
54
|
+
"not ie <= 11",
|
|
55
|
+
"not op_mini all",
|
|
56
|
+
"not safari < 12",
|
|
57
|
+
"not kaios <= 2.5",
|
|
58
|
+
"not edge < 79",
|
|
59
|
+
"not chrome < 70",
|
|
60
|
+
"not and_uc < 13",
|
|
61
|
+
"not samsung < 10"
|
|
62
|
+
],
|
|
63
|
+
"development": [
|
|
64
|
+
"last 1 chrome version",
|
|
65
|
+
"last 1 firefox version",
|
|
66
|
+
"last 1 safari version"
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
"repository": "https://github.com/excalidraw/excalidraw",
|
|
70
|
+
"bugs": "https://github.com/excalidraw/excalidraw/issues",
|
|
71
|
+
"homepage": "https://github.com/excalidraw/excalidraw/tree/master/packages/excalidraw",
|
|
72
|
+
"scripts": {
|
|
73
|
+
"gen:types": "rimraf types && tsc",
|
|
74
|
+
"build:esm": "rimraf dist && node ../../scripts/buildPackage.js && yarn gen:types"
|
|
75
|
+
},
|
|
76
|
+
"peerDependencies": {
|
|
77
|
+
"react": "^17.0.2 || ^18.2.0 || ^19.0.0",
|
|
78
|
+
"react-dom": "^17.0.2 || ^18.2.0 || ^19.0.0"
|
|
79
|
+
},
|
|
80
|
+
"dependencies": {
|
|
81
|
+
"@braintree/sanitize-url": "6.0.2",
|
|
82
|
+
"@excalidraw/laser-pointer": "1.3.1",
|
|
83
|
+
"@excalidraw/mermaid-to-excalidraw": "1.1.3",
|
|
84
|
+
"@excalidraw/random-username": "1.1.0",
|
|
85
|
+
"@radix-ui/react-popover": "1.1.6",
|
|
86
|
+
"@radix-ui/react-tabs": "1.1.3",
|
|
87
|
+
"browser-fs-access": "0.29.1",
|
|
88
|
+
"canvas-roundrect-polyfill": "0.0.1",
|
|
89
|
+
"clsx": "1.1.1",
|
|
90
|
+
"cross-env": "7.0.3",
|
|
91
|
+
"es6-promise-pool": "2.5.0",
|
|
92
|
+
"fractional-indexing": "3.2.0",
|
|
93
|
+
"fuzzy": "0.1.3",
|
|
94
|
+
"haoxin-excalidraw-sdk-common": "0.18.7",
|
|
95
|
+
"haoxin-excalidraw-sdk-element": "0.18.7",
|
|
96
|
+
"haoxin-excalidraw-sdk-math": "0.18.7",
|
|
97
|
+
"image-blob-reduce": "3.0.1",
|
|
98
|
+
"jotai": "2.11.0",
|
|
99
|
+
"jotai-scope": "0.7.2",
|
|
100
|
+
"lodash.debounce": "4.0.8",
|
|
101
|
+
"lodash.throttle": "4.1.1",
|
|
102
|
+
"lucide-react": "^0.441.0",
|
|
103
|
+
"nanoid": "3.3.3",
|
|
104
|
+
"open-color": "1.9.1",
|
|
105
|
+
"pako": "2.0.3",
|
|
106
|
+
"perfect-freehand": "1.2.0",
|
|
107
|
+
"pica": "7.1.1",
|
|
108
|
+
"png-chunk-text": "1.0.0",
|
|
109
|
+
"png-chunks-encode": "1.0.0",
|
|
110
|
+
"png-chunks-extract": "1.0.0",
|
|
111
|
+
"points-on-curve": "1.0.1",
|
|
112
|
+
"pwacompat": "2.0.17",
|
|
113
|
+
"roughjs": "4.6.4",
|
|
114
|
+
"sass": "1.51.0",
|
|
115
|
+
"tunnel-rat": "0.1.2"
|
|
116
|
+
},
|
|
117
|
+
"devDependencies": {
|
|
118
|
+
"@size-limit/preset-big-lib": "9.0.0",
|
|
119
|
+
"@testing-library/dom": "10.4.0",
|
|
120
|
+
"@testing-library/jest-dom": "6.6.3",
|
|
121
|
+
"@testing-library/react": "16.2.0",
|
|
122
|
+
"@types/lodash.debounce": "4.0.8",
|
|
123
|
+
"@types/pako": "2.0.3",
|
|
124
|
+
"@types/pica": "5.1.3",
|
|
125
|
+
"@types/resize-observer-browser": "0.1.7",
|
|
126
|
+
"ansicolor": "2.0.3",
|
|
127
|
+
"autoprefixer": "10.4.7",
|
|
128
|
+
"cross-env": "7.0.3",
|
|
129
|
+
"dotenv": "16.0.1",
|
|
130
|
+
"esbuild": "0.19.10",
|
|
131
|
+
"esbuild-sass-plugin": "2.16.0",
|
|
132
|
+
"eslint-plugin-react": "7.32.2",
|
|
133
|
+
"fake-indexeddb": "3.1.7",
|
|
134
|
+
"fonteditor-core": "2.4.1",
|
|
135
|
+
"harfbuzzjs": "0.3.6",
|
|
136
|
+
"jest-diff": "29.7.0",
|
|
137
|
+
"typescript": "4.9.4"
|
|
138
|
+
}
|
|
139
|
+
}
|