This commit is contained in:
2025-11-24 20:42:43 +01:00
parent 4c8ff39305
commit 46fa63af8a
16 changed files with 595 additions and 345 deletions
+8 -1
View File
@@ -9,7 +9,7 @@ import React, {
} from 'react';
import { resolveDocumentAssetUrl } from '../asset_manager';
import type { EnsureAssetUrl, GetAsset } from '../asset_manager';
import { formatTransform } from './math';
import { formatTransform } from '../utils/math';
import useDocumentDrag from './useDocumentDrag';
import PreviewZoomOverlay from '../detail/PreviewZoomOverlay';
import {
@@ -128,6 +128,8 @@ interface DesktopWorkspaceProps {
activeTagFilters?: Array<Identifier | null>;
tenantId?: Identifier | null;
viewId?: string | null;
documentLinks?: Map<Identifier, unknown> | null;
ensureDownloadUrl?: (docId: Identifier, options?: { force?: boolean }) => Promise<unknown>;
}
interface DesktopWorkspaceViewProps {
@@ -817,6 +819,8 @@ const DesktopWorkspace: React.FC<DesktopWorkspaceProps> = ({
overlayOriginTransform,
overlayDocument,
onDocumentClick,
handleStackSelect,
handlePromoteSelection,
onDocumentStackSelect: handleStackSelect,
onPromoteSelection: handlePromoteSelection,
selectedDocumentIds,
@@ -862,6 +866,8 @@ const DesktopWorkspace: React.FC<DesktopWorkspaceProps> = ({
layoutRef,
layoutSnapshot,
onDocumentClick,
handleStackSelect,
handlePromoteSelection,
openOverlayForDoc,
overlayDisplay,
overlayOriginRect,
@@ -874,6 +880,7 @@ const DesktopWorkspace: React.FC<DesktopWorkspaceProps> = ({
resolveBaseMetrics,
setDraggingId,
selectedDocumentIds,
clearSelection,
onDocumentActivate,
markLayoutDirty,
tagDropTargetId,
-8
View File
@@ -1,8 +0,0 @@
export { clamp } from '../utils/math';
export const formatTransform = (
x: number,
y: number,
rotation = 0,
scale = 1,
): string => `translate3d(${x}px, ${y}px, 0) rotate(${rotation}deg) scale(${scale})`;
+1 -1
View File
@@ -7,7 +7,7 @@ import {
} from 'react';
import type { PointerEvent as ReactPointerEvent } from 'react';
import { preventAll, safeInvoke } from './events';
import { clamp } from './math';
import { clamp } from '../utils/math';
import usePointerTap from '../ui/usePointerTap';
import {
MIN_TIMESTEP,
+1 -1
View File
@@ -1,4 +1,4 @@
import { clamp, formatTransform } from './math';
import { clamp, formatTransform } from '../utils/math';
import { fetchLayoutRecords, upsertLayoutRecords } from './db';
type DocumentId = string;