@ibodr/draw 0.1.4 → 0.1.6

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/dist/index.mjs CHANGED
@@ -21271,8 +21271,9 @@ function DefaultCollaboratorCursor({
21271
21271
  }
21272
21272
  var CollaboratorCursors = track(function CollaboratorCursors2() {
21273
21273
  const editor = useEditor();
21274
- const { CollaboratorCursor: CursorComponent = DefaultCollaboratorCursor } = useEditorComponents();
21275
- if (!CursorComponent) return null;
21274
+ const { CollaboratorCursor } = useEditorComponents();
21275
+ if (CollaboratorCursor === null) return null;
21276
+ const CursorComponent = CollaboratorCursor ?? DefaultCollaboratorCursor;
21276
21277
  const zoom = editor.getZoomLevel();
21277
21278
  const scale = getCollaboratorCursorScale(zoom);
21278
21279
  const container = editor.getContainer();
@@ -35429,9 +35430,10 @@ function DrawInFrontOfTheCanvas({
35429
35430
  hideUi,
35430
35431
  CustomInFrontOfTheCanvas
35431
35432
  }) {
35432
- const { CollaboratorCursors: Cursors } = useEditorComponents();
35433
+ const { CollaboratorCursors: CollaboratorCursors3 } = useEditorComponents();
35434
+ const CursorsLayer = CollaboratorCursors3 === null ? null : CollaboratorCursors3 ?? CollaboratorCursors;
35433
35435
  return /* @__PURE__ */ jsxs(Fragment, { children: [
35434
- Cursors ? /* @__PURE__ */ jsx(Cursors, {}) : null,
35436
+ CursorsLayer ? /* @__PURE__ */ jsx(CursorsLayer, {}) : null,
35435
35437
  hideUi ? CustomInFrontOfTheCanvas ? /* @__PURE__ */ jsx(CustomInFrontOfTheCanvas, {}) : null : /* @__PURE__ */ jsxs(Fragment, { children: [
35436
35438
  /* @__PURE__ */ jsx(DrawUiInFrontOfTheCanvas, {}),
35437
35439
  CustomInFrontOfTheCanvas ? /* @__PURE__ */ jsx(CustomInFrontOfTheCanvas, {}) : null
@@ -35500,8 +35502,8 @@ function Draw(props) {
35500
35502
  () => ({
35501
35503
  Spinner,
35502
35504
  LoadingScreen,
35503
- CollaboratorCursors: _components.CollaboratorCursors === void 0 ? CollaboratorCursors : _components.CollaboratorCursors,
35504
35505
  ..._components,
35506
+ CollaboratorCursors: _components.CollaboratorCursors === void 0 ? CollaboratorCursors : _components.CollaboratorCursors,
35505
35507
  InFrontOfTheCanvas
35506
35508
  }),
35507
35509
  [_components, InFrontOfTheCanvas]
@@ -37158,7 +37160,7 @@ async function extractAssets(editor, snapshot, msg, addToast) {
37158
37160
  // src/index.ts
37159
37161
  registerDrawLibraryVersion(
37160
37162
  "@ibodr/draw",
37161
- "0.1.4",
37163
+ "0.1.6",
37162
37164
  "esm"
37163
37165
  );
37164
37166
  /*!