@tulip-systems/drive 0.8.2 → 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.
Files changed (230) hide show
  1. package/dist/components/content.d.mts +1 -2
  2. package/dist/components/content.mjs +1 -2
  3. package/dist/components/context.client.d.mts +1 -2
  4. package/dist/components/dnd.client.d.mts +1 -2
  5. package/dist/components/dnd.client.mjs +1 -2
  6. package/dist/components/grid-card.client.d.mts +5 -2
  7. package/dist/components/grid-card.client.mjs +15 -15
  8. package/dist/components/grid.client.d.mts +1 -2
  9. package/dist/components/grid.client.mjs +1 -2
  10. package/dist/components/navigation/breadcrumbs.client.d.mts +1 -2
  11. package/dist/components/navigation/breadcrumbs.client.mjs +1 -2
  12. package/dist/components/navigation/header.client.d.mts +1 -2
  13. package/dist/components/navigation/header.client.mjs +1 -2
  14. package/dist/components/navigation/toolbar.client.d.mts +1 -2
  15. package/dist/components/navigation/toolbar.client.mjs +1 -2
  16. package/dist/components/navigation/view-switcher.client.d.mts +1 -2
  17. package/dist/components/navigation/view-switcher.client.mjs +1 -2
  18. package/dist/components/selection.client.d.mts +2 -3
  19. package/dist/components/selection.client.mjs +2 -5
  20. package/dist/components/view.client.d.mts +1 -2
  21. package/dist/components/view.client.mjs +1 -2
  22. package/dist/config/filters.mjs +1 -2
  23. package/dist/config/types.mjs +1 -2
  24. package/dist/lib/constants.d.mts +1 -2
  25. package/dist/lib/constants.mjs +1 -2
  26. package/dist/lib/contracts.d.mts +1 -2
  27. package/dist/lib/dto.d.mts +1 -2
  28. package/dist/lib/dto.mjs +1 -2
  29. package/dist/lib/helpers.d.mts +1 -2
  30. package/dist/lib/helpers.mjs +1 -2
  31. package/dist/lib/helpers.server.d.mts +1 -2
  32. package/dist/lib/helpers.server.mjs +1 -2
  33. package/dist/lib/search-params.d.mts +1 -2
  34. package/dist/lib/search-params.mjs +1 -2
  35. package/dist/lib/validators.d.mts +1 -2
  36. package/dist/lib/validators.mjs +1 -2
  37. package/dist/providers/google/components/command-file-update.d.mts +1 -2
  38. package/dist/providers/google/components/command-file-update.mjs +3 -4
  39. package/dist/providers/google/components/command-folder-create.d.mts +1 -2
  40. package/dist/providers/google/components/command-folder-create.mjs +3 -4
  41. package/dist/providers/google/components/command-folder-update.d.mts +1 -2
  42. package/dist/providers/google/components/command-folder-update.mjs +3 -4
  43. package/dist/providers/google/components/content.client.d.mts +1 -2
  44. package/dist/providers/google/components/content.client.mjs +1 -2
  45. package/dist/providers/google/components/navigation.client.d.mts +1 -2
  46. package/dist/providers/google/components/navigation.client.mjs +1 -2
  47. package/dist/providers/google/components/provider.client.d.mts +1 -2
  48. package/dist/providers/google/components/provider.client.mjs +1 -2
  49. package/dist/providers/google/components/view.client.d.mts +1 -2
  50. package/dist/providers/google/components/view.client.mjs +2 -4
  51. package/dist/providers/google/config/columns-data.d.mts +1 -2
  52. package/dist/providers/google/config/columns-data.mjs +1 -2
  53. package/dist/providers/google/config/filters.d.mts +1 -2
  54. package/dist/providers/google/config/filters.mjs +1 -2
  55. package/dist/providers/google/lib/constants.mjs +1 -2
  56. package/dist/providers/google/lib/dto.d.mts +1 -2
  57. package/dist/providers/google/lib/dto.mjs +1 -2
  58. package/dist/providers/google/lib/helpers.mjs +1 -9
  59. package/dist/providers/google/lib/router.server.d.mts +3 -4
  60. package/dist/providers/google/lib/router.server.mjs +1 -2
  61. package/dist/providers/google/lib/search-params.d.mts +1 -2
  62. package/dist/providers/google/lib/search-params.mjs +1 -2
  63. package/dist/providers/google/lib/service.server.d.mts +1 -2
  64. package/dist/providers/google/lib/service.server.mjs +2 -5
  65. package/dist/providers/google/lib/validators.d.mts +1 -2
  66. package/dist/providers/google/lib/validators.mjs +1 -2
  67. package/dist/providers/local/components/command-file-update.d.mts +1 -2
  68. package/dist/providers/local/components/command-file-update.mjs +3 -4
  69. package/dist/providers/local/components/command-file-upload.d.mts +1 -2
  70. package/dist/providers/local/components/command-file-upload.mjs +1 -2
  71. package/dist/providers/local/components/command-folder-create.d.mts +1 -2
  72. package/dist/providers/local/components/command-folder-create.mjs +3 -4
  73. package/dist/providers/local/components/command-folder-update.d.mts +1 -2
  74. package/dist/providers/local/components/command-folder-update.mjs +3 -4
  75. package/dist/providers/local/components/content.client.d.mts +1 -2
  76. package/dist/providers/local/components/content.client.mjs +1 -2
  77. package/dist/providers/local/components/navigation.client.d.mts +1 -2
  78. package/dist/providers/local/components/navigation.client.mjs +1 -2
  79. package/dist/providers/local/components/provider.client.d.mts +1 -2
  80. package/dist/providers/local/components/provider.client.mjs +1 -2
  81. package/dist/providers/local/components/upload-zone-context.client.d.mts +1 -2
  82. package/dist/providers/local/components/upload-zone-context.client.mjs +1 -2
  83. package/dist/providers/local/components/upload-zone.client.d.mts +1 -2
  84. package/dist/providers/local/components/upload-zone.client.mjs +2 -3
  85. package/dist/providers/local/components/view.client.d.mts +1 -2
  86. package/dist/providers/local/components/view.client.mjs +1 -2
  87. package/dist/providers/local/config/columns-data.d.mts +1 -2
  88. package/dist/providers/local/config/columns-data.mjs +1 -2
  89. package/dist/providers/local/config/filters.d.mts +1 -2
  90. package/dist/providers/local/config/filters.mjs +1 -2
  91. package/dist/providers/local/lib/constants.d.mts +1 -2
  92. package/dist/providers/local/lib/constants.mjs +1 -2
  93. package/dist/providers/local/lib/helpers.d.mts +1 -2
  94. package/dist/providers/local/lib/helpers.mjs +1 -2
  95. package/dist/providers/local/lib/route-handler.server.d.mts +1 -2
  96. package/dist/providers/local/lib/route-handler.server.mjs +1 -2
  97. package/dist/providers/local/lib/router.server.d.mts +25 -26
  98. package/dist/providers/local/lib/router.server.mjs +1 -2
  99. package/dist/providers/local/lib/schema.d.mts +1 -2
  100. package/dist/providers/local/lib/schema.mjs +1 -2
  101. package/dist/providers/local/lib/search-params.d.mts +1 -2
  102. package/dist/providers/local/lib/search-params.mjs +1 -2
  103. package/dist/providers/local/lib/service.server.d.mts +13 -14
  104. package/dist/providers/local/lib/service.server.mjs +1 -2
  105. package/dist/providers/local/lib/upload.client.d.mts +1 -2
  106. package/dist/providers/local/lib/upload.client.mjs +1 -2
  107. package/dist/providers/local/lib/validators.d.mts +1 -2
  108. package/dist/providers/local/lib/validators.mjs +1 -2
  109. package/package.json +44 -46
  110. package/src/components/grid-card.client.tsx +17 -12
  111. package/src/components/selection.client.tsx +1 -2
  112. package/src/config/types.tsx +1 -1
  113. package/src/providers/google/components/command-file-update.tsx +2 -2
  114. package/src/providers/google/components/command-folder-create.tsx +2 -2
  115. package/src/providers/google/components/command-folder-update.tsx +2 -2
  116. package/src/providers/google/components/view.client.tsx +1 -7
  117. package/src/providers/google/lib/helpers.ts +0 -9
  118. package/src/providers/google/lib/service.server.ts +1 -3
  119. package/src/providers/local/components/command-file-update.tsx +2 -2
  120. package/src/providers/local/components/command-folder-create.tsx +2 -2
  121. package/src/providers/local/components/command-folder-update.tsx +2 -2
  122. package/src/providers/local/components/upload-zone.client.tsx +1 -1
  123. package/dist/components/content.d.mts.map +0 -1
  124. package/dist/components/content.mjs.map +0 -1
  125. package/dist/components/context.client.d.mts.map +0 -1
  126. package/dist/components/dnd.client.d.mts.map +0 -1
  127. package/dist/components/dnd.client.mjs.map +0 -1
  128. package/dist/components/grid-card.client.d.mts.map +0 -1
  129. package/dist/components/grid-card.client.mjs.map +0 -1
  130. package/dist/components/grid.client.d.mts.map +0 -1
  131. package/dist/components/grid.client.mjs.map +0 -1
  132. package/dist/components/navigation/breadcrumbs.client.d.mts.map +0 -1
  133. package/dist/components/navigation/breadcrumbs.client.mjs.map +0 -1
  134. package/dist/components/navigation/header.client.d.mts.map +0 -1
  135. package/dist/components/navigation/header.client.mjs.map +0 -1
  136. package/dist/components/navigation/toolbar.client.d.mts.map +0 -1
  137. package/dist/components/navigation/toolbar.client.mjs.map +0 -1
  138. package/dist/components/navigation/view-switcher.client.d.mts.map +0 -1
  139. package/dist/components/navigation/view-switcher.client.mjs.map +0 -1
  140. package/dist/components/selection.client.d.mts.map +0 -1
  141. package/dist/components/selection.client.mjs.map +0 -1
  142. package/dist/components/view.client.d.mts.map +0 -1
  143. package/dist/components/view.client.mjs.map +0 -1
  144. package/dist/config/filters.mjs.map +0 -1
  145. package/dist/config/types.mjs.map +0 -1
  146. package/dist/lib/constants.d.mts.map +0 -1
  147. package/dist/lib/constants.mjs.map +0 -1
  148. package/dist/lib/contracts.d.mts.map +0 -1
  149. package/dist/lib/dto.d.mts.map +0 -1
  150. package/dist/lib/dto.mjs.map +0 -1
  151. package/dist/lib/helpers.d.mts.map +0 -1
  152. package/dist/lib/helpers.mjs.map +0 -1
  153. package/dist/lib/helpers.server.d.mts.map +0 -1
  154. package/dist/lib/helpers.server.mjs.map +0 -1
  155. package/dist/lib/search-params.d.mts.map +0 -1
  156. package/dist/lib/search-params.mjs.map +0 -1
  157. package/dist/lib/validators.d.mts.map +0 -1
  158. package/dist/lib/validators.mjs.map +0 -1
  159. package/dist/providers/google/components/command-file-update.d.mts.map +0 -1
  160. package/dist/providers/google/components/command-file-update.mjs.map +0 -1
  161. package/dist/providers/google/components/command-folder-create.d.mts.map +0 -1
  162. package/dist/providers/google/components/command-folder-create.mjs.map +0 -1
  163. package/dist/providers/google/components/command-folder-update.d.mts.map +0 -1
  164. package/dist/providers/google/components/command-folder-update.mjs.map +0 -1
  165. package/dist/providers/google/components/content.client.d.mts.map +0 -1
  166. package/dist/providers/google/components/content.client.mjs.map +0 -1
  167. package/dist/providers/google/components/navigation.client.d.mts.map +0 -1
  168. package/dist/providers/google/components/navigation.client.mjs.map +0 -1
  169. package/dist/providers/google/components/provider.client.d.mts.map +0 -1
  170. package/dist/providers/google/components/provider.client.mjs.map +0 -1
  171. package/dist/providers/google/components/view.client.d.mts.map +0 -1
  172. package/dist/providers/google/components/view.client.mjs.map +0 -1
  173. package/dist/providers/google/config/columns-data.d.mts.map +0 -1
  174. package/dist/providers/google/config/columns-data.mjs.map +0 -1
  175. package/dist/providers/google/config/filters.d.mts.map +0 -1
  176. package/dist/providers/google/config/filters.mjs.map +0 -1
  177. package/dist/providers/google/lib/constants.mjs.map +0 -1
  178. package/dist/providers/google/lib/dto.d.mts.map +0 -1
  179. package/dist/providers/google/lib/dto.mjs.map +0 -1
  180. package/dist/providers/google/lib/helpers.mjs.map +0 -1
  181. package/dist/providers/google/lib/router.server.d.mts.map +0 -1
  182. package/dist/providers/google/lib/router.server.mjs.map +0 -1
  183. package/dist/providers/google/lib/search-params.d.mts.map +0 -1
  184. package/dist/providers/google/lib/search-params.mjs.map +0 -1
  185. package/dist/providers/google/lib/service.server.d.mts.map +0 -1
  186. package/dist/providers/google/lib/service.server.mjs.map +0 -1
  187. package/dist/providers/google/lib/validators.d.mts.map +0 -1
  188. package/dist/providers/google/lib/validators.mjs.map +0 -1
  189. package/dist/providers/local/components/command-file-update.d.mts.map +0 -1
  190. package/dist/providers/local/components/command-file-update.mjs.map +0 -1
  191. package/dist/providers/local/components/command-file-upload.d.mts.map +0 -1
  192. package/dist/providers/local/components/command-file-upload.mjs.map +0 -1
  193. package/dist/providers/local/components/command-folder-create.d.mts.map +0 -1
  194. package/dist/providers/local/components/command-folder-create.mjs.map +0 -1
  195. package/dist/providers/local/components/command-folder-update.d.mts.map +0 -1
  196. package/dist/providers/local/components/command-folder-update.mjs.map +0 -1
  197. package/dist/providers/local/components/content.client.d.mts.map +0 -1
  198. package/dist/providers/local/components/content.client.mjs.map +0 -1
  199. package/dist/providers/local/components/navigation.client.d.mts.map +0 -1
  200. package/dist/providers/local/components/navigation.client.mjs.map +0 -1
  201. package/dist/providers/local/components/provider.client.d.mts.map +0 -1
  202. package/dist/providers/local/components/provider.client.mjs.map +0 -1
  203. package/dist/providers/local/components/upload-zone-context.client.d.mts.map +0 -1
  204. package/dist/providers/local/components/upload-zone-context.client.mjs.map +0 -1
  205. package/dist/providers/local/components/upload-zone.client.d.mts.map +0 -1
  206. package/dist/providers/local/components/upload-zone.client.mjs.map +0 -1
  207. package/dist/providers/local/components/view.client.d.mts.map +0 -1
  208. package/dist/providers/local/components/view.client.mjs.map +0 -1
  209. package/dist/providers/local/config/columns-data.d.mts.map +0 -1
  210. package/dist/providers/local/config/columns-data.mjs.map +0 -1
  211. package/dist/providers/local/config/filters.d.mts.map +0 -1
  212. package/dist/providers/local/config/filters.mjs.map +0 -1
  213. package/dist/providers/local/lib/constants.d.mts.map +0 -1
  214. package/dist/providers/local/lib/constants.mjs.map +0 -1
  215. package/dist/providers/local/lib/helpers.d.mts.map +0 -1
  216. package/dist/providers/local/lib/helpers.mjs.map +0 -1
  217. package/dist/providers/local/lib/route-handler.server.d.mts.map +0 -1
  218. package/dist/providers/local/lib/route-handler.server.mjs.map +0 -1
  219. package/dist/providers/local/lib/router.server.d.mts.map +0 -1
  220. package/dist/providers/local/lib/router.server.mjs.map +0 -1
  221. package/dist/providers/local/lib/schema.d.mts.map +0 -1
  222. package/dist/providers/local/lib/schema.mjs.map +0 -1
  223. package/dist/providers/local/lib/search-params.d.mts.map +0 -1
  224. package/dist/providers/local/lib/search-params.mjs.map +0 -1
  225. package/dist/providers/local/lib/service.server.d.mts.map +0 -1
  226. package/dist/providers/local/lib/service.server.mjs.map +0 -1
  227. package/dist/providers/local/lib/upload.client.d.mts.map +0 -1
  228. package/dist/providers/local/lib/upload.client.mjs.map +0 -1
  229. package/dist/providers/local/lib/validators.d.mts.map +0 -1
  230. package/dist/providers/local/lib/validators.mjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"breadcrumbs.client.mjs","names":[],"sources":["../../../src/components/navigation/breadcrumbs.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { pointerIntersection } from \"@dnd-kit/collision\";\nimport { useDroppable } from \"@dnd-kit/react\";\nimport { BreadcrumbItem, BreadcrumbLink, BreadcrumbPage } from \"@tulip-systems/core/components\";\nimport {\n HeaderBreadcrumbSeparator,\n HeaderBreadcrumbs,\n HeaderBreadcrumbsDesktopList,\n HeaderBreadcrumbsDropdownMenu,\n HeaderBreadcrumbsDropdownMenuItem,\n HeaderBreadcrumbsLink,\n HeaderBreadcrumbsMobileList,\n} from \"@tulip-systems/core/components/client\";\nimport Link from \"next/link\";\nimport { createSerializer, useQueryStates } from \"nuqs\";\nimport { Fragment } from \"react\";\nimport { driveTreeSearchParams } from \"@/entry\";\n\n/**\n * Drive Header Breadcrumbs\n */\ntype DriveNodeBreadcrumb = {\n node: true;\n label: string;\n parentId: string | null;\n};\n\ntype DriveHrefBreadcrumb = {\n node?: false;\n label: string;\n href: string;\n};\n\nexport type DriveBreadcrumb = DriveNodeBreadcrumb | DriveHrefBreadcrumb;\n\nexport type DriveBreadCrumbsProps = {\n breadcrumbs?: DriveBreadcrumb[];\n};\n\nexport function DriveBreadcrumbs({ breadcrumbs = [] }: DriveBreadCrumbsProps) {\n return (\n <HeaderBreadcrumbs>\n <HeaderBreadcrumbsMobileList>\n {breadcrumbs.length > 1 && (\n <>\n <HeaderBreadcrumbsDropdownMenu>\n {breadcrumbs.slice(0, -1).map((breadcrumb, index) => (\n <HeaderBreadcrumbsDropdownMenuItem key={index} breadcrumb={breadcrumb} />\n ))}\n </HeaderBreadcrumbsDropdownMenu>\n\n <HeaderBreadcrumbSeparator />\n </>\n )}\n\n {breadcrumbs.slice(-1).map((breadcrumb, index, array) => (\n <Fragment key={index}>\n <HeaderBreadcrumbsLink breadcrumb={breadcrumb} />\n {index < array.length - 1 && <HeaderBreadcrumbSeparator />}\n </Fragment>\n ))}\n </HeaderBreadcrumbsMobileList>\n\n <HeaderBreadcrumbsDesktopList>\n {breadcrumbs.length > 2 && (\n <>\n <HeaderBreadcrumbsDropdownMenu>\n {breadcrumbs.slice(0, -2).map((breadcrumb, index) => (\n <HeaderBreadcrumbsDropdownMenuItem key={index} breadcrumb={breadcrumb} />\n ))}\n </HeaderBreadcrumbsDropdownMenu>\n\n <HeaderBreadcrumbSeparator />\n </>\n )}\n\n {breadcrumbs.slice(-2).map((breadcrumb, index, array) => (\n <Fragment key={index}>\n {breadcrumb.node ? (\n <DriveHeaderBreadcrumbsLink breadcrumb={breadcrumb} />\n ) : (\n <HeaderBreadcrumbsLink breadcrumb={breadcrumb} />\n )}\n {index < array.length - 1 && <HeaderBreadcrumbSeparator />}\n </Fragment>\n ))}\n </HeaderBreadcrumbsDesktopList>\n </HeaderBreadcrumbs>\n );\n}\n\n/**\n * Drive Header Breadcrumbs Link with DnD support\n */\nfunction DriveHeaderBreadcrumbsLink(props: { breadcrumb: DriveNodeBreadcrumb }) {\n const id = props.breadcrumb.parentId ?? null;\n const [query] = useQueryStates(driveTreeSearchParams);\n const serialize = createSerializer(driveTreeSearchParams);\n\n const { ref, isDropTarget } = useDroppable({\n id: id ?? \"drive\",\n collisionDetector: pointerIntersection,\n });\n\n const href = serialize({ ...query, parentId: id });\n\n return (\n <BreadcrumbItem\n ref={ref}\n data-over={isDropTarget && query.parentId !== id}\n className=\"data-[over=true]:bg-primary/35\"\n >\n {href !== undefined && href !== null ? (\n <BreadcrumbLink asChild>\n <Link href={href || \"?\"} className=\"truncate\">\n {props.breadcrumb.label}\n </Link>\n </BreadcrumbLink>\n ) : (\n <BreadcrumbPage className=\"truncate\">{props.breadcrumb.label}</BreadcrumbPage>\n )}\n </BreadcrumbItem>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAwCA,SAAgB,iBAAiB,EAAE,cAAc,EAAE,IAA2B;AAC5E,QACE,qBAAC,gCACC,qBAAC,0CACE,YAAY,SAAS,KACpB,8CACE,oBAAC,2CACE,YAAY,MAAM,GAAG,GAAG,CAAC,KAAK,YAAY,UACzC,oBAAC,qCAA0D,cAAnB,MAAiC,CACzE,GAC4B,EAEhC,oBAAC,8BAA4B,IAC5B,EAGJ,YAAY,MAAM,GAAG,CAAC,KAAK,YAAY,OAAO,UAC7C,qBAAC,uBACC,oBAAC,yBAAkC,aAAc,EAChD,QAAQ,MAAM,SAAS,KAAK,oBAAC,8BAA4B,KAF7C,MAGJ,CACX,IAC0B,EAE9B,qBAAC,2CACE,YAAY,SAAS,KACpB,8CACE,oBAAC,2CACE,YAAY,MAAM,GAAG,GAAG,CAAC,KAA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0,0 @@
1
- {"version":3,"file":"header.client.mjs","names":[],"sources":["../../../src/components/navigation/header.client.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n Header,\n HeaderTopbarBackButton,\n HeaderTopbarMobileNavSwitcher,\n Topbar,\n TopbarTools,\n} from \"@tulip-systems/core/components/client\";\nimport type { ComponentProps } from \"react\";\nimport { type DriveBreadCrumbsProps, DriveBreadcrumbs } from \"./breadcrumbs.client\";\n\n/**\n * Drive Header\n */\nexport function DriveHeader({ children, ...props }: ComponentProps<\"div\">) {\n return (\n <Header {...props}>\n <Topbar>{children}</Topbar>\n </Header>\n );\n}\n\n/**\n * Drive Header Breadcrumbs\n */\nexport function DriveHeaderBreadcrumbs({ breadcrumbs }: DriveBreadCrumbsProps) {\n return (\n <div className=\"flex h-full items-center gap-4\">\n <div className=\"h-full\">\n <HeaderTopbarBackButton />\n <HeaderTopbarMobileNavSwitcher />\n </div>\n\n <DriveBreadcrumbs breadcrumbs={breadcrumbs} />\n </div>\n );\n}\n\n/**\n * Drive Header Tools\n */\nexport function DriveHeaderTools({ children, ...props }: ComponentProps<\"div\">) {\n return <TopbarTools {...props}>{children}</TopbarTools>;\n}\n"],"mappings":";;;;;;;;;;AAeA,SAAgB,YAAY,EAAE,UAAU,GAAG,SAAgC;AACzE,QACE,oBAAC;EAAO,GAAI;YACV,oBAAC,UAAQ,WAAkB;GACpB;;;;;AAOb,SAAgB,uBAAuB,EAAE,eAAsC;AAC7E,QACE,qBAAC;EAAI,WAAU;aACb,qBAAC;GAAI,WAAU;cACb,oBAAC,2BAAyB,EAC1B,oBAAC,kCAAgC;IAC7B,EAEN,oBAAC,oBAA8B,cAAe;GAC1C;;;;;AAOV,SAAgB,iBAAiB,EAAE,UAAU,GAAG,SAAgC;AAC9E,QAAO,oBAAC;EAAY,GAAI;EAAQ;GAAuB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"toolbar.client.d.mts","names":[],"sources":["../../../src/components/navigation/toolbar.client.tsx"],"mappings":";;;;;;;;iBASgB,YAAA,CAAA;EAAe,SAAA;EAAW,QAAA;EAAA,GAAa;AAAA,GAAS,cAAA,UAAqB,kBAAA,CAAA,GAAA,CAAA,OAAA;;;;iBAmBrE,iBAAA,CAAA;EAAoB,QAAA;EAAU,SAAA;EAAA,GAAc;AAAA,GAAS,cAAA,UAAqB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"toolbar.client.mjs","names":[],"sources":["../../../src/components/navigation/toolbar.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"@tulip-systems/core/lib\";\nimport type { ComponentProps } from \"react\";\nimport { DriveBreadcrumbs } from \"./breadcrumbs.client\";\n\n/**\n * Drive Page Topbar\n */\nexport function DriveToolbar({ className, children, ...props }: ComponentProps<\"div\">) {\n return (\n <div\n {...props}\n className={cn(\"flex items-center justify-between overflow-x-auto pt-3\", className)}\n >\n {children}\n </div>\n );\n}\n\n/**\n * Drive Toolbar Breadcrumbs\n */\nexport const DriveToolbarBreadcrumbs = DriveBreadcrumbs;\n\n/**\n * Drive Header Tools\n */\nexport function DriveToolbarTools({ children, className, ...props }: ComponentProps<\"div\">) {\n return (\n <div {...props} className={cn(\"flex h-full items-center justify-end gap-4\", className)}>\n {children}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AASA,SAAgB,aAAa,EAAE,WAAW,UAAU,GAAG,SAAgC;AACrF,QACE,oBAAC;EACC,GAAI;EACJ,WAAW,GAAG,0DAA0D,UAAU;EAEjF;GACG;;;;;AAOV,MAAa,0BAA0B;;;;AAKvC,SAAgB,kBAAkB,EAAE,UAAU,WAAW,GAAG,SAAgC;AAC1F,QACE,oBAAC;EAAI,GAAI;EAAO,WAAW,GAAG,8CAA8C,UAAU;EACnF;GACG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"view-switcher.client.d.mts","names":[],"sources":["../../../src/components/navigation/view-switcher.client.tsx"],"mappings":";;;;;;iBASgB,iBAAA,CAAA,GAAiB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"view-switcher.client.mjs","names":[],"sources":["../../../src/components/navigation/view-switcher.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { ToggleGroup, ToggleGroupItem } from \"@tulip-systems/core/components/client\";\nimport { LayoutGridIcon, StretchVerticalIcon } from \"lucide-react\";\nimport { type DriveViewMode, useDriveViewContext } from \"../view.client\";\n\n/**\n * Drive view switcher\n */\nexport function DriveViewSwitcher() {\n const { view, onViewChange } = useDriveViewContext();\n\n return (\n <ToggleGroup\n type=\"single\"\n variant=\"outline\"\n value={view}\n onValueChange={(value) => {\n console.log(\"DriveViewSwitcher: Changing view to\", value);\n onViewChange(value ? (value as DriveViewMode) : \"grid\");\n }}\n >\n <ToggleGroupItem value=\"grid\" aria-label=\"Toggle grid view\">\n <LayoutGridIcon />\n </ToggleGroupItem>\n\n <ToggleGroupItem value=\"list\" aria-label=\"Toggle list view\">\n <StretchVerticalIcon />\n </ToggleGroupItem>\n </ToggleGroup>\n );\n}\n"],"mappings":";;;;;;;;;;;AASA,SAAgB,oBAAoB;CAClC,MAAM,EAAE,MAAM,iBAAiB,qBAAqB;AAEpD,QACE,qBAAC;EACC,MAAK;EACL,SAAQ;EACR,OAAO;EACP,gBAAgB,UAAU;AACxB,WAAQ,IAAI,uCAAuC,MAAM;AACzD,gBAAa,QAAS,QAA0B,OAAO;;aAGzD,oBAAC;GAAgB,OAAM;GAAO,cAAW;aACvC,oBAAC,mBAAiB;IACF,EAElB,oBAAC;GAAgB,OAAM;GAAO,cAAW;aACvC,oBAAC,wBAAsB;IACP;GACN"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"selection.client.d.mts","names":[],"sources":["../../src/components/selection.client.tsx"],"mappings":";;;;;;;;;KASY,0BAAA;EACV,SAAA,GAAY,SAAA;EACZ,mBAAA,IAAuB,IAAA,EAAM,SAAA;AAAA;;;;iBAQf,wBAAA,CAAA,GAAwB,0BAAA;;;;iBASxB,sBAAA,CAAA;EACd,SAAA;EACA,mBAAA;EACA;AAAA,GACC,iBAAA,CAAkB,0BAAA,IAA2B,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"selection.client.mjs","names":[],"sources":["../../src/components/selection.client.tsx"],"sourcesContent":["\"use client\";\n\nimport type { Selection } from \"@tulip-systems/core/data-tables\";\nimport { createContext, type PropsWithChildren, use, useMemo, useState } from \"react\";\nimport type { DriveNode } from \"@/lib/dto\";\n\n/**\n * DriveSelectionContextValue\n */\nexport type DriveSelectionContextValue = {\n selection?: Selection;\n selectionConditions?: (node: DriveNode) => boolean | boolean[];\n};\n\nconst DriveSelectionContext = createContext<DriveSelectionContextValue | null>(null);\n\n/**\n * useDriveSelectionContext\n */\nexport function useDriveSelectionContext() {\n const context = use(DriveSelectionContext);\n if (!context) throw new Error(\"DriveSelectionContext not found!\");\n return context;\n}\n\n/**\n * DriveSelectionProvider\n */\nexport function DriveSelectionProvider({\n selection,\n selectionConditions,\n children,\n}: PropsWithChildren<DriveSelectionContextValue>) {\n const [_rowSelection, _setRowSelection] = useState({});\n\n const value = useMemo(\n () => ({\n selection: {\n rowSelection: selection?.rowSelection ?? _rowSelection,\n setRowSelection: selection?.setRowSelection ?? _setRowSelection,\n },\n selectionConditions: selectionConditions,\n }),\n [selection, selectionConditions, _rowSelection],\n );\n\n return <DriveSelectionContext value={value}>{children}</DriveSelectionContext>;\n}\n"],"mappings":";;;;;;AAcA,MAAM,wBAAwB,cAAiD,KAAK;;;;AAKpF,SAAgB,2BAA2B;CACzC,MAAM,UAAU,IAAI,sBAAsB;AAC1C,KAAI,CAAC,QAAS,OAAM,IAAI,MAAM,mCAAmC;AACjE,QAAO;;;;;AAMT,SAAgB,uBAAuB,EACrC,WACA,qBACA,YACgD;CAChD,MAAM,CAAC,eAAe,oBAAoB,SAAS,EAAE,CAAC;AAatD,QAAO,oBAAC;EAAsB,OAXhB,eACL;GACL,WAAW;IACT,cAAc,WAAW,gBAAgB;IACzC,iBAAiB,WAAW,mBAAmB;IAChD;GACoB;GACtB,GACD;GAAC;GAAW;GAAqB;GAAc,CAChD;EAE4C;GAAiC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"view.client.d.mts","names":[],"sources":["../../src/components/view.client.tsx"],"mappings":";;;;KAKY,aAAA;;;AAAZ;KAKY,qBAAA;EACV,IAAA,EAAM,aAAA;EACN,YAAA,GAAe,IAAA,EAAM,aAAA;AAAA;AAFvB;;;AAAA,iBAUgB,mBAAA,CAAA,GAAmB,qBAAA;;;;KAoBvB,sBAAA,GAAyB,iBAAA,CAAkB,OAAA,CAAQ,qBAAA;EAC7D,WAAA,GAAc,aAAA;AAAA;AAAA,iBAGA,iBAAA,CAAkB,KAAA,EAAO,sBAAA,GAAsB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"view.client.mjs","names":[],"sources":["../../src/components/view.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { createContext, type PropsWithChildren, use, useCallback, useState } from \"react\";\nimport { DRIVE_VIEW_COOKIE, DRIVE_VIEW_COOKIE_MAX_AGE } from \"@/lib/constants\";\n\nexport type DriveViewMode = \"grid\" | \"list\";\n\n/**\n * DriveViewContextValue\n */\nexport type DriveViewContextValue = {\n view: DriveViewMode;\n onViewChange: (view: DriveViewMode) => void;\n};\n\nconst DriveViewContext = createContext<DriveViewContextValue | null>(null);\n\n/**\n * useDriveViewContext\n */\nexport function useDriveViewContext() {\n const context = use(DriveViewContext);\n\n if (!context) {\n console.warn(\"DriveViewContext not found!\");\n return {\n view: \"grid\" as DriveViewMode,\n onViewChange: () => {\n throw new Error(\"DriveViewContext not found!\");\n },\n };\n }\n\n return context;\n}\n\n/**\n * DriveViewProvider\n */\n\nexport type DriveViewProviderProps = PropsWithChildren<Partial<DriveViewContextValue>> & {\n initialView?: DriveViewMode;\n};\n\nexport function DriveViewProvider(props: DriveViewProviderProps) {\n const [_view, _setView] = useState<DriveViewMode>(props.view ?? props.initialView ?? \"grid\");\n const view = props.view ?? _view;\n\n const onViewChange = useCallback(\n (value: DriveViewMode | ((value: DriveViewMode) => DriveViewMode)) => {\n const viewState = typeof value === \"function\" ? value(view) : value;\n\n if (props.onViewChange) {\n props.onViewChange(viewState);\n } else {\n _setView(viewState);\n }\n\n // This sets the cookie to keep the view state.\n // biome-ignore lint/suspicious/noDocumentCookie: This is needed to persist the sidebar state across page reloads.\n document.cookie = `${DRIVE_VIEW_COOKIE}=${viewState}; path=/; max-age=${DRIVE_VIEW_COOKIE_MAX_AGE}`;\n },\n [props.onViewChange, view],\n );\n\n return <DriveViewContext value={{ view, onViewChange }}>{props.children}</DriveViewContext>;\n}\n"],"mappings":";;;;;;;AAeA,MAAM,mBAAmB,cAA4C,KAAK;;;;AAK1E,SAAgB,sBAAsB;CACpC,MAAM,UAAU,IAAI,iBAAiB;AAErC,KAAI,CAAC,SAAS;AACZ,UAAQ,KAAK,8BAA8B;AAC3C,SAAO;GACL,MAAM;GACN,oBAAoB;AAClB,UAAM,IAAI,MAAM,8BAA8B;;GAEjD;;AAGH,QAAO;;AAWT,SAAgB,kBAAkB,OAA+B;CAC/D,MAAM,CAAC,OAAO,YAAY,SAAwB,MAAM,QAAQ,MAAM,eAAe,OAAO;CAC5F,MAAM,OAAO,MAAM,QAAQ;AAmB3B,QAAO,oBAAC;EAAiB,OAAO;GAAE;GAAM,cAjBnB,aAClB,UAAqE;IACpE,MAAM,YAAY,OAAO,UAAU,aAAa,MAAM,KAAK,GAAG;AAE9D,QAAI,MAAM,aACR,OAAM,aAAa,UAAU;QAE7B,UAAS,UAAU;AAKrB,aAAS,SAAS,GAAG,kBAAkB,GAAG,UAAU,oBAAoB;MAE1E,CAAC,MAAM,cAAc,KAAK,CAC3B;GAEqD;YAAG,MAAM;GAA4B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"filters.mjs","names":["z"],"sources":["../../src/config/filters.ts"],"sourcesContent":["import {\n createTableFilters,\n parseFilterArray,\n parseFilterBoolean,\n} from \"@tulip-systems/core/data-tables\";\nimport z from \"zod\";\nimport { DRIVE_NODE_TYPES } from \"@/lib/constants\";\n\nexport const driveTreeFilters = createTableFilters({\n types: parseFilterArray(z.array(z.enum(DRIVE_NODE_TYPES))),\n contentTypes: parseFilterArray(z.array(z.string())),\n nodeIds: parseFilterArray(z.array(z.string())),\n isArchived: parseFilterBoolean(z.boolean()),\n});\n"],"mappings":";;;;;AAQA,MAAa,mBAAmB,mBAAmB;CACjD,OAAO,iBAAiBA,IAAE,MAAMA,IAAE,KAAK,iBAAiB,CAAC,CAAC;CAC1D,cAAc,iBAAiBA,IAAE,MAAMA,IAAE,QAAQ,CAAC,CAAC;CACnD,SAAS,iBAAiBA,IAAE,MAAMA,IAAE,QAAQ,CAAC,CAAC;CAC9C,YAAY,mBAAmBA,IAAE,SAAS,CAAC;CAC5C,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.mjs","names":[],"sources":["../../src/config/types.tsx"],"sourcesContent":["import {\n createStatusConfig,\n createStatusVariants,\n StatusBadge,\n StatusField,\n} from \"@tulip-systems/core/components\";\nimport { cva } from \"class-variance-authority\";\nimport {\n FileArchiveIcon,\n FileAudioIcon,\n FileIcon,\n FileImageIcon,\n FileSpreadsheetIcon,\n FileTextIcon,\n FileVideoIcon,\n} from \"lucide-react\";\nimport type { DriveNodeSubtype } from \"@/lib/validators\";\n\n/**\n * Node subtype config\n */\nexport const nodeSubtypeConfig = createStatusConfig<DriveNodeSubtype>([\n {\n value: \"image\",\n label: \"Afbeelding\",\n icon: FileImageIcon,\n className: \"stroke-blue-500\",\n },\n {\n value: \"document\",\n label: \"Document\",\n icon: FileTextIcon,\n className: \"stroke-red-600\",\n },\n {\n value: \"archive\",\n label: \"Archief\",\n icon: FileArchiveIcon,\n className: \"stroke-yellow-500\",\n },\n {\n value: \"audio\",\n label: \"Audio\",\n icon: FileAudioIcon,\n className: \"stroke-pink-500\",\n },\n {\n value: \"video\",\n label: \"Video\",\n icon: FileVideoIcon,\n className: \"stroke-purple-500\",\n },\n {\n value: \"spreadsheet\",\n label: \"Tabel\",\n icon: FileSpreadsheetIcon,\n className: \"stroke-green-600\",\n },\n {\n value: \"other\",\n label: \"Bestand\",\n icon: FileIcon,\n className: \"stroke-gray-400\",\n },\n]);\n\n/**\n * Node subtype variants\n */\nexport const nodeSubtypeVariants = cva(\"\", {\n variants: { status: createStatusVariants(nodeSubtypeConfig) },\n});\n\n/**\n * Node subtype badge\n */\nexport function NodeSubtypeBadge(props: { subtype: DriveNodeSubtype }) {\n return (\n <StatusBadge config={nodeSubtypeConfig} variants={nodeSubtypeVariants} status={props.subtype} />\n );\n}\n\n/**\n * Node subtype field\n */\nexport function NodeSubtypeField(props: { subtype: DriveNodeSubtype }) {\n return (\n <StatusField config={nodeSubtypeConfig} variants={nodeSubtypeVariants} status={props.subtype} />\n );\n}\n"],"mappings":";;;;;;;;;AAqBA,MAAa,oBAAoB,mBAAqC;CACpE;EACE,OAAO;EACP,OAAO;EACP,MAAM;EACN,WAAW;EACZ;CACD;EACE,OAAO;EACP,OAAO;EACP,MAAM;EACN,WAAW;EACZ;CACD;EACE,OAAO;EACP,OAAO;EACP,MAAM;EACN,WAAW;EACZ;CACD;EACE,OAAO;EACP,OAAO;EACP,MAAM;EACN,WAAW;EACZ;CACD;EACE,OAAO;EACP,OAAO;EACP,MAAM;EACN,WAAW;EACZ;CACD;EACE,OAAO;EACP,OAAO;EACP,MAAM;EACN,WAAW;EACZ;CACD;EACE,OAAO;EACP,OAAO;EACP,MAAM;EACN,WAAW;EACZ;CACF,CAAC;;;;AAKF,MAAa,sBAAsB,IAAI,IAAI,EACzC,UAAU,EAAE,QAAQ,qBAAqB,kBAAkB,EAAE,EAC9D,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.mts","names":[],"sources":["../../src/lib/constants.ts"],"mappings":";cAAa,eAAA;AAAA,cAEA,gBAAA;AAAA,cAEA,mBAAA;;;;cAaA,iBAAA;AAAA,cACA,yBAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.mjs","names":[],"sources":["../../src/lib/constants.ts"],"sourcesContent":["export const DRIVE_PROVIDERS = [\"local\", \"google\"] as const;\n\nexport const DRIVE_NODE_TYPES = [\"folder\", \"file\"] as const;\n\nexport const DRIVE_NODE_SUBTYPES = [\n \"image\",\n \"document\",\n \"spreadsheet\",\n \"video\",\n \"audio\",\n \"archive\",\n \"other\",\n] as const;\n\n/**\n * The cookie name for storing the drive view mode (grid or list).\n */\nexport const DRIVE_VIEW_COOKIE = \"tulip.drive_view_mode\" as const;\nexport const DRIVE_VIEW_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;\n"],"mappings":";AAAA,MAAa,kBAAkB,CAAC,SAAS,SAAS;AAElD,MAAa,mBAAmB,CAAC,UAAU,OAAO;AAElD,MAAa,sBAAsB;CACjC;CACA;CACA;CACA;CACA;CACA;CACA;CACD;;;;AAKD,MAAa,oBAAoB;AACjC,MAAa,4BAA4B,OAAU,KAAK"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"contracts.d.mts","names":[],"sources":["../../src/lib/contracts.ts"],"mappings":";;;;;KAiBY,0BAAA,eAAyC,aAAA,GAAgB,SAAA;EACnE,QAAA;EACA,YAAA;EACA,IAAA,EAAM,KAAA;AAAA;;;;;;;UASS,WAAA,eACD,aAAA,GAAgB,aAAA,4BACJ,qBAAA,CAAsB,KAAA,IAAS,qBAAA,CAAsB,KAAA,sBAC5D,cAAA,CAAe,KAAA,IAAS,cAAA,CAAe,KAAA;EAE1D,WAAA,CAAY,EAAA,WAAa,OAAA,CAAQ,KAAA;EAEjC,mBAAA,CAAoB,KAAA;IAAS,EAAA;IAAY,SAAA;EAAA,IAAsB,OAAA,CAAQ,iBAAA;EAEvE,kBAAA,CAAmB,KAAA,EAAO,4BAAA,GAA+B,OAAA,CAAQ,KAAA;EAEjE,QAAA,CAAS,KAAA,EAAO,kBAAA,GAAqB,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aAAgB,OAAA,CAAQ,KAAA;AAAA;;;;;;KAQ3B,KAAA,eAAoB,aAAA,GAAgB,aAAA,IAAiB,WAAA,CAAY,KAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"dto.d.mts","names":[],"sources":["../../src/lib/dto.ts"],"mappings":";;;;;AAMA;cAAa,uBAAA,EAAuB,CAAA,CAAA,OAAA;;;;KACxB,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,uBAAA;;;;cAKlC,mBAAA,EAAmB,CAAA,CAAA,OAAA;;;;KACpB,aAAA,GAAgB,CAAA,CAAE,KAAA,QAAa,mBAAA;;;;cAK9B,sBAAA,EAAsB,CAAA,CAAA,OAAA;;;;;;;;;KACvB,gBAAA,GAAmB,CAAA,CAAE,KAAA,QAAa,sBAAA;;;AAN9C;cAWa,2BAAA,EAA2B,CAAA,CAAA,OAAA;;;;;KAC5B,qBAAA,GAAwB,CAAA,CAAE,KAAA,QAAa,2BAAA;;;AAPnD;cAYa,oBAAA,EAAoB,CAAA,CAAA,SAAA;;;;;;KAMrB,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,oBAAA;;;;cAK/B,eAAA,EAAe,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkBhB,SAAA,GAAY,CAAA,CAAE,KAAA,QAAa,eAAA;AAAA,KAC3B,aAAA,GAAgB,IAAA,CAAK,SAAA;;;;KAKrB,qBAAA,eAAoC,aAAA,GAAgB,SAAA,IAAa,KAAA;EAC3E,QAAA,EAAU,KAAA;AAAA;;;;KAMA,iBAAA,eAAgC,aAAA,GAAgB,SAAA,IAAa,IAAA,CACvE,KAAA;EAGA,KAAA;AAAA;;;;KAMU,cAAA,eAA6B,aAAA,GAAgB,SAAA,IAAa,KAAA;EAAU,KAAA;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"dto.mjs","names":[],"sources":["../../src/lib/dto.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { DRIVE_NODE_SUBTYPES, DRIVE_NODE_TYPES, DRIVE_PROVIDERS } from \"./constants\";\n\n/**\n * Drive node provider\n */\nexport const driveNodeProviderSchema = z.enum(DRIVE_PROVIDERS);\nexport type DriveNodeProvider = z.infer<typeof driveNodeProviderSchema>;\n\n/**\n * Drive node type\n */\nexport const driveNodeTypeSchema = z.enum(DRIVE_NODE_TYPES);\nexport type DriveNodeType = z.infer<typeof driveNodeTypeSchema>;\n\n/**\n * Drive node subtype\n */\nexport const driveNodeSubtypeSchema = z.enum(DRIVE_NODE_SUBTYPES);\nexport type DriveNodeSubtype = z.infer<typeof driveNodeSubtypeSchema>;\n\n/**\n * Node availability\n */\nexport const driveNodeAvailabilitySchema = z.enum([\"ready\", \"pending\", \"failed\"]);\nexport type DriveNodeAvailability = z.infer<typeof driveNodeAvailabilitySchema>;\n\n/**\n * Node links\n */\nexport const driveNodeLinksSchema = z.object({\n view: z.string().nullable(),\n download: z.string().nullable(),\n preview: z.string().nullable(),\n thumbnail: z.string().nullable(),\n});\nexport type DriveNodeLinks = z.infer<typeof driveNodeLinksSchema>;\n\n/**\n * Node\n */\nexport const driveNodeSchema = z.object({\n id: z.string(),\n provider: driveNodeProviderSchema,\n createdAt: z.date(),\n updatedAt: z.date(),\n name: z.string(),\n namespace: z.string(),\n type: driveNodeTypeSchema,\n subtype: driveNodeSubtypeSchema,\n size: z.number().nullable(),\n contentType: z.string().nullable(),\n readonly: z.boolean(),\n hidden: z.boolean(),\n archivedAt: z.date().nullable(),\n parentId: z.string().nullable(),\n links: driveNodeLinksSchema,\n availability: driveNodeAvailabilitySchema,\n});\nexport type DriveNode = z.infer<typeof driveNodeSchema>;\nexport type DriveNodeBase = Omit<DriveNode, \"provider\">;\n\n/**\n * Node with children\n */\nexport type DriveNodeWithChildren<TNode extends DriveNodeBase = DriveNode> = TNode & {\n children: TNode[];\n};\n\n/**\n * Node parent and child types\n */\nexport type DriveFolderParent<TNode extends DriveNodeBase = DriveNode> = Pick<\n TNode,\n \"id\" | \"name\" | \"parentId\"\n> & {\n depth: number;\n};\n\n/**\n * Node child type\n */\nexport type DriveNodeChild<TNode extends DriveNodeBase = DriveNode> = TNode & { depth: number };\n"],"mappings":";;;;;;;AAMA,MAAa,0BAA0B,EAAE,KAAK,gBAAgB;;;;AAM9D,MAAa,sBAAsB,EAAE,KAAK,iBAAiB;;;;AAM3D,MAAa,yBAAyB,EAAE,KAAK,oBAAoB;;;;AAMjE,MAAa,8BAA8B,EAAE,KAAK;CAAC;CAAS;CAAW;CAAS,CAAC;;;;AAMjF,MAAa,uBAAuB,EAAE,OAAO;CAC3C,MAAM,EAAE,QAAQ,CAAC,UAAU;CAC3B,UAAU,EAAE,QAAQ,CAAC,UAAU;CAC/B,SAAS,EAAE,QAAQ,CAAC,UAAU;CAC9B,WAAW,EAAE,QAAQ,CAAC,UAAU;CACjC,CAAC;;;;AAMF,MAAa,kBAAkB,EAAE,OAAO;CACtC,IAAI,EAAE,QAAQ;CACd,UAAU;CACV,WAAW,EAAE,MAAM;CACnB,WAAW,EAAE,MAAM;CACnB,MAAM,EAAE,QAAQ;CAChB,WAAW,EAAE,QAAQ;CACrB,MAAM;CACN,SAAS;CACT,MAAM,EAAE,QAAQ,CAAC,UAAU;CAC3B,aAAa,EAAE,QAAQ,CAAC,UAAU;CAClC,UAAU,EAAE,SAAS;CACrB,QAAQ,EAAE,SAAS;CACnB,YAAY,EAAE,MAAM,CAAC,UAAU;CAC/B,UAAU,EAAE,QAAQ,CAAC,UAAU;CAC/B,OAAO;CACP,cAAc;CACf,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.d.mts","names":[],"sources":["../../src/lib/helpers.ts"],"mappings":";;;;;AAKA;iBAAgB,MAAA,CAAO,IAAA,EAAM,IAAA,CAAK,SAAA,YAAqB,IAAA,IAAQ,SAAA;;;;iBAO/C,QAAA,CAAS,IAAA,EAAM,IAAA,CAAK,SAAA,YAAqB,IAAA,IAAQ,SAAA;;;;iBAOjD,WAAA,CAAY,KAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.mjs","names":[],"sources":["../../src/lib/helpers.ts"],"sourcesContent":["import type { DriveNode } from \"./dto\";\n\n/**\n * Check if the node is a file\n */\nexport function isFile(node: Pick<DriveNode, \"type\">): node is DriveNode {\n return node.type === \"file\";\n}\n\n/**\n * Check if the node is a folder\n */\nexport function isFolder(node: Pick<DriveNode, \"type\">): node is DriveNode {\n return node.type === \"folder\";\n}\n\n/**\n * Render bytes\n */\nexport function renderBytes(bytes: number) {\n const units = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\"];\n\n let size = bytes;\n let unitIndex = 0;\n\n while (size >= 1024 && unitIndex < units.length - 1) {\n size /= 1024;\n unitIndex++;\n }\n\n return `${size.toFixed(2)}${units[unitIndex]}`;\n}\n"],"mappings":";;;;AAKA,SAAgB,OAAO,MAAkD;AACvE,QAAO,KAAK,SAAS;;;;;AAMvB,SAAgB,SAAS,MAAkD;AACzE,QAAO,KAAK,SAAS;;;;;AAMvB,SAAgB,YAAY,OAAe;CACzC,MAAM,QAAQ;EAAC;EAAK;EAAM;EAAM;EAAM;EAAM;EAAK;CAEjD,IAAI,OAAO;CACX,IAAI,YAAY;AAEhB,QAAO,QAAQ,QAAQ,YAAY,MAAM,SAAS,GAAG;AACnD,UAAQ;AACR;;AAGF,QAAO,GAAG,KAAK,QAAQ,EAAE,GAAG,MAAM"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.server.d.mts","names":[],"sources":["../../src/lib/helpers.server.ts"],"mappings":";;;;;;;AAWA;;;iBAAgB,2BAAA,CAA4B,YAAA,EAAc,OAAA,CAAQ,UAAA,QAAkB,OAAA,KAC7B,aAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.server.mjs","names":[],"sources":["../../src/lib/helpers.server.ts"],"sourcesContent":["import \"server-cli-only\";\n\nimport type { cookies } from \"next/headers\";\nimport type { DriveViewMode } from \"@/components/view.client\";\nimport { DRIVE_VIEW_COOKIE } from \"./constants\";\n\n/**\n * Helper function to get the drive view mode from cookies\n * @param cookiesStore - The cookies store from Next.js headers\n * @returns The drive view mode (\"grid\" or \"list\") or undefined if not set\n */\nexport function getDriveViewModeFromCookies(cookiesStore: Awaited<ReturnType<typeof cookies>>) {\n return cookiesStore.get(DRIVE_VIEW_COOKIE)?.value as DriveViewMode | undefined;\n}\n"],"mappings":";;;;;;;;;AAWA,SAAgB,4BAA4B,cAAmD;AAC7F,QAAO,aAAa,IAAI,kBAAkB,EAAE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"search-params.d.mts","names":[],"sources":["../../src/lib/search-params.ts"],"mappings":";;;cAEa,qBAAA;YAEZ,YAAA,CAAA,mBAAA;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"search-params.mjs","names":[],"sources":["../../src/lib/search-params.ts"],"sourcesContent":["import { parseAsString } from \"nuqs/server\";\n\nexport const driveTreeSearchParams = {\n parentId: parseAsString,\n};\n"],"mappings":";;;AAEA,MAAa,wBAAwB,EACnC,UAAU,eACX"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"validators.d.mts","names":[],"sources":["../../src/lib/validators.ts"],"mappings":";;;;;AAQA;;cAAa,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;KAK7B,sBAAA,GAAyB,CAAA,CAAE,KAAA,QAAa,4BAAA;AAAA,KACxC,uBAAA,GAA0B,CAAA,CAAE,KAAA,QAAa,4BAAA;;;;cAKxC,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;KAG3B,oBAAA,GAAuB,CAAA,CAAE,KAAA,QAAa,0BAAA;AAAA,KACtC,qBAAA,GAAwB,CAAA,CAAE,KAAA,QAAa,0BAAA;;;;;cAMtC,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;KAO3B,oBAAA,GAAuB,CAAA,CAAE,KAAA,QAAa,0BAAA;AAAA,KACtC,qBAAA,GAAwB,CAAA,CAAE,KAAA,QAAa,0BAAA;;;AAxBnD;;cA8Ba,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;KAQ5B,qBAAA,GAAwB,CAAA,CAAE,KAAA,QAAa,2BAAA;AAAA,KACvC,sBAAA,GAAyB,CAAA,CAAE,KAAA,QAAa,2BAAA;;;;cAKvC,uBAAA,EAAuB,CAAA,CAAA,OAAA,CAAA,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;KAWxB,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,uBAAA;;;;cAKlC,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAIzB,kBAAA,GAAqB,CAAA,CAAE,KAAA,QAAa,wBAAA;AAAA,KACpC,mBAAA,GAAsB,CAAA,CAAE,KAAA,QAAa,wBAAA;;;;cAKpC,6BAAA,EAA6B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAI9B,4BAAA,GAA+B,CAAA,CAAE,KAAA,QAAa,6BAAA;AAAA,KAC9C,6BAAA,GAAgC,CAAA,CAAE,KAAA,QAAa,6BAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"validators.mjs","names":[],"sources":["../../src/lib/validators.ts"],"sourcesContent":["import { resolveFiltersSchema, tableQuerySchema } from \"@tulip-systems/core/data-tables\";\nimport { z } from \"zod\";\nimport { driveTreeFilters } from \"@/config/filters\";\n\n/**\n * Create drive folder input schema\n * @description zod schema for validating the input of the create drive folder command\n */\nexport const createDriveFolderInputSchema = z.object({\n name: z.string(),\n namespace: z.string(),\n parentId: z.string().nullable().optional(),\n});\nexport type CreateDriveFolderInput = z.input<typeof createDriveFolderInputSchema>;\nexport type CreateDriveFolderSchema = z.infer<typeof createDriveFolderInputSchema>;\n\n/**\n * Update drive node input schema\n */\nexport const updateDriveNodeInputSchema = z.object({\n name: z.string().optional(),\n});\nexport type UpdateDriveNodeInput = z.input<typeof updateDriveNodeInputSchema>;\nexport type UpdateDriveNodeSchema = z.infer<typeof updateDriveNodeInputSchema>;\n\n/**\n * Upload drive file input schema\n * @description zod schema for validating the input of the upload drive file command\n */\nexport const uploadDriveFileInputSchema = z.object({\n name: z.string(),\n namespace: z.string(),\n parentId: z.string().nullable().optional(),\n contentType: z.string().nullable().optional(),\n size: z.number().nullable().optional(),\n});\nexport type UploadDriveFileInput = z.input<typeof uploadDriveFileInputSchema>;\nexport type UploadDriveFileSchema = z.infer<typeof uploadDriveFileInputSchema>;\n\n/**\n * Presign drive file input schema\n * @description zod schema for validating the input of the presign drive file command\n */\nexport const presignDriveFileInputSchema = z.object({\n name: z.string(),\n namespace: z.string(),\n parentId: z.string().nullable().optional(),\n contentType: z.string().nullable().optional(),\n size: z.number().nullable().optional(),\n});\n\nexport type PresignDriveFileInput = z.input<typeof presignDriveFileInputSchema>;\nexport type PresignDriveFileSchema = z.infer<typeof presignDriveFileInputSchema>;\n\n/**\n * Table filters\n */\nexport const driveTableFiltersSchema = resolveFiltersSchema(driveTreeFilters)\n .partial()\n .extend({\n namespace: z.string(),\n parentId: z.string().nullable(),\n })\n .transform((input) => ({\n ...input,\n isArchived: input?.isArchived ?? false,\n }));\n\nexport type NodesTableFilters = z.infer<typeof driveTableFiltersSchema>;\n\n/**\n * List tree input schema\n */\nexport const listDriveTreeInputSchema = tableQuerySchema.extend({\n filters: driveTableFiltersSchema,\n});\n\nexport type ListDriveTreeInput = z.input<typeof listDriveTreeInputSchema>;\nexport type ListDriveTreeSchema = z.infer<typeof listDriveTreeInputSchema>;\n\n/**\n * Get nodes by parent id input schema\n */\nexport const getNodesByParentIdInputSchema = tableQuerySchema\n .pick({ order: true, sort: true, search: true })\n .extend({ filters: driveTableFiltersSchema });\n\nexport type GetDriveNodesByParentIdInput = z.input<typeof getNodesByParentIdInputSchema>;\nexport type GetDriveNodesByParentIdSchema = z.infer<typeof getNodesByParentIdInputSchema>;\n"],"mappings":";;;;;;;;;AAQA,MAAa,+BAA+B,EAAE,OAAO;CACnD,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OAAA,CAAQ,0BAAA;EACvB,SAAA,GAAY,MAAA,EAAQ,0BAAA,KAA+B,UAAA;EACnD,QAAA,EAAU,eAAA,CAAgB,KAAA,EAAO,MAAA,EAAQ,UAAA,EAAY,eAAA;AAAA;;;;;iBAOvC,4BAAA,2BAEL,YAAA,kDAAA,CAAA;EAIT,aAAA;EACA,SAAA;EACA;AAAA,GACC,iCAAA,CAAkC,KAAA,EAAO,MAAA,EAAQ,UAAA,EAAY,eAAA,IAAgB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-file-update.mjs","names":[],"sources":["../../../../src/providers/google/components/command-file-update.tsx"],"sourcesContent":["\"use client\";\n\nimport { zodResolver } from \"@hookform/resolvers/zod\";\nimport type { DefaultError, MutationOptions } from \"@tanstack/react-query\";\nimport {\n CommandFormDialog,\n CommandFormDialogCancel,\n CommandFormDialogContent,\n CommandFormDialogFields,\n CommandFormDialogFooter,\n CommandFormDialogHeader,\n CommandFormDialogSubmit,\n CommandFormDialogTitle,\n CommandFormDialogTrigger,\n CommandLabel,\n} from \"@tulip-systems/core/commands/client\";\nimport { Input } from \"@tulip-systems/core/components\";\nimport {\n Form,\n FormControl,\n FormField,\n FormItem,\n FormLabel,\n FormMessage,\n} from \"@tulip-systems/core/components/client\";\nimport { FilePen } from \"lucide-react\";\nimport { useForm } from \"react-hook-form\";\nimport {\n type UpdateGoogleDriveNodeInput,\n updateGoogleDriveNodeInputSchema,\n} from \"../lib/validators\";\n\nexport type GoogleDriveFileUpdateCommandProps<\n TData = unknown,\n TError = DefaultError,\n TVariables = unknown,\n TOnMutateResult = unknown,\n> = {\n defaultValues: Partial<UpdateGoogleDriveNodeInput>;\n variables: (values: UpdateGoogleDriveNodeInput) => TVariables;\n mutation: MutationOptions<TData, TError, TVariables, TOnMutateResult>;\n};\n\n/**\n * File update command\n * @description command to update a Google Drive file\n */\nexport function GoogleDriveFileUpdateCommand<\n TData = unknown,\n TError = DefaultError,\n TVariables = unknown,\n TOnMutateResult = unknown,\n>({\n defaultValues,\n variables,\n mutation,\n}: GoogleDriveFileUpdateCommandProps<TData, TError, TVariables, TOnMutateResult>) {\n const form = useForm<UpdateGoogleDriveNodeInput>({\n resolver: zodResolver(updateGoogleDriveNodeInputSchema),\n defaultValues,\n });\n\n return (\n <Form {...form}>\n <CommandFormDialog>\n <CommandFormDialogTrigger label=\"Wijzigen\">\n <FilePen className=\"size-4\" />\n <CommandLabel />\n </CommandFormDialogTrigger>\n\n <CommandFormDialogContent variables={variables} mutation={mutation}>\n <CommandFormDialogHeader>\n <CommandFormDialogTitle>Bestand wijzigen</CommandFormDialogTitle>\n </CommandFormDialogHeader>\n\n <CommandFormDialogFields>\n <FormField\n control={form.control}\n name=\"name\"\n render={({ field }) => (\n <FormItem>\n <FormLabel>Naam</FormLabel>\n <FormControl>\n <Input {...field} value={field.value ?? \"\"} />\n </FormControl>\n <FormMessage />\n </FormItem>\n )}\n />\n </CommandFormDialogFields>\n\n <CommandFormDialogFooter>\n <CommandFormDialogCancel>Annuleren</CommandFormDialogCancel>\n <CommandFormDialogSubmit>Opslaan</CommandFormDialogSubmit>\n </CommandFormDialogFooter>\n </CommandFormDialogContent>\n </CommandFormDialog>\n </Form>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA+CA,SAAgB,6BAKd,EACA,eACA,WACA,YACgF;CAChF,MAAM,OAAO,QAAoC;EAC/C,UAAU,YAAY,iCAAiC;EACvD;EACD,CAAC;AAEF,QACE,oBAAC;EAAK,GAAI;YACR,qBAAC,gCACC,qBAAC;GAAyB,OAAM;cAC9B,oBAAC,WAAQ,WAAU,WAAW,EAC9B,oBAAC,iBAAe;IACS,EAE3B,qBAAC;GAAoC;GAAqB;;IACxD,oBAAC,qCACC,oBAAC,oCAAuB,qBAAyC,GACzC;IAE1B,oBAAC,qCACC,oBAAC;KACC,SAAS,KAAK;KACd,MAAK;KACL,SAAS,EAAE,YACT,qBAAC;MACC,oBAAC,uBAAU,SAAgB;MAC3B,oBAAC,yBACC,oBAAC;OAAM,GAAI;OAAO,OAAO,MAAM,SAAS;QAAM,GAClC;MACd,oBAAC,gBAAc;SACN;MAEb,GACsB;IAE1B,qBAAC,sCACC,oBAAC,qCAAwB,cAAmC,EAC5D,oBAAC,qCAAwB,YAAiC,IAClC;;IACD,IACT;GACf"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-folder-create.d.mts","names":[],"sources":["../../../../src/providers/google/components/command-folder-create.tsx"],"mappings":";;;;;KAkCY,oCAAA,2BAED,YAAA;EAIT,aAAA,GAAgB,OAAA,CAAQ,4BAAA;EACxB,SAAA,GAAY,MAAA,EAAQ,4BAAA,KAAiC,UAAA;EACrD,QAAA,EAAU,eAAA,CAAgB,KAAA,EAAO,MAAA,EAAQ,UAAA,EAAY,eAAA;AAAA;;;;;iBAOvC,+BAAA,2BAEL,YAAA,kDAAA,CAAA;EAIT,aAAA;EACA,SAAA;EACA;AAAA,GACC,oCAAA,CAAqC,KAAA,EAAO,MAAA,EAAQ,UAAA,EAAY,eAAA,IAAgB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-folder-create.mjs","names":[],"sources":["../../../../src/providers/google/components/command-folder-create.tsx"],"sourcesContent":["\"use client\";\n\nimport { zodResolver } from \"@hookform/resolvers/zod\";\nimport type { DefaultError, MutationOptions } from \"@tanstack/react-query\";\nimport {\n CommandFormDialog,\n CommandFormDialogCancel,\n CommandFormDialogContent,\n CommandFormDialogFields,\n CommandFormDialogFooter,\n CommandFormDialogHeader,\n CommandFormDialogSubmit,\n CommandFormDialogTitle,\n CommandFormDialogTrigger,\n CommandLabel,\n} from \"@tulip-systems/core/commands/client\";\nimport { Input } from \"@tulip-systems/core/components\";\nimport {\n Form,\n FormControl,\n FormField,\n FormItem,\n FormLabel,\n FormMessage,\n} from \"@tulip-systems/core/components/client\";\nimport { FolderPlus } from \"lucide-react\";\nimport { useQueryStates } from \"nuqs\";\nimport { useForm } from \"react-hook-form\";\nimport { driveTreeSearchParams } from \"@/lib/search-params\";\nimport {\n type CreateGoogleDriveFolderInput,\n createGoogleDriveFolderInputSchema,\n} from \"../lib/validators\";\n\nexport type GoogleDriveFoldersCreateCommandProps<\n TData = unknown,\n TError = DefaultError,\n TVariables = unknown,\n TOnMutateResult = unknown,\n> = {\n defaultValues?: Partial<CreateGoogleDriveFolderInput>;\n variables: (values: CreateGoogleDriveFolderInput) => TVariables;\n mutation: MutationOptions<TData, TError, TVariables, TOnMutateResult>;\n};\n\n/**\n * Folders create command\n * @description command to create a Google Drive folder\n */\nexport function GoogleDriveFoldersCreateCommand<\n TData = unknown,\n TError = DefaultError,\n TVariables = unknown,\n TOnMutateResult = unknown,\n>({\n defaultValues,\n variables,\n mutation,\n}: GoogleDriveFoldersCreateCommandProps<TData, TError, TVariables, TOnMutateResult>) {\n const [{ parentId }] = useQueryStates(driveTreeSearchParams);\n\n const form = useForm<CreateGoogleDriveFolderInput>({\n resolver: zodResolver(createGoogleDriveFolderInputSchema),\n defaultValues: { ...defaultValues, parentId },\n });\n\n return (\n <Form {...form}>\n <CommandFormDialog>\n <CommandFormDialogTrigger label=\"Folder toevoegen\" hotkey=\"mod+i\">\n <FolderPlus className=\"size-4\" />\n <CommandLabel />\n </CommandFormDialogTrigger>\n\n <CommandFormDialogContent variables={variables} mutation={mutation}>\n <CommandFormDialogHeader>\n <CommandFormDialogTitle>Folder toevoegen</CommandFormDialogTitle>\n </CommandFormDialogHeader>\n\n <CommandFormDialogFields>\n <FormField\n control={form.control}\n name=\"name\"\n render={({ field }) => (\n <FormItem>\n <FormLabel>Naam</FormLabel>\n <FormControl>\n <Input {...field} value={field.value ?? \"\"} />\n </FormControl>\n <FormMessage />\n </FormItem>\n )}\n />\n </CommandFormDialogFields>\n\n <CommandFormDialogFooter>\n <CommandFormDialogCancel>Annuleren</CommandFormDialogCancel>\n <CommandFormDialogSubmit>Toevoegen</CommandFormDialogSubmit>\n </CommandFormDialogFooter>\n </CommandFormDialogContent>\n </CommandFormDialog>\n </Form>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAiDA,SAAgB,gCAKd,EACA,eACA,WACA,YACmF;CACnF,MAAM,CAAC,EAAE,cAAc,eAAe,sBAAsB;CAE5D,MAAM,OAAO,QAAsC;EACjD,UAAU,YAAY,mCAAmC;EACzD,eAAe;GAAE,GAAG;GAAe;GAAU;EAC9C,CAAC;AAEF,QACE,oBAAC;EAAK,GAAI;YACR,qBAAC,gCACC,qBAAC;GAAyB,OAAM;GAAmB,QAAO;cACxD,oBAAC,cAAW,WAAU,WAAW,EACjC,oBAAC,iBAAe;IACS,EAE3B,qBAAC;GAAoC;GAAqB;;IACxD,oBAAC,qCACC,oBAAC,oCAAuB,qBAAyC,GACzC;IAE1B,oBAAC,qCACC,oBAAC;KACC,SAAS,KAAK;KACd,MAAK;KACL,SAAS,EAAE,YACT,qBAAC;MACC,oBAAC,uBAAU,SAAgB;MAC3B,oBAAC,yBACC,oBAAC;OAAM,GAAI;OAAO,OAAO,MAAM,SAAS;QAAM,GAClC;MACd,oBAAC,gBAAc;SACN;MAEb,GACsB;IAE1B,qBAAC,sCACC,oBAAC,qCAAwB,cAAmC,EAC5D,oBAAC,qCAAwB,cAAmC,IACpC;;IACD,IACT;GACf"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-folder-update.d.mts","names":[],"sources":["../../../../src/providers/google/components/command-folder-update.tsx"],"mappings":";;;;;KAgCY,oCAAA,2BAED,YAAA;EAIT,aAAA,EAAe,OAAA,CAAQ,0BAAA;EACvB,SAAA,GAAY,MAAA,EAAQ,0BAAA,KAA+B,UAAA;EACnD,QAAA,EAAU,eAAA,CAAgB,KAAA,EAAO,MAAA,EAAQ,UAAA,EAAY,eAAA;AAAA;;;;;iBAOvC,+BAAA,2BAEL,YAAA,kDAAA,CAAA;EAIT,aAAA;EACA,SAAA;EACA;AAAA,GACC,oCAAA,CAAqC,KAAA,EAAO,MAAA,EAAQ,UAAA,EAAY,eAAA,IAAgB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-folder-update.mjs","names":[],"sources":["../../../../src/providers/google/components/command-folder-update.tsx"],"sourcesContent":["\"use client\";\n\nimport { zodResolver } from \"@hookform/resolvers/zod\";\nimport type { DefaultError, MutationOptions } from \"@tanstack/react-query\";\nimport {\n CommandFormDialog,\n CommandFormDialogCancel,\n CommandFormDialogContent,\n CommandFormDialogFields,\n CommandFormDialogFooter,\n CommandFormDialogHeader,\n CommandFormDialogSubmit,\n CommandFormDialogTitle,\n CommandFormDialogTrigger,\n CommandLabel,\n} from \"@tulip-systems/core/commands/client\";\nimport { Input } from \"@tulip-systems/core/components\";\nimport {\n Form,\n FormControl,\n FormField,\n FormItem,\n FormLabel,\n FormMessage,\n} from \"@tulip-systems/core/components/client\";\nimport { FolderPen } from \"lucide-react\";\nimport { useForm } from \"react-hook-form\";\nimport {\n type UpdateGoogleDriveNodeInput,\n updateGoogleDriveNodeInputSchema,\n} from \"../lib/validators\";\n\nexport type GoogleDriveFoldersUpdateCommandProps<\n TData = unknown,\n TError = DefaultError,\n TVariables = unknown,\n TOnMutateResult = unknown,\n> = {\n defaultValues: Partial<UpdateGoogleDriveNodeInput>;\n variables: (values: UpdateGoogleDriveNodeInput) => TVariables;\n mutation: MutationOptions<TData, TError, TVariables, TOnMutateResult>;\n};\n\n/**\n * Folders update command\n * @description command to update a Google Drive folder\n */\nexport function GoogleDriveFoldersUpdateCommand<\n TData = unknown,\n TError = DefaultError,\n TVariables = unknown,\n TOnMutateResult = unknown,\n>({\n defaultValues,\n variables,\n mutation,\n}: GoogleDriveFoldersUpdateCommandProps<TData, TError, TVariables, TOnMutateResult>) {\n const form = useForm<UpdateGoogleDriveNodeInput>({\n resolver: zodResolver(updateGoogleDriveNodeInputSchema),\n defaultValues,\n });\n\n return (\n <Form {...form}>\n <CommandFormDialog>\n <CommandFormDialogTrigger label=\"Wijzigen\">\n <FolderPen className=\"size-4\" />\n <CommandLabel />\n </CommandFormDialogTrigger>\n\n <CommandFormDialogContent variables={variables} mutation={mutation}>\n <CommandFormDialogHeader>\n <CommandFormDialogTitle>Folder wijzigen</CommandFormDialogTitle>\n </CommandFormDialogHeader>\n\n <CommandFormDialogFields>\n <FormField\n control={form.control}\n name=\"name\"\n render={({ field }) => (\n <FormItem>\n <FormLabel>Naam</FormLabel>\n <FormControl>\n <Input {...field} value={field.value ?? \"\"} />\n </FormControl>\n <FormMessage />\n </FormItem>\n )}\n />\n </CommandFormDialogFields>\n\n <CommandFormDialogFooter>\n <CommandFormDialogCancel>Annuleren</CommandFormDialogCancel>\n <CommandFormDialogSubmit>Opslaan</CommandFormDialogSubmit>\n </CommandFormDialogFooter>\n </CommandFormDialogContent>\n </CommandFormDialog>\n </Form>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA+CA,SAAgB,gCAKd,EACA,eACA,WACA,YACmF;CACnF,MAAM,OAAO,QAAoC;EAC/C,UAAU,YAAY,iCAAiC;EACvD;EACD,CAAC;AAEF,QACE,oBAAC;EAAK,GAAI;YACR,qBAAC,gCACC,qBAAC;GAAyB,OAAM;cAC9B,oBAAC,aAAU,WAAU,WAAW,EAChC,oBAAC,iBAAe;IACS,EAE3B,qBAAC;GAAoC;GAAqB;;IACxD,oBAAC,qCACC,oBAAC,oCAAuB,oBAAwC,GACxC;IAE1B,oBAAC,qCACC,oBAAC;KACC,SAAS,KAAK;KACd,MAAK;KACL,SAAS,EAAE,YACT,qBAAC;MACC,oBAAC,uBAAU,SAAgB;MAC3B,oBAAC,yBACC,oBAAC;OAAM,GAAI;OAAO,OAAO,MAAM,SAAS;QAAM,GAClC;MACd,oBAAC,gBAAc;SACN;MAEb,GACsB;IAE1B,qBAAC,sCACC,oBAAC,qCAAwB,cAAmC,EAC5D,oBAAC,qCAAwB,YAAiC,IAClC;;IACD,IACT;GACf"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"content.client.d.mts","names":[],"sources":["../../../../src/providers/google/components/content.client.tsx"],"mappings":";;;;;AAKA;cAAa,kBAAA,SAAkB,YAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"content.client.mjs","names":[],"sources":["../../../../src/providers/google/components/content.client.tsx"],"sourcesContent":["import { DriveContent } from \"@/components/content\";\n\n/**\n * GoogleDriveContent\n */\nexport const GoogleDriveContent = DriveContent;\n"],"mappings":";;;;;;AAKA,MAAa,qBAAqB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"navigation.client.d.mts","names":[],"sources":["../../../../src/providers/google/components/navigation.client.tsx"],"mappings":";;;;;;cAca,iBAAA,SAAiB,WAAA;AAAA,cACjB,4BAAA,SAA4B,sBAAA;AAAA,cAC5B,sBAAA,SAAsB,gBAAA;AAAA,cACtB,kBAAA,SAAkB,YAAA;AAAA,cAClB,6BAAA,SAAuD,gBAAA;AAAA,cACvD,uBAAA,SAAuB,iBAAA;AAAA,cACvB,uBAAA,SAAuB,iBAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"navigation.client.mjs","names":[],"sources":["../../../../src/providers/google/components/navigation.client.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n DriveHeader,\n DriveHeaderBreadcrumbs,\n DriveHeaderTools,\n} from \"@/components/navigation/header.client\";\nimport {\n DriveToolbar,\n DriveToolbarBreadcrumbs,\n DriveToolbarTools,\n} from \"@/components/navigation/toolbar.client\";\nimport { DriveViewSwitcher } from \"@/components/navigation/view-switcher.client\";\n\nexport const GoogleDriveHeader = DriveHeader;\nexport const GoogleDriveHeaderBreadcrumbs = DriveHeaderBreadcrumbs;\nexport const GoogleDriveHeaderTools = DriveHeaderTools;\nexport const GoogleDriveToolbar = DriveToolbar;\nexport const GoogleDriveToolbarBreadcrumbs = DriveToolbarBreadcrumbs;\nexport const GoogleDriveToolbarTools = DriveToolbarTools;\nexport const GoogleDriveViewSwitcher = DriveViewSwitcher;\n"],"mappings":";;;;;;;AAcA,MAAa,oBAAoB;AACjC,MAAa,+BAA+B;AAC5C,MAAa,yBAAyB;AACtC,MAAa,qBAAqB;AAClC,MAAa,gCAAgC;AAC7C,MAAa,0BAA0B;AACvC,MAAa,0BAA0B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"provider.client.d.mts","names":[],"sources":["../../../../src/providers/google/components/provider.client.tsx"],"mappings":";;;;;;;;;;;KAeY,uBAAA,GAA0B,iBAAA;AAAA,cAEzB,kBAAA,EAAkB,KAAA,CAAA,OAAA,CAAA,iBAAA;;;;iBAKf,qBAAA,CAAA,GAAqB,iBAAA;AALrC;;;AAAA,KAcK,wBAAA,GAA2B,iBAAA,CAC9B,uBAAA,GACE,OAAA,CAAQ,0BAAA,IACR,IAAA,CAAK,sBAAA;AAAA,iBAGO,mBAAA,CAAA;EACd,WAAA;EACA,SAAA;EACA,UAAA;EACA,IAAA;EACA,SAAA;EACA,mBAAA;EACA;AAAA,GACC,wBAAA,GAAwB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"provider.client.mjs","names":[],"sources":["../../../../src/providers/google/components/provider.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { Allowed } from \"@tulip-systems/core/auth/client\";\nimport { createContext, type PropsWithChildren, use } from \"react\";\nimport type { DriveContextValue } from \"@/components/context.client\";\nimport { DriveDragDropProvider } from \"@/components/dnd.client\";\nimport {\n type DriveSelectionContextValue,\n DriveSelectionProvider,\n} from \"@/components/selection.client\";\nimport { DriveViewProvider, type DriveViewProviderProps } from \"@/components/view.client\";\n\n/**\n * GoogleDriveContextValue\n */\nexport type GoogleDriveContextValue = DriveContextValue;\n\nexport const GoogleDriveContext = createContext({} as GoogleDriveContextValue);\n\n/**\n * useDriveContext\n */\nexport function useGoogleDriveContext() {\n const context = use(GoogleDriveContext);\n if (!context) throw new Error(\"DriveContext not found!\");\n return context;\n}\n\n/**\n * DriveContextProvider\n */\ntype GoogleDriveProviderProps = PropsWithChildren<\n GoogleDriveContextValue &\n Partial<DriveSelectionContextValue> &\n Pick<DriveViewProviderProps, \"initialView\">\n>;\n\nexport function GoogleDriveProvider({\n initialView = \"grid\",\n namespace,\n permission,\n meta,\n selection,\n selectionConditions,\n children,\n}: GoogleDriveProviderProps) {\n return (\n <Allowed permission={permission}>\n <DriveSelectionProvider selection={selection} selectionConditions={selectionConditions}>\n <DriveViewProvider initialView={initialView}>\n <DriveDragDropProvider>\n <GoogleDriveContext value={{ namespace, permission, meta }}>\n {children}\n </GoogleDriveContext>\n </DriveDragDropProvider>\n </DriveViewProvider>\n </DriveSelectionProvider>\n </Allowed>\n );\n}\n"],"mappings":";;;;;;;;;;AAiBA,MAAa,qBAAqB,cAAc,EAAE,CAA4B;;;;AAK9E,SAAgB,wBAAwB;CACtC,MAAM,UAAU,IAAI,mBAAmB;AACvC,KAAI,CAAC,QAAS,OAAM,IAAI,MAAM,0BAA0B;AACxD,QAAO;;AAYT,SAAgB,oBAAoB,EAClC,cAAc,QACd,WACA,YACA,MACA,WACA,qBACA,YAC2B;AAC3B,QACE,oBAAC;EAAoB;YACnB,oBAAC;GAAkC;GAAgC;aACjE,oBAAC;IAA+B;cAC9B,oBAAC,mCACC,oBAAC;KAAmB,OAAO;MAAE;MAAW;MAAY;MAAM;KACvD;MACkB,GACC;KACN;IACG;GACjB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"view.client.d.mts","names":[],"sources":["../../../../src/providers/google/components/view.client.tsx"],"mappings":";;;;;;;;;;;;KAgCK,4BAAA,eAA2C,eAAA,GAAkB,eAAA,IAChE,cAAA;EACE,SAAA,EAAW,KAAA;EACX,OAAA,GAAU,cAAA,CAAe,KAAA;EACzB,QAAA,EAAU,UAAA,QAAkB,mBAAA;EAC5B,QAAA,GAAW,UAAA,CAAW,KAAA;EACtB,gBAAA,GAAmB,eAAA;AAAA;AAAA,iBAGP,uBAAA,eAAsC,eAAA,GAAkB,eAAA,CAAA,CAAA;EACtE,SAAA;EACA,OAAA;EACA,QAAA;EACA,QAAA;EACA,gBAAA;EACA,QAAA;EAAA,GACG;AAAA,GACF,4BAAA,CAA6B,KAAA,IAAM,kBAAA,CAAA,GAAA,CAAA,OAAA;;;;iBA2BtB,eAAA,CAAA,GAAe,kBAAA,CAAA,GAAA,CAAA,OAAA;;;;iBAgFf,sBAAA,CAAA;EAAA,GAA4B;AAAA,GAAS,cAAA,UAAqB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"view.client.mjs","names":[],"sources":["../../../../src/providers/google/components/view.client.tsx"],"sourcesContent":["\"use client\";\n\nimport type { VisibilityState } from \"@tanstack/react-table\";\nimport type { CommandDef } from \"@tulip-systems/core/commands\";\nimport { FloatingCommandMenu } from \"@tulip-systems/core/commands/client\";\nimport { type TableColumnDef, TableLayout, TableSkeleton } from \"@tulip-systems/core/data-tables\";\nimport {\n createTableConfig,\n DataTable,\n type InfiniteStrategyMeta,\n TableConfigProvider,\n type useInfiniteStrategy,\n useTableConfigContext,\n} from \"@tulip-systems/core/data-tables/client\";\nimport { type ComponentProps, useMemo } from \"react\";\nimport {\n DriveGrid,\n DriveGridBottombar,\n DriveGridEmpty,\n DriveGridLoading,\n} from \"@/components/grid.client\";\nimport { DriveGridCard, DriveGridCardSkeleton } from \"@/components/grid-card.client\";\nimport { useDriveSelectionContext } from \"@/components/selection.client\";\nimport { useDriveViewContext } from \"@/components/view.client\";\nimport { googleDriveColumns } from \"../config/columns-data\";\nimport { googleDriveImageLoader } from \"../lib/helpers\";\nimport type { GoogleDriveNode } from \"../lib/validators\";\nimport { useGoogleDriveContext } from \"./provider.client\";\n\n/**\n * GoogleDriveContent\n */\ntype GoogleDriveViewProviderProps<TData extends GoogleDriveNode = GoogleDriveNode> =\n ComponentProps<\"div\"> & {\n queryData: TData[];\n columns?: TableColumnDef<TData>[];\n strategy: ReturnType<typeof useInfiniteStrategy>;\n commands?: CommandDef<TData>[];\n columnVisibility?: VisibilityState;\n };\n\nexport function GoogleDriveViewProvider<TData extends GoogleDriveNode = GoogleDriveNode>({\n queryData,\n columns = googleDriveColumns as TableColumnDef<TData>[],\n strategy,\n commands,\n columnVisibility,\n children,\n ...props\n}: GoogleDriveViewProviderProps<TData>) {\n const { meta } = useGoogleDriveContext();\n const { selection } = useDriveSelectionContext();\n\n /**\n * Table\n */\n const config = createTableConfig<TData>({\n queryData,\n columns,\n strategy,\n commands,\n meta,\n columnVisibility,\n selection,\n });\n\n return (\n <TableConfigProvider config={config}>\n <TableLayout {...props}>{children}</TableLayout>\n </TableConfigProvider>\n );\n}\n\n/**\n * GoogleDriveView\n */\nexport function GoogleDriveView() {\n const { view } = useDriveViewContext();\n\n if (view === \"grid\") {\n return <GoogleDriveGrid />;\n }\n\n if (view === \"list\") {\n return <GoogleDriveList />;\n }\n\n return null;\n}\n\n/**\n * GoogleDriveGrid\n */\nfunction GoogleDriveGrid(props: ComponentProps<\"div\">) {\n const { queryData, strategy, commands, selection, meta } =\n useTableConfigContext<GoogleDriveNode>();\n const { rowCount, paginationState } = strategy;\n const { isFetching, isFetchingNextPage, fetchNextPage } = strategy.meta as InfiniteStrategyMeta;\n\n const hasNextPage = rowCount == null ? false : queryData.length < rowCount;\n\n const selectedData = useMemo(\n () => queryData.filter((node) => selection?.rowSelection?.[node.id] === true),\n [queryData, selection?.rowSelection],\n );\n\n return (\n <DriveGrid {...props}>\n {queryData.length > 0 ? (\n queryData.map((node) => (\n <DriveGridCard\n key={node.id}\n node={node}\n commands={commands}\n imageLoader={googleDriveImageLoader}\n />\n ))\n ) : (\n <DriveGridEmpty title=\"Geen resultaten gevonden\" />\n )}\n\n {isFetchingNextPage &&\n Array.from({ length: paginationState?.pageSize ?? 0 }).map((_, index) => (\n <DriveGridCardSkeleton key={index} />\n ))}\n\n <DriveGridBottombar\n hasNextPage={hasNextPage}\n fetchNextPage={fetchNextPage}\n isFetching={isFetching}\n isFetchingNextPage={isFetchingNextPage}\n />\n\n {commands && commands.length > 0 && (\n <FloatingCommandMenu\n data={selectedData as never}\n commands={commands as never}\n meta={meta}\n state={selectedData.length > 0 ? \"open\" : \"closed\"}\n onSuccess={() => selection?.setRowSelection?.({})}\n />\n )}\n </DriveGrid>\n );\n}\n\n/**\n * GoogleDriveList\n */\nfunction GoogleDriveList(props: ComponentProps<typeof DataTable>) {\n return <DataTable {...props} />;\n}\n\n/**\n * GoogleDriveViewLoading\n */\nexport function GoogleDriveViewLoading({ ...props }: ComponentProps<\"div\">) {\n const { view } = useDriveViewContext();\n\n return (\n <div {...props}>\n {view === \"grid\" && <DriveGridLoading {...props} />}\n {view === \"list\" && <TableSkeleton {...props} />}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAyCA,SAAgB,wBAAyE,EACvF,WACA,UAAU,oBACV,UACA,UACA,kBACA,UACA,GAAG,SACmC;CACtC,MAAM,EAAE,SAAS,uBAAuB;CACxC,MAAM,EAAE,cAAc,0BAA0B;AAehD,QACE,oBAAC;EAAoB,QAXR,kBAAyB;GACtC;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAAC;YAIE,oBAAC;GAAY,GAAI;GAAQ;IAAuB;GAC5B;;;;;AAO1B,SAAgB,kBAAkB;CAChC,MAAM,EAAE,SAAS,qBAAqB;AAEtC,KAAI,SAAS,OACX,QAAO,oBAAC,oBAAkB;AAG5B,KAAI,SAAS,OACX,QAAO,oBAAC,oBAAkB;AAG5B,QAAO;;;;;AAMT,SAAS,gBAAgB,OAA8B;CACrD,MAAM,EAAE,WAAW,UAAU,UAAU,WAAW,SAChD,uBAAwC;CAC1C,MAAM,EAAE,UAAU,oBAAoB;CACtC,MAAM,EAAE,YAAY,oBAAoB,kBAAkB,SAAS;CAEnE,MAAM,cAAc,YAAY,OAAO,QAAQ,UAAU,SAAS;CAElE,MAAM,eAAe,cACb,UAAU,QAAQ,SAAS,WAAW,eAAe,KAAK,QAAQ,KAAK,EAC7E,CAAC,WAAW,WAAW,aAAa,CACrC;AAED,QACE,qBAAC;EAAU,GAAI;;GACZ,UAAU,SAAS,IAClB,UAAU,KAAK,SACb,oBAAC;IAEO;IACI;IACV,aAAa;MAHR,KAAK,GAIV,CACF,GAEF,oBAAC,kBAAe,OAAM,6BAA6B;GAGpD,sBACC,MAAM,KAAK,EAAE,QAAQ,iBAAiB,YAAY,GAAG,CAAC,CAAC,KAAK,GAAG,UAC7D,oBAAC,2BAA2B,MAAS,CACrC;GAEJ,oBAAC;IACc;IACE;IACH;IACQ;KACpB;GAED,YAAY,SAAS,SAAS,KAC7B,oBAAC;IACC,MAAM;IACI;IACJ;IACN,OAAO,aAAa,SAAS,IAAI,SAAS;IAC1C,iBAAiB,WAAW,kBAAkB,EAAE,CAAC;KACjD;;GAEM;;;;;AAOhB,SAAS,gBAAgB,OAAyC;AAChE,QAAO,oBAAC,aAAU,GAAI,QAAS;;;;;AAMjC,SAAgB,uBAAuB,EAAE,GAAG,SAAgC;CAC1E,MAAM,EAAE,SAAS,qBAAqB;AAEtC,QACE,qBAAC;EAAI,GAAI;aACN,SAAS,UAAU,oBAAC,oBAAiB,GAAI,QAAS,EAClD,SAAS,UAAU,oBAAC,iBAAc,GAAI,QAAS;GAC5C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"columns-data.d.mts","names":[],"sources":["../../../../src/providers/google/config/columns-data.tsx"],"mappings":";;;;cAaa,kBAAA,EAAoB,cAAA,CAAe,eAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"columns-data.mjs","names":[],"sources":["../../../../src/providers/google/config/columns-data.tsx"],"sourcesContent":["\"use client\";\n\nimport { findStatus } from \"@tulip-systems/core/components\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"@tulip-systems/core/components/client\";\nimport { type TableColumnDef, TableColumnHeader } from \"@tulip-systems/core/data-tables\";\nimport { createTableSelectCell, TableTextCell } from \"@tulip-systems/core/data-tables/client\";\nimport { FolderIcon } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { createSerializer, useQueryStates } from \"nuqs\";\nimport { nodeSubtypeConfig, nodeSubtypeVariants } from \"@/config/types\";\nimport { driveTreeSearchParams } from \"@/lib/search-params\";\nimport type { GoogleDriveNode } from \"../lib/validators\";\n\nexport const googleDriveColumns: TableColumnDef<GoogleDriveNode>[] = [\n createTableSelectCell(),\n {\n id: \"icon\",\n accessorKey: \"icon\",\n header: () => null,\n cell: ({ row }) => {\n if (row.original.type === \"file\") {\n const subtype = findStatus(nodeSubtypeConfig, row.original.subtype);\n if (!subtype) return null;\n\n return (\n <TableTextCell className=\"w-4\">\n <Tooltip>\n <TooltipTrigger>\n <subtype.icon\n className={nodeSubtypeVariants({\n status: row.original.subtype,\n className: \"size-4\",\n })}\n />\n </TooltipTrigger>\n\n <TooltipContent>{subtype.label}</TooltipContent>\n </Tooltip>\n </TableTextCell>\n );\n }\n\n if (row.original.type === \"folder\") {\n return (\n <TableTextCell className=\"w-4\">\n <FolderIcon className=\"w-4 min-w-4\" />\n </TableTextCell>\n );\n }\n\n return null;\n },\n enableSorting: false,\n },\n {\n id: \"name\",\n accessorKey: \"name\",\n header: ({ column }) => <TableColumnHeader column={column} title=\"Naam\" />,\n cell: ({ row }) => {\n const [query] = useQueryStates(driveTreeSearchParams);\n const serialize = createSerializer(driveTreeSearchParams);\n\n return (\n <TableTextCell className=\"w-full min-w-64\">\n <Link\n href={\n row.original.type === \"file\"\n ? ((row.original.links.view as string) ?? \"#\")\n : serialize({ ...query, parentId: row.original.id })\n }\n className=\"truncate hover:underline\"\n target={row.original.type === \"file\" ? \"_blank\" : \"_self\"}\n >\n {row.getValue(\"name\")}\n </Link>\n </TableTextCell>\n );\n },\n enableSorting: false,\n },\n];\n"],"mappings":";;;;;;;;;;;;;;AAaA,MAAa,qBAAwD;CACnE,uBAAuB;CACvB;EACE,IAAI;EACJ,aAAa;EACb,cAAc;EACd,OAAO,EAAE,UAAU;AACjB,OAAI,IAAI,SAAS,SAAS,QAAQ;IAChC,MAAM,UAAU,WAAW,mBAAmB,IAAI,SAAS,QAAQ;AACnE,QAAI,CAAC,QAAS,QAAO;AAErB,WACE,oBAAC;KAAc,WAAU;eACvB,qBAAC,sBACC,oBAAC,4BACC,oBAAC,QAAQ,QACP,WAAW,oBAAoB;MAC7B,QAAQ,IAAI,SAAS;MACrB,WAAW;MACZ,CAAC,GACF,GACa,EAEjB,oBAAC,4BAAgB,QAAQ,QAAuB,IACxC;MACI;;AAIpB,OAAI,IAAI,SAAS,SAAS,SACxB,QACE,oBAAC;IAAc,WAAU;cACvB,oBAAC,cAAW,WAAU,gBAAgB;KACxB;AAIpB,UAAO;;EAET,eAAe;EAChB;CACD;EACE,IAAI;EACJ,aAAa;EACb,SAAS,EAAE,aAAa,oBAAC;GAA0B;GAAQ,OAAM;IAAS;EAC1E,OAAO,EAAE,UAAU;GACjB,MAAM,CAAC,SAAS,eAAe,sBAAsB;GACrD,MAAM,YAAY,iBAAiB,sBAAsB;AAEzD,UACE,oBAAC;IAAc,WAAU;cACvB,oBAAC;KACC,MACE,IAAI,SAAS,SAAS,SAChB,IAAI,SAAS,MAAM,QAAmB,MACxC,UAAU;MAAE,GAAG;MAAO,UAAU,IAAI,SAAS;MAAI,CAAC;KAExD,WAAU;KACV,QAAQ,IAAI,SAAS,SAAS,SAAS,WAAW;eAEjD,IAAI,SAAS,OAAO;MAChB;KACO;;EAGpB,eAAe;EAChB;CACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"filters.d.mts","names":[],"sources":["../../../../src/providers/google/config/filters.ts"],"mappings":";;;;cAEa,sBAAA;mEAAyC,GAAA,CAAA,OAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"filters.mjs","names":[],"sources":["../../../../src/providers/google/config/filters.ts"],"sourcesContent":["import { driveTreeFilters } from \"@/config/filters\";\n\nexport const googleDriveTreeFilters = driveTreeFilters;\n"],"mappings":";;;AAEA,MAAa,yBAAyB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.mjs","names":[],"sources":["../../../../src/providers/google/lib/constants.ts"],"sourcesContent":["export const GOOGLE_DRIVE_FOLDER_MIME_TYPE = \"application/vnd.google-apps.folder\";\n\n/**\n * Minimal Google file fields needed to build a complete `GoogleDriveNode`.\n *\n * Keeping this list explicit prevents over-fetching large provider payloads and\n * ensures every service method receives metadata with the same expected shape.\n */\nexport const GOOGLE_DRIVE_NODE_FIELDS =\n \"id,name,mimeType,size,parents,driveId,createdTime,modifiedTime,trashed,trashedTime,webViewLink,webContentLink,thumbnailLink,contentRestrictions,capabilities\";\n"],"mappings":";AAAA,MAAa,gCAAgC;;;;;;;AAQ7C,MAAa,2BACX"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"dto.d.mts","names":[],"sources":["../../../../src/providers/google/lib/dto.ts"],"mappings":";;;;;;AAYA;;;;;KAAY,uBAAA;EACV,IAAA,EAAM,QAAA,CAAS,WAAA;EACf,SAAA;AAAA;;AAWF;;;;;;;cAAa,kBAAA;EAQ0D;;;;;;;;;;KAAzC,uBAAA,GAA0B,eAAA;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"dto.mjs","names":[],"sources":["../../../../src/providers/google/lib/dto.ts"],"sourcesContent":["import type { drive_v3 } from \"googleapis\";\nimport { inferLocalDriveNodeSubtype } from \"../../local/entry\";\nimport { GOOGLE_DRIVE_FOLDER_MIME_TYPE } from \"./constants\";\nimport type { GoogleDriveNode } from \"./validators\";\n\n/**\n * Input used by the DTO factory.\n *\n * `namespace` can be supplied by callers when Google metadata does not include\n * enough drive context. Most service calls rely on `driveId` or the first parent\n * from the Google response instead.\n */\nexport type GoogleDriveNodeDTOInput = {\n file: drive_v3.Schema$File;\n namespace?: string;\n};\n\n/**\n * Factory for mapping Google Drive API file metadata to the provider-neutral node shape.\n * This is the single source of truth for how Google Drive metadata maps to our shared\n * `DriveNode` contract, ensuring consistent mapping across all service methods.\n * The factory also handles missing or partial metadata from Google by applying sensible\n * defaults and fallbacks, so the shared DTO always satisfies the base contract expected\n * by the UI and other consumers.\n */\nexport const GoogleDriveNodeDTO = {\n /**\n * Maps raw Google Drive file metadata to the provider-neutral Drive node shape.\n *\n * Google models files and folders with the same `drive_v3.Schema$File` object.\n * Folders are detected by their special MIME type, while every other MIME type\n * is treated as a file and mapped to a provider-neutral subtype.\n */\n create({ file, namespace }: GoogleDriveNodeDTOInput): GoogleDriveNode {\n if (!file.id) {\n throw new Error(\"Google Drive file has no id\");\n }\n\n // Google Drive folders are files with a special MIME type.\n const isFolder = file.mimeType === GOOGLE_DRIVE_FOLDER_MIME_TYPE;\n\n // Google can omit timestamps in partial responses. Fall back to stable dates\n // so the shared DTO always satisfies the base Drive node contract.\n const createdAt = file.createdTime ? new Date(file.createdTime) : new Date();\n const updatedAt = file.modifiedTime ? new Date(file.modifiedTime) : createdAt;\n\n // Google calls soft deletion `trashed`; the shared Drive contract exposes it\n // as `archivedAt` for consistency with local/object-storage providers.\n const trashedAt = file.trashedTime ? new Date(file.trashedTime) : null;\n const archivedAt = file.trashed\n ? (trashedAt ?? new Date(file.modifiedTime ?? Date.now()))\n : null;\n const contentType = isFolder ? null : (file.mimeType ?? null);\n const name = file.name ?? \"Untitled\";\n const googleParents = file.parents ?? [];\n const [googleParentId] = googleParents;\n\n // The shared `namespace` is the drive/root boundary used by the UI. Prefer\n // explicit caller context, then Google's shared drive id, then the first\n // parent as a last-resort root context for My Drive-like responses.\n const nodeNamespace = namespace ?? file.driveId ?? googleParentId;\n\n if (!nodeNamespace) {\n throw new Error(\"Google Drive file has no namespace\");\n }\n\n const readonly =\n file.contentRestrictions?.some((restriction) => restriction.readOnly) ??\n file.capabilities?.canEdit === false;\n\n return {\n id: file.id,\n provider: \"google\",\n createdAt,\n updatedAt,\n name,\n namespace: nodeNamespace,\n type: isFolder ? \"folder\" : \"file\",\n subtype: isFolder ? \"other\" : inferLocalDriveNodeSubtype({ name, contentType }),\n size: file.size ? Number(file.size) : null,\n contentType,\n readonly,\n hidden: false,\n archivedAt,\n parentId: googleParentId && googleParentId !== nodeNamespace ? googleParentId : null,\n links: {\n view: file.webViewLink ?? file.webContentLink ?? null,\n download: file.webContentLink ?? null,\n preview: file.webViewLink ?? null,\n thumbnail: file.thumbnailLink ?? null,\n },\n availability: \"ready\",\n googleDriveId: file.driveId ?? null,\n mimeType: file.mimeType ?? null,\n webViewLink: file.webViewLink ?? null,\n webContentLink: file.webContentLink ?? null,\n thumbnailLink: file.thumbnailLink ?? null,\n trashed: file.trashed ?? false,\n trashedAt,\n googleParents,\n canEdit: file.capabilities?.canEdit ?? null,\n } satisfies GoogleDriveNode;\n },\n};\n"],"mappings":";;;;;;;;;;;;AAyBA,MAAa,qBAAqB,EAQhC,OAAO,EAAE,MAAM,aAAuD;AACpE,KAAI,CAAC,KAAK,GACR,OAAM,IAAI,MAAM,8BAA8B;CAIhD,MAAM,WAAW,KAAK,aAAa;CAInC,MAAM,YAAY,KAAK,cAAc,IAAI,KAAK,KAAK,YAAY,mBAAG,IAAI,MAAM;CAC5E,MAAM,YAAY,KAAK,eAAe,IAAI,KAAK,KAAK,aAAa,GAAG;CAIpE,MAAM,YAAY,KAAK,cAAc,IAAI,KAAK,KAAK,YAAY,GAAG;CAClE,MAAM,aAAa,KAAK,UACnB,aAAa,IAAI,KAAK,KAAK,gBAAgB,KAAK,KAAK,CAAC,GACvD;CACJ,MAAM,cAAc,WAAW,OAAQ,KAAK,YAAY;CACxD,MAAM,OAAO,KAAK,QAAQ;CAC1B,MAAM,gBAAgB,KAAK,WAAW,EAAE;CACxC,MAAM,CAAC,kBAAkB;CAKzB,MAAM,gBAAgB,aAAa,KAAK,WAAW;AAEnD,KAAI,CAAC,cACH,OAAM,IAAI,MAAM,qCAAqC;CAGvD,MAAM,WACJ,KAAK,qBAAqB,MAAM,gBAAgB,YAAY,SAAS,IACrE,KAAK,cAAc,YAAY;AAEjC,QAAO;EACL,IAAI,KAAK;EACT,UAAU;EACV;EACA;EACA;EACA,WAAW;EACX,MAAM,WAAW,WAAW;EAC5B,SAAS,WAAW,UAAU,2BAA2B;GAAE;GAAM;GAAa,CAAC;EAC/E,MAAM,KAAK,OAAO,OAAO,KAAK,KAAK,GAAG;EACtC;EACA;EACA,QAAQ;EACR;EACA,UAAU,kBAAkB,mBAAmB,gBAAgB,iBAAiB;EAChF,OAAO;GACL,MAAM,KAAK,eAAe,KAAK,kBAAkB;GACjD,UAAU,KAAK,kBAAkB;GACjC,SAAS,KAAK,eAAe;GAC7B,WAAW,KAAK,iBAAiB;GAClC;EACD,cAAc;EACd,eAAe,KAAK,WAAW;EAC/B,UAAU,KAAK,YAAY;EAC3B,aAAa,KAAK,eAAe;EACjC,gBAAgB,KAAK,kBAAkB;EACvC,eAAe,KAAK,iBAAiB;EACrC,SAAS,KAAK,WAAW;EACzB;EACA;EACA,SAAS,KAAK,cAAc,WAAW;EACxC;GAEJ"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.mjs","names":[],"sources":["../../../../src/providers/google/lib/helpers.ts"],"sourcesContent":["import { Readable } from \"node:stream\";\nimport type { ObjectBodyInput } from \"@tulip-systems/core/storage\";\nimport type { ImageLoaderProps } from \"next/image\";\n\n/**\n * Escapes dynamic values before interpolating them into Google Drive `q` strings.\n *\n * Drive query values are wrapped in single quotes. Backslashes and single quotes\n * can otherwise break the query literal or change the meaning of the expression.\n */\nexport function escapeGoogleDriveQueryValue(value: string) {\n return value.replace(/\\\\/g, \"\\\\\\\\\").replace(/'/g, \"\\\\'\");\n}\n\n/**\n * Returns true when a Google API error represents a missing file/folder.\n *\n * The Google client throws rich error objects rather than typed exceptions, so\n * the service checks the normalized `code` property and treats only 404 as a\n * nullable not-found result. Permission, quota, and transport failures should\n * keep bubbling up.\n */\nexport function isGoogleNotFound(error: unknown) {\n return typeof error === \"object\" && error != null && \"code\" in error && error.code === 404;\n}\n\n/**\n * Normalizes supported object body inputs into a readable stream for googleapis.\n *\n * The Drive client accepts a stream-like `media.body`. Local upload flows can\n * provide strings, buffers, array-like chunks, or already-created streams, so we\n * pass through streams and wrap everything else with `Readable.from`.\n */\nexport function toGoogleDriveReadable(body: ObjectBodyInput) {\n if (body instanceof Readable) return body;\n if (typeof body === \"string\") return Readable.from([body]);\n return Readable.from([body]);\n}\n\n/**\n * Use Google-provided thumbnail URLs directly instead of routing them through\n * the Next.js optimizer.\n */\nexport function googleDriveImageLoader({ src }: ImageLoaderProps) {\n return src;\n}\n"],"mappings":";;;;;;;;;AAUA,SAAgB,4BAA4B,OAAe;AACzD,QAAO,MAAM,QAAQ,OAAO,OAAO,CAAC,QAAQ,MAAM,MAAM;;;;;;;;;;AAW1D,SAAgB,iBAAiB,OAAgB;AAC/C,QAAO,OAAO,UAAU,YAAY,SAAS,QAAQ,UAAU,SAAS,MAAM,SAAS;;;;;;;;;AAUzF,SAAgB,sBAAsB,MAAuB;AAC3D,KAAI,gBAAgB,SAAU,QAAO;AACrC,KAAI,OAAO,SAAS,SAAU,QAAO,SAAS,KAAK,CAAC,KAAK,CAAC;AAC1D,QAAO,SAAS,KAAK,CAAC,KAAK,CAAC;;;;;;AAO9B,SAAgB,uBAAuB,EAAE,OAAyB;AAChE,QAAO"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"router.server.d.mts","names":[],"sources":["../../../../src/providers/google/lib/router.server.ts"],"mappings":";;;;;;;;;iBAcgB,2BAAA,iBAA4C,eAAA,CAAA,CAC1D,KAAA,EAAO,WAAA,CAAY,OAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"router.server.mjs","names":[],"sources":["../../../../src/providers/google/lib/router.server.ts"],"sourcesContent":["import type { TDatabaseSchema } from \"@tulip-systems/core/config\";\nimport { bulkActionSchema } from \"@tulip-systems/core/router\";\nimport { initRPC } from \"@tulip-systems/core/router/server\";\nimport { z } from \"zod\";\nimport type { GoogleDrive } from \"./service.server\";\nimport {\n createGoogleDriveFolderInputSchema,\n getGoogleDriveNodesByParentIdInputSchema,\n googleDriveNodeSchema,\n googleDriveNodeWithChildrenSchema,\n listGoogleDriveTreeInputSchema,\n updateGoogleDriveNodeInputSchema,\n} from \"./validators\";\n\nexport function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(\n drive: GoogleDrive<TSchema>,\n) {\n const { protectedProcedure } = initRPC<TSchema>();\n\n return {\n getNodeWithChildren: protectedProcedure\n .input(z.object({ id: z.string(), namespace: z.string() }))\n .output(googleDriveNodeWithChildrenSchema.nullable())\n .handler(async ({ input }) => drive.getNodeWithChildren(input)),\n getNodesByParentId: protectedProcedure\n .input(getGoogleDriveNodesByParentIdInputSchema)\n .output(z.array(googleDriveNodeSchema))\n .handler(async ({ input }) => drive.getNodesByParentId(input)),\n listTree: protectedProcedure\n .input(listGoogleDriveTreeInputSchema)\n .handler(async ({ input }) => drive.listTree(input)),\n getFolderParents: protectedProcedure\n .input(z.object({ id: z.string().nullable(), namespace: z.string() }))\n .handler(async ({ input }) => drive.getFolderParents(input)),\n createFolder: protectedProcedure\n .input(createGoogleDriveFolderInputSchema)\n .output(googleDriveNodeSchema)\n .handler(async ({ input }) => drive.createFolder(input)),\n updateNode: protectedProcedure\n .input(z.object({ id: z.string(), data: updateGoogleDriveNodeInputSchema }))\n .output(googleDriveNodeSchema)\n .handler(async ({ input }) => drive.updateNode(input.id, input.data)),\n moveNode: protectedProcedure\n .input(z.object({ id: z.string(), parentId: z.string().nullish() }))\n .output(googleDriveNodeSchema)\n .handler(async ({ input }) =>\n drive.moveNode({ id: input.id, parentId: input.parentId ?? null }),\n ),\n archiveNodes: protectedProcedure\n .input(bulkActionSchema)\n .output(z.array(googleDriveNodeSchema))\n .handler(async ({ input }) => drive.archiveNodes(input.ids)),\n restoreNodes: protectedProcedure\n .input(bulkActionSchema)\n .output(z.array(googleDriveNodeSchema))\n .handler(async ({ input }) => drive.restoreNodes(input.ids)),\n deleteNodes: protectedProcedure\n .input(bulkActionSchema)\n .output(z.void())\n .handler(async ({ input }) => drive.deleteNodes(input.ids)),\n };\n}\n"],"mappings":";;;;;;AAcA,SAAgB,4BACd,OACA;CACA,MAAM,EAAE,uBAAuB,SAAkB;AAEjD,QAAO;EACL,qBAAqB,mBAClB,MAAM,EAAE,OAAO;GAAE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D,cAAc,mBACX,MAAM,iBAAiB,CACvB,OAAO,EAAE,MAAM,sBAAsB,CAAC,CACtC,QAAQ,OAAO,EAAE,YAAY,MAAM,aAAa,MAAM,IAAI,CAAC;EAC9D,aAAa,mBACV,MAAM,iBAAiB,CACvB,OAAO,EAAE,MAAM,CAAC,CAChB,QAAQ,OAAO,EAAE,YAAY,MAAM,YAAY,MAAM,IAAI,CAAC;EAC9D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"search-params.d.mts","names":[],"sources":["../../../../src/providers/google/lib/search-params.ts"],"mappings":";;;;;;cAMa,iCAAA;EAAA,gBAAsF,YAAA,CAAA,mBAAA;EAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"search-params.mjs","names":[],"sources":["../../../../src/providers/google/lib/search-params.ts"],"sourcesContent":["import { resolveFiltersSearchParams } from \"@tulip-systems/core/data-tables\";\nimport { googleDriveTreeFilters } from \"../config/filters\";\n\n/**\n * Filters\n */\nexport const googleDriveTreeFilterSearchParams = resolveFiltersSearchParams(googleDriveTreeFilters);\n"],"mappings":";;;;;;;AAMA,MAAa,oCAAoC,2BAA2B,uBAAuB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"service.server.d.mts","names":[],"sources":["../../../../src/providers/google/lib/service.server.ts"],"mappings":";;;;;;;;;;;AAkCA;KAAY,iBAAA,iBAAkC,eAAA,IAAmB,IAAA,CAAK,QAAA,CAAS,OAAA;EAC7E,EAAA,EAAI,QAAA,CAAS,OAAA;AAAA;;;;;;;;cAUF,WAAA,iBAA4B,eAAA,aAErC,WAAA,CAAY,eAAA,EAAiB,2BAAA,EAA6B,oBAAA,GAC1D,kBAAA,CAAmB,eAAA,GACnB,iBAAA,CAAkB,eAAA,EAAiB,eAAA,GACnC,YAAA,CAAa,eAAA;EAAA;WAEN,MAAA,EAAQ,QAAA,CAAS,KAAA;cAEd,MAAA,EAAQ,iBAAA,CAAkB,OAAA;EAnBtC;;;;;AAUF;;;;;;;EAoDQ,WAAA,CAA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s","names":["#getFile","#toNode","#parentQuery","#idQuery","#typeQuery","#contentTypeQuery","#archiveQuery","#searchQuery","#listChildren","#buildQuery","#orderBy","#pageCursorAt","#listNodes","#walkParents","#walkChildren","#setTrashed"],"sources":["../../../../src/providers/google/lib/service.server.ts"],"sourcesContent":["import type { TDatabaseSchema } from \"@tulip-systems/core/config\";\nimport type { TableQuerySchema } from \"@tulip-systems/core/data-tables\";\nimport type { TableQueryResponse } from \"@tulip-systems/core/data-tables/server\";\nimport type { Database } from \"@tulip-systems/core/database/server\";\nimport { ServerError } from \"@tulip-systems/core/router/server\";\nimport type { ObjectBodyInput } from \"@tulip-systems/core/storage\";\nimport { type drive_v3, google } from \"googleapis\";\nimport type {\n DriveArchive,\n DriveDirectUpload,\n DriveNodeMutations,\n DriveReader,\n} from \"@/lib/contracts\";\nimport { GOOGLE_DRIVE_FOLDER_MIME_TYPE, GOOGLE_DRIVE_NODE_FIELDS } from \"./constants\";\nimport { GoogleDriveNodeDTO } from \"./dto\";\nimport { escapeGoogleDriveQueryValue, isGoogleNotFound, toGoogleDriveReadable } from \"./helpers\";\nimport type {\n CreateGoogleDriveFolderInput,\n GetGoogleDriveNodesByParentIdSchema,\n GoogleDriveNode,\n GoogleDriveNodeChild,\n GoogleDriveNodeWithChildren,\n GoogleDriveTableFilters,\n ListGoogleDriveTreeSchema,\n UpdateGoogleDriveNodeInput,\n UploadGoogleDriveFileInput,\n} from \"./validators\";\n\nconst DEFAULT_PAGE_SIZE = 10;\nconst CHILDREN_PAGE_SIZE = 1000;\n\n/**\n * Drive Service Config\n */\nexport type GoogleDriveConfig<TSchema extends TDatabaseSchema> = Pick<drive_v3.Options, \"auth\"> & {\n db: Database<TSchema>;\n};\n\n/**\n * Google Drive provider.\n *\n * A single service instance can operate on multiple Google shared drives. The\n * shared Drive `namespace` is the Google `driveId`, so namespace is supplied by\n * method inputs rather than by the constructor.\n */\nexport class GoogleDrive<TSchema extends TDatabaseSchema>\n implements\n DriveReader<GoogleDriveNode, GoogleDriveNodeWithChildren, GoogleDriveNodeChild>,\n DriveNodeMutations<GoogleDriveNode>,\n DriveDirectUpload<GoogleDriveNode, ObjectBodyInput>,\n DriveArchive<GoogleDriveNode>\n{\n readonly client: drive_v3.Drive;\n\n constructor(config: GoogleDriveConfig<TSchema>) {\n this.client = google.drive({ auth: config.auth, version: \"v3\" });\n }\n\n /**\n * Fetches raw Google Drive metadata for a file or folder.\n *\n * Google Drive uses the same `files.get` endpoint for files and folders. We\n * request only `GOOGLE_DRIVE_NODE_FIELDS` so DTO mapping receives a predictable\n * shape and we avoid over-fetching provider metadata.\n *\n * A Google 404 is translated to `null` to match the public `getNodeById`\n * contract. All other errors are rethrown because they represent real failures\n * such as insufficient permissions, invalid credentials, quota limits, or API\n * outages.\n */\n async #getFile(id: string): Promise<drive_v3.Schema$File | null> {\n try {\n const result = await this.client.files.get({\n fileId: id,\n supportsAllDrives: true,\n fields: GOOGLE_DRIVE_NODE_FIELDS,\n });\n\n return result.data;\n } catch (error) {\n if (isGoogleNotFound(error)) return null;\n throw error;\n }\n }\n\n /**\n * Loads a single Google Drive file/folder by its Google file id.\n *\n * Returns `null` when Google reports the file does not exist or is not visible to\n * the authenticated account. Other Google API errors are allowed to bubble up so\n * callers do not accidentally treat permission, quota, or transport failures as\n * missing data.\n *\n * The returned Google metadata is normalized into the shared Drive node shape by\n * `#toNode`, which also validates that Google returned the minimum metadata we\n * need to identify the node and its namespace.\n */\n async getNodeById(id: string): Promise<GoogleDriveNode | null> {\n const file = await this.#getFile(id);\n return file ? this.#toNode(file) : null;\n }\n\n /**\n * Converts a table sort field into a Google Drive `orderBy` value.\n *\n * Google Drive only accepts a fixed set of field names in `files.list.orderBy`.\n * The table layer uses provider-neutral names such as `createdAt` and\n * `updatedAt`, so this method maps those aliases to Google's native field names.\n *\n * Unknown sort fields intentionally fall back to `modifiedTime desc` instead of\n * being passed through, because Google returns a 400 for unsupported order fields.\n */\n #orderBy(input: Pick<TableQuerySchema, \"sort\" | \"order\">): string {\n const direction = input.order === \"asc\" ? \"\" : \" desc\";\n\n switch (input.sort) {\n case \"name\":\n return `name${direction}`;\n case \"createdAt\":\n case \"createdTime\":\n return `createdTime${direction}`;\n case \"updatedAt\":\n case \"modifiedTime\":\n return `modifiedTime${direction}`;\n default:\n return \"modifiedTime desc\";\n }\n }\n\n /**\n * Scopes results to a parent folder.\n *\n * Google Drive represents folder membership as `'<folderId>' in parents`.\n * A `null` parent maps to the provider namespace/root drive id.\n * An `undefined` parent means no parent filter should be applied.\n */\n #parentQuery(input: Pick<GoogleDriveTableFilters, \"namespace\" | \"parentId\">): string | null {\n if (input.parentId === undefined) return null;\n\n const parentId = input.parentId ?? input.namespace;\n return `'${escapeGoogleDriveQueryValue(parentId)}' in parents`;\n }\n\n /**\n * Filters results to a specific set of Google file ids.\n */\n #idQuery(nodeIds?: string[] | null): string | null {\n if (!nodeIds?.length) return null;\n return `(${nodeIds.map((id) => `id = '${escapeGoogleDriveQueryValue(id)}'`).join(\" or \")})`;\n }\n\n /**\n * Converts provider-neutral node types to Google Drive MIME-type filters.\n *\n * Google Drive folders are identified by their folder MIME type. Every other\n * MIME type is treated as a file.\n */\n #typeQuery(types?: Array<\"file\" | \"folder\"> | null): string | null {\n if (types?.length !== 1) return null;\n\n return types[0] === \"folder\"\n ? `mimeType = '${GOOGLE_DRIVE_FOLDER_MIME_TYPE}'`\n : `mimeType != '${GOOGLE_DRIVE_FOLDER_MIME_TYPE}'`;\n }\n\n /**\n * Filters files by MIME type.\n *\n * This only applies to files. Folder filtering should use `#typeQuery`.\n */\n #contentTypeQuery(contentTypes?: string[] | null): string | null {\n if (!contentTypes?.length) return null;\n\n return `(${contentTypes\n .map((contentType) => `mimeType = '${escapeGoogleDriveQueryValue(contentType)}'`)\n .join(\" or \")})`;\n }\n\n /**\n * Filters archived/active nodes.\n *\n * Google Drive calls this state `trashed`; the shared Drive contract calls it\n * archived/soft-deleted. By default we return active nodes only.\n */\n #archiveQuery(isArchived?: boolean | null): string | null {\n return `trashed = ${isArchived === true ? \"true\" : \"false\"}`;\n }\n\n /**\n * Applies a name search.\n *\n * Google Drive supports `name contains '<value>'`, which is a substring match.\n */\n #searchQuery(search?: string | null): string | null {\n if (!search) return null;\n\n return `name contains '${escapeGoogleDriveQueryValue(search)}'`;\n }\n\n #buildQuery(input: GoogleDriveTableFilters & Pick<TableQuerySchema, \"search\">): string {\n return [\n this.#parentQuery(input),\n this.#idQuery(input.nodeIds),\n this.#typeQuery(input.types),\n this.#contentTypeQuery(input.contentTypes),\n this.#archiveQuery(input.isArchived),\n this.#searchQuery(input.search),\n ]\n .filter((clause): clause is string => typeof clause === \"string\" && clause.length > 0)\n .join(\" and \");\n }\n\n /**\n * Lists the direct children of a Google Drive folder.\n *\n * Google Drive stores both files and folders behind the `files.list` endpoint.\n * This helper translates our drive query input into a Google Drive search query\n * and returns only the immediate children for the requested parent.\n *\n * The result is paginated by Google, so we keep requesting pages until all\n * matching children are loaded. Recursive traversal is intentionally not handled\n * here; callers that need full subtrees should use `getNodeChildren`.\n */\n async #listChildren(input: GetGoogleDriveNodesByParentIdSchema) {\n const filters = input?.filters;\n const files: drive_v3.Schema$File[] = [];\n let pageToken: string | undefined;\n\n do {\n const result = await this.client.files.list({\n pageToken,\n pageSize: CHILDREN_PAGE_SIZE,\n corpora: \"drive\",\n driveId: input.filters.namespace,\n includeItemsFromAllDrives: true,\n supportsAllDrives: true,\n q: this.#buildQuery({\n namespace: input.filters.namespace,\n parentId: input.filters.parentId,\n nodeIds: filters?.nodeIds,\n types: filters?.types,\n contentTypes: filters?.contentTypes,\n isArchived: filters?.isArchived,\n search: input?.search,\n }),\n orderBy: this.#orderBy(input),\n fields: `nextPageToken, files(${GOOGLE_DRIVE_NODE_FIELDS})`,\n });\n\n files.push(...(result.data.files ?? []));\n pageToken = result.data.nextPageToken ?? undefined;\n } while (pageToken);\n\n return files.map((file) => this.#toNode(file));\n }\n\n /**\n * Loads a node and its direct children within a namespace.\n *\n * Google Drive does not enforce our provider-neutral `namespace` at `files.get`\n * time, so the node is fetched by id first and then checked against the requested\n * namespace/shared drive. A missing node or namespace mismatch returns\n * `null`, matching the shared Drive reader contract.\n *\n * Only direct children are loaded. Recursive traversal is handled separately by\n * `getNodeChildren`.\n */\n async getNodeWithChildren(input: {\n id: string;\n namespace: string;\n }): Promise<GoogleDriveNodeWithChildren | null> {\n const node = await this.getNodeById(input.id);\n if (!node || node.namespace !== input.namespace) return null;\n\n const children = await this.#listChildren({\n filters: {\n parentId: node.id,\n namespace: node.namespace,\n isArchived: false,\n },\n });\n\n return { ...node, children };\n }\n\n /**\n * Lists the direct children of a parent folder.\n *\n * This is the Google Drive implementation of the shared Drive reader method. It\n * delegates to `#listChildren`, which translates the provider-neutral filters,\n * search, and sorting options into a Google Drive `files.list` query.\n *\n * Only immediate children are returned. Recursive traversal is handled by\n * `getNodeChildren`.\n */\n async getNodesByParentId(input: GetGoogleDriveNodesByParentIdSchema): Promise<GoogleDriveNode[]> {\n return this.#listChildren(input);\n }\n\n /**\n * Resolves the Google Drive page token for a numeric table cursor.\n *\n * The shared table API uses numeric cursors (`0`, `1`, `2`, ...), while Google\n * Drive pagination uses opaque `nextPageToken` values. To bridge that mismatch,\n * we walk Google pages until we reach the requested table page.\n *\n * The intermediate requests only fetch file ids because their content is thrown\n * away; we only need each response's `nextPageToken`.\n *\n * Returns `exhausted: true` when Google runs out of pages before the requested\n * cursor is reached.\n */\n async #pageCursorAt(\n input: {\n namespace: string;\n q: string;\n limit: number;\n cursor?: number;\n orderBy?: string;\n },\n remainingPages: number,\n pageToken?: string,\n ): Promise<{ pageToken?: string; exhausted: boolean }> {\n if (remainingPages === 0) return { pageToken, exhausted: false };\n\n const result = await this.client.files.list({\n pageSize: input.limit,\n pageToken,\n corpora: \"drive\",\n driveId: input.namespace,\n includeItemsFromAllDrives: true,\n supportsAllDrives: true,\n q: input.q,\n orderBy: input.orderBy,\n fields: \"nextPageToken, files(id)\",\n });\n\n const nextPageToken = result.data.nextPageToken ?? undefined;\n if (!nextPageToken) return { exhausted: true };\n\n return this.#pageCursorAt(input, remainingPages - 1, nextPageToken);\n }\n\n /**\n * Lists Google Drive nodes using the shared table pagination shape.\n *\n * The shared table API uses numeric cursors, but Google Drive uses opaque page\n * tokens. Before fetching the requested page, `#pageCursorAt` advances through\n * Google pages until it resolves the page token for the requested numeric cursor.\n *\n * Google Drive does not return a total row count for `files.list`, so pagination\n * totals are estimated from the current cursor, returned page size, and whether\n * Google reports another page. The estimate is only meant to support table/infinite\n * pagination controls; it should not be treated as an exact item count.\n */\n async #listNodes(input: {\n namespace: string;\n q: string;\n limit?: number;\n cursor?: number;\n orderBy?: string;\n }): Promise<TableQueryResponse<GoogleDriveNode>> {\n const limit = input.limit ?? DEFAULT_PAGE_SIZE;\n const cursor = input.cursor ?? 0;\n const pageCursor = await this.#pageCursorAt({ ...input, limit }, cursor);\n\n if (pageCursor.exhausted) {\n return {\n data: [],\n pagination: {\n total: cursor * limit,\n totalPages: Math.max(1, cursor),\n limit,\n hasNextPage: false,\n hasPreviousPage: cursor > 0,\n cursor,\n nextCursor: null,\n previousCursor: cursor > 0 ? cursor - 1 : null,\n },\n };\n }\n\n const result = await this.client.files.list({\n pageSize: limit,\n pageToken: pageCursor.pageToken,\n corpora: \"drive\",\n driveId: input.namespace,\n includeItemsFromAllDrives: true,\n supportsAllDrives: true,\n q: input.q,\n orderBy: input.orderBy,\n fields: `nextPageToken, files(${GOOGLE_DRIVE_NODE_FIELDS})`,\n });\n\n const data = result.data.files?.map((file) => this.#toNode(file)) ?? [];\n const hasNextPage = result.data.nextPageToken != null;\n\n // Google does not expose an exact total for this query. Estimate enough rows\n // for the current page and one possible next page so pagination remains usable.\n const total = cursor * limit + data.length + (hasNextPage ? limit : 0);\n\n return {\n data,\n pagination: {\n total,\n totalPages: Math.max(1, Math.ceil(total / limit)),\n limit,\n hasNextPage,\n hasPreviousPage: cursor > 0,\n cursor,\n nextCursor: hasNextPage ? cursor + 1 : null,\n previousCursor: cursor > 0 ? cursor - 1 : null,\n },\n };\n }\n\n /**\n * Lists one page of Google Drive nodes for a tree/folder view.\n *\n * The public input uses the shared table-query shape: pagination, sorting,\n * search, and drive filters. This method translates that input into the internal\n * Google Drive list request shape used by `#listNodes`.\n *\n * Google Drive does not expose a native tree endpoint. This returns only the\n * direct children for the requested `parentId`; recursive traversal is handled\n * by `getNodeChildren`.\n */\n async listTree(input: ListGoogleDriveTreeSchema): Promise<TableQueryResponse<GoogleDriveNode>> {\n return this.#listNodes({\n namespace: input.filters.namespace,\n limit: input.limit,\n cursor: input.cursor,\n orderBy: this.#orderBy(input),\n q: this.#buildQuery({\n namespace: input.filters.namespace,\n parentId: input.filters.parentId,\n nodeIds: input.filters.nodeIds,\n types: input.filters.types,\n contentTypes: input.filters.contentTypes,\n isArchived: input.filters.isArchived,\n search: input.search,\n }),\n });\n }\n\n /**\n * Walks from a Google Drive node up through its parent chain.\n *\n * Google Drive only exposes direct parents, so breadcrumbs must be resolved one\n * node at a time. The `seen` set prevents accidental infinite loops if Google\n * ever returns cyclic or inconsistent parent metadata.\n *\n * `seen` is treated immutably so each recursive call receives its own traversal\n * state instead of mutating caller-owned state.\n */\n async #walkParents(\n currentId: string | null,\n namespace: string,\n depth = 0,\n seen = new Set<string>(),\n ): Promise<Array<Pick<GoogleDriveNode, \"id\" | \"name\" | \"parentId\"> & { depth: number }>> {\n if (!currentId || seen.has(currentId)) return [];\n\n const node = await this.getNodeById(currentId);\n if (!node || node.namespace !== namespace) return [];\n\n const nextSeen = new Set([...seen, node.id]);\n\n return [\n { id: node.id, name: node.name, parentId: node.parentId, depth },\n ...(await this.#walkParents(node.parentId, namespace, depth + 1, nextSeen)),\n ];\n }\n\n /**\n * Resolves the breadcrumb parent chain for a Google Drive node.\n *\n * A `null` id represents the namespace root and therefore has no parent chain.\n * The returned list is ordered from the root-most ancestor to the requested\n * node, matching breadcrumb display order.\n */\n async getFolderParents(input: {\n id: string | null;\n namespace: string;\n }): Promise<Array<Pick<GoogleDriveNode, \"id\" | \"name\" | \"parentId\"> & { depth: number }>> {\n if (!input.id) return [];\n\n const parents = await this.#walkParents(input.id, input.namespace);\n return parents.toSorted((a, b) => Number(b.depth) - Number(a.depth));\n }\n\n /**\n * Walks a Google Drive subtree breadth-first.\n *\n * Google Drive has no recursive children endpoint, so folder descendants must be\n * loaded one folder at a time. The returned rows include the starting nodes and\n * all descendants with their relative depth.\n */\n async #walkChildren(\n queue: { id: string; depth: number }[],\n seen: ReadonlySet<string> = new Set(),\n ): Promise<GoogleDriveNodeChild[]> {\n const [current, ...rest] = queue;\n if (!current) return [];\n\n if (seen.has(current.id)) {\n return this.#walkChildren(rest, seen);\n }\n\n const node = await this.getNodeById(current.id);\n if (!node) {\n return this.#walkChildren(rest, seen);\n }\n\n const nextSeen = new Set([...seen, node.id]);\n const currentChild = {\n id: node.id,\n type: node.type,\n parentId: node.parentId,\n depth: current.depth,\n } satisfies GoogleDriveNodeChild;\n\n if (node.type !== \"folder\") {\n return [currentChild, ...(await this.#walkChildren(rest, nextSeen))];\n }\n\n const children = await this.#listChildren({\n filters: {\n namespace: node.namespace,\n parentId: node.id,\n isArchived: false,\n },\n });\n\n const nextQueue = [\n ...rest,\n ...children.map((child) => ({\n id: child.id,\n depth: current.depth + 1,\n })),\n ];\n\n return [currentChild, ...(await this.#walkChildren(nextQueue, nextSeen))];\n }\n\n /**\n * Resolves the subtree for one or more Google Drive nodes.\n */\n async getNodeChildren(ids: string[]): Promise<GoogleDriveNodeChild[]> {\n const uniqueIds = Array.from(new Set(ids));\n return this.#walkChildren(uniqueIds.map((id) => ({ id, depth: 0 })));\n }\n\n /**\n * Creates a Google Drive folder in the requested parent.\n *\n * Google Drive represents folders as files with the special folder MIME type.\n * Creating a folder therefore uses the same `files.create` endpoint as file\n * uploads, but without a media body.\n *\n * A `null` or missing `parentId` means \"create in the namespace root\", where the\n * namespace is the shared drive id/root folder used by this provider.\n */\n async createFolder(input: CreateGoogleDriveFolderInput): Promise<GoogleDriveNode> {\n const result = await this.client.files.create({\n requestBody: {\n name: input.name,\n parents: [input.parentId ?? input.namespace],\n mimeType: GOOGLE_DRIVE_FOLDER_MIME_TYPE,\n },\n supportsAllDrives: true,\n fields: GOOGLE_DRIVE_NODE_FIELDS,\n });\n\n return this.#toNode(result.data);\n }\n\n /**\n * Uploads a file body to Google Drive and returns the created node.\n *\n * Google Drive creates files through `files.create` with two parts:\n * metadata in `requestBody` and the actual file content in `media.body`.\n *\n * A `null` or missing `parentId` means \"upload to the namespace root\", where the\n * namespace is the Google shared drive/root id used by this provider.\n *\n * The input body can be a provider-neutral object body type. `toReadable`\n * normalizes it into a Node.js readable stream because the Google API client\n * expects stream-compatible media bodies.\n */\n async uploadFile(\n input: UploadGoogleDriveFileInput & { body: ObjectBodyInput },\n ): Promise<GoogleDriveNode> {\n const result = await this.client.files.create({\n requestBody: {\n name: input.name,\n parents: [input.parentId ?? input.namespace],\n mimeType: input.contentType ?? undefined,\n },\n media: {\n mimeType: input.contentType ?? undefined,\n body: toGoogleDriveReadable(input.body),\n },\n supportsAllDrives: true,\n fields: GOOGLE_DRIVE_NODE_FIELDS,\n });\n\n return this.#toNode(result.data);\n }\n\n /**\n * Updates mutable Google Drive node metadata.\n *\n * Google Drive uses `files.update` for metadata changes such as renaming and\n * moving a file/folder to or from the trash. The shared Drive API calls this\n * soft-delete state \"archived\"; Google Drive exposes it as `trashed`, so\n * `data.isArchived` is translated directly to Google's `trashed` field.\n *\n * Parent changes are intentionally not handled here. Moving a node requires\n * Google Drive's `addParents`/`removeParents` API and should go through\n * `moveNode` instead.\n */\n async updateNode(id: string, data: UpdateGoogleDriveNodeInput): Promise<GoogleDriveNode> {\n const result = await this.client.files.update({\n fileId: id,\n requestBody: {\n name: data.name,\n trashed: data.isArchived,\n },\n supportsAllDrives: true,\n fields: GOOGLE_DRIVE_NODE_FIELDS,\n });\n\n return this.#toNode(result.data);\n }\n\n /**\n * Moves a Google Drive node to another parent folder.\n *\n * Google Drive does not allow parent changes through the normal metadata\n * `requestBody`. Moving requires `addParents` and `removeParents` on\n * `files.update`, so this operation is intentionally separate from `updateNode`.\n *\n * A `null` parent means \"move to the namespace root\". For this provider, the\n * namespace is the Google shared drive/root id.\n */\n async moveNode(input: { id: string; parentId: string | null }): Promise<GoogleDriveNode> {\n const node = await this.getNodeById(input.id);\n if (!node) {\n throw new ServerError(\"NOT_FOUND\", { message: \"Node not found\" });\n }\n\n if (node.readonly) {\n throw new ServerError(\"BAD_REQUEST\", { message: \"Node is readonly and cannot be changed\" });\n }\n\n if (input.parentId === input.id) {\n throw new ServerError(\"BAD_REQUEST\", { message: \"Node cannot be moved into itself\" });\n }\n\n // Prevent creating cycles by moving a folder into one of its descendants.\n if (input.parentId) {\n const subtree = await this.getNodeChildren([input.id]);\n\n if (subtree.some((child) => child.id === input.parentId)) {\n throw new ServerError(\"BAD_REQUEST\", {\n message: \"Node cannot be moved into one of its descendants\",\n });\n }\n }\n\n const result = await this.client.files.update({\n fileId: input.id,\n addParents: input.parentId ?? node.namespace,\n removeParents: node.googleParents.join(\",\") || undefined,\n supportsAllDrives: true,\n fields: GOOGLE_DRIVE_NODE_FIELDS,\n });\n\n return this.#toNode(result.data);\n }\n\n /**\n * Updates the Google Drive trash state for multiple nodes.\n *\n * Google Drive exposes archive/restore behavior through the `trashed` metadata\n * field on `files.update`. Each node requires a separate API request, so updates\n * are executed in parallel after duplicate ids are removed.\n */\n async #setTrashed(ids: string[], trashed: boolean): Promise<GoogleDriveNode[]> {\n const uniqueIds = [...new Set(ids)];\n\n const results = await Promise.all(\n uniqueIds.map((id) =>\n this.client.files.update({\n fileId: id,\n requestBody: { trashed },\n supportsAllDrives: true,\n fields: GOOGLE_DRIVE_NODE_FIELDS,\n }),\n ),\n );\n\n return results.map((result) => this.#toNode(result.data));\n }\n\n /**\n * Moves Google Drive nodes to trash.\n *\n * The shared Drive API calls this \"archive\", while Google Drive calls the same\n * state `trashed`. This is a soft-delete operation; nodes can be restored with\n * `restoreNodes`.\n */\n async archiveNodes(ids: string[]): Promise<GoogleDriveNode[]> {\n return this.#setTrashed(ids, true);\n }\n\n /**\n * Restores Google Drive nodes from trash.\n *\n * This reverses `archiveNodes` by setting Google Drive's `trashed` flag back to\n * `false`.\n */\n async restoreNodes(ids: string[]): Promise<GoogleDriveNode[]> {\n return this.#setTrashed(ids, false);\n }\n\n /**\n * Permanently deletes a Google Drive node.\n *\n * This uses Google Drive `files.delete`, which removes the file/folder rather\n * than moving it to trash. Soft deletion/trashing should go through the archive\n * method instead.\n */\n async deleteNode(id: string): Promise<void> {\n await this.client.files.delete({\n fileId: id,\n supportsAllDrives: true,\n });\n }\n\n /**\n * Permanently deletes multiple Google Drive nodes.\n *\n * Duplicate ids are removed before issuing delete requests so the same Google\n * file is not deleted more than once. Deletions are executed in parallel because\n * Google Drive exposes deletion as one request per file id.\n *\n * This is a hard delete. Soft deletion/trashing should go through the archive\n * method instead.\n */\n async deleteNodes(ids: string[]): Promise<void> {\n const uniqueIds = [...new Set(ids)];\n\n await Promise.all(\n uniqueIds.map((id) =>\n this.client.files.delete({\n fileId: id,\n supportsAllDrives: true,\n }),\n ),\n );\n }\n\n /**\n * Converts raw Google Drive file metadata into the provider's normalized node DTO.\n *\n * Google Drive API responses are loosely typed and may omit fields that our\n * drive abstraction requires, such as `id` or a namespace/root identifier. Those\n * cases indicate an invalid provider response rather than a caller error, so\n * they are normalized to an internal server error.\n *\n * Any unexpected mapping error is rethrown so it can be handled by the normal\n * server error boundary/logging path.\n */\n #toNode(file: drive_v3.Schema$File): GoogleDriveNode {\n try {\n return GoogleDriveNodeDTO.create({ file });\n } catch (error) {\n if (\n error instanceof Error &&\n [\"Google Drive file has no id\", \"Google Drive file has no namespace\"].includes(\n error.message,\n )\n ) {\n throw new ServerError(\"INTERNAL_SERVER_ERROR\", { message: error.message });\n }\n\n throw error;\n }\n }\n}\n"],"mappings":";;;;;;;AA4BA,MAAM,oBAAoB;AAC1B,MAAM,qBAAqB;;;;;;;;AAgB3B,IAAa,c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B,GAAA,CAAA,OAAA,CAAA,GAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;KAE9B,uBAAA,GAA0B,GAAA,CAAE,KAAA,QAAa,6BAAA;AAAA,KACzC,4BAAA,GAA+B,GAAA,CAAE,KAAA,QAAa,6BAAA;;;;;cAM7C,8BAAA,EAA8B,GAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAE/B,wBAAA,GAA2B,GAAA,CAAE,KAAA,QAAa,8BAAA;AAAA,KAC1C,yBAAA,GAA4B,GAAA,CAAE,KAAA,QAAa,8BAAA;;;;;cAM1C,wCAAA,EAAwC,GAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAEzC,kCAAA,GAAqC,GAAA,CAAE,KAAA,QAC1C,wCAAA;AAAA,KAEG,mCAAA,GAAsC,GAAA,CAAE,KAAA,QAC3C,wCAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"validators.mjs","names":["z"],"sources":["../../../../src/providers/google/lib/validators.ts"],"sourcesContent":["import z from \"zod\";\nimport { type DriveNodeChild, driveNodeSchema } from \"@/lib/dto\";\nimport {\n createDriveFolderInputSchema,\n driveTableFiltersSchema,\n getNodesByParentIdInputSchema,\n listDriveTreeInputSchema,\n updateDriveNodeInputSchema,\n uploadDriveFileInputSchema,\n} from \"@/lib/validators\";\n\n/**\n * GoogleDriveNode schema\n * @description zod schema for validating the shape of a GoogleDriveNode\n */\nexport const googleDriveNodeSchema = driveNodeSchema.extend({\n /**\n * Constant discriminator for Google-backed nodes.\n * Maps to the provider implementation, not to a Google Drive API field.\n */\n provider: z.literal(\"google\"),\n /**\n * Native Google shared drive id from `drive_v3.Schema$File.driveId`.\n * We keep this provider-specific field only as source metadata. The shared\n * `DriveNode.namespace` field is the canonical namespace used by callers.\n */\n googleDriveId: z.string().nullable(),\n /**\n * Original Google Drive MIME type from `drive_v3.Schema$File.mimeType`.\n * The common `contentType` field uses the same source for files and `null`\n * for folders so consumers can treat folders consistently across providers.\n */\n mimeType: z.string().nullable(),\n /**\n * Browser view URL from `drive_v3.Schema$File.webViewLink`.\n * This is Google Drive's closest equivalent to a provider-neutral view URL.\n */\n webViewLink: z.string().nullable(),\n\n /**\n * Download URL from `drive_v3.Schema$File.webContentLink`.\n * Google only returns this for binary files, not for all Google-native docs.\n */\n webContentLink: z.string().nullable(),\n /**\n * Thumbnail URL from `drive_v3.Schema$File.thumbnailLink`.\n * Google provides this opportunistically, so the common `links.thumbnail`\n * field is nullable.\n */\n thumbnailLink: z.string().nullable(),\n /**\n * Native Google trash state from `drive_v3.Schema$File.trashed`.\n * The common `archivedAt` field derives from this because the local provider\n * models soft removal as archive while Google Drive models it as trash.\n */\n trashed: z.boolean(),\n /**\n * Native Google trash timestamp from `drive_v3.Schema$File.trashedTime`.\n * The common `archivedAt` field uses this when available, falling back to the\n * modified time when Google only exposes `trashed: true`.\n */\n trashedAt: z.date().nullable(),\n /**\n * Raw Google parent ids from `drive_v3.Schema$File.parents`.\n * The common `parentId` field uses the first parent, with the configured\n * namespace converted to `null` so root nodes match the local provider shape.\n */\n googleParents: z.array(z.string()),\n\n /**\n * Google edit capability from `drive_v3.Schema$File.capabilities.canEdit`.\n * The common `readonly` field is true when Google content restrictions mark\n * the file readonly or when Google says the user cannot edit the file.\n */\n canEdit: z.boolean().nullable(),\n});\n\nexport type GoogleDriveNode = z.infer<typeof googleDriveNodeSchema>;\nexport type GoogleDriveNodeChild = DriveNodeChild<GoogleDriveNode>;\n\n/**\n * GoogleDriveNodeWithChildren schema\n * @description zod schema for validating the shape of a GoogleDriveNode with children\n */\nexport const googleDriveNodeWithChildrenSchema = googleDriveNodeSchema.extend({\n children: z.array(googleDriveNodeSchema),\n});\n\nexport type GoogleDriveNodeWithChildren = z.infer<typeof googleDriveNodeWithChildrenSchema>;\n\n/**\n * Create drive folder input schema\n * @description zod schema for validating the input of the create drive folder command\n */\nexport const createGoogleDriveFolderInputSchema = createDriveFolderInputSchema;\n\nexport type CreateGoogleDriveFolderInput = z.input<typeof createGoogleDriveFolderInputSchema>;\nexport type CreateGoogleDriveFolderSchema = z.infer<typeof createGoogleDriveFolderInputSchema>;\n\n/**\n * Update drive node input schema\n * @description zod schema for validating the input of the update drive node command\n */\nexport const updateGoogleDriveNodeInputSchema = updateDriveNodeInputSchema.extend({\n isArchived: z.boolean().optional(),\n});\n\nexport type UpdateGoogleDriveNodeInput = z.input<typeof updateGoogleDriveNodeInputSchema>;\nexport type UpdateGoogleDriveNodeSchema = z.infer<typeof updateGoogleDriveNodeInputSchema>;\n\n/**\n * Upload drive file input schema\n * @description zod schema for validating the input of the upload drive file command\n */\nexport const uploadGoogleDriveFileInputSchema = uploadDriveFileInputSchema;\n\nexport type UploadGoogleDriveFileInput = z.input<typeof uploadGoogleDriveFileInputSchema>;\nexport type UploadGoogleDriveFileSchema = z.infer<typeof uploadGoogleDriveFileInputSchema>;\n\n/**\n * Filters\n */\nexport const googleDriveTableFiltersSchema = driveTableFiltersSchema;\n\nexport type GoogleDriveTableFilters = z.infer<typeof googleDriveTableFiltersSchema>;\nexport type GoogleDriveTableFiltersInput = z.input<typeof googleDriveTableFiltersSchema>;\n\n/**\n * List drive tree input schema\n * @description zod schema for validating the input of the list drive tree command\n */\nexport const listGoogleDriveTreeInputSchema = listDriveTreeInputSchema;\n\nexport type ListGoogleDriveTreeInput = z.input<typeof listGoogleDriveTreeInputSchema>;\nexport type ListGoogleDriveTreeSchema = z.infer<typeof listGoogleDriveTreeInputSchema>;\n\n/**\n * Get drive nodes by parent id input schema\n * @description zod schema for validating the input of the get drive nodes by parent id command\n */\nexport const getGoogleDriveNodesByParentIdInputSchema = getNodesByParentIdInputSchema;\n\nexport type GetGoogleDriveNodesByParentIdInput = z.input<\n typeof getGoogleDriveNodesByParentIdInputSchema\n>;\nexport type GetGoogleDriveNodesByParentIdSchema = z.infer<\n typeof getGoogleDriveNodesByParentIdInputSchema\n>;\n"],"mappings":";;;;;;;;;AAeA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version":3,"file":"command-file-update.mjs","names":[],"sources":["../../../../src/providers/local/components/command-file-update.tsx"],"sourcesContent":["\"use client\";\n\nimport { zodResolver } from \"@hookform/resolvers/zod\";\nimport type { DefaultError, MutationOptions } from \"@tanstack/react-query\";\nimport {\n CommandFormDialog,\n CommandFormDialogCancel,\n CommandFormDialogContent,\n CommandFormDialogFields,\n CommandFormDialogFooter,\n CommandFormDialogHeader,\n CommandFormDialogSubmit,\n CommandFormDialogTitle,\n CommandFormDialogTrigger,\n CommandLabel,\n} from \"@tulip-systems/core/commands/client\";\nimport { Input } from \"@tulip-systems/core/components\";\nimport {\n Form,\n FormControl,\n FormField,\n FormItem,\n FormLabel,\n FormMessage,\n} from \"@tulip-systems/core/components/client\";\nimport { FilePen } from \"lucide-react\";\nimport { useForm } from \"react-hook-form\";\nimport { type UpdateLocalDriveNodeInput, updateLocalDriveNodeInputSchema } from \"../lib/validators\";\n\nexport type LocalDriveFileUpdateCommandProps<\n TData = unknown,\n TError = DefaultError,\n TVariables = unknown,\n TOnMutateResult = unknown,\n> = {\n defaultValues: Partial<UpdateLocalDriveNodeInput>;\n variables: (values: UpdateLocalDriveNodeInput) => TVariables;\n mutation: MutationOptions<TData, TError, TVariables, TOnMutateResult>;\n};\n\nexport function LocalDriveFileUpdateCommand<\n TData = unknown,\n TError = DefaultError,\n TVariables = unknown,\n TOnMutateResult = unknown,\n>({\n defaultValues,\n variables,\n mutation,\n}: LocalDriveFileUpdateCommandProps<TData, TError, TVariables, TOnMutateResult>) {\n const form = useForm<UpdateLocalDriveNodeInput>({\n resolver: zodResolver(updateLocalDriveNodeInputSchema),\n defaultValues,\n });\n\n return (\n <Form {...form}>\n <CommandFormDialog>\n <CommandFormDialogTrigger label=\"Wijzigen\">\n <FilePen className=\"size-4\" />\n <CommandLabel />\n </CommandFormDialogTrigger>\n\n <CommandFormDialogContent variables={variables} mutation={mutation}>\n <CommandFormDialogHeader>\n <CommandFormDialogTitle>Bestand wijzigen</CommandFormDialogTitle>\n </CommandFormDialogHeader>\n\n <CommandFormDialogFields>\n <FormField\n control={form.control}\n name=\"name\"\n render={({ field }) => (\n <FormItem>\n <FormLabel>Naam</FormLabel>\n <FormControl>\n <Input {...field} value={field.value ?? \"\"} />\n </FormControl>\n <FormMessage />\n </FormItem>\n )}\n />\n </CommandFormDialogFields>\n\n <CommandFormDialogFooter>\n <CommandFormDialogCancel>Annuleren</CommandFormDialogCancel>\n <CommandFormDialogSubmit>Opslaan</CommandFormDialogSubmit>\n </CommandFormDialogFooter>\n </CommandFormDialogContent>\n </CommandFormDialog>\n </Form>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAwCA,SAAgB,4BAKd,EACA,eACA,WACA,YAC+E;CAC/E,MAAM,OAAO,QAAmC;EAC9C,UAAU,YAAY,gCAAgC;EACtD;EACD,CAAC;AAEF,QACE,oBAAC;EAAK,GAAI;YACR,qBAAC,gCACC,qBAAC;GAAyB,OAAM;cAC9B,oBAAC,WAAQ,WAAU,WAAW,EAC9B,oBAAC,iBAAe;IACS,EAE3B,qBAAC;GAAoC;GAAqB;;IACxD,oBAAC,qCACC,oBAAC,oCAAuB,qBAAyC,GACzC;IAE1B,oBAAC,qCACC,oBAAC;KACC,SAAS,KAAK;KACd,MAAK;KACL,SAAS,EAAE,YACT,qBAAC;MACC,oBAAC,uBAAU,SAAgB;MAC3B,oBAAC,yBACC,oBAAC;OAAM,GAAI;OAAO,OAAO,MAAM,SAAS;QAAM,GAClC;MACd,oBAAC,gBAAc;SACN;MAEb,GACsB;IAE1B,qBAAC,sCACC,oBAAC,qCAAwB,cAAmC,EAC5D,oBAAC,qCAAwB,YAAiC,IAClC;;IACD,IACT;GACf"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-file-upload.d.mts","names":[],"sources":["../../../../src/providers/local/components/command-file-upload.tsx"],"mappings":";;;;iBASgB,4BAAA,CAAA;EAA+B,SAAA;EAAA,GAAc;AAAA,GAAS,cAAA,UAAqB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-file-upload.mjs","names":[],"sources":["../../../../src/providers/local/components/command-file-upload.tsx"],"sourcesContent":["\"use client\";\n\nimport { CommandEmpty, CommandLabel } from \"@tulip-systems/core/commands/client\";\nimport { Input } from \"@tulip-systems/core/components\";\nimport { cn } from \"@tulip-systems/core/lib\";\nimport { UploadIcon } from \"lucide-react\";\nimport type { ComponentProps } from \"react\";\nimport { useLocalDriveUploadZone } from \"./upload-zone-context.client\";\n\nexport function LocalDriveFilesUploadCommand({ className, ...props }: ComponentProps<\"div\">) {\n const { onUpload } = useLocalDriveUploadZone();\n\n return (\n <CommandEmpty {...props} className={cn(\"relative gap-2\", className)} label=\"Upload\">\n <UploadIcon className=\"h-3 w-3\" />\n <CommandLabel />\n\n <Input\n type=\"file\"\n className=\"absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0\"\n multiple\n onChange={(event) => {\n if (!event.target.files) return;\n Array.from(event.target.files).forEach(onUpload);\n }}\n />\n </CommandEmpty>\n );\n}\n"],"mappings":";;;;;;;;;;AASA,SAAgB,6BAA6B,EAAE,WAAW,GAAG,SAAgC;CAC3F,MAAM,EAAE,aAAa,yBAAyB;AAE9C,QACE,qBAAC;EAAa,GAAI;EAAO,WAAW,GAAG,kBAAkB,UAAU;EAAE,OAAM;;GACzE,oBAAC,cAAW,WAAU,YAAY;GAClC,oBAAC,iBAAe;GAEhB,oBAAC;IACC,MAAK;IACL,WAAU;IACV;IACA,WAAW,UAAU;AACnB,SAAI,CAAC,MAAM,OAAO,MAAO;AACzB,WAAM,KAAK,MAAM,OAAO,MAAM,CAAC,QAAQ,SAAS;;KAElD;;GACW"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-folder-create.d.mts","names":[],"sources":["../../../../src/providers/local/components/command-folder-create.tsx"],"mappings":";;;;;KAkCY,mCAAA,2BAED,YAAA;EAIT,aAAA,GAAgB,OAAA,CAAQ,2BAAA;EACxB,SAAA,GAAY,MAAA,EAAQ,2BAAA,KAAgC,UAAA;EACpD,QAAA,EAAU,eAAA,CAAgB,KAAA,EAAO,MAAA,EAAQ,UAAA,EAAY,eAAA;AAAA;AAAA,iBAGvC,8BAAA,2BAEL,YAAA,kDAAA,CAAA;EAIT,aAAA;EACA,SAAA;EACA;AAAA,GACC,mCAAA,CAAoC,KAAA,EAAO,MAAA,EAAQ,UAAA,EAAY,eAAA,IAAgB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-folder-create.mjs","names":[],"sources":["../../../../src/providers/local/components/command-folder-create.tsx"],"sourcesContent":["\"use client\";\n\nimport { zodResolver } from \"@hookform/resolvers/zod\";\nimport type { DefaultError, MutationOptions } from \"@tanstack/react-query\";\nimport {\n CommandFormDialog,\n CommandFormDialogCancel,\n CommandFormDialogContent,\n CommandFormDialogFields,\n CommandFormDialogFooter,\n CommandFormDialogHeader,\n CommandFormDialogSubmit,\n CommandFormDialogTitle,\n CommandFormDialogTrigger,\n CommandLabel,\n} from \"@tulip-systems/core/commands/client\";\nimport { Input } from \"@tulip-systems/core/components\";\nimport {\n Form,\n FormControl,\n FormField,\n FormItem,\n FormLabel,\n FormMessage,\n} from \"@tulip-systems/core/components/client\";\nimport { FolderPlus } from \"lucide-react\";\nimport { useQueryStates } from \"nuqs\";\nimport { useForm } from \"react-hook-form\";\nimport { driveTreeSearchParams } from \"@/lib/search-params\";\nimport {\n type CreateLocalDriveFolderInput,\n createLocalDriveFolderInputSchema,\n} from \"../lib/validators\";\n\nexport type LocalDriveFoldersCreateCommandProps<\n TData = unknown,\n TError = DefaultError,\n TVariables = unknown,\n TOnMutateResult = unknown,\n> = {\n defaultValues?: Partial<CreateLocalDriveFolderInput>;\n variables: (values: CreateLocalDriveFolderInput) => TVariables;\n mutation: MutationOptions<TData, TError, TVariables, TOnMutateResult>;\n};\n\nexport function LocalDriveFoldersCreateCommand<\n TData = unknown,\n TError = DefaultError,\n TVariables = unknown,\n TOnMutateResult = unknown,\n>({\n defaultValues,\n variables,\n mutation,\n}: LocalDriveFoldersCreateCommandProps<TData, TError, TVariables, TOnMutateResult>) {\n const [{ parentId }] = useQueryStates(driveTreeSearchParams);\n\n const form = useForm<CreateLocalDriveFolderInput>({\n resolver: zodResolver(createLocalDriveFolderInputSchema),\n defaultValues: { ...defaultValues, parentId },\n });\n\n return (\n <Form {...form}>\n <CommandFormDialog>\n <CommandFormDialogTrigger label=\"Folder toevoegen\" hotkey=\"mod+i\">\n <FolderPlus className=\"size-4\" />\n <CommandLabel />\n </CommandFormDialogTrigger>\n\n <CommandFormDialogContent variables={variables} mutation={mutation}>\n <CommandFormDialogHeader>\n <CommandFormDialogTitle>Folder toevoegen</CommandFormDialogTitle>\n </CommandFormDialogHeader>\n\n <CommandFormDialogFields>\n <FormField\n control={form.control}\n name=\"name\"\n render={({ field }) => (\n <FormItem>\n <FormLabel>Naam</FormLabel>\n <FormControl>\n <Input {...field} value={field.value ?? \"\"} />\n </FormControl>\n <FormMessage />\n </FormItem>\n )}\n />\n </CommandFormDialogFields>\n\n <CommandFormDialogFooter>\n <CommandFormDialogCancel>Annuleren</CommandFormDialogCancel>\n <CommandFormDialogSubmit>Toevoegen</CommandFormDialogSubmit>\n </CommandFormDialogFooter>\n </CommandFormDialogContent>\n </CommandFormDialog>\n </Form>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AA6CA,SAAgB,+BAKd,EACA,eACA,WACA,YACkF;CAClF,MAAM,CAAC,EAAE,cAAc,eAAe,sBAAsB;CAE5D,MAAM,OAAO,QAAqC;EAChD,UAAU,YAAY,kCAAkC;EACxD,eAAe;GAAE,GAAG;GAAe;GAAU;EAC9C,CAAC;AAEF,QACE,oBAAC;EAAK,GAAI;YACR,qBAAC,gCACC,qBAAC;GAAyB,OAAM;GAAmB,QAAO;cACxD,oBAAC,cAAW,WAAU,WAAW,EACjC,oBAAC,iBAAe;IACS,EAE3B,qBAAC;GAAoC;GAAqB;;IACxD,oBAAC,qCACC,oBAAC,oCAAuB,qBAAyC,GACzC;IAE1B,oBAAC,qCACC,oBAAC;KACC,SAAS,KAAK;KACd,MAAK;KACL,SAAS,EAAE,YACT,qBAAC;MACC,oBAAC,uBAAU,SAAgB;MAC3B,oBAAC,yBACC,oBAAC;OAAM,GAAI;OAAO,OAAO,MAAM,SAAS;QAAM,GAClC;MACd,oBAAC,gBAAc;SACN;MAEb,GACsB;IAE1B,qBAAC,sCACC,oBAAC,qCAAwB,cAAmC,EAC5D,oBAAC,qCAAwB,cAAmC,IACpC;;IACD,IACT;GACf"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-folder-update.d.mts","names":[],"sources":["../../../../src/providers/local/components/command-folder-update.tsx"],"mappings":";;;;;KA6BY,mCAAA,2BAED,YAAA;EAIT,aAAA,EAAe,OAAA,CAAQ,yBAAA;EACvB,SAAA,GAAY,MAAA,EAAQ,yBAAA,KAA8B,UAAA;EAClD,QAAA,EAAU,eAAA,CAAgB,KAAA,EAAO,MAAA,EAAQ,UAAA,EAAY,eAAA;AAAA;AAAA,iBAGvC,8BAAA,2BAEL,YAAA,kDAAA,CAAA;EAIT,aAAA;EACA,SAAA;EACA;AAAA,GACC,mCAAA,CAAoC,KAAA,EAAO,MAAA,EAAQ,UAAA,EAAY,eAAA,IAAgB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-folder-update.mjs","names":[],"sources":["../../../../src/providers/local/components/command-folder-update.tsx"],"sourcesContent":["\"use client\";\n\nimport { zodResolver } from \"@hookform/resolvers/zod\";\nimport type { DefaultError, MutationOptions } from \"@tanstack/react-query\";\nimport {\n CommandFormDialog,\n CommandFormDialogCancel,\n CommandFormDialogContent,\n CommandFormDialogFields,\n CommandFormDialogFooter,\n CommandFormDialogHeader,\n CommandFormDialogSubmit,\n CommandFormDialogTitle,\n CommandFormDialogTrigger,\n CommandLabel,\n} from \"@tulip-systems/core/commands/client\";\nimport { Input } from \"@tulip-systems/core/components\";\nimport {\n Form,\n FormControl,\n FormField,\n FormItem,\n FormLabel,\n FormMessage,\n} from \"@tulip-systems/core/components/client\";\nimport { FolderPen } from \"lucide-react\";\nimport { useForm } from \"react-hook-form\";\nimport { type UpdateLocalDriveNodeInput, updateLocalDriveNodeInputSchema } from \"../lib/validators\";\n\nexport type LocalDriveFoldersUpdateCommandProps<\n TData = unknown,\n TError = DefaultError,\n TVariables = unknown,\n TOnMutateResult = unknown,\n> = {\n defaultValues: Partial<UpdateLocalDriveNodeInput>;\n variables: (values: UpdateLocalDriveNodeInput) => TVariables;\n mutation: MutationOptions<TData, TError, TVariables, TOnMutateResult>;\n};\n\nexport function LocalDriveFoldersUpdateCommand<\n TData = unknown,\n TError = DefaultError,\n TVariables = unknown,\n TOnMutateResult = unknown,\n>({\n defaultValues,\n variables,\n mutation,\n}: LocalDriveFoldersUpdateCommandProps<TData, TError, TVariables, TOnMutateResult>) {\n const form = useForm<UpdateLocalDriveNodeInput>({\n resolver: zodResolver(updateLocalDriveNodeInputSchema),\n defaultValues,\n });\n\n return (\n <Form {...form}>\n <CommandFormDialog>\n <CommandFormDialogTrigger label=\"Wijzigen\">\n <FolderPen className=\"size-4\" />\n <CommandLabel />\n </CommandFormDialogTrigger>\n\n <CommandFormDialogContent variables={variables} mutation={mutation}>\n <CommandFormDialogHeader>\n <CommandFormDialogTitle>Folder wijzigen</CommandFormDialogTitle>\n </CommandFormDialogHeader>\n\n <CommandFormDialogFields>\n <FormField\n control={form.control}\n name=\"name\"\n render={({ field }) => (\n <FormItem>\n <FormLabel>Naam</FormLabel>\n <FormControl>\n <Input {...field} value={field.value ?? \"\"} />\n </FormControl>\n <FormMessage />\n </FormItem>\n )}\n />\n </CommandFormDialogFields>\n\n <CommandFormDialogFooter>\n <CommandFormDialogCancel>Annuleren</CommandFormDialogCancel>\n <CommandFormDialogSubmit>Opslaan</CommandFormDialogSubmit>\n </CommandFormDialogFooter>\n </CommandFormDialogContent>\n </CommandFormDialog>\n </Form>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAwCA,SAAgB,+BAKd,EACA,eACA,WACA,YACkF;CAClF,MAAM,OAAO,QAAmC;EAC9C,UAAU,YAAY,gCAAgC;EACtD;EACD,CAAC;AAEF,QACE,oBAAC;EAAK,GAAI;YACR,qBAAC,gCACC,qBAAC;GAAyB,OAAM;cAC9B,oBAAC,aAAU,WAAU,WAAW,EAChC,oBAAC,iBAAe;IACS,EAE3B,qBAAC;GAAoC;GAAqB;;IACxD,oBAAC,qCACC,oBAAC,oCAAuB,oBAAwC,GACxC;IAE1B,oBAAC,qCACC,oBAAC;KACC,SAAS,KAAK;KACd,MAAK;KACL,SAAS,EAAE,YACT,qBAAC;MACC,oBAAC,uBAAU,SAAgB;MAC3B,oBAAC,yBACC,oBAAC;OAAM,GAAI;OAAO,OAAO,MAAM,SAAS;QAAM,GAClC;MACd,oBAAC,gBAAc;SACN;MAEb,GACsB;IAE1B,qBAAC,sCACC,oBAAC,qCAAwB,cAAmC,EAC5D,oBAAC,qCAAwB,YAAiC,IAClC;;IACD,IACT;GACf"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"content.client.d.mts","names":[],"sources":["../../../../src/providers/local/components/content.client.tsx"],"mappings":";;;cAEa,iBAAA,SAAiB,YAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"content.client.mjs","names":[],"sources":["../../../../src/providers/local/components/content.client.tsx"],"sourcesContent":["import { DriveContent } from \"@/components/content\";\n\nexport const LocalDriveContent = DriveContent;\n"],"mappings":";;;AAEA,MAAa,oBAAoB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"navigation.client.d.mts","names":[],"sources":["../../../../src/providers/local/components/navigation.client.tsx"],"mappings":";;;;;;cAgBa,gBAAA,SAAgB,WAAA;AAAA,cAChB,2BAAA,SAA2B,sBAAA;AAAA,cAC3B,qBAAA,SAAqB,gBAAA;AAAA,cACrB,iBAAA,SAAiB,YAAA;AAAA,cACjB,4BAAA,SAAsD,gBAAA;AAAA,cACtD,sBAAA,SAAsB,iBAAA;AAAA,cACtB,sBAAA,SAAsB,iBAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"navigation.client.mjs","names":[],"sources":["../../../../src/providers/local/components/navigation.client.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n DriveHeader,\n DriveHeaderBreadcrumbs,\n DriveHeaderTools,\n} from \"@/components/navigation/header.client\";\nimport {\n DriveToolbar,\n DriveToolbarBreadcrumbs,\n DriveToolbarTools,\n} from \"@/components/navigation/toolbar.client\";\nimport { DriveViewSwitcher } from \"@/components/navigation/view-switcher.client\";\n\nexport type { DriveBreadcrumb } from \"@/components/navigation/breadcrumbs.client\";\n\nexport const LocalDriveHeader = DriveHeader;\nexport const LocalDriveHeaderBreadcrumbs = DriveHeaderBreadcrumbs;\nexport const LocalDriveHeaderTools = DriveHeaderTools;\nexport const LocalDriveToolbar = DriveToolbar;\nexport const LocalDriveToolbarBreadcrumbs = DriveToolbarBreadcrumbs;\nexport const LocalDriveToolbarTools = DriveToolbarTools;\nexport const LocalDriveViewSwitcher = DriveViewSwitcher;\n"],"mappings":";;;;;;;AAgBA,MAAa,mBAAmB;AAChC,MAAa,8BAA8B;AAC3C,MAAa,wBAAwB;AACrC,MAAa,oBAAoB;AACjC,MAAa,+BAA+B;AAC5C,MAAa,yBAAyB;AACtC,MAAa,yBAAyB"}