@elixpo/lixsketch 4.5.8 → 4.5.9
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 +1 -1
- package/src/index.js +6 -13
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -3,30 +3,23 @@
|
|
|
3
3
|
* @lixsketch/engine - Open-source SVG whiteboard engine
|
|
4
4
|
*
|
|
5
5
|
* Usage:
|
|
6
|
-
* import { createSketchEngine } from '@lixsketch
|
|
6
|
+
* import { createSketchEngine } from '@elixpo/lixsketch';
|
|
7
7
|
*
|
|
8
8
|
* const engine = createSketchEngine(svgElement, {
|
|
9
9
|
* onEvent: (type, data) => console.log(type, data),
|
|
10
10
|
* });
|
|
11
11
|
* await engine.init();
|
|
12
12
|
* engine.setActiveTool('rectangle');
|
|
13
|
+
*
|
|
14
|
+
* Shape classes are loaded lazily by the engine during init() and exposed
|
|
15
|
+
* on `window` (Rectangle, Circle, Arrow, etc.) and via `engine._modules.shapes`.
|
|
16
|
+
* They CANNOT be statically imported because they depend on globals (rough, svg)
|
|
17
|
+
* that are only set up during engine initialization.
|
|
13
18
|
*/
|
|
14
19
|
|
|
15
20
|
// Main engine class
|
|
16
21
|
export { SketchEngine, default } from './SketchEngine.js';
|
|
17
22
|
|
|
18
|
-
// Shape classes
|
|
19
|
-
export { Rectangle } from './shapes/Rectangle.js';
|
|
20
|
-
export { Circle } from './shapes/Circle.js';
|
|
21
|
-
export { Arrow } from './shapes/Arrow.js';
|
|
22
|
-
export { Line } from './shapes/Line.js';
|
|
23
|
-
export { TextShape } from './shapes/TextShape.js';
|
|
24
|
-
export { CodeShape } from './shapes/CodeShape.js';
|
|
25
|
-
export { ImageShape } from './shapes/ImageShape.js';
|
|
26
|
-
export { IconShape } from './shapes/IconShape.js';
|
|
27
|
-
export { Frame } from './shapes/Frame.js';
|
|
28
|
-
export { FreehandStroke } from './shapes/FreehandStroke.js';
|
|
29
|
-
|
|
30
23
|
// Convenience factory
|
|
31
24
|
import { SketchEngine } from './SketchEngine.js';
|
|
32
25
|
|