canvu-react 0.3.25 → 0.3.26

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.
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as CanvasPlugin } from './types-7kfWcm0L.cjs';
2
+ import { C as CanvasPlugin } from './types-BLXR7g_L.cjs';
3
3
  import 'react';
4
4
  import './types-CB0TZZuk.cjs';
5
5
  import './camera-BwQjm5oh.cjs';
package/dist/chatbot.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as CanvasPlugin } from './types-C4k_AMvi.js';
2
+ import { C as CanvasPlugin } from './types-Cm7IsgL4.js';
3
3
  import 'react';
4
4
  import './types-CB0TZZuk.js';
5
5
  import './camera-KwCYYPhm.js';
package/dist/react.cjs CHANGED
@@ -6515,7 +6515,12 @@ function PresenceRemoteLayer({
6515
6515
  const markup = peer.markupStroke;
6516
6516
  let strokeNode = null;
6517
6517
  if (markup && markup.points.length > 0) {
6518
- const paint = strokePaint(markup.tool, color);
6518
+ const fallbackPaint = strokePaint(markup.tool, color);
6519
+ const paint = {
6520
+ stroke: markup.stroke ?? fallbackPaint.stroke,
6521
+ strokeOpacity: markup.strokeOpacity ?? fallbackPaint.strokeOpacity,
6522
+ widthWorld: markup.strokeWidth ?? fallbackPaint.widthWorld
6523
+ };
6519
6524
  const d = markup.points.length >= 2 ? smoothFreehandPointsToPathD([...markup.points]) : null;
6520
6525
  if (d) {
6521
6526
  strokeNode = /* @__PURE__ */ jsxRuntime.jsx(
@@ -7424,14 +7429,15 @@ var VectorViewport = react.forwardRef(
7424
7429
  const directRemoteStrokePreviewRef = react.useRef(false);
7425
7430
  const remoteStrokePreviewFrameRef = react.useRef(null);
7426
7431
  const pendingRemoteStrokePreviewRef = react.useRef(null);
7427
- const flushRemoteStrokePreview = react.useCallback(() => {
7432
+ const flushRemoteStrokePreviewWithStyle = react.useCallback(() => {
7428
7433
  remoteStrokePreviewFrameRef.current = null;
7429
7434
  const pending = pendingRemoteStrokePreviewRef.current;
7430
7435
  if (!pending) return;
7431
7436
  onPlacementPreviewChangeRef.current?.({
7432
7437
  kind: "stroke",
7433
7438
  tool: pending.tool,
7434
- points: pending.points
7439
+ points: pending.points,
7440
+ style: { ...strokeStyleRef.current }
7435
7441
  });
7436
7442
  }, []);
7437
7443
  const emitRemoteStrokePreview = react.useCallback(
@@ -7441,10 +7447,10 @@ var VectorViewport = react.forwardRef(
7441
7447
  pendingRemoteStrokePreviewRef.current = { tool, points };
7442
7448
  if (remoteStrokePreviewFrameRef.current != null) return;
7443
7449
  remoteStrokePreviewFrameRef.current = requestAnimationFrame(
7444
- flushRemoteStrokePreview
7450
+ flushRemoteStrokePreviewWithStyle
7445
7451
  );
7446
7452
  },
7447
- [flushRemoteStrokePreview]
7453
+ [flushRemoteStrokePreviewWithStyle]
7448
7454
  );
7449
7455
  const emitRemoteStrokePreviewClear = react.useCallback(() => {
7450
7456
  if (remoteStrokePreviewFrameRef.current != null) {
@@ -8707,7 +8713,8 @@ var VectorViewport = react.forwardRef(
8707
8713
  setPlacementPreview({
8708
8714
  kind: "stroke",
8709
8715
  tool,
8710
- points: [startPoint]
8716
+ points: [startPoint],
8717
+ style: { ...strokeStyleRef.current }
8711
8718
  });
8712
8719
  }
8713
8720
  captureInteractionPointer(e.currentTarget, e.pointerId);
@@ -9074,7 +9081,8 @@ var VectorViewport = react.forwardRef(
9074
9081
  setPlacementPreview({
9075
9082
  kind: "stroke",
9076
9083
  tool: st.tool,
9077
- points: interpolated
9084
+ points: interpolated,
9085
+ style: { ...strokeStyleRef.current }
9078
9086
  });
9079
9087
  }
9080
9088
  return;