feat: Refactor utility and component exports, update dependencies, and add Knip for unused code detection.
This commit is contained in:
@@ -23,7 +23,7 @@ import { resolveDocumentAssetUrl } from '../asset_manager';
|
||||
import PanelHeader from '../ui/PanelHeader';
|
||||
import BreadcrumbTrail from '../ui/BreadcrumbTrail';
|
||||
import DocumentViewerLayout from './DocumentViewerLayout';
|
||||
import useViewerLayoutMode from './useViewerLayoutMode';
|
||||
import { useViewerLayoutMode } from './useViewerLayoutMode';
|
||||
import { usePanelResizeBindings } from '../app/PanelManagerContext';
|
||||
import type { DocumentId, FolderId } from '../types/identifiers';
|
||||
import type { Document } from '../types/documents';
|
||||
@@ -46,7 +46,7 @@ interface DocumentViewerPanelProps extends DocumentSummarySectionProps {
|
||||
sidebarMode?: SidebarMode;
|
||||
}
|
||||
|
||||
export const createDocumentViewerHeaderActions = ({
|
||||
const createDocumentViewerHeaderActions = ({
|
||||
document,
|
||||
actionState,
|
||||
onZoom,
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { DownloadIcon } from '../ui/icons';
|
||||
import { AUDIO_EXTENSIONS, VIDEO_EXTENSIONS } from '../constants/preview';
|
||||
|
||||
export interface MediaViewerProps {
|
||||
interface MediaViewerProps {
|
||||
src: string;
|
||||
mimeType?: string;
|
||||
filename?: string;
|
||||
|
||||
@@ -5,8 +5,6 @@ import {
|
||||
PORTRAIT_RATIO_STYLE_ID,
|
||||
} from '../constants/preview';
|
||||
|
||||
export { DOCUMENT_VIEWER_PORTRAIT_HEIGHT_RATIO };
|
||||
|
||||
const ensurePortraitRatioStyle = () => {
|
||||
const cssValue = String(DOCUMENT_VIEWER_PORTRAIT_HEIGHT_RATIO);
|
||||
const cssText = `:root { --document-viewer-portrait-height-ratio: ${cssValue}; }`;
|
||||
@@ -78,5 +76,3 @@ export const useViewerLayoutMode = (
|
||||
|
||||
return isStacked;
|
||||
};
|
||||
|
||||
export default useViewerLayoutMode;
|
||||
|
||||
Reference in New Issue
Block a user