canvu-react 0.4.60 → 0.4.61
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/native.cjs +37 -17
- package/dist/native.cjs.map +1 -1
- package/dist/native.d.cts +11 -1
- package/dist/native.d.ts +11 -1
- package/dist/native.js +37 -17
- package/dist/native.js.map +1 -1
- package/package.json +1 -1
package/dist/native.d.cts
CHANGED
|
@@ -247,6 +247,9 @@ type NativeRemotePresenceHit = {
|
|
|
247
247
|
readonly peerId?: string;
|
|
248
248
|
};
|
|
249
249
|
|
|
250
|
+
type NativeVectorStyleInspectorPlacement = "bottom" | "top-left";
|
|
251
|
+
type NativeVectorStyleInspectorOverlayStyle = StyleProp<ViewStyle>;
|
|
252
|
+
|
|
250
253
|
type NativeCustomShapePlacementOptions = {
|
|
251
254
|
readonly toolId: string;
|
|
252
255
|
readonly createItem: (args: {
|
|
@@ -385,7 +388,14 @@ type NativeVectorViewportProps = {
|
|
|
385
388
|
readonly overlay?: React.ReactNode;
|
|
386
389
|
readonly toolbar?: React.ReactNode;
|
|
387
390
|
readonly showStyleInspector?: boolean;
|
|
388
|
-
readonly styleInspectorPlacement?:
|
|
391
|
+
readonly styleInspectorPlacement?: NativeVectorStyleInspectorPlacement;
|
|
392
|
+
/**
|
|
393
|
+
* Overrides the outer container style used to position the native style inspector.
|
|
394
|
+
*
|
|
395
|
+
* Use this when your app overlays custom headers, footers, or safe-area chrome
|
|
396
|
+
* above the canvas and needs to move the inspector away from those controls.
|
|
397
|
+
*/
|
|
398
|
+
readonly styleInspectorOverlayStyle?: NativeVectorStyleInspectorOverlayStyle;
|
|
389
399
|
};
|
|
390
400
|
declare const NativeVectorViewport: react.ForwardRefExoticComponent<NativeVectorViewportProps & react.RefAttributes<NativeVectorViewportHandle>>;
|
|
391
401
|
|
package/dist/native.d.ts
CHANGED
|
@@ -247,6 +247,9 @@ type NativeRemotePresenceHit = {
|
|
|
247
247
|
readonly peerId?: string;
|
|
248
248
|
};
|
|
249
249
|
|
|
250
|
+
type NativeVectorStyleInspectorPlacement = "bottom" | "top-left";
|
|
251
|
+
type NativeVectorStyleInspectorOverlayStyle = StyleProp<ViewStyle>;
|
|
252
|
+
|
|
250
253
|
type NativeCustomShapePlacementOptions = {
|
|
251
254
|
readonly toolId: string;
|
|
252
255
|
readonly createItem: (args: {
|
|
@@ -385,7 +388,14 @@ type NativeVectorViewportProps = {
|
|
|
385
388
|
readonly overlay?: React.ReactNode;
|
|
386
389
|
readonly toolbar?: React.ReactNode;
|
|
387
390
|
readonly showStyleInspector?: boolean;
|
|
388
|
-
readonly styleInspectorPlacement?:
|
|
391
|
+
readonly styleInspectorPlacement?: NativeVectorStyleInspectorPlacement;
|
|
392
|
+
/**
|
|
393
|
+
* Overrides the outer container style used to position the native style inspector.
|
|
394
|
+
*
|
|
395
|
+
* Use this when your app overlays custom headers, footers, or safe-area chrome
|
|
396
|
+
* above the canvas and needs to move the inspector away from those controls.
|
|
397
|
+
*/
|
|
398
|
+
readonly styleInspectorOverlayStyle?: NativeVectorStyleInspectorOverlayStyle;
|
|
389
399
|
};
|
|
390
400
|
declare const NativeVectorViewport: react.ForwardRefExoticComponent<NativeVectorViewportProps & react.RefAttributes<NativeVectorViewportHandle>>;
|
|
391
401
|
|
package/dist/native.js
CHANGED
|
@@ -5368,6 +5368,35 @@ function duplicateNativeSelectedShapes(input) {
|
|
|
5368
5368
|
});
|
|
5369
5369
|
}
|
|
5370
5370
|
|
|
5371
|
+
// src/native/native-style-inspector-overlay.ts
|
|
5372
|
+
function resolveNativeStyleInspectorOverlayStyle({
|
|
5373
|
+
placement,
|
|
5374
|
+
overlayElevation,
|
|
5375
|
+
overlayStyle,
|
|
5376
|
+
overlayZIndex
|
|
5377
|
+
}) {
|
|
5378
|
+
const placementStyle = placement === "top-left" ? {
|
|
5379
|
+
position: "absolute",
|
|
5380
|
+
left: 16,
|
|
5381
|
+
top: 104,
|
|
5382
|
+
alignItems: "flex-start"
|
|
5383
|
+
} : {
|
|
5384
|
+
position: "absolute",
|
|
5385
|
+
left: 16,
|
|
5386
|
+
right: 16,
|
|
5387
|
+
bottom: 84,
|
|
5388
|
+
alignItems: "center"
|
|
5389
|
+
};
|
|
5390
|
+
return [
|
|
5391
|
+
placementStyle,
|
|
5392
|
+
{
|
|
5393
|
+
zIndex: overlayZIndex,
|
|
5394
|
+
elevation: overlayElevation
|
|
5395
|
+
},
|
|
5396
|
+
overlayStyle
|
|
5397
|
+
];
|
|
5398
|
+
}
|
|
5399
|
+
|
|
5371
5400
|
// src/native/native-transient-items.ts
|
|
5372
5401
|
function moveNativeTransientItems({
|
|
5373
5402
|
items,
|
|
@@ -5664,7 +5693,8 @@ var NativeVectorViewport = forwardRef(function NativeVectorViewport2({
|
|
|
5664
5693
|
overlay,
|
|
5665
5694
|
toolbar,
|
|
5666
5695
|
showStyleInspector = false,
|
|
5667
|
-
styleInspectorPlacement = "bottom"
|
|
5696
|
+
styleInspectorPlacement = "bottom",
|
|
5697
|
+
styleInspectorOverlayStyle
|
|
5668
5698
|
}, ref) {
|
|
5669
5699
|
const [size, setSize] = useState({ width: 0, height: 0 });
|
|
5670
5700
|
const cameraRef = useRef(null);
|
|
@@ -6898,22 +6928,12 @@ var NativeVectorViewport = forwardRef(function NativeVectorViewport2({
|
|
|
6898
6928
|
View,
|
|
6899
6929
|
{
|
|
6900
6930
|
pointerEvents: "box-none",
|
|
6901
|
-
style:
|
|
6902
|
-
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
elevation: NATIVE_VIEWPORT_OVERLAY_ELEVATION
|
|
6908
|
-
} : {
|
|
6909
|
-
position: "absolute",
|
|
6910
|
-
left: 16,
|
|
6911
|
-
right: 16,
|
|
6912
|
-
bottom: 84,
|
|
6913
|
-
alignItems: "center",
|
|
6914
|
-
zIndex: NATIVE_VIEWPORT_OVERLAY_Z_INDEX,
|
|
6915
|
-
elevation: NATIVE_VIEWPORT_OVERLAY_ELEVATION
|
|
6916
|
-
},
|
|
6931
|
+
style: resolveNativeStyleInspectorOverlayStyle({
|
|
6932
|
+
placement: styleInspectorPlacement,
|
|
6933
|
+
overlayElevation: NATIVE_VIEWPORT_OVERLAY_ELEVATION,
|
|
6934
|
+
overlayStyle: styleInspectorOverlayStyle,
|
|
6935
|
+
overlayZIndex: NATIVE_VIEWPORT_OVERLAY_Z_INDEX
|
|
6936
|
+
}),
|
|
6917
6937
|
children: /* @__PURE__ */ jsx(
|
|
6918
6938
|
NativeVectorStyleInspector,
|
|
6919
6939
|
{
|