fuck
This commit is contained in:
@@ -30,7 +30,7 @@ import '../styles/workspace/workspace-cards.css';
|
||||
|
||||
type Identifier = string | number;
|
||||
|
||||
type TagLike = { id?: Identifier | null; label?: string; color?: string | null } | null | undefined;
|
||||
type TagLike = { id?: Identifier | null; label?: string; color?: string | null } | null;
|
||||
|
||||
export interface DeskDocument {
|
||||
id?: Identifier | null;
|
||||
@@ -126,7 +126,7 @@ interface DesktopWorkspaceProps {
|
||||
onAssignTagToDocument?: (...args: unknown[]) => void;
|
||||
ensureAssetUrl?: (...args: unknown[]) => Promise<unknown> | unknown;
|
||||
getDocumentAsset?: (...args: unknown[]) => unknown;
|
||||
activeTagIds?: Array<Identifier | null | undefined>;
|
||||
activeTagIds?: Array<Identifier | null>;
|
||||
selectedDocumentIds?: Identifier[];
|
||||
onClearSelection?: () => void;
|
||||
detailPanelOpen?: boolean;
|
||||
@@ -142,7 +142,7 @@ interface DesktopWorkspaceViewProps {
|
||||
handleCanvasDragOver: (event: React.DragEvent<HTMLDivElement>) => void;
|
||||
handleCanvasDragLeave: (event: React.DragEvent<HTMLDivElement>) => void;
|
||||
handleCanvasDrop: (event: React.DragEvent<HTMLDivElement>) => void;
|
||||
ensureDocumentSize: (doc: DeskDocument | null | undefined) => DocumentSizeInfo | null;
|
||||
ensureDocumentSize: (doc: DeskDocument | null) => DocumentSizeInfo | null;
|
||||
layoutSnapshot: Map<string, LayoutEntry>;
|
||||
layoutRef: React.MutableRefObject<Map<string, LayoutEntry>>;
|
||||
dragTransformsRef: React.MutableRefObject<Map<string, DragTransformOverride>>;
|
||||
@@ -176,15 +176,15 @@ interface DesktopWorkspaceViewProps {
|
||||
detailPanelOpen: boolean;
|
||||
onCloseDetailPanel?: DesktopWorkspaceProps['onCloseDetailPanel'];
|
||||
documentLookup: Map<string, DeskDocument>;
|
||||
resolveBaseMetrics: (doc: DeskDocument | null | undefined, cardWidth: number, cardHeight: number) => {
|
||||
resolveBaseMetrics: (doc: DeskDocument | null, cardWidth: number, cardHeight: number) => {
|
||||
baseWidth: number;
|
||||
baseHeight: number;
|
||||
baseScale: number;
|
||||
};
|
||||
bringToFront: (docId: Identifier | null | undefined) => void;
|
||||
bringToFront: (docId: Identifier | null) => void;
|
||||
setDraggingId: (value: string | null) => void;
|
||||
canvasSize: { width: number; height: number };
|
||||
openOverlayForDoc: (docId: Identifier | null | undefined, originInfo?: OverlayOriginHint | null) => void;
|
||||
openOverlayForDoc: (docId: Identifier | null, originInfo?: OverlayOriginHint | null) => void;
|
||||
recalcVisibleDocIds: () => void;
|
||||
dragSettings: DragSettings;
|
||||
onInspectDocument?: DesktopWorkspaceProps['onInspectDocument'];
|
||||
@@ -231,7 +231,7 @@ const DesktopWorkspace: React.FC<DesktopWorkspaceProps> = ({
|
||||
);
|
||||
const [docSizeVersion, setDocSizeVersion] = useState(0);
|
||||
const docSizeMapRef = useRef<Map<string, DocumentSizeInfo>>(new Map());
|
||||
const ensureDocumentSize = useCallback((doc: DeskDocument | null | undefined): DocumentSizeInfo | null => {
|
||||
const ensureDocumentSize = useCallback((doc: DeskDocument | null): DocumentSizeInfo | null => {
|
||||
if (!doc?.id) {
|
||||
return null;
|
||||
}
|
||||
@@ -312,7 +312,7 @@ const DesktopWorkspace: React.FC<DesktopWorkspaceProps> = ({
|
||||
const layoutRef = useRef<Map<string, LayoutEntry>>(layoutSnapshot);
|
||||
layoutRef.current = engine.layout as Map<string, LayoutEntry>;
|
||||
|
||||
const bringToFront = useCallback((docId: Identifier | null | undefined) => {
|
||||
const bringToFront = useCallback((docId: Identifier | null) => {
|
||||
engine.bringToFront(docId);
|
||||
}, [engine]);
|
||||
|
||||
@@ -425,7 +425,7 @@ const DesktopWorkspace: React.FC<DesktopWorkspaceProps> = ({
|
||||
}, [engine]);
|
||||
|
||||
const resolvePreviewDimensions = useCallback(
|
||||
(doc: DeskDocument | null | undefined): PreviewMetadataEntry | null => {
|
||||
(doc: DeskDocument | null): PreviewMetadataEntry | null => {
|
||||
if (!doc?.id) {
|
||||
return null;
|
||||
}
|
||||
@@ -581,7 +581,7 @@ const DesktopWorkspace: React.FC<DesktopWorkspaceProps> = ({
|
||||
}, [overlayDocId, documentLookup]);
|
||||
|
||||
const resolveBaseMetrics = useCallback(
|
||||
(doc: DeskDocument | null | undefined, cardWidth: number, cardHeight: number) => {
|
||||
(doc: DeskDocument | null, cardWidth: number, cardHeight: number) => {
|
||||
const previewDims = doc ? resolvePreviewDimensions(doc) : null;
|
||||
if (previewDims?.width && previewDims?.height) {
|
||||
const baseWidth = Math.max(previewDims.width, cardWidth);
|
||||
@@ -612,7 +612,7 @@ const DesktopWorkspace: React.FC<DesktopWorkspaceProps> = ({
|
||||
}, [draggingId, items, setDraggingId]);
|
||||
|
||||
const openOverlayForDoc = useCallback(
|
||||
(docId: Identifier | null | undefined, originInfo: OverlayOriginHint | null = null) => {
|
||||
(docId: Identifier | null, originInfo: OverlayOriginHint | null = null) => {
|
||||
if (!docId) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user