- Updated .env.example to include configuration for OnlyOffice Document Server. - Modified the workspace configuration to remove the drive-suite path. - Adjusted TypeScript environment imports for consistency. - Enhanced Next.js configuration to disable canvas in Webpack. - Updated package.json to include new dependencies for OnlyOffice and PDF.js. - Added global styles for OnlyOffice theme integration in the CSS. - Created new layout and page components for the Drive feature, including public sharing and editing functionalities. - Updated metadata handling across various layouts to reflect the new app structure.
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
"use client"
|
|
|
|
import { DriveCardRefProvider } from "@/components/drive/drive-card-ref-context"
|
|
import { useDriveMarqueeSelection } from "@/lib/hooks/use-drive-marquee-selection"
|
|
import { cn } from "@/lib/utils"
|
|
|
|
export function DriveMarqueeSurface({
|
|
enabled = true,
|
|
className,
|
|
children,
|
|
}: {
|
|
enabled?: boolean
|
|
className?: string
|
|
children: React.ReactNode
|
|
}) {
|
|
const { registerCardRef, onSurfacePointerDown, marquee } =
|
|
useDriveMarqueeSelection(enabled)
|
|
|
|
return (
|
|
<DriveCardRefProvider registerCardRef={registerCardRef}>
|
|
<div
|
|
data-drive-marquee-surface
|
|
className={cn("relative flex min-h-full flex-1 flex-col select-none", className)}
|
|
onPointerDown={onSurfacePointerDown}
|
|
>
|
|
{children}
|
|
{marquee ? (
|
|
<div
|
|
className="pointer-events-none fixed z-50 border border-[#1a73e8] bg-[#1a73e8]/10"
|
|
style={{
|
|
left: marquee.left,
|
|
top: marquee.top,
|
|
width: marquee.width,
|
|
height: marquee.height,
|
|
}}
|
|
/>
|
|
) : null}
|
|
</div>
|
|
</DriveCardRefProvider>
|
|
)
|
|
}
|