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.
- package/dist/chatbot.d.cts +1 -1
- package/dist/chatbot.d.ts +1 -1
- package/dist/react.cjs +15 -7
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +15 -7
- package/dist/react.js.map +1 -1
- package/dist/realtime.cjs +21 -3
- package/dist/realtime.cjs.map +1 -1
- package/dist/realtime.d.cts +2 -2
- package/dist/realtime.d.ts +2 -2
- package/dist/realtime.js +21 -3
- package/dist/realtime.js.map +1 -1
- package/dist/{types-7kfWcm0L.d.cts → types-BLXR7g_L.d.cts} +7 -0
- package/dist/{types-C4k_AMvi.d.ts → types-Cm7IsgL4.d.ts} +7 -0
- package/package.json +1 -1
package/dist/react.d.cts
CHANGED
|
@@ -3,8 +3,8 @@ export { H as HydratedSceneItemsWithAssetsResult, h as hydrateSceneItemsWithAsse
|
|
|
3
3
|
import { V as VectorSceneItem } from './types-CB0TZZuk.cjs';
|
|
4
4
|
import { V as VectorViewportAssetKind, u as VectorViewportAssetStore } from './shape-builders-DFudWDFI.cjs';
|
|
5
5
|
export { v as VectorViewportAssetHydrationRequest, w as VectorViewportAssetResolveRequest, x as VectorViewportAssetResolveResult, y as VectorViewportAssetUploadRequest, z as VectorViewportAssetUploadResult } from './shape-builders-DFudWDFI.cjs';
|
|
6
|
-
import { B as BoardComponentPosition, V as VectorToolDefinition, C as CanvasPlugin, a as VectorSelectionInspector } from './types-
|
|
7
|
-
export { b as CanvasPluginComponentProps, c as CanvasPluginContribution, d as CanvasPluginItemsChangeMiddlewareContext, e as CanvasPluginRenderContext, f as CanvuChromeActiveToolStyle, g as CanvuChromeContext, h as CanvuChromeContextValue, i as CanvuChromeSelectionStyleChange, j as CanvuPluginContext, k as CanvuPluginContextValue, l as CanvuPluginViewportSnapshot, m as CustomShapePlacementOptions, P as PlacementPreview, n as VectorCanvasSpacePosition, o as VectorSelectionInspectorProps, p as VectorViewport, q as VectorViewportHandle, r as VectorViewportProps, W as WorldPointerDownDetail, s as createCanvuPlugin, t as getBoardPositionStyle, u as useCanvuChromeContext, v as useCanvuDocumentContext, w as useCanvuPluginContext, x as useCanvuPluginContribution, y as useCanvuResolvedTools, z as useCanvuViewportContext } from './types-
|
|
6
|
+
import { B as BoardComponentPosition, V as VectorToolDefinition, C as CanvasPlugin, a as VectorSelectionInspector } from './types-BLXR7g_L.cjs';
|
|
7
|
+
export { b as CanvasPluginComponentProps, c as CanvasPluginContribution, d as CanvasPluginItemsChangeMiddlewareContext, e as CanvasPluginRenderContext, f as CanvuChromeActiveToolStyle, g as CanvuChromeContext, h as CanvuChromeContextValue, i as CanvuChromeSelectionStyleChange, j as CanvuPluginContext, k as CanvuPluginContextValue, l as CanvuPluginViewportSnapshot, m as CustomShapePlacementOptions, P as PlacementPreview, n as VectorCanvasSpacePosition, o as VectorSelectionInspectorProps, p as VectorViewport, q as VectorViewportHandle, r as VectorViewportProps, W as WorldPointerDownDetail, s as createCanvuPlugin, t as getBoardPositionStyle, u as useCanvuChromeContext, v as useCanvuDocumentContext, w as useCanvuPluginContext, x as useCanvuPluginContribution, y as useCanvuResolvedTools, z as useCanvuViewportContext } from './types-BLXR7g_L.cjs';
|
|
8
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
9
|
import * as react from 'react';
|
|
10
10
|
import { CSSProperties, ReactNode, ReactElement, SVGProps } from 'react';
|
package/dist/react.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ export { H as HydratedSceneItemsWithAssetsResult, h as hydrateSceneItemsWithAsse
|
|
|
3
3
|
import { V as VectorSceneItem } from './types-CB0TZZuk.js';
|
|
4
4
|
import { V as VectorViewportAssetKind, u as VectorViewportAssetStore } from './shape-builders-ENwnK-zT.js';
|
|
5
5
|
export { v as VectorViewportAssetHydrationRequest, w as VectorViewportAssetResolveRequest, x as VectorViewportAssetResolveResult, y as VectorViewportAssetUploadRequest, z as VectorViewportAssetUploadResult } from './shape-builders-ENwnK-zT.js';
|
|
6
|
-
import { B as BoardComponentPosition, V as VectorToolDefinition, C as CanvasPlugin, a as VectorSelectionInspector } from './types-
|
|
7
|
-
export { b as CanvasPluginComponentProps, c as CanvasPluginContribution, d as CanvasPluginItemsChangeMiddlewareContext, e as CanvasPluginRenderContext, f as CanvuChromeActiveToolStyle, g as CanvuChromeContext, h as CanvuChromeContextValue, i as CanvuChromeSelectionStyleChange, j as CanvuPluginContext, k as CanvuPluginContextValue, l as CanvuPluginViewportSnapshot, m as CustomShapePlacementOptions, P as PlacementPreview, n as VectorCanvasSpacePosition, o as VectorSelectionInspectorProps, p as VectorViewport, q as VectorViewportHandle, r as VectorViewportProps, W as WorldPointerDownDetail, s as createCanvuPlugin, t as getBoardPositionStyle, u as useCanvuChromeContext, v as useCanvuDocumentContext, w as useCanvuPluginContext, x as useCanvuPluginContribution, y as useCanvuResolvedTools, z as useCanvuViewportContext } from './types-
|
|
6
|
+
import { B as BoardComponentPosition, V as VectorToolDefinition, C as CanvasPlugin, a as VectorSelectionInspector } from './types-Cm7IsgL4.js';
|
|
7
|
+
export { b as CanvasPluginComponentProps, c as CanvasPluginContribution, d as CanvasPluginItemsChangeMiddlewareContext, e as CanvasPluginRenderContext, f as CanvuChromeActiveToolStyle, g as CanvuChromeContext, h as CanvuChromeContextValue, i as CanvuChromeSelectionStyleChange, j as CanvuPluginContext, k as CanvuPluginContextValue, l as CanvuPluginViewportSnapshot, m as CustomShapePlacementOptions, P as PlacementPreview, n as VectorCanvasSpacePosition, o as VectorSelectionInspectorProps, p as VectorViewport, q as VectorViewportHandle, r as VectorViewportProps, W as WorldPointerDownDetail, s as createCanvuPlugin, t as getBoardPositionStyle, u as useCanvuChromeContext, v as useCanvuDocumentContext, w as useCanvuPluginContext, x as useCanvuPluginContribution, y as useCanvuResolvedTools, z as useCanvuViewportContext } from './types-Cm7IsgL4.js';
|
|
8
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
9
|
import * as react from 'react';
|
|
10
10
|
import { CSSProperties, ReactNode, ReactElement, SVGProps } from 'react';
|
package/dist/react.js
CHANGED
|
@@ -6508,7 +6508,12 @@ function PresenceRemoteLayer({
|
|
|
6508
6508
|
const markup = peer.markupStroke;
|
|
6509
6509
|
let strokeNode = null;
|
|
6510
6510
|
if (markup && markup.points.length > 0) {
|
|
6511
|
-
const
|
|
6511
|
+
const fallbackPaint = strokePaint(markup.tool, color);
|
|
6512
|
+
const paint = {
|
|
6513
|
+
stroke: markup.stroke ?? fallbackPaint.stroke,
|
|
6514
|
+
strokeOpacity: markup.strokeOpacity ?? fallbackPaint.strokeOpacity,
|
|
6515
|
+
widthWorld: markup.strokeWidth ?? fallbackPaint.widthWorld
|
|
6516
|
+
};
|
|
6512
6517
|
const d = markup.points.length >= 2 ? smoothFreehandPointsToPathD([...markup.points]) : null;
|
|
6513
6518
|
if (d) {
|
|
6514
6519
|
strokeNode = /* @__PURE__ */ jsx(
|
|
@@ -7417,14 +7422,15 @@ var VectorViewport = forwardRef(
|
|
|
7417
7422
|
const directRemoteStrokePreviewRef = useRef(false);
|
|
7418
7423
|
const remoteStrokePreviewFrameRef = useRef(null);
|
|
7419
7424
|
const pendingRemoteStrokePreviewRef = useRef(null);
|
|
7420
|
-
const
|
|
7425
|
+
const flushRemoteStrokePreviewWithStyle = useCallback(() => {
|
|
7421
7426
|
remoteStrokePreviewFrameRef.current = null;
|
|
7422
7427
|
const pending = pendingRemoteStrokePreviewRef.current;
|
|
7423
7428
|
if (!pending) return;
|
|
7424
7429
|
onPlacementPreviewChangeRef.current?.({
|
|
7425
7430
|
kind: "stroke",
|
|
7426
7431
|
tool: pending.tool,
|
|
7427
|
-
points: pending.points
|
|
7432
|
+
points: pending.points,
|
|
7433
|
+
style: { ...strokeStyleRef.current }
|
|
7428
7434
|
});
|
|
7429
7435
|
}, []);
|
|
7430
7436
|
const emitRemoteStrokePreview = useCallback(
|
|
@@ -7434,10 +7440,10 @@ var VectorViewport = forwardRef(
|
|
|
7434
7440
|
pendingRemoteStrokePreviewRef.current = { tool, points };
|
|
7435
7441
|
if (remoteStrokePreviewFrameRef.current != null) return;
|
|
7436
7442
|
remoteStrokePreviewFrameRef.current = requestAnimationFrame(
|
|
7437
|
-
|
|
7443
|
+
flushRemoteStrokePreviewWithStyle
|
|
7438
7444
|
);
|
|
7439
7445
|
},
|
|
7440
|
-
[
|
|
7446
|
+
[flushRemoteStrokePreviewWithStyle]
|
|
7441
7447
|
);
|
|
7442
7448
|
const emitRemoteStrokePreviewClear = useCallback(() => {
|
|
7443
7449
|
if (remoteStrokePreviewFrameRef.current != null) {
|
|
@@ -8700,7 +8706,8 @@ var VectorViewport = forwardRef(
|
|
|
8700
8706
|
setPlacementPreview({
|
|
8701
8707
|
kind: "stroke",
|
|
8702
8708
|
tool,
|
|
8703
|
-
points: [startPoint]
|
|
8709
|
+
points: [startPoint],
|
|
8710
|
+
style: { ...strokeStyleRef.current }
|
|
8704
8711
|
});
|
|
8705
8712
|
}
|
|
8706
8713
|
captureInteractionPointer(e.currentTarget, e.pointerId);
|
|
@@ -9067,7 +9074,8 @@ var VectorViewport = forwardRef(
|
|
|
9067
9074
|
setPlacementPreview({
|
|
9068
9075
|
kind: "stroke",
|
|
9069
9076
|
tool: st.tool,
|
|
9070
|
-
points: interpolated
|
|
9077
|
+
points: interpolated,
|
|
9078
|
+
style: { ...strokeStyleRef.current }
|
|
9071
9079
|
});
|
|
9072
9080
|
}
|
|
9073
9081
|
return;
|