@tulip-systems/drive 0.9.0 → 0.10.0

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.
Files changed (29) hide show
  1. package/dist/client.d.mts +2 -1
  2. package/dist/client.mjs +2 -1
  3. package/dist/components/grid-card.client.d.mts +2 -2
  4. package/dist/lib/dto.d.mts +2 -2
  5. package/dist/lib/validators.d.mts +9 -9
  6. package/dist/lib/view-config.client.d.mts +57 -0
  7. package/dist/lib/view-config.client.mjs +46 -0
  8. package/dist/providers/google/components/view.client.d.mts +2 -2
  9. package/dist/providers/google/components/view.client.mjs +8 -8
  10. package/dist/providers/google/config/columns-data.mjs +1 -1
  11. package/dist/providers/google/config/filters.d.mts +1 -1
  12. package/dist/providers/google/lib/router.server.d.mts +20 -20
  13. package/dist/providers/google/lib/search-params.d.mts +1 -1
  14. package/dist/providers/google/lib/validators.d.mts +12 -12
  15. package/dist/providers/local/components/view.client.d.mts +2 -2
  16. package/dist/providers/local/components/view.client.mjs +8 -8
  17. package/dist/providers/local/config/columns-data.mjs +1 -1
  18. package/dist/providers/local/config/filters.d.mts +1 -1
  19. package/dist/providers/local/lib/router.server.d.mts +119 -119
  20. package/dist/providers/local/lib/schema.d.mts +2 -2
  21. package/dist/providers/local/lib/search-params.d.mts +1 -1
  22. package/dist/providers/local/lib/service.server.d.mts +20 -20
  23. package/dist/providers/local/lib/validators.d.mts +18 -18
  24. package/package.json +2 -2
  25. package/src/components/grid-card.client.tsx +2 -2
  26. package/src/entry.client.ts +5 -0
  27. package/src/lib/view-config.client.tsx +116 -0
  28. package/src/providers/google/components/view.client.tsx +15 -19
  29. package/src/providers/local/components/view.client.tsx +15 -15
package/dist/client.d.mts CHANGED
@@ -2,4 +2,5 @@ import { DriveGrid, DriveGridBottombar, DriveGridEmpty, DriveGridEmptyProps, Dri
2
2
  import { DriveGridCard, DriveGridCardSkeleton, DriveGridFileCard, DriveGridFolderCard } from "./components/grid-card.client.mjs";
3
3
  import { DriveSelectionContextValue, DriveSelectionProvider, useDriveSelectionContext } from "./components/selection.client.mjs";
4
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 };
5
+ import { CreateDriveViewConfigInput, DriveViewCommands, DriveViewConfig, DriveViewConfigProvider, createDriveViewConfig, useDriveViewConfig } from "./lib/view-config.client.mjs";
6
+ export { CreateDriveViewConfigInput, DriveGrid, DriveGridBottombar, DriveGridCard, DriveGridCardSkeleton, DriveGridEmpty, DriveGridEmptyProps, DriveGridFileCard, DriveGridFolderCard, DriveGridLoading, DriveGridLoadingProps, DriveGridProps, DriveSelectionContextValue, DriveSelectionProvider, DriveViewCommands, DriveViewConfig, DriveViewConfigProvider, DriveViewContextValue, DriveViewMode, DriveViewProvider, DriveViewProviderProps, createDriveViewConfig, useDriveSelectionContext, useDriveViewConfig, useDriveViewContext };
package/dist/client.mjs CHANGED
@@ -2,5 +2,6 @@ import { DriveSelectionProvider, useDriveSelectionContext } from "./components/s
2
2
  import { DriveGridCard, DriveGridCardSkeleton, DriveGridFileCard, DriveGridFolderCard } from "./components/grid-card.client.mjs";
3
3
  import { DriveGrid, DriveGridBottombar, DriveGridEmpty, DriveGridLoading } from "./components/grid.client.mjs";
4
4
  import { DriveViewProvider, useDriveViewContext } from "./components/view.client.mjs";
5
+ import { DriveViewConfigProvider, createDriveViewConfig, useDriveViewConfig } from "./lib/view-config.client.mjs";
5
6
 
6
- export { DriveGrid, DriveGridBottombar, DriveGridCard, DriveGridCardSkeleton, DriveGridEmpty, DriveGridFileCard, DriveGridFolderCard, DriveGridLoading, DriveSelectionProvider, DriveViewProvider, useDriveSelectionContext, useDriveViewContext };
7
+ export { DriveGrid, DriveGridBottombar, DriveGridCard, DriveGridCardSkeleton, DriveGridEmpty, DriveGridFileCard, DriveGridFolderCard, DriveGridLoading, DriveSelectionProvider, DriveViewConfigProvider, DriveViewProvider, createDriveViewConfig, useDriveSelectionContext, useDriveViewConfig, useDriveViewContext };
@@ -2,7 +2,7 @@ import { DriveNode } from "../lib/dto.mjs";
2
2
  import { ComponentProps } from "react";
3
3
  import { ImageLoaderProps } from "next/image";
4
4
  import * as react_jsx_runtime0 from "react/jsx-runtime";
5
- import { CommandDef } from "@tulip-systems/core/commands";
5
+ import { CommandFor } from "@tulip-systems/core/commands";
6
6
 
7
7
  //#region src/components/grid-card.client.d.ts
8
8
  /**
@@ -10,7 +10,7 @@ import { CommandDef } from "@tulip-systems/core/commands";
10
10
  */
11
11
  type DriveGridCardProps<TData extends DriveNode> = ComponentProps<"div"> & {
12
12
  node: TData;
13
- commands?: CommandDef[];
13
+ commands?: CommandFor<TData>[];
14
14
  imageLoader?: (props: ImageLoaderProps) => string;
15
15
  unoptimized?: boolean;
16
16
  };
@@ -13,8 +13,8 @@ type DriveNodeProvider = z.infer<typeof driveNodeProviderSchema>;
13
13
  * Drive node type
14
14
  */
15
15
  declare const driveNodeTypeSchema: z.ZodEnum<{
16
- folder: "folder";
17
16
  file: "file";
17
+ folder: "folder";
18
18
  }>;
19
19
  type DriveNodeType = z.infer<typeof driveNodeTypeSchema>;
20
20
  /**
@@ -63,8 +63,8 @@ declare const driveNodeSchema: z.ZodObject<{
63
63
  name: z.ZodString;
64
64
  namespace: z.ZodString;
65
65
  type: z.ZodEnum<{
66
- folder: "folder";
67
66
  file: "file";
67
+ folder: "folder";
68
68
  }>;
69
69
  subtype: z.ZodEnum<{
70
70
  image: "image";
@@ -51,8 +51,8 @@ type PresignDriveFileSchema = z.infer<typeof presignDriveFileInputSchema>;
51
51
  */
52
52
  declare const driveTableFiltersSchema: z.ZodPipe<z.ZodObject<{
53
53
  types: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
54
- folder: "folder";
55
54
  file: "file";
55
+ folder: "folder";
56
56
  }>>>>;
57
57
  contentTypes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
58
58
  nodeIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
@@ -63,13 +63,13 @@ declare const driveTableFiltersSchema: z.ZodPipe<z.ZodObject<{
63
63
  isArchived: boolean;
64
64
  namespace: string;
65
65
  parentId: string | null;
66
- types?: ("folder" | "file")[] | null | undefined;
66
+ types?: ("file" | "folder")[] | null | undefined;
67
67
  contentTypes?: string[] | null | undefined;
68
68
  nodeIds?: string[] | null | undefined;
69
69
  }, {
70
70
  namespace: string;
71
71
  parentId: string | null;
72
- types?: ("folder" | "file")[] | null | undefined;
72
+ types?: ("file" | "folder")[] | null | undefined;
73
73
  contentTypes?: string[] | null | undefined;
74
74
  nodeIds?: string[] | null | undefined;
75
75
  isArchived?: boolean | null | undefined;
@@ -89,8 +89,8 @@ declare const listDriveTreeInputSchema: z.ZodObject<{
89
89
  search: z.ZodOptional<z.ZodNullable<z.ZodString>>;
90
90
  filters: z.ZodPipe<z.ZodObject<{
91
91
  types: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
92
- folder: "folder";
93
92
  file: "file";
93
+ folder: "folder";
94
94
  }>>>>;
95
95
  contentTypes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
96
96
  nodeIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
@@ -101,13 +101,13 @@ declare const listDriveTreeInputSchema: z.ZodObject<{
101
101
  isArchived: boolean;
102
102
  namespace: string;
103
103
  parentId: string | null;
104
- types?: ("folder" | "file")[] | null | undefined;
104
+ types?: ("file" | "folder")[] | null | undefined;
105
105
  contentTypes?: string[] | null | undefined;
106
106
  nodeIds?: string[] | null | undefined;
107
107
  }, {
108
108
  namespace: string;
109
109
  parentId: string | null;
110
- types?: ("folder" | "file")[] | null | undefined;
110
+ types?: ("file" | "folder")[] | null | undefined;
111
111
  contentTypes?: string[] | null | undefined;
112
112
  nodeIds?: string[] | null | undefined;
113
113
  isArchived?: boolean | null | undefined;
@@ -127,8 +127,8 @@ declare const getNodesByParentIdInputSchema: z.ZodObject<{
127
127
  }>>>;
128
128
  filters: z.ZodPipe<z.ZodObject<{
129
129
  types: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
130
- folder: "folder";
131
130
  file: "file";
131
+ folder: "folder";
132
132
  }>>>>;
133
133
  contentTypes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
134
134
  nodeIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
@@ -139,13 +139,13 @@ declare const getNodesByParentIdInputSchema: z.ZodObject<{
139
139
  isArchived: boolean;
140
140
  namespace: string;
141
141
  parentId: string | null;
142
- types?: ("folder" | "file")[] | null | undefined;
142
+ types?: ("file" | "folder")[] | null | undefined;
143
143
  contentTypes?: string[] | null | undefined;
144
144
  nodeIds?: string[] | null | undefined;
145
145
  }, {
146
146
  namespace: string;
147
147
  parentId: string | null;
148
- types?: ("folder" | "file")[] | null | undefined;
148
+ types?: ("file" | "folder")[] | null | undefined;
149
149
  contentTypes?: string[] | null | undefined;
150
150
  nodeIds?: string[] | null | undefined;
151
151
  isArchived?: boolean | null | undefined;
@@ -0,0 +1,57 @@
1
+ import { Selection, TableColumnDef, TableFiltersResult, TableMetaInput } from "@tulip-systems/core/data-tables";
2
+ import { PropsWithChildren } from "react";
3
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+ import { TableConfigContextValue, useInfiniteStrategy } from "@tulip-systems/core/data-tables/client";
5
+ import { CommandFor } from "@tulip-systems/core/commands";
6
+ import { VisibilityState } from "@tanstack/react-table";
7
+
8
+ //#region src/lib/view-config.client.d.ts
9
+ /**
10
+ * DriveViewConfig context
11
+ */
12
+ type DriveViewCommands<TData, TMeta = object> = {
13
+ node?: CommandFor<TData, TMeta>[];
14
+ selectedNodes?: CommandFor<TData[], TMeta>[];
15
+ };
16
+ type DriveViewConfigContextValue<TData, TMeta = object> = {
17
+ commands?: DriveViewCommands<TData, TMeta>;
18
+ };
19
+ /**
20
+ * Drive View configuration
21
+ */
22
+ type DriveViewConfig<TData, TMeta extends TableMetaInput<TData> = TableMetaInput<TData>> = DriveViewConfigContextValue<TData, TMeta> & Omit<TableConfigContextValue<TData, TableFiltersResult, TMeta>, "commands">;
23
+ type CreateDriveViewConfigInput<TData, TMeta extends TableMetaInput<TData> = TableMetaInput<TData>> = {
24
+ queryData: TData[];
25
+ columns: TableColumnDef<TData>[];
26
+ strategy: ReturnType<typeof useInfiniteStrategy>;
27
+ commands?: DriveViewCommands<TData, TMeta>;
28
+ meta?: TMeta;
29
+ columnVisibility?: VisibilityState;
30
+ selection?: Selection;
31
+ getRowId?: (row: TData) => string;
32
+ };
33
+ declare function createDriveViewConfig<TData, TMeta extends TableMetaInput<TData> = TableMetaInput<TData>>({
34
+ queryData,
35
+ columns,
36
+ strategy,
37
+ commands,
38
+ meta,
39
+ columnVisibility,
40
+ selection,
41
+ getRowId
42
+ }: CreateDriveViewConfigInput<TData, TMeta>): DriveViewConfig<TData, TMeta>;
43
+ /**
44
+ * DriveViewConfigProvider component
45
+ * Wraps the children components with the DriveViewConfigContext provider
46
+ * and provides the configuration for the drive view
47
+ */
48
+ type DriveViewConfigProviderProps<TData, TMeta extends TableMetaInput<TData> = TableMetaInput<TData>> = PropsWithChildren<{
49
+ config: ReturnType<typeof createDriveViewConfig<TData, TMeta>>;
50
+ }>;
51
+ declare function DriveViewConfigProvider<TData, TMeta extends TableMetaInput<TData> = TableMetaInput<TData>>({
52
+ config,
53
+ children
54
+ }: DriveViewConfigProviderProps<TData, TMeta>): react_jsx_runtime0.JSX.Element;
55
+ declare function useDriveViewConfig<TData, TMeta extends TableMetaInput<TData> = TableMetaInput<TData>>(): DriveViewConfig<TData, TMeta>;
56
+ //#endregion
57
+ export { CreateDriveViewConfigInput, DriveViewCommands, DriveViewConfig, DriveViewConfigProvider, createDriveViewConfig, useDriveViewConfig };
@@ -0,0 +1,46 @@
1
+ "use client";
2
+
3
+ import { createContext, use } from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { TableConfigProvider, createTableConfig, useTableConfigContext } from "@tulip-systems/core/data-tables/client";
6
+
7
+ //#region src/lib/view-config.client.tsx
8
+ const DriveViewConfigContext = createContext({});
9
+ function createDriveViewConfig({ queryData, columns, strategy, commands, meta, columnVisibility, selection, getRowId = (row) => row.id }) {
10
+ const { commands: _commands, ...table } = createTableConfig({
11
+ queryData,
12
+ columns,
13
+ getRowId,
14
+ strategy,
15
+ meta,
16
+ columnVisibility,
17
+ selection
18
+ });
19
+ return {
20
+ ...table,
21
+ commands
22
+ };
23
+ }
24
+ function DriveViewConfigProvider({ config, children }) {
25
+ return /* @__PURE__ */ jsx(DriveViewConfigContext, {
26
+ value: config,
27
+ children: /* @__PURE__ */ jsx(TableConfigProvider, {
28
+ config: {
29
+ ...config,
30
+ commands: config.commands?.selectedNodes
31
+ },
32
+ children
33
+ })
34
+ });
35
+ }
36
+ function useDriveViewConfig() {
37
+ const tableConfig = useTableConfigContext();
38
+ const viewConfig = use(DriveViewConfigContext);
39
+ return {
40
+ ...tableConfig,
41
+ ...viewConfig
42
+ };
43
+ }
44
+
45
+ //#endregion
46
+ export { DriveViewConfigProvider, createDriveViewConfig, useDriveViewConfig };
@@ -1,9 +1,9 @@
1
+ import { DriveViewCommands } from "../../../lib/view-config.client.mjs";
1
2
  import { GoogleDriveNode } from "../lib/validators.mjs";
2
3
  import { TableColumnDef } from "@tulip-systems/core/data-tables";
3
4
  import { ComponentProps } from "react";
4
5
  import * as react_jsx_runtime0 from "react/jsx-runtime";
5
6
  import { useInfiniteStrategy } from "@tulip-systems/core/data-tables/client";
6
- import { CommandDef } from "@tulip-systems/core/commands";
7
7
  import { VisibilityState } from "@tanstack/react-table";
8
8
 
9
9
  //#region src/providers/google/components/view.client.d.ts
@@ -14,7 +14,7 @@ type GoogleDriveViewProviderProps<TData extends GoogleDriveNode = GoogleDriveNod
14
14
  queryData: TData[];
15
15
  columns?: TableColumnDef<TData>[];
16
16
  strategy: ReturnType<typeof useInfiniteStrategy>;
17
- commands?: CommandDef[];
17
+ commands?: DriveViewCommands<TData>;
18
18
  columnVisibility?: VisibilityState;
19
19
  };
20
20
  declare function GoogleDriveViewProvider<TData extends GoogleDriveNode = GoogleDriveNode>({
@@ -4,22 +4,22 @@ import { useDriveSelectionContext } from "../../../components/selection.client.m
4
4
  import { DriveGridCard, DriveGridCardSkeleton } from "../../../components/grid-card.client.mjs";
5
5
  import { DriveGrid, DriveGridBottombar, DriveGridEmpty, DriveGridLoading } from "../../../components/grid.client.mjs";
6
6
  import { useDriveViewContext } from "../../../components/view.client.mjs";
7
+ import { DriveViewConfigProvider, createDriveViewConfig, useDriveViewConfig } from "../../../lib/view-config.client.mjs";
7
8
  import { googleDriveColumns } from "../config/columns-data.mjs";
8
9
  import { useGoogleDriveContext } from "./provider.client.mjs";
9
10
  import { TableLayout, TableSkeleton } from "@tulip-systems/core/data-tables";
10
11
  import { useMemo } from "react";
11
12
  import { FloatingCommandMenu } from "@tulip-systems/core/commands/client";
12
13
  import { jsx, jsxs } from "react/jsx-runtime";
13
- import { DataTable, TableConfigProvider, createTableConfig, useTableConfigContext } from "@tulip-systems/core/data-tables/client";
14
+ import { DataTable } from "@tulip-systems/core/data-tables/client";
14
15
 
15
16
  //#region src/providers/google/components/view.client.tsx
16
17
  function GoogleDriveViewProvider({ queryData, columns = googleDriveColumns, strategy, commands, columnVisibility, children, ...props }) {
17
18
  const { meta } = useGoogleDriveContext();
18
- return /* @__PURE__ */ jsx(TableConfigProvider, {
19
- config: createTableConfig({
19
+ return /* @__PURE__ */ jsx(DriveViewConfigProvider, {
20
+ config: createDriveViewConfig({
20
21
  queryData,
21
22
  columns,
22
- getRowId: (row) => row.id,
23
23
  strategy,
24
24
  commands,
25
25
  meta,
@@ -45,7 +45,7 @@ function GoogleDriveView() {
45
45
  * GoogleDriveGrid
46
46
  */
47
47
  function GoogleDriveGrid(props) {
48
- const { queryData, strategy, commands, selection, meta } = useTableConfigContext();
48
+ const { queryData, strategy, commands, selection, meta } = useDriveViewConfig();
49
49
  const { rowCount, paginationState } = strategy;
50
50
  const { isFetching, isFetchingNextPage, fetchNextPage } = strategy.meta;
51
51
  const hasNextPage = rowCount == null ? false : queryData.length < rowCount;
@@ -55,7 +55,7 @@ function GoogleDriveGrid(props) {
55
55
  children: [
56
56
  queryData.length > 0 ? queryData.map((node) => /* @__PURE__ */ jsx(DriveGridCard, {
57
57
  node,
58
- commands,
58
+ commands: commands?.node,
59
59
  unoptimized: true
60
60
  }, node.id)) : /* @__PURE__ */ jsx(DriveGridEmpty, { title: "Geen resultaten gevonden" }),
61
61
  isFetchingNextPage && Array.from({ length: paginationState?.pageSize ?? 0 }).map((_, index) => /* @__PURE__ */ jsx(DriveGridCardSkeleton, {}, index)),
@@ -65,9 +65,9 @@ function GoogleDriveGrid(props) {
65
65
  isFetching,
66
66
  isFetchingNextPage
67
67
  }),
68
- commands && commands.length > 0 && /* @__PURE__ */ jsx(FloatingCommandMenu, {
68
+ commands?.selectedNodes && commands.selectedNodes.length > 0 && /* @__PURE__ */ jsx(FloatingCommandMenu, {
69
69
  data: selectedData,
70
- commands,
70
+ commands: commands.selectedNodes,
71
71
  meta,
72
72
  state: selectedData.length > 0 ? "open" : "closed",
73
73
  onSuccess: () => selection?.setRowSelection?.({})
@@ -6,8 +6,8 @@ import { TableColumnHeader } from "@tulip-systems/core/data-tables";
6
6
  import { findStatus } from "@tulip-systems/core/components";
7
7
  import { FolderIcon } from "lucide-react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
- import { Tooltip, TooltipContent, TooltipTrigger } from "@tulip-systems/core/components/client";
10
9
  import { TableTextCell, createTableSelectCell } from "@tulip-systems/core/data-tables/client";
10
+ import { Tooltip, TooltipContent, TooltipTrigger } from "@tulip-systems/core/components/client";
11
11
  import Link from "next/link";
12
12
  import { createSerializer, useQueryStates } from "nuqs";
13
13
 
@@ -4,8 +4,8 @@ import * as _tulip_systems_core_data_tables0 from "@tulip-systems/core/data-tabl
4
4
  //#region src/providers/google/config/filters.d.ts
5
5
  declare const googleDriveTreeFilters: {
6
6
  types: _tulip_systems_core_data_tables0.ParseFilter<zod.ZodArray<zod.ZodEnum<{
7
- folder: "folder";
8
7
  file: "file";
8
+ folder: "folder";
9
9
  }>>>;
10
10
  contentTypes: _tulip_systems_core_data_tables0.ParseFilter<zod.ZodArray<zod.ZodString>>;
11
11
  nodeIds: _tulip_systems_core_data_tables0.ParseFilter<zod.ZodArray<zod.ZodString>>;
@@ -18,8 +18,8 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
18
18
  name: z.ZodString;
19
19
  namespace: z.ZodString;
20
20
  type: z.ZodEnum<{
21
- folder: "folder";
22
21
  file: "file";
22
+ folder: "folder";
23
23
  }>;
24
24
  subtype: z.ZodEnum<{
25
25
  image: "image";
@@ -64,8 +64,8 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
64
64
  name: z.ZodString;
65
65
  namespace: z.ZodString;
66
66
  type: z.ZodEnum<{
67
- folder: "folder";
68
67
  file: "file";
68
+ folder: "folder";
69
69
  }>;
70
70
  subtype: z.ZodEnum<{
71
71
  image: "image";
@@ -114,8 +114,8 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
114
114
  }>>>;
115
115
  filters: z.ZodPipe<z.ZodObject<{
116
116
  types: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
117
- folder: "folder";
118
117
  file: "file";
118
+ folder: "folder";
119
119
  }>>>>;
120
120
  contentTypes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
121
121
  nodeIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
@@ -126,13 +126,13 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
126
126
  isArchived: boolean;
127
127
  namespace: string;
128
128
  parentId: string | null;
129
- types?: ("folder" | "file")[] | null | undefined;
129
+ types?: ("file" | "folder")[] | null | undefined;
130
130
  contentTypes?: string[] | null | undefined;
131
131
  nodeIds?: string[] | null | undefined;
132
132
  }, {
133
133
  namespace: string;
134
134
  parentId: string | null;
135
- types?: ("folder" | "file")[] | null | undefined;
135
+ types?: ("file" | "folder")[] | null | undefined;
136
136
  contentTypes?: string[] | null | undefined;
137
137
  nodeIds?: string[] | null | undefined;
138
138
  isArchived?: boolean | null | undefined;
@@ -144,8 +144,8 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
144
144
  name: z.ZodString;
145
145
  namespace: z.ZodString;
146
146
  type: z.ZodEnum<{
147
- folder: "folder";
148
147
  file: "file";
148
+ folder: "folder";
149
149
  }>;
150
150
  subtype: z.ZodEnum<{
151
151
  image: "image";
@@ -195,8 +195,8 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
195
195
  search: z.ZodOptional<z.ZodNullable<z.ZodString>>;
196
196
  filters: z.ZodPipe<z.ZodObject<{
197
197
  types: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
198
- folder: "folder";
199
198
  file: "file";
199
+ folder: "folder";
200
200
  }>>>>;
201
201
  contentTypes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
202
202
  nodeIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
@@ -207,13 +207,13 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
207
207
  isArchived: boolean;
208
208
  namespace: string;
209
209
  parentId: string | null;
210
- types?: ("folder" | "file")[] | null | undefined;
210
+ types?: ("file" | "folder")[] | null | undefined;
211
211
  contentTypes?: string[] | null | undefined;
212
212
  nodeIds?: string[] | null | undefined;
213
213
  }, {
214
214
  namespace: string;
215
215
  parentId: string | null;
216
- types?: ("folder" | "file")[] | null | undefined;
216
+ types?: ("file" | "folder")[] | null | undefined;
217
217
  contentTypes?: string[] | null | undefined;
218
218
  nodeIds?: string[] | null | undefined;
219
219
  isArchived?: boolean | null | undefined;
@@ -224,7 +224,7 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
224
224
  updatedAt: Date;
225
225
  name: string;
226
226
  namespace: string;
227
- type: "folder" | "file";
227
+ type: "file" | "folder";
228
228
  subtype: "image" | "document" | "spreadsheet" | "video" | "audio" | "archive" | "other";
229
229
  size: number | null;
230
230
  contentType: string | null;
@@ -255,7 +255,7 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
255
255
  updatedAt: Date;
256
256
  name: string;
257
257
  namespace: string;
258
- type: "folder" | "file";
258
+ type: "file" | "folder";
259
259
  subtype: "image" | "document" | "spreadsheet" | "video" | "audio" | "archive" | "other";
260
260
  size: number | null;
261
261
  contentType: string | null;
@@ -290,7 +290,7 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
290
290
  updatedAt: Date;
291
291
  name: string;
292
292
  namespace: string;
293
- type: "folder" | "file";
293
+ type: "file" | "folder";
294
294
  subtype: "image" | "document" | "spreadsheet" | "video" | "audio" | "archive" | "other";
295
295
  size: number | null;
296
296
  contentType: string | null;
@@ -315,7 +315,7 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
315
315
  trashedAt: Date | null;
316
316
  googleParents: string[];
317
317
  canEdit: boolean | null;
318
- }, "id" | "name" | "parentId"> & {
318
+ }, "name" | "parentId" | "id"> & {
319
319
  depth: number;
320
320
  })[], (Pick<{
321
321
  id: string;
@@ -323,7 +323,7 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
323
323
  updatedAt: Date;
324
324
  name: string;
325
325
  namespace: string;
326
- type: "folder" | "file";
326
+ type: "file" | "folder";
327
327
  subtype: "image" | "document" | "spreadsheet" | "video" | "audio" | "archive" | "other";
328
328
  size: number | null;
329
329
  contentType: string | null;
@@ -348,7 +348,7 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
348
348
  trashedAt: Date | null;
349
349
  googleParents: string[];
350
350
  canEdit: boolean | null;
351
- }, "id" | "name" | "parentId"> & {
351
+ }, "name" | "parentId" | "id"> & {
352
352
  depth: number;
353
353
  })[]>, Record<never, never>, Record<never, never>>;
354
354
  createFolder: _orpc_server0.DecoratedProcedure<_orpc_server0.MergedInitialContext<_tulip_systems_core_router_server0.RPCContext<TSchema> & Record<never, never>, _tulip_systems_core_router_server0.RPCContext<TSchema> & Record<never, never>, _tulip_systems_core_router_server0.RPCContext<TSchema>>, _orpc_server0.MergedCurrentContext<_tulip_systems_core_router_server0.RPCContext<TSchema>, _tulip_systems_core_router_server0.ProtectedRPCContext<TSchema>>, z.ZodObject<{
@@ -362,8 +362,8 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
362
362
  name: z.ZodString;
363
363
  namespace: z.ZodString;
364
364
  type: z.ZodEnum<{
365
- folder: "folder";
366
365
  file: "file";
366
+ folder: "folder";
367
367
  }>;
368
368
  subtype: z.ZodEnum<{
369
369
  image: "image";
@@ -415,8 +415,8 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
415
415
  name: z.ZodString;
416
416
  namespace: z.ZodString;
417
417
  type: z.ZodEnum<{
418
- folder: "folder";
419
418
  file: "file";
419
+ folder: "folder";
420
420
  }>;
421
421
  subtype: z.ZodEnum<{
422
422
  image: "image";
@@ -465,8 +465,8 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
465
465
  name: z.ZodString;
466
466
  namespace: z.ZodString;
467
467
  type: z.ZodEnum<{
468
- folder: "folder";
469
468
  file: "file";
469
+ folder: "folder";
470
470
  }>;
471
471
  subtype: z.ZodEnum<{
472
472
  image: "image";
@@ -514,8 +514,8 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
514
514
  name: z.ZodString;
515
515
  namespace: z.ZodString;
516
516
  type: z.ZodEnum<{
517
- folder: "folder";
518
517
  file: "file";
518
+ folder: "folder";
519
519
  }>;
520
520
  subtype: z.ZodEnum<{
521
521
  image: "image";
@@ -563,8 +563,8 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
563
563
  name: z.ZodString;
564
564
  namespace: z.ZodString;
565
565
  type: z.ZodEnum<{
566
- folder: "folder";
567
566
  file: "file";
567
+ folder: "folder";
568
568
  }>;
569
569
  subtype: z.ZodEnum<{
570
570
  image: "image";
@@ -5,7 +5,7 @@ import * as nuqs_server0 from "nuqs/server";
5
5
  * Filters
6
6
  */
7
7
  declare const googleDriveTreeFilterSearchParams: {
8
- readonly types: nuqs_server0.SingleParserBuilder<("folder" | "file")[] | null>;
8
+ readonly types: nuqs_server0.SingleParserBuilder<("file" | "folder")[] | null>;
9
9
  readonly contentTypes: nuqs_server0.SingleParserBuilder<string[] | null>;
10
10
  readonly nodeIds: nuqs_server0.SingleParserBuilder<string[] | null>;
11
11
  readonly isArchived: nuqs_server0.SingleParserBuilder<boolean | null>;
@@ -13,8 +13,8 @@ declare const googleDriveNodeSchema: z$1.ZodObject<{
13
13
  name: z$1.ZodString;
14
14
  namespace: z$1.ZodString;
15
15
  type: z$1.ZodEnum<{
16
- folder: "folder";
17
16
  file: "file";
17
+ folder: "folder";
18
18
  }>;
19
19
  subtype: z$1.ZodEnum<{
20
20
  image: "image";
@@ -66,8 +66,8 @@ declare const googleDriveNodeWithChildrenSchema: z$1.ZodObject<{
66
66
  name: z$1.ZodString;
67
67
  namespace: z$1.ZodString;
68
68
  type: z$1.ZodEnum<{
69
- folder: "folder";
70
69
  file: "file";
70
+ folder: "folder";
71
71
  }>;
72
72
  subtype: z$1.ZodEnum<{
73
73
  image: "image";
@@ -112,8 +112,8 @@ declare const googleDriveNodeWithChildrenSchema: z$1.ZodObject<{
112
112
  name: z$1.ZodString;
113
113
  namespace: z$1.ZodString;
114
114
  type: z$1.ZodEnum<{
115
- folder: "folder";
116
115
  file: "file";
116
+ folder: "folder";
117
117
  }>;
118
118
  subtype: z$1.ZodEnum<{
119
119
  image: "image";
@@ -193,8 +193,8 @@ type UploadGoogleDriveFileSchema = z$1.infer<typeof uploadGoogleDriveFileInputSc
193
193
  */
194
194
  declare const googleDriveTableFiltersSchema: z$1.ZodPipe<z$1.ZodObject<{
195
195
  types: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodEnum<{
196
- folder: "folder";
197
196
  file: "file";
197
+ folder: "folder";
198
198
  }>>>>;
199
199
  contentTypes: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
200
200
  nodeIds: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
@@ -205,13 +205,13 @@ declare const googleDriveTableFiltersSchema: z$1.ZodPipe<z$1.ZodObject<{
205
205
  isArchived: boolean;
206
206
  namespace: string;
207
207
  parentId: string | null;
208
- types?: ("folder" | "file")[] | null | undefined;
208
+ types?: ("file" | "folder")[] | null | undefined;
209
209
  contentTypes?: string[] | null | undefined;
210
210
  nodeIds?: string[] | null | undefined;
211
211
  }, {
212
212
  namespace: string;
213
213
  parentId: string | null;
214
- types?: ("folder" | "file")[] | null | undefined;
214
+ types?: ("file" | "folder")[] | null | undefined;
215
215
  contentTypes?: string[] | null | undefined;
216
216
  nodeIds?: string[] | null | undefined;
217
217
  isArchived?: boolean | null | undefined;
@@ -233,8 +233,8 @@ declare const listGoogleDriveTreeInputSchema: z$1.ZodObject<{
233
233
  search: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
234
234
  filters: z$1.ZodPipe<z$1.ZodObject<{
235
235
  types: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodEnum<{
236
- folder: "folder";
237
236
  file: "file";
237
+ folder: "folder";
238
238
  }>>>>;
239
239
  contentTypes: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
240
240
  nodeIds: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
@@ -245,13 +245,13 @@ declare const listGoogleDriveTreeInputSchema: z$1.ZodObject<{
245
245
  isArchived: boolean;
246
246
  namespace: string;
247
247
  parentId: string | null;
248
- types?: ("folder" | "file")[] | null | undefined;
248
+ types?: ("file" | "folder")[] | null | undefined;
249
249
  contentTypes?: string[] | null | undefined;
250
250
  nodeIds?: string[] | null | undefined;
251
251
  }, {
252
252
  namespace: string;
253
253
  parentId: string | null;
254
- types?: ("folder" | "file")[] | null | undefined;
254
+ types?: ("file" | "folder")[] | null | undefined;
255
255
  contentTypes?: string[] | null | undefined;
256
256
  nodeIds?: string[] | null | undefined;
257
257
  isArchived?: boolean | null | undefined;
@@ -272,8 +272,8 @@ declare const getGoogleDriveNodesByParentIdInputSchema: z$1.ZodObject<{
272
272
  }>>>;
273
273
  filters: z$1.ZodPipe<z$1.ZodObject<{
274
274
  types: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodEnum<{
275
- folder: "folder";
276
275
  file: "file";
276
+ folder: "folder";
277
277
  }>>>>;
278
278
  contentTypes: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
279
279
  nodeIds: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
@@ -284,13 +284,13 @@ declare const getGoogleDriveNodesByParentIdInputSchema: z$1.ZodObject<{
284
284
  isArchived: boolean;
285
285
  namespace: string;
286
286
  parentId: string | null;
287
- types?: ("folder" | "file")[] | null | undefined;
287
+ types?: ("file" | "folder")[] | null | undefined;
288
288
  contentTypes?: string[] | null | undefined;
289
289
  nodeIds?: string[] | null | undefined;
290
290
  }, {
291
291
  namespace: string;
292
292
  parentId: string | null;
293
- types?: ("folder" | "file")[] | null | undefined;
293
+ types?: ("file" | "folder")[] | null | undefined;
294
294
  contentTypes?: string[] | null | undefined;
295
295
  nodeIds?: string[] | null | undefined;
296
296
  isArchived?: boolean | null | undefined;
@@ -1,9 +1,9 @@
1
+ import { DriveViewCommands } from "../../../lib/view-config.client.mjs";
1
2
  import { LocalDriveNodeWithAsset } from "../lib/validators.mjs";
2
3
  import { TableColumnDef } from "@tulip-systems/core/data-tables";
3
4
  import { ComponentProps } from "react";
4
5
  import * as react_jsx_runtime0 from "react/jsx-runtime";
5
6
  import { useInfiniteStrategy } from "@tulip-systems/core/data-tables/client";
6
- import { CommandDef } from "@tulip-systems/core/commands";
7
7
  import { VisibilityState } from "@tanstack/react-table";
8
8
 
9
9
  //#region src/providers/local/components/view.client.d.ts
@@ -11,7 +11,7 @@ type LocalDriveViewProviderProps<TData extends LocalDriveNodeWithAsset = LocalDr
11
11
  queryData: TData[];
12
12
  columns?: TableColumnDef<TData>[];
13
13
  strategy: ReturnType<typeof useInfiniteStrategy>;
14
- commands?: CommandDef[];
14
+ commands?: DriveViewCommands<TData>;
15
15
  columnVisibility?: VisibilityState;
16
16
  };
17
17
  declare function LocalDriveViewProvider<TData extends LocalDriveNodeWithAsset = LocalDriveNodeWithAsset>({