@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +6 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elixpo/lixsketch",
3
- "version": "4.5.8",
3
+ "version": "4.5.9",
4
4
  "description": "Open-source SVG whiteboard engine with hand-drawn aesthetics — the core of LixSketch",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
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/engine';
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