@tulip-systems/drive 0.8.1 → 0.8.3
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/client.d.mts +5 -0
- package/dist/client.mjs +6 -0
- package/dist/components/content.d.mts +13 -0
- package/dist/components/content.mjs +17 -0
- package/dist/components/context.client.d.mts +13 -0
- package/dist/components/dnd.client.d.mts +16 -0
- package/dist/components/dnd.client.mjs +29 -0
- package/dist/components/grid-card.client.d.mts +46 -0
- package/dist/components/grid-card.client.mjs +173 -0
- package/dist/components/grid.client.d.mts +53 -0
- package/dist/components/grid.client.mjs +53 -0
- package/dist/components/navigation/breadcrumbs.client.d.mts +25 -0
- package/dist/components/navigation/breadcrumbs.client.mjs +51 -0
- package/dist/components/navigation/header.client.d.mts +27 -0
- package/dist/components/navigation/header.client.mjs +40 -0
- package/dist/components/navigation/toolbar.client.d.mts +23 -0
- package/dist/components/navigation/toolbar.client.mjs +34 -0
- package/dist/components/navigation/view-switcher.client.d.mts +9 -0
- package/dist/components/navigation/view-switcher.client.mjs +35 -0
- package/dist/components/selection.client.d.mts +27 -0
- package/dist/components/selection.client.mjs +36 -0
- package/dist/components/view.client.d.mts +25 -0
- package/dist/components/view.client.mjs +43 -0
- package/dist/config/filters.mjs +14 -0
- package/dist/config/types.mjs +60 -0
- package/dist/google/client.d.mts +8 -0
- package/dist/google/client.mjs +9 -0
- package/dist/google/server.d.mts +3 -0
- package/dist/google/server.mjs +4 -0
- package/dist/google.d.mts +6 -0
- package/dist/google.mjs +7 -0
- package/dist/index.d.mts +7 -0
- package/dist/index.mjs +7 -0
- package/dist/lib/constants.d.mts +11 -0
- package/dist/lib/constants.mjs +20 -0
- package/dist/lib/contracts.d.mts +100 -0
- package/dist/lib/dto.d.mts +117 -0
- package/dist/lib/dto.mjs +57 -0
- package/dist/lib/helpers.d.mts +17 -0
- package/dist/lib/helpers.mjs +36 -0
- package/dist/lib/helpers.server.d.mts +13 -0
- package/dist/lib/helpers.server.mjs +15 -0
- package/dist/lib/search-params.d.mts +8 -0
- package/dist/lib/search-params.mjs +7 -0
- package/dist/lib/validators.d.mts +157 -0
- package/dist/lib/validators.mjs +65 -0
- package/dist/local/client.d.mts +13 -0
- package/dist/local/client.mjs +13 -0
- package/dist/local/server.d.mts +4 -0
- package/dist/local/server.mjs +5 -0
- package/dist/local.d.mts +8 -0
- package/dist/local.mjs +9 -0
- package/dist/providers/google/components/command-file-update.d.mts +21 -0
- package/dist/providers/google/components/command-file-update.mjs +51 -0
- package/dist/providers/google/components/command-folder-create.d.mts +21 -0
- package/dist/providers/google/components/command-folder-create.mjs +58 -0
- package/dist/providers/google/components/command-folder-update.d.mts +21 -0
- package/dist/providers/google/components/command-folder-update.mjs +51 -0
- package/dist/providers/google/components/content.client.d.mts +9 -0
- package/dist/providers/google/components/content.client.mjs +10 -0
- package/dist/providers/google/components/navigation.client.d.mts +15 -0
- package/dist/providers/google/components/navigation.client.mjs +17 -0
- package/dist/providers/google/components/provider.client.d.mts +32 -0
- package/dist/providers/google/components/provider.client.mjs +42 -0
- package/dist/providers/google/components/view.client.d.mts +40 -0
- package/dist/providers/google/components/view.client.mjs +96 -0
- package/dist/providers/google/config/columns-data.d.mts +7 -0
- package/dist/providers/google/config/columns-data.mjs +69 -0
- package/dist/providers/google/config/filters.d.mts +15 -0
- package/dist/providers/google/config/filters.mjs +7 -0
- package/dist/providers/google/lib/constants.mjs +12 -0
- package/dist/providers/google/lib/dto.d.mts +38 -0
- package/dist/providers/google/lib/dto.mjs +65 -0
- package/dist/providers/google/lib/helpers.mjs +38 -0
- package/dist/providers/google/lib/router.server.d.mts +611 -0
- package/dist/providers/google/lib/router.server.mjs +39 -0
- package/dist/providers/google/lib/search-params.d.mts +14 -0
- package/dist/providers/google/lib/search-params.mjs +11 -0
- package/dist/providers/google/lib/service.server.d.mts +185 -0
- package/dist/providers/google/lib/service.server.mjs +610 -0
- package/dist/providers/google/lib/validators.d.mts +302 -0
- package/dist/providers/google/lib/validators.mjs +58 -0
- package/dist/providers/local/components/command-file-update.d.mts +17 -0
- package/dist/providers/local/components/command-file-update.mjs +47 -0
- package/dist/providers/local/components/command-file-upload.d.mts +10 -0
- package/dist/providers/local/components/command-file-upload.mjs +34 -0
- package/dist/providers/local/components/command-folder-create.d.mts +17 -0
- package/dist/providers/local/components/command-folder-create.mjs +54 -0
- package/dist/providers/local/components/command-folder-update.d.mts +17 -0
- package/dist/providers/local/components/command-folder-update.mjs +47 -0
- package/dist/providers/local/components/content.client.d.mts +6 -0
- package/dist/providers/local/components/content.client.mjs +7 -0
- package/dist/providers/local/components/navigation.client.d.mts +15 -0
- package/dist/providers/local/components/navigation.client.mjs +17 -0
- package/dist/providers/local/components/provider.client.d.mts +39 -0
- package/dist/providers/local/components/provider.client.mjs +60 -0
- package/dist/providers/local/components/upload-zone-context.client.d.mts +37 -0
- package/dist/providers/local/components/upload-zone-context.client.mjs +22 -0
- package/dist/providers/local/components/upload-zone.client.d.mts +29 -0
- package/dist/providers/local/components/upload-zone.client.mjs +146 -0
- package/dist/providers/local/components/view.client.d.mts +31 -0
- package/dist/providers/local/components/view.client.mjs +90 -0
- package/dist/providers/local/config/columns-data.d.mts +7 -0
- package/dist/providers/local/config/columns-data.mjs +69 -0
- package/dist/providers/local/config/filters.d.mts +25 -0
- package/dist/providers/local/config/filters.mjs +14 -0
- package/dist/providers/local/lib/constants.d.mts +11 -0
- package/dist/providers/local/lib/constants.mjs +28 -0
- package/dist/providers/local/lib/helpers.d.mts +44 -0
- package/dist/providers/local/lib/helpers.mjs +109 -0
- package/dist/providers/local/lib/route-handler.server.d.mts +33 -0
- package/dist/providers/local/lib/route-handler.server.mjs +113 -0
- package/dist/providers/local/lib/router.server.d.mts +41647 -0
- package/dist/providers/local/lib/router.server.mjs +51 -0
- package/dist/providers/local/lib/schema.d.mts +1112 -0
- package/dist/providers/local/lib/schema.mjs +70 -0
- package/dist/providers/local/lib/search-params.d.mts +13 -0
- package/dist/providers/local/lib/search-params.mjs +8 -0
- package/dist/providers/local/lib/service.server.d.mts +488 -0
- package/dist/providers/local/lib/service.server.mjs +667 -0
- package/dist/providers/local/lib/upload.client.d.mts +61 -0
- package/dist/providers/local/lib/upload.client.mjs +99 -0
- package/dist/providers/local/lib/validators.d.mts +453 -0
- package/dist/providers/local/lib/validators.mjs +95 -0
- package/dist/server.d.mts +2 -0
- package/dist/server.mjs +3 -0
- package/package.json +45 -46
- package/src/components/grid-card.client.tsx +17 -12
- package/src/components/selection.client.tsx +1 -2
- package/src/config/types.tsx +1 -1
- package/src/providers/google/components/command-file-update.tsx +2 -2
- package/src/providers/google/components/command-folder-create.tsx +2 -2
- package/src/providers/google/components/command-folder-update.tsx +2 -2
- package/src/providers/google/components/view.client.tsx +1 -7
- package/src/providers/google/lib/helpers.ts +0 -9
- package/src/providers/google/lib/service.server.ts +1 -3
- package/src/providers/local/components/command-file-update.tsx +2 -2
- package/src/providers/local/components/command-folder-create.tsx +2 -2
- package/src/providers/local/components/command-folder-update.tsx +2 -2
- package/src/providers/local/components/upload-zone.client.tsx +1 -1
- package/src/providers/local/lib/helpers.ts +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DriveGrid, DriveGridBottombar, DriveGridEmpty, DriveGridEmptyProps, DriveGridLoading, DriveGridLoadingProps, DriveGridProps } from "./components/grid.client.mjs";
|
|
2
|
+
import { DriveGridCard, DriveGridCardSkeleton, DriveGridFileCard, DriveGridFolderCard } from "./components/grid-card.client.mjs";
|
|
3
|
+
import { DriveSelectionContextValue, DriveSelectionProvider, useDriveSelectionContext } from "./components/selection.client.mjs";
|
|
4
|
+
import { DriveViewContextValue, DriveViewMode, DriveViewProvider, DriveViewProviderProps, useDriveViewContext } from "./components/view.client.mjs";
|
|
5
|
+
export { DriveGrid, DriveGridBottombar, DriveGridCard, DriveGridCardSkeleton, DriveGridEmpty, DriveGridEmptyProps, DriveGridFileCard, DriveGridFolderCard, DriveGridLoading, DriveGridLoadingProps, DriveGridProps, DriveSelectionContextValue, DriveSelectionProvider, DriveViewContextValue, DriveViewMode, DriveViewProvider, DriveViewProviderProps, useDriveSelectionContext, useDriveViewContext };
|
package/dist/client.mjs
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DriveSelectionProvider, useDriveSelectionContext } from "./components/selection.client.mjs";
|
|
2
|
+
import { DriveGridCard, DriveGridCardSkeleton, DriveGridFileCard, DriveGridFolderCard } from "./components/grid-card.client.mjs";
|
|
3
|
+
import { DriveGrid, DriveGridBottombar, DriveGridEmpty, DriveGridLoading } from "./components/grid.client.mjs";
|
|
4
|
+
import { DriveViewProvider, useDriveViewContext } from "./components/view.client.mjs";
|
|
5
|
+
|
|
6
|
+
export { DriveGrid, DriveGridBottombar, DriveGridCard, DriveGridCardSkeleton, DriveGridEmpty, DriveGridFileCard, DriveGridFolderCard, DriveGridLoading, DriveSelectionProvider, DriveViewProvider, useDriveSelectionContext, useDriveViewContext };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/content.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Drive Content
|
|
7
|
+
*/
|
|
8
|
+
declare function DriveContent({
|
|
9
|
+
className,
|
|
10
|
+
...props
|
|
11
|
+
}: ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { DriveContent };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { cn } from "@tulip-systems/core/lib";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/content.tsx
|
|
5
|
+
/**
|
|
6
|
+
* Drive Content
|
|
7
|
+
*/
|
|
8
|
+
function DriveContent({ className, ...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsx("div", {
|
|
10
|
+
...props,
|
|
11
|
+
className: cn("space-y-6", className),
|
|
12
|
+
children: props.children
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { DriveContent };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Permission } from "@tulip-systems/core/auth";
|
|
2
|
+
|
|
3
|
+
//#region src/components/context.client.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* DriveContext
|
|
6
|
+
*/
|
|
7
|
+
type DriveContextValue = {
|
|
8
|
+
namespace: string;
|
|
9
|
+
permission?: Permission;
|
|
10
|
+
meta?: object;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { DriveContextValue };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/dnd.client.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* DriveViewProvider
|
|
7
|
+
*/
|
|
8
|
+
type DriveDragDropProviderProps = PropsWithChildren<{
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
onMove?: (input: {
|
|
11
|
+
id: string;
|
|
12
|
+
parentId: string | null;
|
|
13
|
+
}) => void;
|
|
14
|
+
}>;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { DriveDragDropProviderProps };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { DragDropProvider } from "@dnd-kit/react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { PointerActivationConstraints, PointerSensor } from "@dnd-kit/dom";
|
|
6
|
+
|
|
7
|
+
//#region src/components/dnd.client.tsx
|
|
8
|
+
function DriveDragDropProvider(props) {
|
|
9
|
+
return /* @__PURE__ */ jsx(DragDropProvider, {
|
|
10
|
+
sensors: (defaults) => [...defaults, PointerSensor.configure({ activationConstraints: [new PointerActivationConstraints.Distance({ value: 35 })] })],
|
|
11
|
+
onDragEnd: (event) => {
|
|
12
|
+
if (props.disabled) return;
|
|
13
|
+
const { operation, canceled } = event;
|
|
14
|
+
const { source, target } = operation;
|
|
15
|
+
if (!source || !target || canceled) return;
|
|
16
|
+
const id = source.id.toString();
|
|
17
|
+
const parentId = target.id.toString() === "drive" ? null : target.id.toString();
|
|
18
|
+
if (id === parentId) return;
|
|
19
|
+
props.onMove?.({
|
|
20
|
+
id,
|
|
21
|
+
parentId
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
children: props.children
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
export { DriveDragDropProvider };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { DriveNode } from "../lib/dto.mjs";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
import { ImageLoaderProps } from "next/image";
|
|
4
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
import { CommandDef } from "@tulip-systems/core/commands";
|
|
6
|
+
|
|
7
|
+
//#region src/components/grid-card.client.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Drive Grid Card
|
|
10
|
+
*/
|
|
11
|
+
type DriveGridCardProps<TData extends DriveNode> = ComponentProps<"div"> & {
|
|
12
|
+
node: TData;
|
|
13
|
+
commands?: CommandDef<TData>[];
|
|
14
|
+
imageLoader?: (props: ImageLoaderProps) => string;
|
|
15
|
+
unoptimized?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare function DriveGridCard<TData extends DriveNode>(props: DriveGridCardProps<TData>): react_jsx_runtime0.JSX.Element | null;
|
|
18
|
+
/**
|
|
19
|
+
* Folder card
|
|
20
|
+
*/
|
|
21
|
+
declare function DriveGridFolderCard<TData extends DriveNode>({
|
|
22
|
+
node,
|
|
23
|
+
commands,
|
|
24
|
+
onDoubleClick,
|
|
25
|
+
imageLoader,
|
|
26
|
+
unoptimized,
|
|
27
|
+
className,
|
|
28
|
+
...props
|
|
29
|
+
}: DriveGridCardProps<TData>): react_jsx_runtime0.JSX.Element | null;
|
|
30
|
+
/**
|
|
31
|
+
* File card
|
|
32
|
+
*/
|
|
33
|
+
declare function DriveGridFileCard<TData extends DriveNode>({
|
|
34
|
+
node,
|
|
35
|
+
commands,
|
|
36
|
+
imageLoader,
|
|
37
|
+
unoptimized,
|
|
38
|
+
className,
|
|
39
|
+
...props
|
|
40
|
+
}: DriveGridCardProps<TData>): react_jsx_runtime0.JSX.Element | null;
|
|
41
|
+
/**
|
|
42
|
+
* Card Skeleton
|
|
43
|
+
*/
|
|
44
|
+
declare function DriveGridCardSkeleton(): react_jsx_runtime0.JSX.Element;
|
|
45
|
+
//#endregion
|
|
46
|
+
export { DriveGridCard, DriveGridCardSkeleton, DriveGridFileCard, DriveGridFolderCard };
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { nodeSubtypeConfig, nodeSubtypeVariants } from "../config/types.mjs";
|
|
4
|
+
import { useDriveSelectionContext } from "./selection.client.mjs";
|
|
5
|
+
import { Card, CardContent, CardHeader, CardTitle, Skeleton, findStatus } from "@tulip-systems/core/components";
|
|
6
|
+
import { createElement } from "react";
|
|
7
|
+
import { useDraggable, useDroppable } from "@dnd-kit/react";
|
|
8
|
+
import { ContextCommandMenu, ContextCommandMenuContent, ContextCommandMenuTrigger, DropdownCommandMenu } from "@tulip-systems/core/commands/client";
|
|
9
|
+
import { FolderIcon } from "lucide-react";
|
|
10
|
+
import Image from "next/image";
|
|
11
|
+
import { useRouter } from "next/navigation";
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
|
|
14
|
+
//#region src/components/grid-card.client.tsx
|
|
15
|
+
function DriveGridCard(props) {
|
|
16
|
+
if (props.node.availability === "pending") return /* @__PURE__ */ jsx(DriveGridCardSkeleton, { ...props });
|
|
17
|
+
if (props.node.type === "folder") return /* @__PURE__ */ jsx(DriveGridFolderCard, { ...props });
|
|
18
|
+
if (props.node.type === "file") return /* @__PURE__ */ jsx(DriveGridFileCard, { ...props });
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Folder card
|
|
23
|
+
*/
|
|
24
|
+
function DriveGridFolderCard({ node, commands, onDoubleClick, imageLoader, unoptimized, className, ...props }) {
|
|
25
|
+
const { id } = node;
|
|
26
|
+
const router = useRouter();
|
|
27
|
+
const selectionContext = useDriveSelectionContext();
|
|
28
|
+
const droppable = useDroppable({ id: node.id });
|
|
29
|
+
const draggable = useDraggable({ id: node.id });
|
|
30
|
+
if (node.hidden) return null;
|
|
31
|
+
return /* @__PURE__ */ jsxs(ContextCommandMenu, { children: [/* @__PURE__ */ jsx(ContextCommandMenuTrigger, {
|
|
32
|
+
asChild: true,
|
|
33
|
+
children: /* @__PURE__ */ createElement(Card, {
|
|
34
|
+
...props,
|
|
35
|
+
key: id,
|
|
36
|
+
ref: draggable.ref,
|
|
37
|
+
"data-selected": selectionContext?.selection?.rowSelection?.[id],
|
|
38
|
+
"data-dragging": draggable.isDragging,
|
|
39
|
+
className: "group @container relative flex max-h-48 max-w-full cursor-pointer flex-col items-center gap-2 overflow-hidden bg-transparent p-2 hover:bg-muted/70 active:bg-muted data-[selected=true]:bg-primary/30 data-[dragging=true]:opacity-50",
|
|
40
|
+
onClick: () => {
|
|
41
|
+
const conditions = selectionContext?.selectionConditions?.(node);
|
|
42
|
+
if (conditions !== void 0) {
|
|
43
|
+
if (!(Array.isArray(conditions) ? conditions.some((condition) => condition) : conditions)) return;
|
|
44
|
+
}
|
|
45
|
+
if (!selectionContext?.selection?.rowSelection?.[id]) selectionContext?.selection?.setRowSelection?.((old) => ({
|
|
46
|
+
...old,
|
|
47
|
+
[id]: true
|
|
48
|
+
}));
|
|
49
|
+
else selectionContext?.selection?.setRowSelection?.((old) => {
|
|
50
|
+
const newSelection = { ...old };
|
|
51
|
+
delete newSelection[id];
|
|
52
|
+
return newSelection;
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
onDoubleClick: () => router.push(`?parentId=${id}`)
|
|
56
|
+
}, /* @__PURE__ */ jsx("div", {
|
|
57
|
+
ref: droppable.ref,
|
|
58
|
+
"data-over": droppable.isDropTarget && !draggable.isDragging,
|
|
59
|
+
className: "absolute inset-0 -z-10 data-[over=true]:bg-primary/35"
|
|
60
|
+
}), /* @__PURE__ */ jsxs(CardHeader, {
|
|
61
|
+
className: "flex w-full flex-row items-center justify-between gap-2.5 p-0 px-1.5",
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ jsx(FolderIcon, { className: "my-1.5 size-4 fill-foreground" }),
|
|
64
|
+
/* @__PURE__ */ jsx(CardTitle, {
|
|
65
|
+
className: "line-clamp-2 w-full break-all text-xs leading-[1.2]",
|
|
66
|
+
title: node.name,
|
|
67
|
+
children: node.name
|
|
68
|
+
}),
|
|
69
|
+
commands && /* @__PURE__ */ jsx(DropdownCommandMenu, {
|
|
70
|
+
data: node,
|
|
71
|
+
commands
|
|
72
|
+
})
|
|
73
|
+
]
|
|
74
|
+
}), /* @__PURE__ */ jsx(CardContent, {
|
|
75
|
+
className: "h-48 w-full overflow-hidden rounded-lg bg-background p-0 group-hover:bg-background",
|
|
76
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
77
|
+
className: "flex h-full w-full items-center justify-center",
|
|
78
|
+
children: /* @__PURE__ */ jsx(FolderIcon, { className: "size-12 fill-foreground" })
|
|
79
|
+
})
|
|
80
|
+
}))
|
|
81
|
+
}), commands && /* @__PURE__ */ jsx(ContextCommandMenuContent, {
|
|
82
|
+
data: node,
|
|
83
|
+
commands
|
|
84
|
+
})] });
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* File card
|
|
88
|
+
*/
|
|
89
|
+
function DriveGridFileCard({ node, commands, imageLoader, unoptimized = false, className, ...props }) {
|
|
90
|
+
const { id } = node;
|
|
91
|
+
const { ref, isDragging } = useDraggable({ id });
|
|
92
|
+
const selectionContext = useDriveSelectionContext();
|
|
93
|
+
const Icon = findStatus(nodeSubtypeConfig, node.subtype)?.icon;
|
|
94
|
+
const fileUrl = node.links.view ?? node.links.download;
|
|
95
|
+
const imageUrl = node.links.thumbnail ?? node.links.preview;
|
|
96
|
+
if (node.hidden) return null;
|
|
97
|
+
return /* @__PURE__ */ jsxs(ContextCommandMenu, { children: [/* @__PURE__ */ jsx(ContextCommandMenuTrigger, {
|
|
98
|
+
asChild: true,
|
|
99
|
+
children: /* @__PURE__ */ createElement(Card, {
|
|
100
|
+
...props,
|
|
101
|
+
key: id,
|
|
102
|
+
ref,
|
|
103
|
+
"data-selected": selectionContext?.selection?.rowSelection?.[id],
|
|
104
|
+
"data-dragging": isDragging,
|
|
105
|
+
className: "@container flex max-h-48 max-w-full cursor-pointer flex-col items-center gap-2 overflow-hidden p-2 hover:bg-muted/70 active:bg-muted data-[selected=true]:bg-primary/30 data-[dragging=true]:opacity-50",
|
|
106
|
+
onClick: () => {
|
|
107
|
+
const conditions = selectionContext?.selectionConditions?.(node);
|
|
108
|
+
if (conditions !== void 0) {
|
|
109
|
+
if (!(Array.isArray(conditions) ? conditions.some((condition) => condition) : conditions)) return;
|
|
110
|
+
}
|
|
111
|
+
if (!selectionContext?.selection?.rowSelection?.[id]) selectionContext?.selection?.setRowSelection?.((old) => ({
|
|
112
|
+
...old,
|
|
113
|
+
[id]: true
|
|
114
|
+
}));
|
|
115
|
+
else selectionContext?.selection?.setRowSelection?.((old) => {
|
|
116
|
+
const newSelection = { ...old };
|
|
117
|
+
delete newSelection[id];
|
|
118
|
+
return newSelection;
|
|
119
|
+
});
|
|
120
|
+
},
|
|
121
|
+
onDoubleClick: () => window.open(fileUrl ?? "", "_blank", "noopener,noreferrer")
|
|
122
|
+
}, /* @__PURE__ */ jsxs(CardHeader, {
|
|
123
|
+
className: "flex w-full flex-row items-center justify-between gap-2 p-0 px-1.5",
|
|
124
|
+
children: [
|
|
125
|
+
Icon && /* @__PURE__ */ jsx(Icon, { className: nodeSubtypeVariants({
|
|
126
|
+
status: node.subtype,
|
|
127
|
+
className: "my-1.5 size-4"
|
|
128
|
+
}) }),
|
|
129
|
+
/* @__PURE__ */ jsx(CardTitle, {
|
|
130
|
+
className: "line-clamp-2 w-full break-all text-xs leading-[1.2]",
|
|
131
|
+
title: node.name,
|
|
132
|
+
children: node.name
|
|
133
|
+
}),
|
|
134
|
+
commands && /* @__PURE__ */ jsx(DropdownCommandMenu, {
|
|
135
|
+
data: node,
|
|
136
|
+
commands
|
|
137
|
+
})
|
|
138
|
+
]
|
|
139
|
+
}), /* @__PURE__ */ jsx(CardContent, {
|
|
140
|
+
className: "h-48 w-full overflow-hidden rounded-lg bg-background p-0",
|
|
141
|
+
children: node.subtype === "image" ? /* @__PURE__ */ jsx(Image, {
|
|
142
|
+
src: imageUrl ?? fileUrl ?? "",
|
|
143
|
+
alt: node.name,
|
|
144
|
+
width: 200,
|
|
145
|
+
height: 200,
|
|
146
|
+
loader: imageLoader,
|
|
147
|
+
className: "h-full w-full object-cover",
|
|
148
|
+
unoptimized
|
|
149
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
150
|
+
className: "flex h-full w-full items-center justify-center",
|
|
151
|
+
children: Icon && /* @__PURE__ */ jsx(Icon, { className: nodeSubtypeVariants({
|
|
152
|
+
status: node.subtype,
|
|
153
|
+
className: "size-12"
|
|
154
|
+
}) })
|
|
155
|
+
})
|
|
156
|
+
}))
|
|
157
|
+
}), commands && /* @__PURE__ */ jsx(ContextCommandMenuContent, {
|
|
158
|
+
data: node,
|
|
159
|
+
commands
|
|
160
|
+
})] });
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Card Skeleton
|
|
164
|
+
*/
|
|
165
|
+
function DriveGridCardSkeleton() {
|
|
166
|
+
return /* @__PURE__ */ jsxs(Card, {
|
|
167
|
+
className: "flex max-h-52 cursor-pointer flex-col items-center gap-3 overflow-hidden bg-muted/70 p-3",
|
|
168
|
+
children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-7" }), /* @__PURE__ */ jsx(CardContent, { className: "h-52 w-full overflow-hidden rounded-lg bg-background p-0" })]
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
//#endregion
|
|
173
|
+
export { DriveGridCard, DriveGridCardSkeleton, DriveGridFileCard, DriveGridFolderCard };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/grid.client.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Layout primitive for drive grid content.
|
|
7
|
+
*/
|
|
8
|
+
type DriveGridProps = ComponentProps<"div">;
|
|
9
|
+
declare function DriveGrid({
|
|
10
|
+
className,
|
|
11
|
+
...props
|
|
12
|
+
}: DriveGridProps): react_jsx_runtime0.JSX.Element;
|
|
13
|
+
/**
|
|
14
|
+
* Empty state that spans the full grid.
|
|
15
|
+
*/
|
|
16
|
+
type DriveGridEmptyProps = ComponentProps<"div"> & {
|
|
17
|
+
title?: ReactNode;
|
|
18
|
+
description?: ReactNode;
|
|
19
|
+
};
|
|
20
|
+
declare function DriveGridEmpty({
|
|
21
|
+
title,
|
|
22
|
+
description,
|
|
23
|
+
className,
|
|
24
|
+
children,
|
|
25
|
+
...props
|
|
26
|
+
}: DriveGridEmptyProps): react_jsx_runtime0.JSX.Element;
|
|
27
|
+
/**
|
|
28
|
+
* Skeleton grid for page-level loading states.
|
|
29
|
+
*/
|
|
30
|
+
type DriveGridLoadingProps = ComponentProps<"div">;
|
|
31
|
+
declare function DriveGridLoading({
|
|
32
|
+
className,
|
|
33
|
+
...props
|
|
34
|
+
}: DriveGridLoadingProps): react_jsx_runtime0.JSX.Element;
|
|
35
|
+
/**
|
|
36
|
+
* Infinite table bottombar
|
|
37
|
+
*/
|
|
38
|
+
type DriveGridBottombarProps = ComponentProps<"div"> & {
|
|
39
|
+
hasNextPage: boolean;
|
|
40
|
+
fetchNextPage: () => void;
|
|
41
|
+
isFetching: boolean;
|
|
42
|
+
isFetchingNextPage: boolean;
|
|
43
|
+
};
|
|
44
|
+
declare function DriveGridBottombar({
|
|
45
|
+
hasNextPage,
|
|
46
|
+
fetchNextPage,
|
|
47
|
+
isFetching,
|
|
48
|
+
isFetchingNextPage,
|
|
49
|
+
className,
|
|
50
|
+
...props
|
|
51
|
+
}: DriveGridBottombarProps): react_jsx_runtime0.JSX.Element;
|
|
52
|
+
//#endregion
|
|
53
|
+
export { DriveGrid, DriveGridBottombar, DriveGridEmpty, DriveGridEmptyProps, DriveGridLoading, DriveGridLoadingProps, DriveGridProps };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { DriveGridCardSkeleton } from "./grid-card.client.mjs";
|
|
4
|
+
import { EmptyDescription, EmptyPage, EmptyPageTitle } from "@tulip-systems/core/components";
|
|
5
|
+
import { cn } from "@tulip-systems/core/lib";
|
|
6
|
+
import { useInView } from "motion/react";
|
|
7
|
+
import { useEffect, useRef } from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
|
|
10
|
+
//#region src/components/grid.client.tsx
|
|
11
|
+
function DriveGrid({ className, ...props }) {
|
|
12
|
+
return /* @__PURE__ */ jsx("div", {
|
|
13
|
+
...props,
|
|
14
|
+
className: cn("grid grid-cols-1 gap-5 md:grid-cols-[repeat(auto-fill,minmax(13rem,1fr))]", className)
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function DriveGridEmpty({ title, description, className, children, ...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsxs(EmptyPage, {
|
|
19
|
+
...props,
|
|
20
|
+
className: cn("col-span-full min-h-[80dvh]", className),
|
|
21
|
+
children: [/* @__PURE__ */ jsx(EmptyPageTitle, { children: title }), description && /* @__PURE__ */ jsx(EmptyDescription, { children: description })]
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function DriveGridLoading({ className, ...props }) {
|
|
25
|
+
return /* @__PURE__ */ jsx(DriveGrid, {
|
|
26
|
+
...props,
|
|
27
|
+
children: Array.from({ length: 12 }).map((_, index) => /* @__PURE__ */ jsx(DriveGridCardSkeleton, {}, index))
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function DriveGridBottombar({ hasNextPage, fetchNextPage, isFetching, isFetchingNextPage, className, ...props }) {
|
|
31
|
+
const scrollRef = useRef(null);
|
|
32
|
+
const isInView = useInView(scrollRef);
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
if (isInView && hasNextPage && !isFetching && !isFetchingNextPage) fetchNextPage();
|
|
35
|
+
}, [
|
|
36
|
+
isInView,
|
|
37
|
+
fetchNextPage,
|
|
38
|
+
hasNextPage,
|
|
39
|
+
isFetching,
|
|
40
|
+
isFetchingNextPage
|
|
41
|
+
]);
|
|
42
|
+
return /* @__PURE__ */ jsx("div", {
|
|
43
|
+
...props,
|
|
44
|
+
className: cn("relative col-span-full", className),
|
|
45
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
46
|
+
ref: scrollRef,
|
|
47
|
+
className: "absolute bottom-0 -z-50 min-h-[500px] bg-primary"
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
export { DriveGrid, DriveGridBottombar, DriveGridEmpty, DriveGridLoading };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/components/navigation/breadcrumbs.client.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Drive Header Breadcrumbs
|
|
6
|
+
*/
|
|
7
|
+
type DriveNodeBreadcrumb = {
|
|
8
|
+
node: true;
|
|
9
|
+
label: string;
|
|
10
|
+
parentId: string | null;
|
|
11
|
+
};
|
|
12
|
+
type DriveHrefBreadcrumb = {
|
|
13
|
+
node?: false;
|
|
14
|
+
label: string;
|
|
15
|
+
href: string;
|
|
16
|
+
};
|
|
17
|
+
type DriveBreadcrumb = DriveNodeBreadcrumb | DriveHrefBreadcrumb;
|
|
18
|
+
type DriveBreadCrumbsProps = {
|
|
19
|
+
breadcrumbs?: DriveBreadcrumb[];
|
|
20
|
+
};
|
|
21
|
+
declare function DriveBreadcrumbs({
|
|
22
|
+
breadcrumbs
|
|
23
|
+
}: DriveBreadCrumbsProps): react_jsx_runtime0.JSX.Element;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { DriveBreadCrumbsProps, DriveBreadcrumb, DriveBreadcrumbs };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { driveTreeSearchParams } from "../../lib/search-params.mjs";
|
|
4
|
+
import { BreadcrumbItem, BreadcrumbLink, BreadcrumbPage } from "@tulip-systems/core/components";
|
|
5
|
+
import { Fragment } from "react";
|
|
6
|
+
import { useDroppable } from "@dnd-kit/react";
|
|
7
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { HeaderBreadcrumbSeparator, HeaderBreadcrumbs, HeaderBreadcrumbsDesktopList, HeaderBreadcrumbsDropdownMenu, HeaderBreadcrumbsDropdownMenuItem, HeaderBreadcrumbsLink, HeaderBreadcrumbsMobileList } from "@tulip-systems/core/components/client";
|
|
9
|
+
import Link from "next/link";
|
|
10
|
+
import { createSerializer, useQueryStates } from "nuqs";
|
|
11
|
+
import { pointerIntersection } from "@dnd-kit/collision";
|
|
12
|
+
|
|
13
|
+
//#region src/components/navigation/breadcrumbs.client.tsx
|
|
14
|
+
function DriveBreadcrumbs({ breadcrumbs = [] }) {
|
|
15
|
+
return /* @__PURE__ */ jsxs(HeaderBreadcrumbs, { children: [/* @__PURE__ */ jsxs(HeaderBreadcrumbsMobileList, { children: [breadcrumbs.length > 1 && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(HeaderBreadcrumbsDropdownMenu, { children: breadcrumbs.slice(0, -1).map((breadcrumb, index) => /* @__PURE__ */ jsx(HeaderBreadcrumbsDropdownMenuItem, { breadcrumb }, index)) }), /* @__PURE__ */ jsx(HeaderBreadcrumbSeparator, {})] }), breadcrumbs.slice(-1).map((breadcrumb, index, array) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(HeaderBreadcrumbsLink, { breadcrumb }), index < array.length - 1 && /* @__PURE__ */ jsx(HeaderBreadcrumbSeparator, {})] }, index))] }), /* @__PURE__ */ jsxs(HeaderBreadcrumbsDesktopList, { children: [breadcrumbs.length > 2 && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(HeaderBreadcrumbsDropdownMenu, { children: breadcrumbs.slice(0, -2).map((breadcrumb, index) => /* @__PURE__ */ jsx(HeaderBreadcrumbsDropdownMenuItem, { breadcrumb }, index)) }), /* @__PURE__ */ jsx(HeaderBreadcrumbSeparator, {})] }), breadcrumbs.slice(-2).map((breadcrumb, index, array) => /* @__PURE__ */ jsxs(Fragment, { children: [breadcrumb.node ? /* @__PURE__ */ jsx(DriveHeaderBreadcrumbsLink, { breadcrumb }) : /* @__PURE__ */ jsx(HeaderBreadcrumbsLink, { breadcrumb }), index < array.length - 1 && /* @__PURE__ */ jsx(HeaderBreadcrumbSeparator, {})] }, index))] })] });
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Drive Header Breadcrumbs Link with DnD support
|
|
19
|
+
*/
|
|
20
|
+
function DriveHeaderBreadcrumbsLink(props) {
|
|
21
|
+
const id = props.breadcrumb.parentId ?? null;
|
|
22
|
+
const [query] = useQueryStates(driveTreeSearchParams);
|
|
23
|
+
const serialize = createSerializer(driveTreeSearchParams);
|
|
24
|
+
const { ref, isDropTarget } = useDroppable({
|
|
25
|
+
id: id ?? "drive",
|
|
26
|
+
collisionDetector: pointerIntersection
|
|
27
|
+
});
|
|
28
|
+
const href = serialize({
|
|
29
|
+
...query,
|
|
30
|
+
parentId: id
|
|
31
|
+
});
|
|
32
|
+
return /* @__PURE__ */ jsx(BreadcrumbItem, {
|
|
33
|
+
ref,
|
|
34
|
+
"data-over": isDropTarget && query.parentId !== id,
|
|
35
|
+
className: "data-[over=true]:bg-primary/35",
|
|
36
|
+
children: href !== void 0 && href !== null ? /* @__PURE__ */ jsx(BreadcrumbLink, {
|
|
37
|
+
asChild: true,
|
|
38
|
+
children: /* @__PURE__ */ jsx(Link, {
|
|
39
|
+
href: href || "?",
|
|
40
|
+
className: "truncate",
|
|
41
|
+
children: props.breadcrumb.label
|
|
42
|
+
})
|
|
43
|
+
}) : /* @__PURE__ */ jsx(BreadcrumbPage, {
|
|
44
|
+
className: "truncate",
|
|
45
|
+
children: props.breadcrumb.label
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
//#endregion
|
|
51
|
+
export { DriveBreadcrumbs };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DriveBreadCrumbsProps } from "./breadcrumbs.client.mjs";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/navigation/header.client.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Drive Header
|
|
8
|
+
*/
|
|
9
|
+
declare function DriveHeader({
|
|
10
|
+
children,
|
|
11
|
+
...props
|
|
12
|
+
}: ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
|
|
13
|
+
/**
|
|
14
|
+
* Drive Header Breadcrumbs
|
|
15
|
+
*/
|
|
16
|
+
declare function DriveHeaderBreadcrumbs({
|
|
17
|
+
breadcrumbs
|
|
18
|
+
}: DriveBreadCrumbsProps): react_jsx_runtime0.JSX.Element;
|
|
19
|
+
/**
|
|
20
|
+
* Drive Header Tools
|
|
21
|
+
*/
|
|
22
|
+
declare function DriveHeaderTools({
|
|
23
|
+
children,
|
|
24
|
+
...props
|
|
25
|
+
}: ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { DriveHeader, DriveHeaderBreadcrumbs, DriveHeaderTools };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { DriveBreadcrumbs } from "./breadcrumbs.client.mjs";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Header, HeaderTopbarBackButton, HeaderTopbarMobileNavSwitcher, Topbar, TopbarTools } from "@tulip-systems/core/components/client";
|
|
6
|
+
|
|
7
|
+
//#region src/components/navigation/header.client.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Drive Header
|
|
10
|
+
*/
|
|
11
|
+
function DriveHeader({ children, ...props }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(Header, {
|
|
13
|
+
...props,
|
|
14
|
+
children: /* @__PURE__ */ jsx(Topbar, { children })
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Drive Header Breadcrumbs
|
|
19
|
+
*/
|
|
20
|
+
function DriveHeaderBreadcrumbs({ breadcrumbs }) {
|
|
21
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
22
|
+
className: "flex h-full items-center gap-4",
|
|
23
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
24
|
+
className: "h-full",
|
|
25
|
+
children: [/* @__PURE__ */ jsx(HeaderTopbarBackButton, {}), /* @__PURE__ */ jsx(HeaderTopbarMobileNavSwitcher, {})]
|
|
26
|
+
}), /* @__PURE__ */ jsx(DriveBreadcrumbs, { breadcrumbs })]
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Drive Header Tools
|
|
31
|
+
*/
|
|
32
|
+
function DriveHeaderTools({ children, ...props }) {
|
|
33
|
+
return /* @__PURE__ */ jsx(TopbarTools, {
|
|
34
|
+
...props,
|
|
35
|
+
children
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
export { DriveHeader, DriveHeaderBreadcrumbs, DriveHeaderTools };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import "./breadcrumbs.client.mjs";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/navigation/toolbar.client.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Drive Page Topbar
|
|
8
|
+
*/
|
|
9
|
+
declare function DriveToolbar({
|
|
10
|
+
className,
|
|
11
|
+
children,
|
|
12
|
+
...props
|
|
13
|
+
}: ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* Drive Header Tools
|
|
16
|
+
*/
|
|
17
|
+
declare function DriveToolbarTools({
|
|
18
|
+
children,
|
|
19
|
+
className,
|
|
20
|
+
...props
|
|
21
|
+
}: ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { DriveToolbar, DriveToolbarTools };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { DriveBreadcrumbs } from "./breadcrumbs.client.mjs";
|
|
4
|
+
import { cn } from "@tulip-systems/core/lib";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/navigation/toolbar.client.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Drive Page Topbar
|
|
10
|
+
*/
|
|
11
|
+
function DriveToolbar({ className, children, ...props }) {
|
|
12
|
+
return /* @__PURE__ */ jsx("div", {
|
|
13
|
+
...props,
|
|
14
|
+
className: cn("flex items-center justify-between overflow-x-auto pt-3", className),
|
|
15
|
+
children
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Drive Toolbar Breadcrumbs
|
|
20
|
+
*/
|
|
21
|
+
const DriveToolbarBreadcrumbs = DriveBreadcrumbs;
|
|
22
|
+
/**
|
|
23
|
+
* Drive Header Tools
|
|
24
|
+
*/
|
|
25
|
+
function DriveToolbarTools({ children, className, ...props }) {
|
|
26
|
+
return /* @__PURE__ */ jsx("div", {
|
|
27
|
+
...props,
|
|
28
|
+
className: cn("flex h-full items-center justify-end gap-4", className),
|
|
29
|
+
children
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
export { DriveToolbar, DriveToolbarBreadcrumbs, DriveToolbarTools };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/components/navigation/view-switcher.client.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Drive view switcher
|
|
6
|
+
*/
|
|
7
|
+
declare function DriveViewSwitcher(): react_jsx_runtime0.JSX.Element;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { DriveViewSwitcher };
|