@powerhousedao/connect 1.0.0-dev.246 → 1.0.0-dev.248

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 (36) hide show
  1. package/LICENSE +661 -0
  2. package/dist/assets/{app-BT03qzg4.js → app-BgY4XbK3.js} +1483 -1001
  3. package/dist/assets/{app-D9QJBr8i.css → app-CYjeY4R-.css} +113 -50
  4. package/dist/assets/{app-loader-Cp_C_kSQ.js → app-loader-Be1urgPw.js} +206 -185
  5. package/dist/assets/{app-loader-Bnp0H-wa.css → app-loader-DC8DXqh9.css} +129 -18
  6. package/dist/assets/{ccip-rCu2dOKk.js → ccip-KX_YlO62.js} +3 -3
  7. package/dist/assets/{content-B1RXkSXz.js → content-CrBPsYmC.js} +36 -6
  8. package/dist/assets/{index-CJbQZ7hP.js → index-Ca8tBMzh.js} +3 -3
  9. package/dist/assets/{index-DX2bXpNe.js → index-CrpTq7W6.js} +670 -519
  10. package/dist/assets/{index-a5VEmfQw.js → index-DG5cID7M.js} +4 -4
  11. package/dist/assets/{main.Hm4UID1Z.js → main.BvYgkrO6.js} +1 -1
  12. package/dist/assets/{style-D4JhTt_m.css → style-D7CwmVZf.css} +52 -36
  13. package/dist/index.html +1 -1
  14. package/dist/modules/@powerhousedao/reactor-browser/{chunk-G6LMXRY5.js → chunk-2ONJ2PX4.js} +1 -1
  15. package/dist/modules/@powerhousedao/reactor-browser/{chunk-XXFOSD4A.js → chunk-6MBHOHAA.js} +1 -1
  16. package/dist/modules/@powerhousedao/reactor-browser/{chunk-FW7N6EJH.js → chunk-C7QRY43M.js} +3 -3
  17. package/dist/modules/@powerhousedao/reactor-browser/{chunk-45DCPCA7.js → chunk-CO2RVWYY.js} +1 -1
  18. package/dist/modules/@powerhousedao/reactor-browser/{chunk-YDERCA5J.js → chunk-IC6B3767.js} +1 -1
  19. package/dist/modules/@powerhousedao/reactor-browser/{chunk-A4GIWVYS.js → chunk-N5UNGAA6.js} +94 -74
  20. package/dist/modules/@powerhousedao/reactor-browser/{chunk-F3RCGUF6.js → chunk-NHD6VUCD.js} +2 -2
  21. package/dist/modules/@powerhousedao/reactor-browser/{chunk-UP4DC4D2.js → chunk-OYYVE7RP.js} +1 -1
  22. package/dist/modules/@powerhousedao/reactor-browser/{chunk-M2UUQ5LH.js → chunk-U34SEKEB.js} +2 -2
  23. package/dist/modules/@powerhousedao/reactor-browser/{chunk-PQ4UODLR.js → chunk-UDKYG6I4.js} +1 -1
  24. package/dist/modules/@powerhousedao/reactor-browser/context/index.js +2 -2
  25. package/dist/modules/@powerhousedao/reactor-browser/context/read-mode.js +2 -2
  26. package/dist/modules/@powerhousedao/reactor-browser/hooks/index.js +8 -8
  27. package/dist/modules/@powerhousedao/reactor-browser/hooks/useAddDebouncedOperations.js +3 -3
  28. package/dist/modules/@powerhousedao/reactor-browser/hooks/useConnectCrypto.js +2 -2
  29. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDocumentDrives.js +2 -2
  30. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDocumentEditor.js +5 -5
  31. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActions.js +2 -2
  32. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActionsWithUiNodes.js +3 -3
  33. package/dist/modules/@powerhousedao/reactor-browser/index.js +10 -10
  34. package/dist/modules/@powerhousedao/reactor-browser/reactor.js +2 -2
  35. package/dist/vite-envs.sh +1 -1
  36. package/package.json +8 -8
@@ -1,7 +1,7 @@
1
1
  @import "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap";
2
2
 
3
- /*! tailwindcss v4.0.14 | MIT License | https://tailwindcss.com */
4
- /*! tailwindcss v4.0.14 | MIT License | https://tailwindcss.com */
3
+ /*! tailwindcss v4.0.17 | MIT License | https://tailwindcss.com */
4
+ /*! tailwindcss v4.0.17 | MIT License | https://tailwindcss.com */
5
5
  :root {
6
6
  --toastify-color-light: #fff;
7
7
  --toastify-color-dark: #121212;
@@ -715,7 +715,6 @@
715
715
  @layer theme {
716
716
  :root, :host {
717
717
  --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
718
- --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
719
718
  --color-red-100: #fdedec;
720
719
  --color-red-400: oklch(.704 .191 22.216);
721
720
  --color-red-500: oklch(.637 .237 25.331);
@@ -736,6 +735,7 @@
736
735
  --color-green-700: oklch(.527 .154 150.069);
737
736
  --color-green-800: oklch(.448 .119 151.328);
738
737
  --color-green-900: oklch(.393 .095 152.535);
738
+ --color-blue-50: oklch(.97 .014 254.604);
739
739
  --color-blue-100: oklch(.932 .032 255.585);
740
740
  --color-blue-400: oklch(.707 .165 254.624);
741
741
  --color-blue-500: oklch(.623 .214 259.815);
@@ -798,12 +798,6 @@
798
798
  --animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;
799
799
  --default-transition-duration: .15s;
800
800
  --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);
801
- --default-font-family: var(--font-sans);
802
- --default-font-feature-settings: var(--font-sans--font-feature-settings);
803
- --default-font-variation-settings: var(--font-sans--font-variation-settings);
804
- --default-mono-font-family: var(--font-mono);
805
- --default-mono-font-feature-settings: var(--font-mono--font-feature-settings);
806
- --default-mono-font-variation-settings: var(--font-mono--font-variation-settings);
807
801
  --color-charcoal-300: #9da6b9;
808
802
  --color-charcoal-700: #485265;
809
803
  --color-charcoal-800: #373e4e;
@@ -816,20 +810,51 @@
816
810
  --animate-slide-in-from-bottom: slideInFromBottom .2s ease-in-out;
817
811
  --animate-slide-in-from-left: slideInFromLeft .2s ease-in-out;
818
812
  --animate-slide-in-from-right: slideInFromRight .2s ease-in-out;
813
+ --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
819
814
  --text-3xl: 1.875rem;
820
815
  --text-3xl--line-height: calc(2.25 / 1.875);
821
816
  --leading-normal: 1.5;
822
817
  --leading-relaxed: 1.625;
823
818
  --drop-shadow-sm: 0 1px 2px #00000026;
824
819
  --blur-sm: 8px;
820
+ --default-font-family: var(--font-sans);
821
+ --default-mono-font-family: var(--font-mono);
825
822
  --spacing-app-height: calc(100vh - 32px);
826
823
  }
827
824
  }
828
825
  @layer base {
826
+ html, :host {
827
+ -webkit-text-size-adjust: 100%;
828
+ tab-size: 4;
829
+ font-feature-settings: initial;
830
+ font-variation-settings: initial;
831
+ -webkit-tap-highlight-color: transparent;
832
+ font-family: Inter, sans-serif;
833
+ line-height: 1.5;
834
+ }
835
+
836
+ code, kbd, samp, pre {
837
+ font-feature-settings: initial;
838
+ font-variation-settings: initial;
839
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
840
+ font-size: 1em;
841
+ }
842
+
843
+ @supports (not ((-webkit-appearance: -apple-pay-button))) or (contain-intrinsic-size: 1px) {
844
+ ::placeholder {
845
+ color: color-mix(in oklab, currentColor 50%, transparent);
846
+ }
847
+ }
848
+
829
849
  h1, h2, h3, h4, h5, h6, p {
830
850
  color: var(--color-gray-900);
831
851
  }
832
852
 
853
+ * {
854
+ scrollbar-color: initial;
855
+ scrollbar-width: initial;
856
+ }
857
+
833
858
  *, :after, :before, ::backdrop {
834
859
  box-sizing: border-box;
835
860
  border: 0 solid;
@@ -854,10 +879,6 @@
854
879
  -webkit-tap-highlight-color: transparent;
855
880
  }
856
881
 
857
- body {
858
- line-height: inherit;
859
- }
860
-
861
882
  hr {
862
883
  height: 0;
863
884
  color: inherit;
@@ -980,7 +1001,12 @@
980
1001
 
981
1002
  ::placeholder {
982
1003
  opacity: 1;
983
- color: color-mix(in oklab, currentColor 50%, transparent);
1004
+ }
1005
+
1006
+ @supports (not ((-webkit-appearance: -apple-pay-button))) or (contain-intrinsic-size: 1px) {
1007
+ ::placeholder {
1008
+ color: color-mix(in oklab, currentColor 50%, transparent);
1009
+ }
984
1010
  }
985
1011
 
986
1012
  textarea {
@@ -1384,6 +1410,32 @@
1384
1410
  margin-left: auto;
1385
1411
  }
1386
1412
 
1413
+ .scrollbar-thin {
1414
+ scrollbar-width: thin;
1415
+ scrollbar-color: var(--scrollbar-thumb, initial) var(--scrollbar-track, initial);
1416
+ }
1417
+
1418
+ .scrollbar-thin::-webkit-scrollbar-track {
1419
+ background-color: var(--scrollbar-track);
1420
+ border-radius: var(--scrollbar-track-radius);
1421
+ }
1422
+
1423
+ .scrollbar-thin::-webkit-scrollbar-thumb {
1424
+ background-color: var(--scrollbar-thumb);
1425
+ border-radius: var(--scrollbar-thumb-radius);
1426
+ }
1427
+
1428
+ .scrollbar-thin::-webkit-scrollbar-corner {
1429
+ background-color: var(--scrollbar-corner);
1430
+ border-radius: var(--scrollbar-corner-radius);
1431
+ }
1432
+
1433
+ .scrollbar-thin::-webkit-scrollbar {
1434
+ width: 8px;
1435
+ height: 8px;
1436
+ display: block;
1437
+ }
1438
+
1387
1439
  .line-clamp-2 {
1388
1440
  -webkit-line-clamp: 2;
1389
1441
  -webkit-box-orient: vertical;
@@ -1793,6 +1845,10 @@
1793
1845
  min-width: calc(var(--spacing) * 8);
1794
1846
  }
1795
1847
 
1848
+ .min-w-9 {
1849
+ min-width: calc(var(--spacing) * 9);
1850
+ }
1851
+
1796
1852
  .min-w-36 {
1797
1853
  min-width: calc(var(--spacing) * 36);
1798
1854
  }
@@ -1809,10 +1865,6 @@
1809
1865
  min-width: 142px;
1810
1866
  }
1811
1867
 
1812
- .min-w-\[160px\] {
1813
- min-width: 160px;
1814
- }
1815
-
1816
1868
  .min-w-\[360px\] {
1817
1869
  min-width: 360px;
1818
1870
  }
@@ -2053,6 +2105,10 @@
2053
2105
  overflow: scroll;
2054
2106
  }
2055
2107
 
2108
+ .overflow-x-auto {
2109
+ overflow-x: auto;
2110
+ }
2111
+
2056
2112
  .overflow-x-hidden {
2057
2113
  overflow-x: hidden;
2058
2114
  }
@@ -2159,6 +2215,11 @@
2159
2215
  border-top-width: 1px;
2160
2216
  }
2161
2217
 
2218
+ .border-r {
2219
+ border-right-style: var(--tw-border-style);
2220
+ border-right-width: 1px;
2221
+ }
2222
+
2162
2223
  .border-r-\[0\.5px\] {
2163
2224
  border-right-style: var(--tw-border-style);
2164
2225
  border-right-width: .5px;
@@ -2202,6 +2263,10 @@
2202
2263
  border-color: var(--color-blue-600);
2203
2264
  }
2204
2265
 
2266
+ .border-blue-900 {
2267
+ border-color: var(--color-blue-900);
2268
+ }
2269
+
2205
2270
  .border-gray-100 {
2206
2271
  border-color: var(--color-gray-100);
2207
2272
  }
@@ -2262,6 +2327,10 @@
2262
2327
  background-color: #fff;
2263
2328
  }
2264
2329
 
2330
+ .bg-blue-50 {
2331
+ background-color: var(--color-blue-50);
2332
+ }
2333
+
2265
2334
  .bg-blue-100 {
2266
2335
  background-color: var(--color-blue-100);
2267
2336
  }
@@ -2398,6 +2467,10 @@
2398
2467
  padding-inline: 5.5px;
2399
2468
  }
2400
2469
 
2470
+ .px-\[12px\] {
2471
+ padding-inline: 12px;
2472
+ }
2473
+
2401
2474
  .py-0 {
2402
2475
  padding-block: calc(var(--spacing) * 0);
2403
2476
  }
@@ -2430,6 +2503,10 @@
2430
2503
  padding-block: 7px;
2431
2504
  }
2432
2505
 
2506
+ .py-\[15px\] {
2507
+ padding-block: 15px;
2508
+ }
2509
+
2433
2510
  .pt-0 {
2434
2511
  padding-top: calc(var(--spacing) * 0);
2435
2512
  }
@@ -2589,6 +2666,11 @@
2589
2666
  line-height: calc(var(--spacing) * 5);
2590
2667
  }
2591
2668
 
2669
+ .leading-\[14px\] {
2670
+ --tw-leading: 14px;
2671
+ line-height: 14px;
2672
+ }
2673
+
2592
2674
  .leading-\[18px\] {
2593
2675
  --tw-leading: 18px;
2594
2676
  line-height: 18px;
@@ -2962,6 +3044,19 @@
2962
3044
  scrollbar-width: none;
2963
3045
  }
2964
3046
 
3047
+ .scrollbar-thumb-gray-300 {
3048
+ --scrollbar-thumb: #d8d9da;
3049
+ }
3050
+
3051
+ .scrollbar-track-transparent {
3052
+ --scrollbar-track: transparent;
3053
+ }
3054
+
3055
+ .not-last\:border-b:not(:last-child) {
3056
+ border-bottom-style: var(--tw-border-style);
3057
+ border-bottom-width: 1px;
3058
+ }
3059
+
2965
3060
  .group-focus-within\:\!text-gray-900:is(:where(.group):focus-within *) {
2966
3061
  color: var(--color-gray-900) !important;
2967
3062
  }
@@ -3499,6 +3594,10 @@
3499
3594
  filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
3500
3595
  }
3501
3596
 
3597
+ .hover\:scrollbar-thumb-gray-300:hover {
3598
+ --scrollbar-thumb: #d8d9da;
3599
+ }
3600
+
3502
3601
  .focus-within\:hover\:cursor-default:focus-within:hover {
3503
3602
  cursor: default;
3504
3603
  }
@@ -4066,6 +4165,10 @@
4066
4165
  --tw-ring-color: var(--color-charcoal-300);
4067
4166
  }
4068
4167
 
4168
+ .dark\:scrollbar-thumb-charcoal-700:where(.dark, .dark *) {
4169
+ --scrollbar-thumb: #485265;
4170
+ }
4171
+
4069
4172
  .dark\:group-focus-within\:\!text-gray-50:where(.dark, .dark *):is(:where(.group):focus-within *) {
4070
4173
  color: var(--color-gray-50) !important;
4071
4174
  }
@@ -4235,6 +4338,10 @@
4235
4338
  color: var(--color-slate-50);
4236
4339
  }
4237
4340
 
4341
+ .dark\:hover\:scrollbar-thumb-charcoal-700:where(.dark, .dark *):hover {
4342
+ --scrollbar-thumb: #485265;
4343
+ }
4344
+
4238
4345
  .dark\:focus-within\:hover\:bg-charcoal-900:where(.dark, .dark *):focus-within:hover {
4239
4346
  background-color: var(--color-charcoal-900);
4240
4347
  }
@@ -4340,6 +4447,10 @@
4340
4447
  background-color: #404446;
4341
4448
  }
4342
4449
 
4450
+ .\[\&\]\:\!w-\[120px\] {
4451
+ width: 120px !important;
4452
+ }
4453
+
4343
4454
  .focus\:\[\&_\.input-field\]\:bg-transparent:focus .input-field {
4344
4455
  background-color: #0000;
4345
4456
  }
@@ -1,7 +1,7 @@
1
- import { aD as BaseError, aE as getUrl, aF as stringify, aG as decodeErrorResult, aH as isAddressEqual, aI as call, aJ as concat, aK as encodeAbiParameters, aL as HttpRequestError, aM as isHex } from "./app-BT03qzg4.js";
2
- import "./main.Hm4UID1Z.js";
1
+ import { aD as BaseError, aE as getUrl, aF as stringify, aG as decodeErrorResult, aH as isAddressEqual, aI as call, aJ as concat, aK as encodeAbiParameters, aL as HttpRequestError, aM as isHex } from "./app-BgY4XbK3.js";
2
+ import "./main.BvYgkrO6.js";
3
3
  import "react/jsx-runtime";
4
- import "./app-loader-Cp_C_kSQ.js";
4
+ import "./app-loader-Be1urgPw.js";
5
5
  import "react";
6
6
  import "@powerhousedao/reactor-browser";
7
7
  import "react-dom";
@@ -1,8 +1,8 @@
1
1
  import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
2
- import { t as twMerge, B as Button, m as mergeClassNameProps, E as ERROR, M as MISSING, C as CONFLICT, S as SUCCESS, h as SYNCING, I as INITIAL_SYNC, i as ConnectDropdownMenu, u as useOnClickOutside, j as useEventListener, k as useCopyToClipboard, l as Select, n as ENSAvatar, P as Provider, o as Root3, T as Trigger, p as Portal, q as Content2, v as validateInitialState, w as validateStateSchemaName, x as validateModules, y as useUnwrappedReactor, z as useConnectDid, A as useConnectCrypto, D as useTranslation, F as useModal, G as useAtomValue, H as themeAtom, J as useUser, K as useUserPermissions, L as useUiNodes, N as exportFile, O as useGetDocumentModelModule, Q as addActionContext, U as signOperation, V as useDocumentDriveServer, W as useHotkeys, X as useGetEditor, Y as isSameDocument, Z as useNavigate, _ as ErrorBoundary, $ as DriveLayout, a0 as SearchBar, a1 as useAsyncReactor, a2 as useFilteredDocumentModels, a3 as useDriveEditor, a4 as useDocumentDriveById } from "./app-BT03qzg4.js";
2
+ import { t as twMerge, B as Button, m as mergeClassNameProps, E as ERROR, M as MISSING, C as CONFLICT, S as SUCCESS, h as SYNCING, I as INITIAL_SYNC, i as ConnectDropdownMenu, u as useOnClickOutside, j as useEventListener, k as useCopyToClipboard, l as Select, n as ENSAvatar, P as Provider, o as Root3, T as Trigger, p as Portal, q as Content2, v as validateInitialState, w as validateStateSchemaName, x as validateModules, y as useUnwrappedReactor, z as useConnectDid, A as useConnectCrypto, D as useTranslation, F as useModal, G as useAtomValue, H as themeAtom, J as useUser, K as useUserPermissions, L as useUiNodes, N as exportFile, O as useGetDocumentModelModule, Q as addActionContext, U as signOperation, V as useDocumentDriveServer, W as useHotkeys, X as useGetEditor, Y as isSameDocument, Z as useNavigate, _ as ErrorBoundary, $ as DriveLayout, a0 as SearchBar, a1 as useAsyncReactor, a2 as useFilteredDocumentModels, a3 as useDriveEditor, a4 as useDocumentDriveById } from "./app-BgY4XbK3.js";
3
3
  import * as React from "react";
4
4
  import React__default, { useState, useCallback, useMemo, useEffect, Fragment, useRef, useLayoutEffect, memo as memo$1, createElement, useSyncExternalStore, Suspense } from "react";
5
- import { _ as Icon, aX as getDimensions, aY as READ, aZ as nodeOptionsMap, a_ as defaultFileOptions, a$ as DELETE, b0 as RENAME, b1 as WRITE, b2 as DUPLICATE, b3 as defaultFolderOptions, b4 as garbageCollect, b5 as sortOperations, b6 as UI_NODE, aO as DRIVE, ay as FILE, b7 as undo, b8 as redo, ac as logger, b9 as useDocumentDispatch, aP as FOLDER, ak as driveDocumentModelModule } from "./app-loader-Cp_C_kSQ.js";
5
+ import { _ as Icon, aX as getDimensions, aY as READ, aZ as nodeOptionsMap, a_ as defaultFileOptions, a$ as DELETE, b0 as RENAME, b1 as WRITE, b2 as DUPLICATE, b3 as defaultFolderOptions, b4 as garbageCollect, b5 as sortOperations, b6 as UI_NODE, aO as DRIVE, ay as FILE, b7 as undo, b8 as redo, ac as logger, b9 as useDocumentDispatch, aP as FOLDER, ak as driveDocumentModelModule } from "./app-loader-Be1urgPw.js";
6
6
  import { useDocument, useDocumentEditorProps } from "@powerhousedao/reactor-browser";
7
7
  import { useUiNodesContext, FILE as FILE$1 } from "@powerhousedao/reactor-browser/hooks/useUiNodesContext";
8
8
  import { useDriveActionsWithUiNodes } from "@powerhousedao/reactor-browser/hooks/useDriveActionsWithUiNodes";
@@ -10,7 +10,7 @@ import { useDriveContext, DriveContextProvider } from "@powerhousedao/reactor-br
10
10
  import "@powerhousedao/reactor-browser/uiNodes/constants";
11
11
  import { makeDriveDocumentStateHook } from "@powerhousedao/reactor-browser/hooks/document-state";
12
12
  import { flushSync } from "react-dom";
13
- import "./main.Hm4UID1Z.js";
13
+ import "./main.BvYgkrO6.js";
14
14
  const PaginationButton = ({ active = false, ...props }) => {
15
15
  const className = twMerge("h-8 min-w-8 border border-solid border-gray-300 bg-white px-3 py-1 text-xs text-gray-900 hover:bg-gray-100", !active && "border-0");
16
16
  return jsx(Button, { color: "light", size: "small", ...mergeClassNameProps(props, className), children: props.children });
@@ -238,7 +238,7 @@ function FolderItem(props) {
238
238
  const { uiNode, isAllowedToCreateDocuments, className, onRenameNode, onDuplicateNode, onDeleteNode, onSelectNode, onAddFile, onCopyNode, onMoveNode } = props;
239
239
  const [mode, setMode] = useState(READ);
240
240
  const [isDropdownMenuOpen, setIsDropdownMenuOpen] = useState(false);
241
- const { dragProps } = useDrag(props);
241
+ const { dragProps } = useDrag({ ...props, uiNode });
242
242
  const { isDropTarget, dropProps } = useDrop({
243
243
  uiNode,
244
244
  onAddFile,
@@ -251,6 +251,7 @@ function FolderItem(props) {
251
251
  }
252
252
  function onSubmit(name) {
253
253
  onRenameNode(name, uiNode);
254
+ setMode(READ);
254
255
  }
255
256
  function onClick() {
256
257
  onSelectNode(uiNode);
@@ -2577,6 +2578,12 @@ function calculateRange({
2577
2578
  }) {
2578
2579
  const lastIndex = measurements.length - 1;
2579
2580
  const getOffset = (index) => measurements[index].start;
2581
+ if (measurements.length <= lanes) {
2582
+ return {
2583
+ startIndex: 0,
2584
+ endIndex: lastIndex
2585
+ };
2586
+ }
2580
2587
  let startIndex = findNearestBinarySearch(
2581
2588
  0,
2582
2589
  lastIndex,
@@ -3710,13 +3717,36 @@ function FolderView(props) {
3710
3717
  const { t } = useTranslation();
3711
3718
  const folderNodes = node.children.filter((node2) => node2.kind === FOLDER).sort(sortUiNodesByName);
3712
3719
  const fileNodes = node.children.filter((node2) => node2.kind === FILE).sort(sortUiNodesByName);
3720
+ const folderCallbacks = {
3721
+ onSelectNode: (node2) => nodeProps.onSelectNode(node2),
3722
+ onRenameNode: (name, node2) => nodeProps.onRenameNode(name, node2),
3723
+ onDuplicateNode: (node2) => nodeProps.onDuplicateNode(node2),
3724
+ onDeleteNode: (node2) => nodeProps.onDeleteNode(node2)
3725
+ };
3726
+ const fileCallbacks = {
3727
+ onSelectNode: (node2) => nodeProps.onSelectNode(node2),
3728
+ onRenameNode: (name, node2) => nodeProps.onRenameNode(name, node2),
3729
+ onDuplicateNode: (node2) => nodeProps.onDuplicateNode(node2),
3730
+ onDeleteNode: (node2) => nodeProps.onDeleteNode(node2)
3731
+ };
3732
+ const baseNodeCallbacks = {
3733
+ onAddFile: async (file, parentNode) => {
3734
+ await nodeProps.onAddFile(file, parentNode);
3735
+ },
3736
+ onCopyNode: async (uiNode, targetNode) => {
3737
+ await nodeProps.onCopyNode(uiNode, targetNode);
3738
+ },
3739
+ onMoveNode: async (uiNode, targetNode) => {
3740
+ await nodeProps.onMoveNode(uiNode, targetNode);
3741
+ }
3742
+ };
3713
3743
  return jsxs("div", { className: twMerge("rounded-md border-2 border-transparent p-2", isDropTarget && "border-dashed border-blue-100", className), ...containerProps, children: [jsx(DriveLayout.ContentSection, { title: t("folderView.sections.folders.title", {
3714
3744
  defaultValue: "Folders"
3715
- }), className: "mb-4", children: folderNodes.length > 0 ? folderNodes.map((folderNode) => jsx(FolderItem, { uiNode: folderNode, onAddFile: nodeProps.onAddFile, onCopyNode: nodeProps.onCopyNode, onMoveNode: nodeProps.onMoveNode, onSelectNode: nodeProps.onSelectNode, onRenameNode: nodeProps.onRenameNode, onDuplicateNode: nodeProps.onDuplicateNode, onDeleteNode: nodeProps.onDeleteNode, isAllowedToCreateDocuments: nodeProps.isAllowedToCreateDocuments }, folderNode.id)) : jsx("div", { className: "mb-8 text-sm text-gray-400", children: t("folderView.sections.folders.empty", {
3745
+ }), className: "mb-4", children: folderNodes.length > 0 ? folderNodes.map((folderNode) => jsx(FolderItem, { uiNode: folderNode, ...baseNodeCallbacks, ...folderCallbacks, isAllowedToCreateDocuments: nodeProps.isAllowedToCreateDocuments }, folderNode.id)) : jsx("div", { className: "mb-8 text-sm text-gray-400", children: t("folderView.sections.folders.empty", {
3716
3746
  defaultValue: "No documents or files 📄"
3717
3747
  }) }) }), jsx(DriveLayout.ContentSection, { title: t("folderView.sections.documents.title", {
3718
3748
  defaultValue: "Documents and files"
3719
- }), children: jsx("div", { className: twMerge("w-full", fileNodes.length > 0 ? "min-h-[400px]" : "min-h-14"), children: jsx(FileContentView, { fileNodes, onSelectNode: nodeProps.onSelectNode, onRenameNode: nodeProps.onRenameNode, onDuplicateNode: nodeProps.onDuplicateNode, onDeleteNode: nodeProps.onDeleteNode, isAllowedToCreateDocuments: nodeProps.isAllowedToCreateDocuments }) }) })] });
3749
+ }), children: jsx("div", { className: twMerge("w-full", fileNodes.length > 0 ? "min-h-[400px]" : "min-h-14"), children: jsx(FileContentView, { fileNodes, ...fileCallbacks, isAllowedToCreateDocuments: nodeProps.isAllowedToCreateDocuments }) }) })] });
3720
3750
  }
3721
3751
  function Editor(props) {
3722
3752
  const { document: document2, dispatch, className, children } = props;
@@ -1,8 +1,8 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-loader-Cp_C_kSQ.js","assets/main.Hm4UID1Z.js","assets/app-loader-Bnp0H-wa.css"])))=>i.map(i=>d[i]);
2
- import { _ as __vitePreload } from "./main.Hm4UID1Z.js";
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-loader-Be1urgPw.js","assets/main.BvYgkrO6.js","assets/app-loader-DC8DXqh9.css"])))=>i.map(i=>d[i]);
2
+ import { _ as __vitePreload } from "./main.BvYgkrO6.js";
3
3
  import { createRoot } from "react-dom/client";
4
4
  async function renderApp(element) {
5
- const AppLoader = await __vitePreload(() => import("./app-loader-Cp_C_kSQ.js").then((n) => n.c9), true ? __vite__mapDeps([0,1,2]) : void 0);
5
+ const AppLoader = await __vitePreload(() => import("./app-loader-Be1urgPw.js").then((n) => n.c9), true ? __vite__mapDeps([0,1,2]) : void 0);
6
6
  createRoot(element).render(AppLoader.default);
7
7
  }
8
8
  const AppElement = document.getElementById("app");